TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelMultiplerateUpdateRequest req = new XhotelMultiplerateUpdateRequest();
req.setRpid(123L);
req.setStatus(123L);
req.setOutRid("123");
req.setRateSwitchCal("[{\"date\":\"yyyy-MM-dd\",\"rate_status\":1,\"checkin_status\":1,\"checkout_status\":1},{\"date\":\"yyyy-MM-dd\",\"rate_status\":0,\"checkin_status\":1,\"checkout_status\":1}]");
req.setLengthofstay(1L);
req.setOccupancy(1L);
req.setCurrencyCode("CNY");
req.setRatePlanCode("123");
req.setInventoryPrice("{\"use_room_inventory\":false,\"inventory_price\":[{\"date\":2015-07-28,\"quota\":11,\"price\":150,\"tax\":100,\"addBed\":2200,\"addPerson\":2000},{\"date\":2015-07-29,\"quota\":10,\"price\":200,\"tax\":100,\"addBed\":1200,\"addPerson\":2000}]}");
req.setName("aaa");
req.setGid(123L);
req.setVendor("taobao");
req.setChildnum(1L);
req.setInfantnum(1L);
req.setLockEndTime("2016-07-16 00:00:00");
req.setLockStartTime("2016-07-15 00:00:00");
req.setOnlineBookingBindingInfo("[{\"itemId\":1234235235,\"skuId\":1234235235,\"priceRuleInfoList\":[{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"}]},{\"itemId\":1234235235,\"skuId\":1234235235,\"priceRuleInfoList\":[{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"}]}]");
req.setBreakfast(1L);
req.setCancelPolicy("{\"cancelPolicyType\":1}|{\"cancelPolicyType\":2}|{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}|{\"cancelPolicyType\":5,\"policyInfo\":{\"timeBefore\":6}}|{\"cancelPolicyType\":6,\"policyInfo\":{\"14\":1}}");
req.setBreakfastCal("[{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"breakfast_count\":0},{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"breakfast_count\":1}]");
req.setCancelPolicyCal("[{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"cancel_policy\":{\"cancelPolicyType\":1} },{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"cancel_policy\":{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}}]");
req.setHotelXitemInfos("[{\"actionType\":\"BOUND\",\"outXcode\":\"123456\",\"subTypeCode\":\"40000_105\",\"shortName\":\"延时14点退房\",\"time\":\"00:00-23:59\",\"value\":1200,\"itemDesc\":\"可延时到14点退房\",\"dimensionType\":1,\"picList\":[],\"adultCount\":1,\"childCount\":1,\"itemLimit\":\"\",\"checkInStart\":\"2023-07-13 00:00:01\",\"checkInEnd\":\"2023-07-13 00:00:01\",\"bookStartTime\":\"2023-07-13 00:00:01\",\"bookStartEnd\":\"2023-07-13 00:00:01\",\"featureDetail\":\"\"}]");
XhotelMultiplerateUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelMultiplerateUpdateRequest req = new XhotelMultiplerateUpdateRequest();
req.Rpid = 123L;
req.Status = 123L;
req.OutRid = "123";
req.RateSwitchCal = "[{\"date\":\"yyyy-MM-dd\",\"rate_status\":1,\"checkin_status\":1,\"checkout_status\":1},{\"date\":\"yyyy-MM-dd\",\"rate_status\":0,\"checkin_status\":1,\"checkout_status\":1}]";
req.Lengthofstay = 1L;
req.Occupancy = 1L;
req.CurrencyCode = "CNY";
req.RatePlanCode = "123";
req.InventoryPrice = "{\"use_room_inventory\":false,\"inventory_price\":[{\"date\":2015-07-28,\"quota\":11,\"price\":150,\"tax\":100,\"addBed\":2200,\"addPerson\":2000},{\"date\":2015-07-29,\"quota\":10,\"price\":200,\"tax\":100,\"addBed\":1200,\"addPerson\":2000}]}";
req.Name = "aaa";
req.Gid = 123L;
req.Vendor = "taobao";
req.Childnum = 1L;
req.Infantnum = 1L;
req.LockEndTime = "2016-07-16 00:00:00";
req.LockStartTime = "2016-07-15 00:00:00";
req.OnlineBookingBindingInfo = "[{\"itemId\":1234235235,\"skuId\":1234235235,\"priceRuleInfoList\":[{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"}]},{\"itemId\":1234235235,\"skuId\":1234235235,\"priceRuleInfoList\":[{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"}]}]";
req.Breakfast = 1L;
req.CancelPolicy = "{\"cancelPolicyType\":1}|{\"cancelPolicyType\":2}|{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}|{\"cancelPolicyType\":5,\"policyInfo\":{\"timeBefore\":6}}|{\"cancelPolicyType\":6,\"policyInfo\":{\"14\":1}}";
req.BreakfastCal = "[{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"breakfast_count\":0},{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"breakfast_count\":1}]";
req.CancelPolicyCal = "[{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"cancel_policy\":{\"cancelPolicyType\":1} },{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"cancel_policy\":{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}}]";
req.HotelXitemInfos = "[{\"actionType\":\"BOUND\",\"outXcode\":\"123456\",\"subTypeCode\":\"40000_105\",\"shortName\":\"延时14点退房\",\"time\":\"00:00-23:59\",\"value\":1200,\"itemDesc\":\"可延时到14点退房\",\"dimensionType\":1,\"picList\":[],\"adultCount\":1,\"childCount\":1,\"itemLimit\":\"\",\"checkInStart\":\"2023-07-13 00:00:01\",\"checkInEnd\":\"2023-07-13 00:00:01\",\"bookStartTime\":\"2023-07-13 00:00:01\",\"bookStartEnd\":\"2023-07-13 00:00:01\",\"featureDetail\":\"\"}]";
XhotelMultiplerateUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelMultiplerateUpdateRequest;
$req->setRpid("123");
$req->setStatus("123");
$req->setOutRid("123");
$req->setRateSwitchCal("[{\"date\":\"yyyy-MM-dd\",\"rate_status\":1,\"checkin_status\":1,\"checkout_status\":1},{\"date\":\"yyyy-MM-dd\",\"rate_status\":0,\"checkin_status\":1,\"checkout_status\":1}]");
$req->setLengthofstay("1");
$req->setOccupancy("1");
$req->setCurrencyCode("CNY");
$req->setRatePlanCode("123");
$req->setInventoryPrice("{\"use_room_inventory\":false,\"inventory_price\":[{\"date\":2015-07-28,\"quota\":11,\"price\":150,\"tax\":100,\"addBed\":2200,\"addPerson\":2000},{\"date\":2015-07-29,\"quota\":10,\"price\":200,\"tax\":100,\"addBed\":1200,\"addPerson\":2000}]}");
$req->setName("aaa");
$req->setGid("123");
$req->setVendor("taobao");
$req->setChildnum("1");
$req->setInfantnum("1");
$req->setLockEndTime("2016-07-16 00:00:00");
$req->setLockStartTime("2016-07-15 00:00:00");
$req->setOnlineBookingBindingInfo("[{\"itemId\":1234235235,\"skuId\":1234235235,\"priceRuleInfoList\":[{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"}]},{\"itemId\":1234235235,\"skuId\":1234235235,\"priceRuleInfoList\":[{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"}]}]");
$req->setBreakfast("1");
$req->setCancelPolicy("{\"cancelPolicyType\":1}|{\"cancelPolicyType\":2}|{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}|{\"cancelPolicyType\":5,\"policyInfo\":{\"timeBefore\":6}}|{\"cancelPolicyType\":6,\"policyInfo\":{\"14\":1}}");
$req->setBreakfastCal("[{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"breakfast_count\":0},{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"breakfast_count\":1}]");
$req->setCancelPolicyCal("[{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"cancel_policy\":{\"cancelPolicyType\":1} },{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"cancel_policy\":{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}}]");
$req->setHotelXitemInfos("[{\"actionType\":\"BOUND\",\"outXcode\":\"123456\",\"subTypeCode\":\"40000_105\",\"shortName\":\"延时14点退房\",\"time\":\"00:00-23:59\",\"value\":1200,\"itemDesc\":\"可延时到14点退房\",\"dimensionType\":1,\"picList\":[],\"adultCount\":1,\"childCount\":1,\"itemLimit\":\"\",\"checkInStart\":\"2023-07-13 00:00:01\",\"checkInEnd\":\"2023-07-13 00:00:01\",\"bookStartTime\":\"2023-07-13 00:00:01\",\"bookStartEnd\":\"2023-07-13 00:00:01\",\"featureDetail\":\"\"}]");
$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.multiplerate.update' \
-d 'partner_id=apidoc' \
-d 'session=e522c68f-9604-4ba4-9fcb-c5fabe602ed5' \
-d 'sign=D786579FCF94A75603E92F048F6F680B' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+17%3A30%3A48' \
-d 'v=2.0' \
-d 'breakfast=1' \
-d 'breakfast_cal=%7B%22date%22%3A%22yyyy-MM-dd%22%2C%22startDate%22%3A%22yyyy-MM-dd%22%2C%22endDate%22%3A%22yyyy-MM-dd%22%2C%22breakfast_count%22%3A0%7D%2C%7B%22date%22%3A%22yyyy-MM-dd%22%2C%22startDate%22%3A%22yyyy-MM-dd%22%2C%22endDate%22%3A%22yyyy-MM-dd%22%2C%22breakfast_count%22%3A1%7D' \
-d 'cancel_policy=%7B%5C%22cancelPolicyType%5C%22%3A1%7D%7C%7B%5C%22cancelPolicyType%5C%22%3A2%7D%7C%7B%5C%22cancelPolicyType%5C%22%3A4%2C%5C%22policyInfo%5C%22%3A%7B%5C%2248%5C%22%3A10%2C%5C%2224%5C%22%3A20%7D%7D%7C%7B%5C%22cancelPolicyType%5C%22%3A5%2C%5C%22policyInfo%5C%22%3A%7B%5C%22timeBefore%5C%22%3A6%7D%7D%7C%7B%5C%22cancelPolicyType%5C%22%3A6%2C%5C%22policyInfo%5C%22%3A%7B%5C%2214%5C%22%3A1%7D%7D' \
-d 'cancel_policy_cal=%7B%22date%22%3A%22yyyy-MM-dd%22%2C%22startDate%22%3A%22yyyy-MM-dd%22%2C%22endDate%22%3A%22yyyy-MM-dd%22%2C%22cancel_policy%22%3A%7B%22cancelPolicyType%22%3A1%7D+%7D%2C%7B%22date%22%3A%22yyyy-MM-dd%22%2C%22startDate%22%3A%22yyyy-MM-dd%22%2C%22endDate%22%3A%22yyyy-MM-dd%22%2C%22cancel_policy%22%3A%7B%22cancelPolicyType%22%3A4%2C%22policyInfo%22%3A%7B%2248%22%3A10%2C%2224%22%3A20%7D%7D%7D' \
-d 'childnum=1' \
-d 'currency_code=CNY' \
-d 'gid=123' \
-d 'hotel_xitem_infos=%7B%22actionType%22%3A%22BOUND%22%2C%22outXcode%22%3A%22123456%22%2C%22subTypeCode%22%3A%2240000_105%22%2C%22shortName%22%3A%22%E5%BB%B6%E6%97%B614%E7%82%B9%E9%80%80%E6%88%BF%22%2C%22time%22%3A%2200%3A00-23%3A59%22%2C%22value%22%3A1200%2C%22itemDesc%22%3A%22%E5%8F%AF%E5%BB%B6%E6%97%B6%E5%88%B014%E7%82%B9%E9%80%80%E6%88%BF%22%2C%22dimensionType%22%3A1%2C%22picList%22%3A%5B%5D%2C%22adultCount%22%3A1%2C%22childCount%22%3A1%2C%22itemLimit%22%3A%22%22%2C%22checkInStart%22%3A%222023-07-13+00%3A00%3A01%22%2C%22checkInEnd%22%3A%222023-07-13+00%3A00%3A01%22%2C%22bookStartTime%22%3A%222023-07-13+00%3A00%3A01%22%2C%22bookStartEnd%22%3A%222023-07-13+00%3A00%3A01%22%2C%22featureDetail%22%3A%22%22%7D' \
-d 'infantnum=1' \
-d 'inventory_price=%7B%5C%22use_room_inventory%5C%22%3Afalse%2C%5C%22inventory_price%5C%22%3A%5B%7B%5C%22date%5C%22%3A2015-07-28%2C%5C%22quota%5C%22%3A11%2C%5C%22price%5C%22%3A150%2C%5C%22tax%5C%22%3A100%2C%5C%22addBed%5C%22%3A2200%2C%5C%22addPerson%5C%22%3A2000%7D%2C%7B%5C%22date%5C%22%3A2015-07-29%2C%5C%22quota%5C%22%3A10%2C%5C%22price%5C%22%3A200%2C%5C%22tax%5C%22%3A100%2C%5C%22addBed%5C%22%3A1200%2C%5C%22addPerson%5C%22%3A2000%7D%5D%7D' \
-d 'lengthofstay=1' \
-d 'lock_end_time=2016-07-16+00%3A00%3A00' \
-d 'lock_start_time=2016-07-15+00%3A00%3A00' \
-d 'name=aaa' \
-d 'occupancy=1' \
-d 'online_booking_binding_info=%7B%22itemId%22%3A1234235235%2C%22skuId%22%3A1234235235%2C%22priceRuleInfoList%22%3A%5B%7B%22priceRuleNumber%22%3A%2214235253%22%7D%2C%7B%22priceRuleNumber%22%3A%2214235253%22%7D%2C%7B%22priceRuleNumber%22%3A%2214235253%22%7D%5D%7D%2C%7B%22itemId%22%3A1234235235%2C%22skuId%22%3A1234235235%2C%22priceRuleInfoList%22%3A%5B%7B%22priceRuleNumber%22%3A%2214235253%22%7D%2C%7B%22priceRuleNumber%22%3A%2214235253%22%7D%2C%7B%22priceRuleNumber%22%3A%2214235253%22%7D%5D%7D' \
-d 'out_rid=123' \
-d 'rate_plan_code=123' \
-d 'rate_switch_cal=%7B%22date%22%3A%22yyyy-MM-dd%22%2C%22rate_status%22%3A1%2C%22checkin_status%22%3A1%2C%22checkout_status%22%3A1%7D%2C%7B%22date%22%3A%22yyyy-MM-dd%22%2C%22rate_status%22%3A0%2C%22checkin_status%22%3A1%2C%22checkout_status%22%3A1%7D' \
-d 'rpid=123' \
-d 'status=123' \
-d 'vendor=taobao'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelMultiplerateUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.rpid=123
req.status=123
req.out_rid="123"
req.rate_switch_cal="[{\"date\":\"yyyy-MM-dd\",\"rate_status\":1,\"checkin_status\":1,\"checkout_status\":1},{\"date\":\"yyyy-MM-dd\",\"rate_status\":0,\"checkin_status\":1,\"checkout_status\":1}]"
req.lengthofstay=1
req.occupancy=1
req.currency_code="CNY"
req.rate_plan_code="123"
req.inventory_price="{\"use_room_inventory\":false,\"inventory_price\":[{\"date\":2015-07-28,\"quota\":11,\"price\":150,\"tax\":100,\"addBed\":2200,\"addPerson\":2000},{\"date\":2015-07-29,\"quota\":10,\"price\":200,\"tax\":100,\"addBed\":1200,\"addPerson\":2000}]}"
req.name="aaa"
req.gid=123
req.vendor="taobao"
req.childnum=1
req.infantnum=1
req.lock_end_time="2016-07-16 00:00:00"
req.lock_start_time="2016-07-15 00:00:00"
req.online_booking_binding_info="[{\"itemId\":1234235235,\"skuId\":1234235235,\"priceRuleInfoList\":[{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"}]},{\"itemId\":1234235235,\"skuId\":1234235235,\"priceRuleInfoList\":[{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"},{\"priceRuleNumber\":\"14235253\"}]}]"
req.breakfast=1
req.cancel_policy="{\"cancelPolicyType\":1}|{\"cancelPolicyType\":2}|{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}|{\"cancelPolicyType\":5,\"policyInfo\":{\"timeBefore\":6}}|{\"cancelPolicyType\":6,\"policyInfo\":{\"14\":1}}"
req.breakfast_cal="[{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"breakfast_count\":0},{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"breakfast_count\":1}]"
req.cancel_policy_cal="[{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"cancel_policy\":{\"cancelPolicyType\":1} },{\"date\":\"yyyy-MM-dd\",\"startDate\":\"yyyy-MM-dd\",\"endDate\":\"yyyy-MM-dd\",\"cancel_policy\":{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}}]"
req.hotel_xitem_infos="[{\"actionType\":\"BOUND\",\"outXcode\":\"123456\",\"subTypeCode\":\"40000_105\",\"shortName\":\"延时14点退房\",\"time\":\"00:00-23:59\",\"value\":1200,\"itemDesc\":\"可延时到14点退房\",\"dimensionType\":1,\"picList\":[],\"adultCount\":1,\"childCount\":1,\"itemLimit\":\"\",\"checkInStart\":\"2023-07-13 00:00:01\",\"checkInEnd\":\"2023-07-13 00:00:01\",\"bookStartTime\":\"2023-07-13 00:00:01\",\"bookStartEnd\":\"2023-07-13 00:00:01\",\"featureDetail\":\"\"}]"
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.multiplerate.update");
add_param(pRequest,"rpid","123");
add_param(pRequest,"status","123");
add_param(pRequest,"out_rid","123");
add_param(pRequest,"rate_switch_cal","{"date":"yyyy-MM-dd","rate_status":1,"checkin_status":1,"checkout_status":1},{"date":"yyyy-MM-dd","rate_status":0,"checkin_status":1,"checkout_status":1}");
add_param(pRequest,"lengthofstay","1");
add_param(pRequest,"occupancy","1");
add_param(pRequest,"currency_code","CNY");
add_param(pRequest,"rate_plan_code","123");
add_param(pRequest,"inventory_price","{\"use_room_inventory\":false,\"inventory_price\":[{\"date\":2015-07-28,\"quota\":11,\"price\":150,\"tax\":100,\"addBed\":2200,\"addPerson\":2000},{\"date\":2015-07-29,\"quota\":10,\"price\":200,\"tax\":100,\"addBed\":1200,\"addPerson\":2000}]}");
add_param(pRequest,"name","aaa");
add_param(pRequest,"gid","123");
add_param(pRequest,"vendor","taobao");
add_param(pRequest,"childnum","1");
add_param(pRequest,"infantnum","1");
add_param(pRequest,"lock_end_time","2016-07-16 00:00:00");
add_param(pRequest,"lock_start_time","2016-07-15 00:00:00");
add_param(pRequest,"online_booking_binding_info","{"itemId":1234235235,"skuId":1234235235,"priceRuleInfoList":[{"priceRuleNumber":"14235253"},{"priceRuleNumber":"14235253"},{"priceRuleNumber":"14235253"}]},{"itemId":1234235235,"skuId":1234235235,"priceRuleInfoList":[{"priceRuleNumber":"14235253"},{"priceRuleNumber":"14235253"},{"priceRuleNumber":"14235253"}]}");
add_param(pRequest,"breakfast","1");
add_param(pRequest,"cancel_policy","{\"cancelPolicyType\":1}|{\"cancelPolicyType\":2}|{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}|{\"cancelPolicyType\":5,\"policyInfo\":{\"timeBefore\":6}}|{\"cancelPolicyType\":6,\"policyInfo\":{\"14\":1}}");
add_param(pRequest,"breakfast_cal","{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","breakfast_count":0},{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","breakfast_count":1}");
add_param(pRequest,"cancel_policy_cal","{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","cancel_policy":{"cancelPolicyType":1} },{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","cancel_policy":{"cancelPolicyType":4,"policyInfo":{"48":10,"24":20}}}");
add_param(pRequest,"hotel_xitem_infos","{"actionType":"BOUND","outXcode":"123456","subTypeCode":"40000_105","shortName":"延时14点退房","time":"00:00-23:59","value":1200,"itemDesc":"可延时到14点退房","dimensionType":1,"picList":[],"adultCount":1,"childCount":1,"itemLimit":"","checkInStart":"2023-07-13 00:00:01","checkInEnd":"2023-07-13 00:00:01","bookStartTime":"2023-07-13 00:00:01","bookStartEnd":"2023-07-13 00:00:01","featureDetail":""}");
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.multiplerate.update', {
'rpid':'123',
'status':'123',
'out_rid':'123',
'rate_switch_cal':'{"date":"yyyy-MM-dd","rate_status":1,"checkin_status":1,"checkout_status":1},{"date":"yyyy-MM-dd","rate_status":0,"checkin_status":1,"checkout_status":1}',
'lengthofstay':'1',
'occupancy':'1',
'currency_code':'CNY',
'rate_plan_code':'123',
'inventory_price':'{\"use_room_inventory\":false,\"inventory_price\":[{\"date\":2015-07-28,\"quota\":11,\"price\":150,\"tax\":100,\"addBed\":2200,\"addPerson\":2000},{\"date\":2015-07-29,\"quota\":10,\"price\":200,\"tax\":100,\"addBed\":1200,\"addPerson\":2000}]}',
'name':'aaa',
'gid':'123',
'vendor':'taobao',
'childnum':'1',
'infantnum':'1',
'lock_end_time':'2016-07-16 00:00:00',
'lock_start_time':'2016-07-15 00:00:00',
'online_booking_binding_info':'{"itemId":1234235235,"skuId":1234235235,"priceRuleInfoList":[{"priceRuleNumber":"14235253"},{"priceRuleNumber":"14235253"},{"priceRuleNumber":"14235253"}]},{"itemId":1234235235,"skuId":1234235235,"priceRuleInfoList":[{"priceRuleNumber":"14235253"},{"priceRuleNumber":"14235253"},{"priceRuleNumber":"14235253"}]}',
'breakfast':'1',
'cancel_policy':'{\"cancelPolicyType\":1}|{\"cancelPolicyType\":2}|{\"cancelPolicyType\":4,\"policyInfo\":{\"48\":10,\"24\":20}}|{\"cancelPolicyType\":5,\"policyInfo\":{\"timeBefore\":6}}|{\"cancelPolicyType\":6,\"policyInfo\":{\"14\":1}}',
'breakfast_cal':'{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","breakfast_count":0},{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","breakfast_count":1}',
'cancel_policy_cal':'{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","cancel_policy":{"cancelPolicyType":1} },{"date":"yyyy-MM-dd","startDate":"yyyy-MM-dd","endDate":"yyyy-MM-dd","cancel_policy":{"cancelPolicyType":4,"policyInfo":{"48":10,"24":20}}}',
'hotel_xitem_infos':'{"actionType":"BOUND","outXcode":"123456","subTypeCode":"40000_105","shortName":"延时14点退房","time":"00:00-23:59","value":1200,"itemDesc":"可延时到14点退房","dimensionType":1,"picList":[],"adultCount":1,"childCount":1,"itemLimit":"","checkInStart":"2023-07-13 00:00:01","checkInEnd":"2023-07-13 00:00:01","bookStartTime":"2023-07-13 00:00:01","bookStartEnd":"2023-07-13 00:00:01","featureDetail":""}'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})