TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelRateDeleteRequest req = new XhotelRateDeleteRequest();
req.setRateId(10000L);
req.setRpId(10000L);
req.setVendor("taobao");
req.setRateplanCode("12345AAA");
req.setOutRid("12345AAA");
req.setGid("10000");
XhotelRateDeleteResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelRateDeleteRequest req = new XhotelRateDeleteRequest();
req.RateId = 10000L;
req.RpId = 10000L;
req.Vendor = "taobao";
req.RateplanCode = "12345AAA";
req.OutRid = "12345AAA";
req.Gid = "10000";
XhotelRateDeleteResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelRateDeleteRequest;
$req->setRateId("10000");
$req->setRpId("10000");
$req->setVendor("taobao");
$req->setRateplanCode("12345AAA");
$req->setOutRid("12345AAA");
$req->setGid("10000");
$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.rate.delete' \
-d 'partner_id=apidoc' \
-d 'session=330ccf4b-70e0-4fa6-bdc2-c34197054b91' \
-d 'sign=AA7336910A3D8DF17A29C3EB9340CB8C' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-26+19%3A01%3A18' \
-d 'v=2.0' \
-d 'gid=10000' \
-d 'out_rid=12345AAA' \
-d 'rate_id=10000' \
-d 'rateplan_code=12345AAA' \
-d 'rp_id=10000' \
-d 'vendor=taobao'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelRateDeleteRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.rate_id=10000
req.rp_id=10000
req.vendor="taobao"
req.rateplan_code="12345AAA"
req.out_rid="12345AAA"
req.gid="10000"
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.rate.delete");
add_param(pRequest,"rate_id","10000");
add_param(pRequest,"rp_id","10000");
add_param(pRequest,"vendor","taobao");
add_param(pRequest,"rateplan_code","12345AAA");
add_param(pRequest,"out_rid","12345AAA");
add_param(pRequest,"gid","10000");
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.rate.delete', {
'rate_id':'10000',
'rp_id':'10000',
'vendor':'taobao',
'rateplan_code':'12345AAA',
'out_rid':'12345AAA',
'gid':'10000'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})