TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelIntlRateUpdateRequest req = new XhotelIntlRateUpdateRequest();
XhotelIntlRateUpdateRequest.UpdateRateParam obj1 = new XhotelIntlRateUpdateRequest.UpdateRateParam();
List<XhotelIntlRateUpdateRequest.UpdateRateDo> list3 = new ArrayList<XhotelIntlRateUpdateRequest.UpdateRateDo>();
XhotelIntlRateUpdateRequest.UpdateRateDo obj4 = new XhotelIntlRateUpdateRequest.UpdateRateDo();
list3.add(obj4);
List<XhotelIntlRateUpdateRequest.CheckDateDo> list7 = new ArrayList<XhotelIntlRateUpdateRequest.CheckDateDo>();
XhotelIntlRateUpdateRequest.CheckDateDo obj8 = new XhotelIntlRateUpdateRequest.CheckDateDo();
list7.add(obj8);
obj8.setCheckOut(StringUtils.parseDateTime("2020-03-02 00:00:00"));
obj8.setCheckIn(StringUtils.parseDateTime("2020-03-03 00:00:00"));
list5.setCheckDateDOList(list7);
obj4.setAdults(2L);
obj4.setOutHid("423229");
obj4.setChildren(2L);
obj4.setAges("2|2");
obj1.setUpdateRateDOList(list3);
obj1.setExpireTime(StringUtils.parseDateTime("2020-02-20 10:10:10"));
obj1.setSupplier("xxxx");
req.setUpdateRateParam(obj1);
XhotelIntlRateUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelIntlRateUpdateRequest req = new XhotelIntlRateUpdateRequest();
XhotelIntlRateUpdateRequest.UpdateRateParamDomain obj1 = new XhotelIntlRateUpdateRequest.UpdateRateParamDomain();
List<XhotelIntlRateUpdateRequest.UpdateRateDoDomain> list3 = new List<XhotelIntlRateUpdateRequest.UpdateRateDoDomain>();
XhotelIntlRateUpdateRequest.UpdateRateDoDomain obj4 = new XhotelIntlRateUpdateRequest.UpdateRateDoDomain();
list3.Add(obj4);
List<XhotelIntlRateUpdateRequest.CheckDateDoDomain> list6 = new List<XhotelIntlRateUpdateRequest.CheckDateDoDomain>();
XhotelIntlRateUpdateRequest.CheckDateDoDomain obj7 = new XhotelIntlRateUpdateRequest.CheckDateDoDomain();
list6.Add(obj7);
obj7.CheckOut = DateTime.Parse(2020-03-02 00:00:00");
obj7.CheckIn = DateTime.Parse(2020-03-03 00:00:00");
obj4.CheckDateDOList= list6;
obj4.Adults = 2L;
obj4.OutHid = "423229";
obj4.Children = 2L;
obj4.Ages = "2|2";
obj1.UpdateRateDOList= list3;
obj1.ExpireTime = DateTime.Parse(2020-02-20 10:10:10");
obj1.Supplier = "xxxx";
req.UpdateRateParam_ = obj1;
XhotelIntlRateUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelIntlRateUpdateRequest;
$update_rate_param = new UpdateRateParam;
$update_rate_d_o_list = new UpdateRateDo;
$check_date_d_o_list = new CheckDateDo;
$check_date_d_o_list->check_out="2020-03-02 00:00:00";
$check_date_d_o_list->check_in="2020-03-03 00:00:00";
$update_rate_d_o_list->check_date_d_o_list = $check_date_d_o_list;
$update_rate_d_o_list->adults="2";
$update_rate_d_o_list->out_hid="423229";
$update_rate_d_o_list->children="2";
$update_rate_d_o_list->ages="2|2";
$update_rate_param->update_rate_d_o_list = $update_rate_d_o_list;
$update_rate_param->expire_time="2020-02-20 10:10:10";
$update_rate_param->supplier="xxxx";
$req->setUpdateRateParam(json_encode($update_rate_param));
$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.intl.rate.update' \
-d 'partner_id=apidoc' \
-d 'session=65975d96-89f6-465f-8810-f2d03a9955be' \
-d 'sign=4BFB7BED9B8DAEA835A5606DEC0FA1F0' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-04+01%3A30%3A12' \
-d 'v=2.0' \
-d 'update_rate_param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelIntlRateUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.update_rate_param=""
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.intl.rate.update");
add_param(pRequest,"update_rate_param","数据结构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.xhotel.intl.rate.update', {
'update_rate_param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})