TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripAslanAtkfOrderQuerybypnrRequest req = new AlitripAslanAtkfOrderQuerybypnrRequest();
AlitripAslanAtkfOrderQuerybypnrRequest.QueryOrderByPnrRq obj1 = new AlitripAslanAtkfOrderQuerybypnrRequest.QueryOrderByPnrRq();
obj1.setBuyPnr("JI32IO");
obj1.setOffice("SHA384");
List<AlitripAslanAtkfOrderQuerybypnrRequest.PassengerInfo> list3 = new ArrayList<AlitripAslanAtkfOrderQuerybypnrRequest.PassengerInfo>();
AlitripAslanAtkfOrderQuerybypnrRequest.PassengerInfo obj4 = new AlitripAslanAtkfOrderQuerybypnrRequest.PassengerInfo();
list3.add(obj4);
obj4.setCertNo("1231231");
obj4.setName("name");
obj1.setPassengers(list3);
List<AlitripAslanAtkfOrderQuerybypnrRequest.SegmentInfo> list6 = new ArrayList<AlitripAslanAtkfOrderQuerybypnrRequest.SegmentInfo>();
AlitripAslanAtkfOrderQuerybypnrRequest.SegmentInfo obj7 = new AlitripAslanAtkfOrderQuerybypnrRequest.SegmentInfo();
list6.add(obj7);
obj7.setAirline("CA");
obj7.setArrAirport("pek");
obj7.setArrDate(StringUtils.parseDateTime("2017-10-23 10:00:00"));
obj7.setCabin("Y");
obj7.setDepAirport("sha");
obj7.setDepDate(StringUtils.parseDateTime("2017-10-23 10:00:00"));
obj7.setFlightNo("CA123");
obj7.setNeedReturn(false);
obj1.setSegments(list6);
req.setParamQueryOrderByPnrRQ(obj1);
AlitripAslanAtkfOrderQuerybypnrResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripAslanAtkfOrderQuerybypnrRequest req = new AlitripAslanAtkfOrderQuerybypnrRequest();
AlitripAslanAtkfOrderQuerybypnrRequest.QueryOrderByPnrRqDomain obj1 = new AlitripAslanAtkfOrderQuerybypnrRequest.QueryOrderByPnrRqDomain();
obj1.BuyPnr = "JI32IO";
obj1.Office = "SHA384";
List<AlitripAslanAtkfOrderQuerybypnrRequest.PassengerInfoDomain> list3 = new List<AlitripAslanAtkfOrderQuerybypnrRequest.PassengerInfoDomain>();
AlitripAslanAtkfOrderQuerybypnrRequest.PassengerInfoDomain obj4 = new AlitripAslanAtkfOrderQuerybypnrRequest.PassengerInfoDomain();
list3.Add(obj4);
obj4.CertNo = "1231231";
obj4.Name = "name";
obj1.Passengers= list3;
List<AlitripAslanAtkfOrderQuerybypnrRequest.SegmentInfoDomain> list6 = new List<AlitripAslanAtkfOrderQuerybypnrRequest.SegmentInfoDomain>();
AlitripAslanAtkfOrderQuerybypnrRequest.SegmentInfoDomain obj7 = new AlitripAslanAtkfOrderQuerybypnrRequest.SegmentInfoDomain();
list6.Add(obj7);
obj7.Airline = "CA";
obj7.ArrAirport = "pek";
obj7.ArrDate = DateTime.Parse(2017-10-23 10:00:00");
obj7.Cabin = "Y";
obj7.DepAirport = "sha";
obj7.DepDate = DateTime.Parse(2017-10-23 10:00:00");
obj7.FlightNo = "CA123";
obj7.NeedReturn = false;
obj1.Segments= list6;
req.ParamQueryOrderByPnrRQ_ = obj1;
AlitripAslanAtkfOrderQuerybypnrResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripAslanAtkfOrderQuerybypnrRequest;
$param_query_order_by_pnr_r_q = new QueryOrderByPnrRq;
$param_query_order_by_pnr_r_q->buy_pnr="JI32IO";
$param_query_order_by_pnr_r_q->office="SHA384";
$passengers = new PassengerInfo;
$passengers->cert_no="1231231";
$passengers->name="name";
$param_query_order_by_pnr_r_q->passengers = $passengers;
$segments = new SegmentInfo;
$segments->airline="CA";
$segments->arr_airport="pek";
$segments->arr_date="2017-10-23 10:00:00";
$segments->cabin="Y";
$segments->dep_airport="sha";
$segments->dep_date="2017-10-23 10:00:00";
$segments->flight_no="CA123";
$segments->need_return="false";
$param_query_order_by_pnr_r_q->segments = $segments;
$req->setParamQueryOrderByPnrRQ(json_encode($param_query_order_by_pnr_r_q));
$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=alitrip.aslan.atkf.order.querybypnr' \
-d 'partner_id=apidoc' \
-d 'session=af930ae3-2476-4596-9e5a-aab47ba5d869' \
-d 'sign=E98E13BE9AF318416DF14B42D24DC3E7' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+17%3A45%3A15' \
-d 'v=2.0' \
-d 'param_query_order_by_pnr_r_q=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripAslanAtkfOrderQuerybypnrRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_query_order_by_pnr_r_q=""
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,"alitrip.aslan.atkf.order.querybypnr");
add_param(pRequest,"param_query_order_by_pnr_r_q","数据结构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('alitrip.aslan.atkf.order.querybypnr', {
'param_query_order_by_pnr_r_q':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})