TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderCreditLoanUpdateRequest req = new XhotelOrderCreditLoanUpdateRequest();
req.setTid(12323232L);
req.setLoanReasonCode(1L);
req.setVoucher(0L);
req.setRemark("垫付订单");
req.setOperator("小红");
req.setPmsPic("http:xxxx.pms.jpg");
req.setCardPic("http:xxxx.idcard.jpg");
req.setCheckInPic("http:xxxx.checkin.jpg");
XhotelOrderCreditLoanUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderCreditLoanUpdateRequest req = new XhotelOrderCreditLoanUpdateRequest();
req.Tid = 12323232L;
req.LoanReasonCode = 1L;
req.Voucher = 0L;
req.Remark = "垫付订单";
req.Operator = "小红";
req.PmsPic = "http:xxxx.pms.jpg";
req.CardPic = "http:xxxx.idcard.jpg";
req.CheckInPic = "http:xxxx.checkin.jpg";
XhotelOrderCreditLoanUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderCreditLoanUpdateRequest;
$req->setTid("12323232");
$req->setLoanReasonCode("1");
$req->setVoucher("0");
$req->setRemark("垫付订单");
$req->setOperator("小红");
$req->setPmsPic("http:xxxx.pms.jpg");
$req->setCardPic("http:xxxx.idcard.jpg");
$req->setCheckInPic("http:xxxx.checkin.jpg");
$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.credit.loan.update' \
-d 'partner_id=apidoc' \
-d 'session=6da5e26a-441f-400e-9c4e-5663a01a6588' \
-d 'sign=3536C023139333E03EDF93042136F721' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+19%3A29%3A44' \
-d 'v=2.0' \
-d 'card_pic=http%3Axxxx.idcard.jpg' \
-d 'check_in_pic=http%3Axxxx.checkin.jpg' \
-d 'loan_reason_code=1' \
-d 'operator=%E5%B0%8F%E7%BA%A2' \
-d 'pms_pic=http%3Axxxx.pms.jpg' \
-d 'remark=%E5%9E%AB%E4%BB%98%E8%AE%A2%E5%8D%95' \
-d 'tid=12323232' \
-d 'voucher=0'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderCreditLoanUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.tid=12323232
req.loan_reason_code=1
req.voucher=0
req.remark="垫付订单"
req.operator="小红"
req.pms_pic="http:xxxx.pms.jpg"
req.card_pic="http:xxxx.idcard.jpg"
req.check_in_pic="http:xxxx.checkin.jpg"
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.credit.loan.update");
add_param(pRequest,"tid","12323232");
add_param(pRequest,"loan_reason_code","1");
add_param(pRequest,"voucher","0");
add_param(pRequest,"remark","垫付订单");
add_param(pRequest,"operator","小红");
add_param(pRequest,"pms_pic","http:xxxx.pms.jpg");
add_param(pRequest,"card_pic","http:xxxx.idcard.jpg");
add_param(pRequest,"check_in_pic","http:xxxx.checkin.jpg");
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.credit.loan.update', {
'tid':'12323232',
'loan_reason_code':'1',
'voucher':'0',
'remark':'垫付订单',
'operator':'小红',
'pms_pic':'http:xxxx.pms.jpg',
'card_pic':'http:xxxx.idcard.jpg',
'check_in_pic':'http:xxxx.checkin.jpg'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})