TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelQuotaUpdateRequest req = new XhotelQuotaUpdateRequest();
req.setQuotaType(0L);
req.setUseRoomInventory(false);
req.setGid(12313123L);
req.setQuota(1L);
req.setQuotaNumType(2L);
req.setDates(""2019-10-11 00:00:00"");
req.setRateId(12312313L);
XhotelQuotaUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelQuotaUpdateRequest req = new XhotelQuotaUpdateRequest();
req.QuotaType = 0L;
req.UseRoomInventory = false;
req.Gid = 12313123L;
req.Quota = 1L;
req.QuotaNumType = 2L;
req.Dates = ""2019-10-11 00:00:00"";
req.RateId = 12312313L;
XhotelQuotaUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelQuotaUpdateRequest;
$req->setQuotaType("0");
$req->setUseRoomInventory("false");
$req->setGid("12313123");
$req->setQuota("1");
$req->setQuotaNumType("2");
$req->setDates("[\"2019-10-11 00:00:00\"]");
$req->setRateId("12312313");
$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.quota.update' \
-d 'partner_id=apidoc' \
-d 'session=8a1a8c9e-b9ee-4a61-b25a-1bec8109d322' \
-d 'sign=D41515FDD8F8D064B961ED58719F2ACC' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+17%3A36%3A51' \
-d 'v=2.0' \
-d 'dates=%222019-10-11+00%3A00%3A00%22' \
-d 'gid=12313123' \
-d 'quota=1' \
-d 'quota_num_type=2' \
-d 'quota_type=0' \
-d 'rate_id=12312313' \
-d 'use_room_inventory=false'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelQuotaUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.quota_type=0
req.use_room_inventory=false
req.gid=12313123
req.quota=1
req.quota_num_type=2
req.dates="["2019-10-11 00:00:00"]"
req.rate_id=12312313
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.quota.update");
add_param(pRequest,"quota_type","0");
add_param(pRequest,"use_room_inventory","false");
add_param(pRequest,"gid","12313123");
add_param(pRequest,"quota","1");
add_param(pRequest,"quota_num_type","2");
add_param(pRequest,"dates",""2019-10-11 00:00:00"");
add_param(pRequest,"rate_id","12312313");
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.quota.update', {
'quota_type':'0',
'use_room_inventory':'false',
'gid':'12313123',
'quota':'1',
'quota_num_type':'2',
'dates':'"2019-10-11 00:00:00"',
'rate_id':'12312313'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})