com.eggwifi.data800.sdk
类 EggFlow

java.lang.Object
  继承者 com.eggwifi.data800.sdk.EggFlow

public class EggFlow
extends Object

易哥流量接口处理类。

作者:
HuangYingNing, ZhaoXiaoHai

字段摘要
static String BUY_API
          购买产品的API路径。
static String FIND_ORDER_API
          查找订单的API路径。
static String FIND_PRODUCT_API
          查找产品的API路径。
static String GET_ORDER_API
          获取指定流量产品的API路径。
static String GET_PRODUCT_API
          获取指定流量产品的API路径。
 
构造方法摘要
EggFlow(String url, String appId, String appSecret)
          构造函数。
 
方法摘要
 OrderResponse buy(String productId, String mobile, EggAdcEffectRule effect, String orderId, String callbackUrl)
          订购流量包。
 OrdersResponse findOrders(String mobile, String productId, int pageNo, int pageSize)
          按条件查询多个订单。
 ProductsResponse findProducts()
          查询所有可用流量包。
 ProductsResponse findProducts(String mobile)
          查询可用流量包。
 OrderResponse getOrder(String orderId)
          查找指定id的订单。
 ProductResponse getProduct(String productId)
          获取指定的产品信息。
 ProductResponse getProduct(String mobile, int amount)
          通过手机号和流量包大小获取指定的产品信息。
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

GET_PRODUCT_API

public static final String GET_PRODUCT_API
获取指定流量产品的API路径。

另请参见:
常量字段值

FIND_PRODUCT_API

public static final String FIND_PRODUCT_API
查找产品的API路径。

另请参见:
常量字段值

BUY_API

public static final String BUY_API
购买产品的API路径。

另请参见:
常量字段值

GET_ORDER_API

public static final String GET_ORDER_API
获取指定流量产品的API路径。

另请参见:
常量字段值

FIND_ORDER_API

public static final String FIND_ORDER_API
查找订单的API路径。

另请参见:
常量字段值
构造方法详细信息

EggFlow

public EggFlow(String url,
               String appId,
               String appSecret)
构造函数。

参数:
url - 接口地址。
appId - 应用接入ID。
appSecret - 应用API密钥。
方法详细信息

getProduct

public ProductResponse getProduct(String productId)
获取指定的产品信息。

参数:
productId - 产品ID。
返回:

getProduct

public ProductResponse getProduct(String mobile,
                                  int amount)
通过手机号和流量包大小获取指定的产品信息。

参数:
mobile - 产品适用的手机号。
amount - 流量产品的流量大小,单位为MB。
返回:

findProducts

public ProductsResponse findProducts()
查询所有可用流量包。

返回:

findProducts

public ProductsResponse findProducts(String mobile)
查询可用流量包。

参数:
mobile - 产品适用的手机号,不提供则查询所有可购买的流量包。
返回:

buy

public OrderResponse buy(String productId,
                         String mobile,
                         EggAdcEffectRule effect,
                         String orderId,
                         String callbackUrl)
订购流量包。

参数:
productId - 订购的产品ID(必须)。
mobile - 充值的手机号(必须)。
effect - 流量生效模式(必须)。
orderId - 自定义订单ID(可选,不指定时输入null)。
callbackUrl - 自定义回调地址(可选,不指定时输入null)。
返回:

getOrder

public OrderResponse getOrder(String orderId)
查找指定id的订单。

参数:
orderId -
返回:

findOrders

public OrdersResponse findOrders(String mobile,
                                 String productId,
                                 int pageNo,
                                 int pageSize)
按条件查询多个订单。

参数:
mobile -
productId -
pageNo -
pageSize -
返回:


Copyright © 2015. All rights reserved.