TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderOfflineSettlePutRequest req = new XhotelOrderOfflineSettlePutRequest();
req.setTid(123L);
req.setTotalRoomFee(12L);
req.setOtherFee(2L);
req.setOtherFeeDetail("{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}");
req.setOutId("r123456");
req.setRoomNo("eee");
req.setDailyPriceInfo("[{\"day\":\"2015-08-12\",\"price\":48800},{\"day\":\"2015-08-13\",\"price\":48800}]");
req.setCheckOut(StringUtils.parseDateTime("2015-08-10 00:00:00"));
req.setMemo("\"客人要求提前离店\"");
List<XhotelOrderOfflineSettlePutRequest.RoomSettleInfo> list2 = new ArrayList<XhotelOrderOfflineSettlePutRequest.RoomSettleInfo>();
XhotelOrderOfflineSettlePutRequest.RoomSettleInfo obj3 = new XhotelOrderOfflineSettlePutRequest.RoomSettleInfo();
list2.add(obj3);
obj3.setRoomNo("123");
obj3.setRoomFee(3L);
obj3.setRoomOtherFee(3L);
obj3.setRoomOtherFeeDetail("{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}");
obj3.setRoomCheckIn(StringUtils.parseDateTime("2015-08-10 00:00:00"));
obj3.setRoomCheckOut(StringUtils.parseDateTime("2015-08-11 00:00:00"));
obj3.setDailyPriceInfo("[{\"day\":\"2015-08-12\",\"price\":48800},{\"day\":\"2015-08-13\",\"price\":48800}]");
obj3.setRoomStatus("3");
req.setRoomSettleInfoList(list2);
req.setContainGuarantee(1L);
req.setOutUuid("333333");
req.setNotifyUrl("http://www.xxx.com");
req.setAmount(100L);
req.setHotelCode("SADFA");
req.setVendor("taobao");
XhotelOrderOfflineSettlePutResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderOfflineSettlePutRequest req = new XhotelOrderOfflineSettlePutRequest();
req.Tid = 123L;
req.TotalRoomFee = 12L;
req.OtherFee = 2L;
req.OtherFeeDetail = "{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}";
req.OutId = "r123456";
req.RoomNo = "eee";
req.DailyPriceInfo = "[{\"day\":\"2015-08-12\",\"price\":48800},{\"day\":\"2015-08-13\",\"price\":48800}]";
req.CheckOut = DateTime.Parse("2015-08-10 00:00:00");
req.Memo = "\"客人要求提前离店\"";
List<XhotelOrderOfflineSettlePutRequest.RoomSettleInfoDomain> list2 = new List<XhotelOrderOfflineSettlePutRequest.RoomSettleInfoDomain>();
XhotelOrderOfflineSettlePutRequest.RoomSettleInfoDomain obj3 = new XhotelOrderOfflineSettlePutRequest.RoomSettleInfoDomain();
list2.Add(obj3);
obj3.RoomNo = "123";
obj3.RoomFee = 3L;
obj3.RoomOtherFee = 3L;
obj3.RoomOtherFeeDetail = "{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}";
obj3.RoomCheckIn = DateTime.Parse(2015-08-10 00:00:00");
obj3.RoomCheckOut = DateTime.Parse(2015-08-11 00:00:00");
obj3.DailyPriceInfo = "[{\"day\":\"2015-08-12\",\"price\":48800},{\"day\":\"2015-08-13\",\"price\":48800}]";
obj3.RoomStatus = "3";
req.RoomSettleInfoList_ = list2;
req.ContainGuarantee = 1L;
req.OutUuid = "333333";
req.NotifyUrl = "http://www.xxx.com";
req.Amount = 100L;
req.HotelCode = "SADFA";
req.Vendor = "taobao";
XhotelOrderOfflineSettlePutResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderOfflineSettlePutRequest;
$req->setTid("123");
$req->setTotalRoomFee("12");
$req->setOtherFee("2");
$req->setOtherFeeDetail("{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}");
$req->setOutId("r123456");
$req->setRoomNo("eee");
$req->setDailyPriceInfo("[{\"day\":\"2015-08-12\",\"price\":48800},{\"day\":\"2015-08-13\",\"price\":48800}]");
$req->setCheckOut("2015-08-10 00:00:00");
$req->setMemo("\"客人要求提前离店\"");
$room_settle_info_list = new RoomSettleInfo;
$room_settle_info_list->room_no="123";
$room_settle_info_list->room_fee="3";
$room_settle_info_list->room_other_fee="3";
$room_settle_info_list->room_other_fee_detail="{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}";
$room_settle_info_list->room_check_in="2015-08-10 00:00:00";
$room_settle_info_list->room_check_out="2015-08-11 00:00:00";
$room_settle_info_list->daily_price_info="[{\"day\":\"2015-08-12\",\"price\":48800},{\"day\":\"2015-08-13\",\"price\":48800}]";
$room_settle_info_list->room_status="3";
$req->setRoomSettleInfoList(json_encode($room_settle_info_list));
$req->setContainGuarantee("1");
$req->setOutUuid("333333");
$req->setNotifyUrl("http://www.xxx.com");
$req->setAmount("100");
$req->setHotelCode("SADFA");
$req->setVendor("taobao");
$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.offline.settle.put' \
-d 'partner_id=apidoc' \
-d 'session=89dc3c0b-4c2b-468c-8408-c26ddc9eb01c' \
-d 'sign=B1143ED32B17F57329A4B730BE19EAA7' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-18+21%3A55%3A13' \
-d 'v=2.0' \
-d 'amount=100' \
-d 'check_out=2015-08-10+00%3A00%3A00' \
-d 'contain_guarantee=1' \
-d 'daily_price_info=%7B%22day%22%3A%222015-08-12%22%2C%22price%22%3A48800%7D%2C%7B%22day%22%3A%222015-08-13%22%2C%22price%22%3A48800%7D' \
-d 'hotel_code=SADFA' \
-d 'memo=%5C%22%E5%AE%A2%E4%BA%BA%E8%A6%81%E6%B1%82%E6%8F%90%E5%89%8D%E7%A6%BB%E5%BA%97%5C%22' \
-d 'notify_url=http%3A%2F%2Fwww.xxx.com' \
-d 'other_fee=2' \
-d 'other_fee_detail=%7B%5C%22%E6%B4%97%E8%A1%A3%E8%B4%B9%5C%22%3A5000%2C%5C%22%E6%B0%B4%E5%90%A7%5C%22%3A10000%2C%5C%22%E4%BC%98%E6%83%A0%5C%22%3A1000%7D' \
-d 'out_id=r123456' \
-d 'out_uuid=333333' \
-d 'room_no=eee' \
-d 'room_settle_info_list=null' \
-d 'tid=123' \
-d 'total_room_fee=12' \
-d 'vendor=taobao'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderOfflineSettlePutRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.tid=123
req.total_room_fee=12
req.other_fee=2
req.other_fee_detail="{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}"
req.out_id="r123456"
req.room_no="eee"
req.daily_price_info="[{\"day\":\"2015-08-12\",\"price\":48800},{\"day\":\"2015-08-13\",\"price\":48800}]"
req.check_out="2015-08-10 00:00:00"
req.memo="\"客人要求提前离店\""
req.room_settle_info_list=""
req.contain_guarantee=1
req.out_uuid="333333"
req.notify_url="http://www.xxx.com"
req.amount=100
req.hotel_code="SADFA"
req.vendor="taobao"
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.offline.settle.put");
add_param(pRequest,"tid","123");
add_param(pRequest,"total_room_fee","12");
add_param(pRequest,"other_fee","2");
add_param(pRequest,"other_fee_detail","{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}");
add_param(pRequest,"out_id","r123456");
add_param(pRequest,"room_no","eee");
add_param(pRequest,"daily_price_info","{"day":"2015-08-12","price":48800},{"day":"2015-08-13","price":48800}");
add_param(pRequest,"check_out","2015-08-10 00:00:00");
add_param(pRequest,"memo","\"客人要求提前离店\"");
add_param(pRequest,"room_settle_info_list","数据结构JSON示例");
add_param(pRequest,"contain_guarantee","1");
add_param(pRequest,"out_uuid","333333");
add_param(pRequest,"notify_url","http://www.xxx.com");
add_param(pRequest,"amount","100");
add_param(pRequest,"hotel_code","SADFA");
add_param(pRequest,"vendor","taobao");
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.offline.settle.put', {
'tid':'123',
'total_room_fee':'12',
'other_fee':'2',
'other_fee_detail':'{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}',
'out_id':'r123456',
'room_no':'eee',
'daily_price_info':'{"day":"2015-08-12","price":48800},{"day":"2015-08-13","price":48800}',
'check_out':'2015-08-10 00:00:00',
'memo':'\"客人要求提前离店\"',
'room_settle_info_list':'数据结构JSON示例',
'contain_guarantee':'1',
'out_uuid':'333333',
'notify_url':'http://www.xxx.com',
'amount':'100',
'hotel_code':'SADFA',
'vendor':'taobao'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})