TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelPmsGuestbillGetVtwoRequest req = new XhotelPmsGuestbillGetVtwoRequest();
req.setTaxNum("122323");
req.setShortIdNum("1234");
req.setRoomNum("101");
req.setRequestId("12134serweg");
req.setUserChannel(1L);
XhotelPmsGuestbillGetVtwoResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelPmsGuestbillGetVtwoRequest req = new XhotelPmsGuestbillGetVtwoRequest();
req.TaxNum = "122323";
req.ShortIdNum = "1234";
req.RoomNum = "101";
req.RequestId = "12134serweg";
req.UserChannel = 1L;
XhotelPmsGuestbillGetVtwoResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelPmsGuestbillGetVtwoRequest;
$req->setTaxNum("122323");
$req->setShortIdNum("1234");
$req->setRoomNum("101");
$req->setRequestId("12134serweg");
$req->setUserChannel("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.pms.guestbill.get.vtwo' \
-d 'partner_id=apidoc' \
-d 'session=f3bbd5d3-588b-40eb-a216-d92b39c27ddd' \
-d 'sign=9738C60077099B1B413794C1F50BEF2F' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+19%3A51%3A06' \
-d 'v=2.0' \
-d 'request_id=12134serweg' \
-d 'room_num=101' \
-d 'short_id_num=1234' \
-d 'tax_num=122323' \
-d 'user_channel=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelPmsGuestbillGetVtwoRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.tax_num="122323"
req.short_id_num="1234"
req.room_num="101"
req.request_id="12134serweg"
req.user_channel=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.pms.guestbill.get.vtwo");
add_param(pRequest,"tax_num","122323");
add_param(pRequest,"short_id_num","1234");
add_param(pRequest,"room_num","101");
add_param(pRequest,"request_id","12134serweg");
add_param(pRequest,"user_channel","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.pms.guestbill.get.vtwo', {
'tax_num':'122323',
'short_id_num':'1234',
'room_num':'101',
'request_id':'12134serweg',
'user_channel':'1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})