TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderInvoiceSettleSearchRequest req = new XhotelOrderInvoiceSettleSearchRequest();
req.setTo(StringUtils.parseDateTime("2017-07-24 00:00:00"));
req.setHid(12121L);
req.setPageSize(20L);
req.setFrom(StringUtils.parseDateTime("2017-07-24 00:00:00"));
req.setSettleStatus(1L);
req.setDateType(1L);
req.setPage(1L);
req.setHotelName("淘宝酒店");
req.setAccountType(1L);
req.setPayType(1L);
req.setTid(12121L);
req.setHids("1,2,3,4");
XhotelOrderInvoiceSettleSearchResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderInvoiceSettleSearchRequest req = new XhotelOrderInvoiceSettleSearchRequest();
req.To = DateTime.Parse("2017-07-24 00:00:00");
req.Hid = 12121L;
req.PageSize = 20L;
req.From = DateTime.Parse("2017-07-24 00:00:00");
req.SettleStatus = 1L;
req.DateType = 1L;
req.Page = 1L;
req.HotelName = "淘宝酒店";
req.AccountType = 1L;
req.PayType = 1L;
req.Tid = 12121L;
req.Hids = "1,2,3,4";
XhotelOrderInvoiceSettleSearchResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderInvoiceSettleSearchRequest;
$req->setTo("2017-07-24 00:00:00");
$req->setHid("12121");
$req->setPageSize("20");
$req->setFrom("2017-07-24 00:00:00");
$req->setSettleStatus("1");
$req->setDateType("1");
$req->setPage("1");
$req->setHotelName("淘宝酒店");
$req->setAccountType("1");
$req->setPayType("1");
$req->setTid("12121");
$req->setHids("1,2,3,4");
$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.invoice.settle.search' \
-d 'partner_id=apidoc' \
-d 'session=5b416479-a362-4c6f-baff-a4e08b8f27aa' \
-d 'sign=1FBE9F13758272BB6D31D1E41CE37701' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+19%3A58%3A25' \
-d 'v=2.0' \
-d 'account_type=1' \
-d 'date_type=1' \
-d 'from=2017-07-24+00%3A00%3A00' \
-d 'hid=12121' \
-d 'hids=1%2C2%2C3%2C4' \
-d 'hotel_name=%E6%B7%98%E5%AE%9D%E9%85%92%E5%BA%97' \
-d 'page=1' \
-d 'page_size=20' \
-d 'pay_type=1' \
-d 'settle_status=1' \
-d 'tid=12121' \
-d 'to=2017-07-24+00%3A00%3A00'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderInvoiceSettleSearchRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.to="2017-07-24 00:00:00"
req.hid=12121
req.page_size=20
req._from="2017-07-24 00:00:00"
req.settle_status=1
req.date_type=1
req.page=1
req.hotel_name="淘宝酒店"
req.account_type=1
req.pay_type=1
req.tid=12121
req.hids="1,2,3,4"
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.invoice.settle.search");
add_param(pRequest,"to","2017-07-24 00:00:00");
add_param(pRequest,"hid","12121");
add_param(pRequest,"page_size","20");
add_param(pRequest,"from","2017-07-24 00:00:00");
add_param(pRequest,"settle_status","1");
add_param(pRequest,"date_type","1");
add_param(pRequest,"page","1");
add_param(pRequest,"hotel_name","淘宝酒店");
add_param(pRequest,"account_type","1");
add_param(pRequest,"pay_type","1");
add_param(pRequest,"tid","12121");
add_param(pRequest,"hids","1,2,3,4");
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.invoice.settle.search', {
'to':'2017-07-24 00:00:00',
'hid':'12121',
'page_size':'20',
'from':'2017-07-24 00:00:00',
'settle_status':'1',
'date_type':'1',
'page':'1',
'hotel_name':'淘宝酒店',
'account_type':'1',
'pay_type':'1',
'tid':'12121',
'hids':'1,2,3,4'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})