TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderAlipayfaceUpdateRequest req = new XhotelOrderAlipayfaceUpdateRequest();
req.setTid(100100100L);
req.setOptType(1L);
req.setReasonType(1L);
req.setReasonText("无房");
req.setOutRoomNumber("2022");
req.setCheckinDate("2014-12-10");
req.setCheckoutDate("2014-12-13");
req.setRooms(1L);
req.setOutId("R12345678");
req.setTids("12322,323333");
req.setCancelType(1L);
req.setOperator("小红");
req.setConfirmCode("1121132");
req.setSelfCheckin(true);
req.setSyncToHotel("Y");
XhotelOrderAlipayfaceUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderAlipayfaceUpdateRequest req = new XhotelOrderAlipayfaceUpdateRequest();
req.Tid = 100100100L;
req.OptType = 1L;
req.ReasonType = 1L;
req.ReasonText = "无房";
req.OutRoomNumber = "2022";
req.CheckinDate = "2014-12-10";
req.CheckoutDate = "2014-12-13";
req.Rooms = 1L;
req.OutId = "R12345678";
req.Tids = "12322,323333";
req.CancelType = 1L;
req.Operator = "小红";
req.ConfirmCode = "1121132";
req.SelfCheckin = true;
req.SyncToHotel = "Y";
XhotelOrderAlipayfaceUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderAlipayfaceUpdateRequest;
$req->setTid("100100100");
$req->setOptType("1");
$req->setReasonType("1");
$req->setReasonText("无房");
$req->setOutRoomNumber("2022");
$req->setCheckinDate("2014-12-10");
$req->setCheckoutDate("2014-12-13");
$req->setRooms("1");
$req->setOutId("R12345678");
$req->setTids("12322,323333");
$req->setCancelType("1");
$req->setOperator("小红");
$req->setConfirmCode("1121132");
$req->setSelfCheckin("true");
$req->setSyncToHotel("Y");
$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.alipayface.update' \
-d 'partner_id=apidoc' \
-d 'session=05ea30d6-9ff0-4c0b-815a-ee25d63df60e' \
-d 'sign=4CA18D63D9917CAB1BEFD53A04827453' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+20%3A20%3A45' \
-d 'v=2.0' \
-d 'cancel_type=1' \
-d 'checkin_date=2014-12-10' \
-d 'checkout_date=2014-12-13' \
-d 'confirm_code=1121132' \
-d 'operator=%E5%B0%8F%E7%BA%A2' \
-d 'opt_type=1' \
-d 'out_id=R12345678' \
-d 'out_room_number=2022' \
-d 'reason_text=%E6%97%A0%E6%88%BF' \
-d 'reason_type=1' \
-d 'rooms=1' \
-d 'self_checkin=true' \
-d 'sync_to_hotel=Y' \
-d 'tid=100100100' \
-d 'tids=12322%2C323333'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderAlipayfaceUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.tid=100100100
req.opt_type=1
req.reason_type=1
req.reason_text="无房"
req.out_room_number="2022"
req.checkin_date="2014-12-10"
req.checkout_date="2014-12-13"
req.rooms=1
req.out_id="R12345678"
req.tids="12322,323333"
req.cancel_type=1
req.operator="小红"
req.confirm_code="1121132"
req.self_checkin=true
req.sync_to_hotel="Y"
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.alipayface.update");
add_param(pRequest,"tid","100100100");
add_param(pRequest,"opt_type","1");
add_param(pRequest,"reason_type","1");
add_param(pRequest,"reason_text","无房");
add_param(pRequest,"out_room_number","2022");
add_param(pRequest,"checkin_date","2014-12-10");
add_param(pRequest,"checkout_date","2014-12-13");
add_param(pRequest,"rooms","1");
add_param(pRequest,"out_id","R12345678");
add_param(pRequest,"tids","12322,323333");
add_param(pRequest,"cancel_type","1");
add_param(pRequest,"operator","小红");
add_param(pRequest,"confirm_code","1121132");
add_param(pRequest,"self_checkin","true");
add_param(pRequest,"sync_to_hotel","Y");
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.alipayface.update', {
'tid':'100100100',
'opt_type':'1',
'reason_type':'1',
'reason_text':'无房',
'out_room_number':'2022',
'checkin_date':'2014-12-10',
'checkout_date':'2014-12-13',
'rooms':'1',
'out_id':'R12345678',
'tids':'12322,323333',
'cancel_type':'1',
'operator':'小红',
'confirm_code':'1121132',
'self_checkin':'true',
'sync_to_hotel':'Y'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})