|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectcom.eggwifi.data800.sdk.EggFlow
public class EggFlow
易哥流量接口处理类。
| 字段摘要 | |
|---|---|
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路径。 |
static String |
URL
正式服务器URL。 |
static String |
URL_TEST
测试服务器URL。 |
| 构造方法摘要 | |
|---|---|
EggFlow(String url,
String appId,
String appSecret)
构造函数。 |
|
| 方法摘要 | |
|---|---|
OrderResponse |
buy(int amount,
Scope scope,
String mobile,
EggAdcEffectRule effect,
String orderId,
String callbackUrl)
订购流量包。 |
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 |
| 字段详细信息 |
|---|
public static final String URL
public static final String URL_TEST
public static final String GET_PRODUCT_API
public static final String FIND_PRODUCT_API
public static final String BUY_API
public static final String GET_ORDER_API
public static final String FIND_ORDER_API
| 构造方法详细信息 |
|---|
public EggFlow(String url,
String appId,
String appSecret)
url - 接口地址。正式生产使用 EggFlow.URL,测试时使用 EggFlow.URL_TEST。注意正式生产用服务器会限制只允许合法IP地址接入,需要在后台正确配置IP地址。appId - 应用接入ID。接入商提供,不可修改。注意正式生产用服务器与测试服务器上的值可能不一样,需要配对使用。appSecret - 应用API密钥。可通过后台系统自行修改。| 方法详细信息 |
|---|
public ProductResponse getProduct(String productId)
productId - 产品ID。
public ProductResponse getProduct(String mobile,
int amount)
mobile - 产品适用的手机号。amount - 流量产品的流量大小,单位为MB。
public ProductsResponse findProducts()
public ProductsResponse findProducts(String mobile)
mobile - 产品适用的手机号,不提供则查询所有可购买的流量包。
public OrderResponse buy(String productId,
String mobile,
EggAdcEffectRule effect,
String orderId,
String callbackUrl)
productId - 订购的产品ID(必须)。mobile - 充值的手机号(必须)。effect - 流量生效模式(必须)。orderId - 自定义订单ID(可选,不指定时输入null)。callbackUrl - 自定义回调地址(可选,不指定时输入null)。
public OrderResponse buy(int amount,
Scope scope,
String mobile,
EggAdcEffectRule effect,
String orderId,
String callbackUrl)
amount - 订购的流量包MB数量(必须)。scope - 适用范围(必需)。mobile - 充值的手机号(必须)。effect - 流量生效模式(必须)。orderId - 自定义订单ID(可选,不指定时输入null)。callbackUrl - 自定义回调地址(可选,不指定时输入null)。
public OrderResponse getOrder(String orderId)
orderId -
public OrdersResponse findOrders(String mobile,
String productId,
int pageNo,
int pageSize)
mobile - productId - pageNo - pageSize -
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||