TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripItFareBatchdeleteRequest req = new AlitripItFareBatchdeleteRequest();
req.setExtendAttributes("{}");
req.setAirline("CA");
req.setArrCity("SHA,HKG");
req.setCabin("C,F");
req.setCanRt(true);
req.setDepCity("SHA,HKG");
req.setEndModifyDate(StringUtils.parseDateTime("2015-11-11 00:00:00"));
req.setEndRestrictGoDate(StringUtils.parseDateTime("2015-11-11 00:00:00"));
req.setFileCode("abc");
req.setOperateSource("API");
req.setOutId("1");
req.setStartModifyDate(StringUtils.parseDateTime("2015-11-11 00:00:00"));
req.setStartRestrictGoDate(StringUtils.parseDateTime("2015-11-11 00:00:00"));
req.setFareType(1L);
req.setStatusList("0,2");
AlitripItFareBatchdeleteResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripItFareBatchdeleteRequest req = new AlitripItFareBatchdeleteRequest();
req.ExtendAttributes = "{}";
req.Airline = "CA";
req.ArrCity = "SHA,HKG";
req.Cabin = "C,F";
req.CanRt = true;
req.DepCity = "SHA,HKG";
req.EndModifyDate = DateTime.Parse("2015-11-11 00:00:00");
req.EndRestrictGoDate = DateTime.Parse("2015-11-11 00:00:00");
req.FileCode = "abc";
req.OperateSource = "API";
req.OutId = "1";
req.StartModifyDate = DateTime.Parse("2015-11-11 00:00:00");
req.StartRestrictGoDate = DateTime.Parse("2015-11-11 00:00:00");
req.FareType = 1L;
req.StatusList = "0,2";
AlitripItFareBatchdeleteResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripItFareBatchdeleteRequest;
$req->setExtendAttributes("{}");
$req->setAirline("CA");
$req->setArrCity("SHA,HKG");
$req->setCabin("C,F");
$req->setCanRt("true");
$req->setDepCity("SHA,HKG");
$req->setEndModifyDate("2015-11-11 00:00:00");
$req->setEndRestrictGoDate("2015-11-11 00:00:00");
$req->setFileCode("abc");
$req->setOperateSource("API");
$req->setOutId("1");
$req->setStartModifyDate("2015-11-11 00:00:00");
$req->setStartRestrictGoDate("2015-11-11 00:00:00");
$req->setFareType("1");
$req->setStatusList("0,2");
$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.alitrip.it.fare.batchdelete' \
-d 'partner_id=apidoc' \
-d 'session=db0e8d1b-c4ea-4fbd-b470-ff3e671149c4' \
-d 'sign=742E9E63685CB2B61D1923E43CED9B19' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-04+01%3A51%3A58' \
-d 'v=2.0' \
-d 'airline=CA' \
-d 'arrCity=SHA%2CHKG' \
-d 'cabin=C%2CF' \
-d 'canRt=true' \
-d 'depCity=SHA%2CHKG' \
-d 'endModifyDate=2015-11-11+00%3A00%3A00' \
-d 'endRestrictGoDate=2015-11-11+00%3A00%3A00' \
-d 'extendAttributes=%7B%7D' \
-d 'fareType=1' \
-d 'fileCode=abc' \
-d 'operateSource=API' \
-d 'outId=1' \
-d 'startModifyDate=2015-11-11+00%3A00%3A00' \
-d 'startRestrictGoDate=2015-11-11+00%3A00%3A00' \
-d 'statusList=0%2C2'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripItFareBatchdeleteRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.extendAttributes="{}"
req.airline="CA"
req.arrCity="SHA,HKG"
req.cabin="C,F"
req.canRt=true
req.depCity="SHA,HKG"
req.endModifyDate="2015-11-11 00:00:00"
req.endRestrictGoDate="2015-11-11 00:00:00"
req.fileCode="abc"
req.operateSource="API"
req.outId="1"
req.startModifyDate="2015-11-11 00:00:00"
req.startRestrictGoDate="2015-11-11 00:00:00"
req.fareType=1
req.statusList="0,2"
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.alitrip.it.fare.batchdelete");
add_param(pRequest,"extendAttributes","{}");
add_param(pRequest,"airline","CA");
add_param(pRequest,"arrCity","SHA,HKG");
add_param(pRequest,"cabin","C,F");
add_param(pRequest,"canRt","true");
add_param(pRequest,"depCity","SHA,HKG");
add_param(pRequest,"endModifyDate","2015-11-11 00:00:00");
add_param(pRequest,"endRestrictGoDate","2015-11-11 00:00:00");
add_param(pRequest,"fileCode","abc");
add_param(pRequest,"operateSource","API");
add_param(pRequest,"outId","1");
add_param(pRequest,"startModifyDate","2015-11-11 00:00:00");
add_param(pRequest,"startRestrictGoDate","2015-11-11 00:00:00");
add_param(pRequest,"fareType","1");
add_param(pRequest,"statusList","0,2");
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.alitrip.it.fare.batchdelete', {
'extendAttributes':'{}',
'airline':'CA',
'arrCity':'SHA,HKG',
'cabin':'C,F',
'canRt':'true',
'depCity':'SHA,HKG',
'endModifyDate':'2015-11-11 00:00:00',
'endRestrictGoDate':'2015-11-11 00:00:00',
'fileCode':'abc',
'operateSource':'API',
'outId':'1',
'startModifyDate':'2015-11-11 00:00:00',
'startRestrictGoDate':'2015-11-11 00:00:00',
'fareType':'1',
'statusList':'0,2'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})