开发者社区> 问答> 正文

订购记录查询接口(QueryOrderList)



订购记录查询接口(QueryOrderList)



定向流量整体流程及操作步骤


定向流量整体流程及操作步骤

参数说明



入参列表

参数名称参数类型必填与否样例取值参数说明
PhoneNumberString必填13010112022订购手机号


出参列表

出参名称出参类型样例取值参数说明
RequestIdString8906582E-6722请求ID
CodeStringOK状态码-返回OK代表请求成功,其他错误码详见错误码列表
MessageString请求成功状态码的描述
dcdpOrderDetailDTOsList详见下表示例订购关系列表


DcdpOrderDetailDTO示例

出参名称出参类型样例取值参数说明
InstanceIdString123456实例ID
SidLong1免流服务ID
GradeIdString1档位ID
orderAppNameStringXXXX发起订购的app名称
freeFlowAppNameStringXXXX,XXX,XXX免流app列表,用逗号分隔
expireTimeString2017-09-01 12:00:00过期时间


技术对接步骤



1:下载SDK工具包


SDK工具包中一共包含了2个类库,一个aliyun-java-sdk-core包,另外一个是alicom-dycdp-api包,将这两个包执行mvn package命令或者mvn deploy命令打包出相应的jar包,添加到工程类库中依赖使用。
SDK&DEMO[ 下载地址]

2: 编写样例程序

  1. [backcolor=transparent]        [backcolor=transparent]//设置访问超时时间
  2. [backcolor=transparent]        [backcolor=transparent]System[backcolor=transparent].[backcolor=transparent]setProperty[backcolor=transparent]([backcolor=transparent]"sun.net.client.defaultConnectTimeout"[backcolor=transparent],[backcolor=transparent] [backcolor=transparent]"10000"[backcolor=transparent]);
  3. [backcolor=transparent]        [backcolor=transparent]System[backcolor=transparent].[backcolor=transparent]setProperty[backcolor=transparent]([backcolor=transparent]"sun.net.client.defaultReadTimeout"[backcolor=transparent],[backcolor=transparent] [backcolor=transparent]"10000"[backcolor=transparent]);
  4. [backcolor=transparent]        [backcolor=transparent]//云通信产品-流量服务API产品名称
  5. [backcolor=transparent]        [backcolor=transparent]final[backcolor=transparent] [backcolor=transparent]String[backcolor=transparent] product [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]"Dycdpapi"[backcolor=transparent];
  6. [backcolor=transparent]        [backcolor=transparent]//云通信产品-流量服务API产品域名
  7. [backcolor=transparent]        [backcolor=transparent]final[backcolor=transparent] [backcolor=transparent]String[backcolor=transparent] domain [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]"dycdpapi.aliyuncs.com"[backcolor=transparent];
  8. [backcolor=transparent]        [backcolor=transparent]//需要替换成你的AK信息
  9. [backcolor=transparent]        [backcolor=transparent]final[backcolor=transparent] [backcolor=transparent]String[backcolor=transparent] accessKeyId [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]"yourAccessKeyId"[backcolor=transparent];
  10. [backcolor=transparent]        [backcolor=transparent]final[backcolor=transparent] [backcolor=transparent]String[backcolor=transparent] accessKeySecret [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]"yourAccessKeySecret"[backcolor=transparent];
  11. [backcolor=transparent]        [backcolor=transparent]//初始化acsClient
  12. [backcolor=transparent]        [backcolor=transparent]IClientProfile[backcolor=transparent] profile [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]DefaultProfile[backcolor=transparent].[backcolor=transparent]getProfile[backcolor=transparent]([backcolor=transparent]"cn-hangzhou"[backcolor=transparent],[backcolor=transparent] accessKeyId[backcolor=transparent],[backcolor=transparent] accessKeySecret[backcolor=transparent]);
  13. [backcolor=transparent]        [backcolor=transparent]DefaultProfile[backcolor=transparent].[backcolor=transparent]addEndpoint[backcolor=transparent]([backcolor=transparent]"cn-hangzhou"[backcolor=transparent],[backcolor=transparent] [backcolor=transparent]"cn-hangzhou"[backcolor=transparent],[backcolor=transparent] product[backcolor=transparent],[backcolor=transparent] domain[backcolor=transparent]);
  14. [backcolor=transparent]        [backcolor=transparent]IAcsClient[backcolor=transparent] acsClient [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]new[backcolor=transparent] [backcolor=transparent]DefaultAcsClient[backcolor=transparent]([backcolor=transparent]profile[backcolor=transparent]);
  15. [backcolor=transparent]        [backcolor=transparent]//组装请求对象
  16. [backcolor=transparent]        [backcolor=transparent]QueryOrderListRequest[backcolor=transparent] request [backcolor=transparent]=[backcolor=transparent] [backcolor=transparent]new[backcolor=transparent] [backcolor=transparent]QueryOrderListRequest[backcolor=transparent]();
  17. [backcolor=transparent]        [backcolor=transparent]//订购的号码
  18. [backcolor=transparent]        request[backcolor=transparent].[backcolor=transparent]setPhoneNumber[backcolor=transparent]([backcolor=transparent]"1300000000"[backcolor=transparent]);
  19. [backcolor=transparent]        [backcolor=transparent]//请求失败这里会抛异常
  20. [backcolor=transparent]        [backcolor=transparent]QueryOrderListResponse[backcolor=transparent] acsResponse [backcolor=transparent]=[backcolor=transparent] acsClient[backcolor=transparent].[backcolor=transparent]getAcsResponse[backcolor=transparent]([backcolor=transparent]request[backcolor=transparent]);
  21. [backcolor=transparent]        [backcolor=transparent]if[backcolor=transparent]([backcolor=transparent]acsResponse[backcolor=transparent].[backcolor=transparent]getCode[backcolor=transparent]()!=[backcolor=transparent] [backcolor=transparent]null[backcolor=transparent] [backcolor=transparent]&&[backcolor=transparent] acsResponse[backcolor=transparent].[backcolor=transparent]getCode[backcolor=transparent]().[backcolor=transparent]equals[backcolor=transparent]([backcolor=transparent]"OK"[backcolor=transparent]))[backcolor=transparent] [backcolor=transparent]{
  22. [backcolor=transparent]                 [backcolor=transparent]//请求成功
  23. [backcolor=transparent]        [backcolor=transparent]}


错误码列表

Code描述
OK请求成功
isv.DXLL_NOT_SID_INFO定向流量免流id不存在
isv.MOBILE_NUMBER_ILLEGAL手机号码格式错误
isv.RES_OWNER_ID_UNKNOWN找不到资源归属的阿里云ID
isv.PRODUCT_UN_SUBSCRIPT未开通云通信产品的阿里云客户
isv.SYSTEM_ERROR接入层系统异常

展开
收起
猫饭先生 2017-10-25 14:06:18 1931 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载