TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderStatementGetRequest req = new XhotelOrderStatementGetRequest();
req.setOrderTids("123,3434,4565");
req.setPageSize(500L);
req.setStart(0L);
req.setDateType(2L);
req.setTo(StringUtils.parseDateTime("2015-09-09 22:22:22"));
req.setFrom(StringUtils.parseDateTime("2015-09-09 22:22:22"));
req.setTid(122222L);
req.setHotelCode("333");
req.setVendor("taobao");
XhotelOrderStatementGetResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderStatementGetRequest req = new XhotelOrderStatementGetRequest();
req.OrderTids = "123,3434,4565";
req.PageSize = 500L;
req.Start = 0L;
req.DateType = 2L;
req.To = DateTime.Parse("2015-09-09 22:22:22");
req.From = DateTime.Parse("2015-09-09 22:22:22");
req.Tid = 122222L;
req.HotelCode = "333";
req.Vendor = "taobao";
XhotelOrderStatementGetResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderStatementGetRequest;
$req->setOrderTids("123,3434,4565");
$req->setPageSize("500");
$req->setStart("0");
$req->setDateType("2");
$req->setTo("2015-09-09 22:22:22");
$req->setFrom("2015-09-09 22:22:22");
$req->setTid("122222");
$req->setHotelCode("333");
$req->setVendor("taobao");
$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.xhotel.order.statement.get' \
-d 'partner_id=apidoc' \
-d 'session=5e45498d-bc73-40e6-a9ce-6748f166557a' \
-d 'sign=0D49E8EE757DE485E5284D513556CD06' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+19%3A54%3A03' \
-d 'v=2.0' \
-d 'date_type=2' \
-d 'from=2015-09-09+22%3A22%3A22' \
-d 'hotel_code=333' \
-d 'order_tids=123%2C3434%2C4565' \
-d 'page_size=500' \
-d 'start=0' \
-d 'tid=122222' \
-d 'to=2015-09-09+22%3A22%3A22' \
-d 'vendor=taobao'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderStatementGetRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.order_tids="123,3434,4565"
req.page_size=500
req.start=0
req.date_type=2
req.to="2015-09-09 22:22:22"
req._from="2015-09-09 22:22:22"
req.tid=122222
req.hotel_code="333"
req.vendor="taobao"
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.xhotel.order.statement.get");
add_param(pRequest,"order_tids","123,3434,4565");
add_param(pRequest,"page_size","500");
add_param(pRequest,"start","0");
add_param(pRequest,"date_type","2");
add_param(pRequest,"to","2015-09-09 22:22:22");
add_param(pRequest,"from","2015-09-09 22:22:22");
add_param(pRequest,"tid","122222");
add_param(pRequest,"hotel_code","333");
add_param(pRequest,"vendor","taobao");
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.xhotel.order.statement.get', {
'order_tids':'123,3434,4565',
'page_size':'500',
'start':'0',
'date_type':'2',
'to':'2015-09-09 22:22:22',
'from':'2015-09-09 22:22:22',
'tid':'122222',
'hotel_code':'333',
'vendor':'taobao'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})