TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderAlipayfaceSettleMockRequest req = new XhotelOrderAlipayfaceSettleMockRequest();
req.setMemo("\"客人要求提前离店\"");
req.setOutId("外部单号");
req.setRoomNo("12A");
req.setOtherFee(12300L);
req.setTotalRoomFee(12300L);
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.setTid(12323L);
req.setOtherFeeDetail("{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}");
List<XhotelOrderAlipayfaceSettleMockRequest.RoomSettleInfo> list2 = new ArrayList<XhotelOrderAlipayfaceSettleMockRequest.RoomSettleInfo>();
XhotelOrderAlipayfaceSettleMockRequest.RoomSettleInfo obj3 = new XhotelOrderAlipayfaceSettleMockRequest.RoomSettleInfo();
list2.add(obj3);
obj3.setRoomNo("123");
obj3.setRoomFee(500L);
obj3.setRoomOtherFee(12L);
obj3.setRoomOtherFeeDetail("{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}");
obj3.setRoomCheckOut(StringUtils.parseDateTime("2015-08-11 00:00:00"));
obj3.setRoomCheckIn(StringUtils.parseDateTime("2015-08-10 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);
XhotelOrderAlipayfaceSettleMockResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderAlipayfaceSettleMockRequest req = new XhotelOrderAlipayfaceSettleMockRequest();
req.Memo = "\"客人要求提前离店\"";
req.OutId = "外部单号";
req.RoomNo = "12A";
req.OtherFee = 12300L;
req.TotalRoomFee = 12300L;
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.Tid = 12323L;
req.OtherFeeDetail = "{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}";
List<XhotelOrderAlipayfaceSettleMockRequest.RoomSettleInfoDomain> list2 = new List<XhotelOrderAlipayfaceSettleMockRequest.RoomSettleInfoDomain>();
XhotelOrderAlipayfaceSettleMockRequest.RoomSettleInfoDomain obj3 = new XhotelOrderAlipayfaceSettleMockRequest.RoomSettleInfoDomain();
list2.Add(obj3);
obj3.RoomNo = "123";
obj3.RoomFee = 500L;
obj3.RoomOtherFee = 12L;
obj3.RoomOtherFeeDetail = "{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}";
obj3.RoomCheckOut = DateTime.Parse(2015-08-11 00:00:00");
obj3.RoomCheckIn = DateTime.Parse(2015-08-10 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;
XhotelOrderAlipayfaceSettleMockResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderAlipayfaceSettleMockRequest;
$req->setMemo("\"客人要求提前离店\"");
$req->setOutId("外部单号");
$req->setRoomNo("12A");
$req->setOtherFee("12300");
$req->setTotalRoomFee("12300");
$req->setDailyPriceInfo("[{\"day\":\"2015-08-12\",\"price\":48800},{\"day\":\"2015-08-13\",\"price\":48800}]");
$req->setCheckOut("2015-08-10 00:00:00");
$req->setTid("12323");
$req->setOtherFeeDetail("{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}");
$room_settle_info_list = new RoomSettleInfo;
$room_settle_info_list->room_no="123";
$room_settle_info_list->room_fee="500";
$room_settle_info_list->room_other_fee="12";
$room_settle_info_list->room_other_fee_detail="{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}";
$room_settle_info_list->room_check_out="2015-08-11 00:00:00";
$room_settle_info_list->room_check_in="2015-08-10 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");
$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.settle.mock' \
-d 'partner_id=apidoc' \
-d 'session=be66cde5-5c88-4bb9-8ba1-d8793b27ed3c' \
-d 'sign=8BB37C1823B8D3D9E9B9D9112E5A7E20' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-27+08%3A50%3A05' \
-d 'v=2.0' \
-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 '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 'other_fee=12300' \
-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=%E5%A4%96%E9%83%A8%E5%8D%95%E5%8F%B7' \
-d 'room_no=12A' \
-d 'room_settle_info_list=null' \
-d 'tid=12323' \
-d 'total_room_fee=12300'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderAlipayfaceSettleMockRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.memo="\"客人要求提前离店\""
req.out_id="外部单号"
req.room_no="12A"
req.other_fee=12300
req.total_room_fee=12300
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.tid=12323
req.other_fee_detail="{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}"
req.room_settle_info_list=""
req.contain_guarantee=1
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.settle.mock");
add_param(pRequest,"memo","\"客人要求提前离店\"");
add_param(pRequest,"out_id","外部单号");
add_param(pRequest,"room_no","12A");
add_param(pRequest,"other_fee","12300");
add_param(pRequest,"total_room_fee","12300");
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,"tid","12323");
add_param(pRequest,"other_fee_detail","{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}");
add_param(pRequest,"room_settle_info_list","数据结构JSON示例");
add_param(pRequest,"contain_guarantee","1");
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.settle.mock', {
'memo':'\"客人要求提前离店\"',
'out_id':'外部单号',
'room_no':'12A',
'other_fee':'12300',
'total_room_fee':'12300',
'daily_price_info':'{"day":"2015-08-12","price":48800},{"day":"2015-08-13","price":48800}',
'check_out':'2015-08-10 00:00:00',
'tid':'12323',
'other_fee_detail':'{\"洗衣费\":5000,\"水吧\":10000,\"优惠\":1000}',
'room_settle_info_list':'数据结构JSON示例',
'contain_guarantee':'1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})