TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripIeAgentOrderHkRequest req = new AlitripIeAgentOrderHkRequest();
req.setAgentId(8888L);
AlitripIeAgentOrderHkRequest.IeWriteBackPnrVO obj1 = new AlitripIeAgentOrderHkRequest.IeWriteBackPnrVO();
obj1.setBookOrderId(123L);
List<AlitripIeAgentOrderHkRequest.IeBookPnrVo> list3 = new ArrayList<AlitripIeAgentOrderHkRequest.IeBookPnrVo>();
AlitripIeAgentOrderHkRequest.IeBookPnrVo obj4 = new AlitripIeAgentOrderHkRequest.IeBookPnrVo();
list3.add(obj4);
obj4.setId(2000000L);
obj4.setPnrNo("VNPPPP");
obj4.setPnrType("demo");
obj1.setBookPnrVos(list3);
req.setWriteBackPnrVO(obj1);
AlitripIeAgentOrderHkResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripIeAgentOrderHkRequest req = new AlitripIeAgentOrderHkRequest();
req.AgentId = 8888L;
AlitripIeAgentOrderHkRequest.IeWriteBackPnrVODomain obj1 = new AlitripIeAgentOrderHkRequest.IeWriteBackPnrVODomain();
obj1.BookOrderId = 123L;
List<AlitripIeAgentOrderHkRequest.IeBookPnrVoDomain> list3 = new List<AlitripIeAgentOrderHkRequest.IeBookPnrVoDomain>();
AlitripIeAgentOrderHkRequest.IeBookPnrVoDomain obj4 = new AlitripIeAgentOrderHkRequest.IeBookPnrVoDomain();
list3.Add(obj4);
obj4.Id = 2000000L;
obj4.PnrNo = "VNPPPP";
obj4.PnrType = "demo";
obj1.BookPnrVos= list3;
req.WriteBackPnrVO_ = obj1;
AlitripIeAgentOrderHkResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripIeAgentOrderHkRequest;
$req->setAgentId("8888");
$write_back_pnr_v_o = new IeWriteBackPnrVO;
$write_back_pnr_v_o->book_order_id="123";
$book_pnr_vos = new IeBookPnrVo;
$book_pnr_vos->id="2000000";
$book_pnr_vos->pnr_no="VNPPPP";
$book_pnr_vos->pnr_type="demo";
$write_back_pnr_v_o->book_pnr_vos = $book_pnr_vos;
$req->setWriteBackPnrVO(json_encode($write_back_pnr_v_o));
$resp = $c->execute($req, $sessionKey);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=taobao.alitrip.ie.agent.order.hk' \
-d 'partner_id=apidoc' \
-d 'session=c6ba7a9b-1800-4337-a79a-10ecd73cc76b' \
-d 'sign=27F5195C5485FE4FA48AC84C6E2523FA' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+17%3A49%3A16' \
-d 'v=2.0' \
-d 'agent_id=8888' \
-d 'write_back_pnr_v_o=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripIeAgentOrderHkRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.agent_id=8888
req.write_back_pnr_v_o=""
try:
resp= req.getResponse(sessionkey)
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.alitrip.ie.agent.order.hk");
add_param(pRequest,"agent_id","8888");
add_param(pRequest,"write_back_pnr_v_o","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,sessionKey);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.alitrip.ie.agent.order.hk', {
'agent_id':'8888',
'write_back_pnr_v_o':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})