TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelServicetimeUpdateRequest req = new XhotelServicetimeUpdateRequest();
req.setParam("[{\"businessId\":11925099374,\"businessType\":3,\"displayItemInNonWorkingTime\":1,\"mondayConfirmLocalTime\":\"09:00-18:00\",\"operator\":\"操作人\",\"orderConfirmType\":1,\"saturdayConfirmLocalTime\":\"09:00-18:00\",\"sellerId\":2054718374,\"sellerNick\":\"sandbox_b_27\",\"sundayConfirmLocalTime\":\"09:00-18:00\",\"supplier\":\"\",\"thursdayConfirmLocalTime\":\"09:00-18:00\",\"timeZoneName\":\"Asia/Shanghai\",\"tuesdayConfirmLocalTime\":\"09:00-18:00\",\"wednesdayConfirmLocalTime\":\"09:00-18:00\",\"fridayConfirmLocalTime\":\"09:00-18:00\"},{\"businessId\":11925099374,\"businessType\":3,\"displayItemInNonWorkingTime\":1,\"mondayConfirmLocalTime\":\"09:00-18:00\",\"operator\":\"操作人\",\"orderConfirmType\":2,\"saturdayConfirmLocalTime\":\"09:00-18:00\",\"sellerId\":2054718374,\"sellerNick\":\"sandbox_b_27\",\"sundayConfirmLocalTime\":\"09:00-18:00\",\"supplier\":\"\",\"thursdayConfirmLocalTime\":\"09:00-18:00\",\"timeZoneName\":\"Asia/Shanghai\",\"tuesdayConfirmLocalTime\":\"09:00-18:00\",\"wednesdayConfirmLocalTime\":\"09:00-18:00\",\"fridayConfirmLocalTime\":\"09:00-18:00\"}]");
XhotelServicetimeUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelServicetimeUpdateRequest req = new XhotelServicetimeUpdateRequest();
req.Param = "[{\"businessId\":11925099374,\"businessType\":3,\"displayItemInNonWorkingTime\":1,\"mondayConfirmLocalTime\":\"09:00-18:00\",\"operator\":\"操作人\",\"orderConfirmType\":1,\"saturdayConfirmLocalTime\":\"09:00-18:00\",\"sellerId\":2054718374,\"sellerNick\":\"sandbox_b_27\",\"sundayConfirmLocalTime\":\"09:00-18:00\",\"supplier\":\"\",\"thursdayConfirmLocalTime\":\"09:00-18:00\",\"timeZoneName\":\"Asia/Shanghai\",\"tuesdayConfirmLocalTime\":\"09:00-18:00\",\"wednesdayConfirmLocalTime\":\"09:00-18:00\",\"fridayConfirmLocalTime\":\"09:00-18:00\"},{\"businessId\":11925099374,\"businessType\":3,\"displayItemInNonWorkingTime\":1,\"mondayConfirmLocalTime\":\"09:00-18:00\",\"operator\":\"操作人\",\"orderConfirmType\":2,\"saturdayConfirmLocalTime\":\"09:00-18:00\",\"sellerId\":2054718374,\"sellerNick\":\"sandbox_b_27\",\"sundayConfirmLocalTime\":\"09:00-18:00\",\"supplier\":\"\",\"thursdayConfirmLocalTime\":\"09:00-18:00\",\"timeZoneName\":\"Asia/Shanghai\",\"tuesdayConfirmLocalTime\":\"09:00-18:00\",\"wednesdayConfirmLocalTime\":\"09:00-18:00\",\"fridayConfirmLocalTime\":\"09:00-18:00\"}]";
XhotelServicetimeUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelServicetimeUpdateRequest;
$req->setParam("[{\"businessId\":11925099374,\"businessType\":3,\"displayItemInNonWorkingTime\":1,\"mondayConfirmLocalTime\":\"09:00-18:00\",\"operator\":\"操作人\",\"orderConfirmType\":1,\"saturdayConfirmLocalTime\":\"09:00-18:00\",\"sellerId\":2054718374,\"sellerNick\":\"sandbox_b_27\",\"sundayConfirmLocalTime\":\"09:00-18:00\",\"supplier\":\"\",\"thursdayConfirmLocalTime\":\"09:00-18:00\",\"timeZoneName\":\"Asia/Shanghai\",\"tuesdayConfirmLocalTime\":\"09:00-18:00\",\"wednesdayConfirmLocalTime\":\"09:00-18:00\",\"fridayConfirmLocalTime\":\"09:00-18:00\"},{\"businessId\":11925099374,\"businessType\":3,\"displayItemInNonWorkingTime\":1,\"mondayConfirmLocalTime\":\"09:00-18:00\",\"operator\":\"操作人\",\"orderConfirmType\":2,\"saturdayConfirmLocalTime\":\"09:00-18:00\",\"sellerId\":2054718374,\"sellerNick\":\"sandbox_b_27\",\"sundayConfirmLocalTime\":\"09:00-18:00\",\"supplier\":\"\",\"thursdayConfirmLocalTime\":\"09:00-18:00\",\"timeZoneName\":\"Asia/Shanghai\",\"tuesdayConfirmLocalTime\":\"09:00-18:00\",\"wednesdayConfirmLocalTime\":\"09:00-18:00\",\"fridayConfirmLocalTime\":\"09:00-18:00\"}]");
$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.servicetime.update' \
-d 'partner_id=apidoc' \
-d 'session=087d5a73-2ec5-4f04-ae6d-0f18c13107d9' \
-d 'sign=2A470D28A7E34068588B199FB0E63F07' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+17%3A34%3A24' \
-d 'v=2.0' \
-d 'param=%7B%22businessId%22%3A11925099374%2C%22businessType%22%3A3%2C%22displayItemInNonWorkingTime%22%3A1%2C%22mondayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22operator%22%3A%22%E6%93%8D%E4%BD%9C%E4%BA%BA%22%2C%22orderConfirmType%22%3A1%2C%22saturdayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22sellerId%22%3A2054718374%2C%22sellerNick%22%3A%22sandbox_b_27%22%2C%22sundayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22supplier%22%3A%22%22%2C%22thursdayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22timeZoneName%22%3A%22Asia%2FShanghai%22%2C%22tuesdayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22wednesdayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22fridayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%7D%2C%7B%22businessId%22%3A11925099374%2C%22businessType%22%3A3%2C%22displayItemInNonWorkingTime%22%3A1%2C%22mondayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22operator%22%3A%22%E6%93%8D%E4%BD%9C%E4%BA%BA%22%2C%22orderConfirmType%22%3A2%2C%22saturdayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22sellerId%22%3A2054718374%2C%22sellerNick%22%3A%22sandbox_b_27%22%2C%22sundayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22supplier%22%3A%22%22%2C%22thursdayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22timeZoneName%22%3A%22Asia%2FShanghai%22%2C%22tuesdayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22wednesdayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%2C%22fridayConfirmLocalTime%22%3A%2209%3A00-18%3A00%22%7D'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelServicetimeUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param="[{\"businessId\":11925099374,\"businessType\":3,\"displayItemInNonWorkingTime\":1,\"mondayConfirmLocalTime\":\"09:00-18:00\",\"operator\":\"操作人\",\"orderConfirmType\":1,\"saturdayConfirmLocalTime\":\"09:00-18:00\",\"sellerId\":2054718374,\"sellerNick\":\"sandbox_b_27\",\"sundayConfirmLocalTime\":\"09:00-18:00\",\"supplier\":\"\",\"thursdayConfirmLocalTime\":\"09:00-18:00\",\"timeZoneName\":\"Asia/Shanghai\",\"tuesdayConfirmLocalTime\":\"09:00-18:00\",\"wednesdayConfirmLocalTime\":\"09:00-18:00\",\"fridayConfirmLocalTime\":\"09:00-18:00\"},{\"businessId\":11925099374,\"businessType\":3,\"displayItemInNonWorkingTime\":1,\"mondayConfirmLocalTime\":\"09:00-18:00\",\"operator\":\"操作人\",\"orderConfirmType\":2,\"saturdayConfirmLocalTime\":\"09:00-18:00\",\"sellerId\":2054718374,\"sellerNick\":\"sandbox_b_27\",\"sundayConfirmLocalTime\":\"09:00-18:00\",\"supplier\":\"\",\"thursdayConfirmLocalTime\":\"09:00-18:00\",\"timeZoneName\":\"Asia/Shanghai\",\"tuesdayConfirmLocalTime\":\"09:00-18:00\",\"wednesdayConfirmLocalTime\":\"09:00-18:00\",\"fridayConfirmLocalTime\":\"09:00-18:00\"}]"
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.servicetime.update");
add_param(pRequest,"param","{"businessId":11925099374,"businessType":3,"displayItemInNonWorkingTime":1,"mondayConfirmLocalTime":"09:00-18:00","operator":"操作人","orderConfirmType":1,"saturdayConfirmLocalTime":"09:00-18:00","sellerId":2054718374,"sellerNick":"sandbox_b_27","sundayConfirmLocalTime":"09:00-18:00","supplier":"","thursdayConfirmLocalTime":"09:00-18:00","timeZoneName":"Asia/Shanghai","tuesdayConfirmLocalTime":"09:00-18:00","wednesdayConfirmLocalTime":"09:00-18:00","fridayConfirmLocalTime":"09:00-18:00"},{"businessId":11925099374,"businessType":3,"displayItemInNonWorkingTime":1,"mondayConfirmLocalTime":"09:00-18:00","operator":"操作人","orderConfirmType":2,"saturdayConfirmLocalTime":"09:00-18:00","sellerId":2054718374,"sellerNick":"sandbox_b_27","sundayConfirmLocalTime":"09:00-18:00","supplier":"","thursdayConfirmLocalTime":"09:00-18:00","timeZoneName":"Asia/Shanghai","tuesdayConfirmLocalTime":"09:00-18:00","wednesdayConfirmLocalTime":"09:00-18:00","fridayConfirmLocalTime":"09:00-18:00"}");
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.servicetime.update', {
'param':'{"businessId":11925099374,"businessType":3,"displayItemInNonWorkingTime":1,"mondayConfirmLocalTime":"09:00-18:00","operator":"操作人","orderConfirmType":1,"saturdayConfirmLocalTime":"09:00-18:00","sellerId":2054718374,"sellerNick":"sandbox_b_27","sundayConfirmLocalTime":"09:00-18:00","supplier":"","thursdayConfirmLocalTime":"09:00-18:00","timeZoneName":"Asia/Shanghai","tuesdayConfirmLocalTime":"09:00-18:00","wednesdayConfirmLocalTime":"09:00-18:00","fridayConfirmLocalTime":"09:00-18:00"},{"businessId":11925099374,"businessType":3,"displayItemInNonWorkingTime":1,"mondayConfirmLocalTime":"09:00-18:00","operator":"操作人","orderConfirmType":2,"saturdayConfirmLocalTime":"09:00-18:00","sellerId":2054718374,"sellerNick":"sandbox_b_27","sundayConfirmLocalTime":"09:00-18:00","supplier":"","thursdayConfirmLocalTime":"09:00-18:00","timeZoneName":"Asia/Shanghai","tuesdayConfirmLocalTime":"09:00-18:00","wednesdayConfirmLocalTime":"09:00-18:00","fridayConfirmLocalTime":"09:00-18:00"}'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})