TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripItFareUpdateRequest req = new AlitripItFareUpdateRequest();
req.setExtendAttributes("{}");
req.setFareId(1L);
req.setFareJson("{\"ticketingAirline\":\"CA\",\"saleAirline\":\"CA\",\"addressOption\":\"城市\",\"tripType\":\"直达\",\"originLand\":\"SHA,BJS\",\"destination\":\"HKG,SHA\",\"cabin\":\"N\",\"restrictFlightNo\":\"\",\"excludeFlightNo\":\"\",\"validDate4Dep\":\"2015-05-30~2015-11-30\",\"flightDateRestrict4Dep\":\"12\",\"saleDate\":\"2015-05-30~2015-11-30\",\"adultPassengerIdentity\":\"普通\",\"ticketPrice\":2000,\"childPrice\":\"1980\",\"returnPoint\":1.0,\"adjustMoney\":0,\"refundRule\":\"费\",\"reissueRule\":\"费\",\"noshowRule\":\"改期\",\"luggageRule\":\"100\"}");
req.setFareType(1L);
req.setOutId("1");
AlitripItFareUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripItFareUpdateRequest req = new AlitripItFareUpdateRequest();
req.ExtendAttributes = "{}";
req.FareId = 1L;
req.FareJson = "{\"ticketingAirline\":\"CA\",\"saleAirline\":\"CA\",\"addressOption\":\"城市\",\"tripType\":\"直达\",\"originLand\":\"SHA,BJS\",\"destination\":\"HKG,SHA\",\"cabin\":\"N\",\"restrictFlightNo\":\"\",\"excludeFlightNo\":\"\",\"validDate4Dep\":\"2015-05-30~2015-11-30\",\"flightDateRestrict4Dep\":\"12\",\"saleDate\":\"2015-05-30~2015-11-30\",\"adultPassengerIdentity\":\"普通\",\"ticketPrice\":2000,\"childPrice\":\"1980\",\"returnPoint\":1.0,\"adjustMoney\":0,\"refundRule\":\"费\",\"reissueRule\":\"费\",\"noshowRule\":\"改期\",\"luggageRule\":\"100\"}";
req.FareType = 1L;
req.OutId = "1";
AlitripItFareUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripItFareUpdateRequest;
$req->setExtendAttributes("{}");
$req->setFareId("1");
$req->setFareJson("{\"ticketingAirline\":\"CA\",\"saleAirline\":\"CA\",\"addressOption\":\"城市\",\"tripType\":\"直达\",\"originLand\":\"SHA,BJS\",\"destination\":\"HKG,SHA\",\"cabin\":\"N\",\"restrictFlightNo\":\"\",\"excludeFlightNo\":\"\",\"validDate4Dep\":\"2015-05-30~2015-11-30\",\"flightDateRestrict4Dep\":\"12\",\"saleDate\":\"2015-05-30~2015-11-30\",\"adultPassengerIdentity\":\"普通\",\"ticketPrice\":2000,\"childPrice\":\"1980\",\"returnPoint\":1.0,\"adjustMoney\":0,\"refundRule\":\"费\",\"reissueRule\":\"费\",\"noshowRule\":\"改期\",\"luggageRule\":\"100\"}");
$req->setFareType("1");
$req->setOutId("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.alitrip.it.fare.update' \
-d 'partner_id=apidoc' \
-d 'session=bbc71155-43c2-4e61-bfb9-0b244ee36678' \
-d 'sign=B9BF10063EC971712566B288BE431AF7' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-04+01%3A55%3A32' \
-d 'v=2.0' \
-d 'extendAttributes=%7B%7D' \
-d 'fareId=1' \
-d 'fareJson=%7B%5C%22ticketingAirline%5C%22%3A%5C%22CA%5C%22%2C%5C%22saleAirline%5C%22%3A%5C%22CA%5C%22%2C%5C%22addressOption%5C%22%3A%5C%22%E5%9F%8E%E5%B8%82%5C%22%2C%5C%22tripType%5C%22%3A%5C%22%E7%9B%B4%E8%BE%BE%5C%22%2C%5C%22originLand%5C%22%3A%5C%22SHA%2CBJS%5C%22%2C%5C%22destination%5C%22%3A%5C%22HKG%2CSHA%5C%22%2C%5C%22cabin%5C%22%3A%5C%22N%5C%22%2C%5C%22restrictFlightNo%5C%22%3A%5C%22%5C%22%2C%5C%22excludeFlightNo%5C%22%3A%5C%22%5C%22%2C%5C%22validDate4Dep%5C%22%3A%5C%222015-05-30%7E2015-11-30%5C%22%2C%5C%22flightDateRestrict4Dep%5C%22%3A%5C%2212%5C%22%2C%5C%22saleDate%5C%22%3A%5C%222015-05-30%7E2015-11-30%5C%22%2C%5C%22adultPassengerIdentity%5C%22%3A%5C%22%E6%99%AE%E9%80%9A%5C%22%2C%5C%22ticketPrice%5C%22%3A2000%2C%5C%22childPrice%5C%22%3A%5C%221980%5C%22%2C%5C%22returnPoint%5C%22%3A1.0%2C%5C%22adjustMoney%5C%22%3A0%2C%5C%22refundRule%5C%22%3A%5C%22%E8%B4%B9%5C%22%2C%5C%22reissueRule%5C%22%3A%5C%22%E8%B4%B9%5C%22%2C%5C%22noshowRule%5C%22%3A%5C%22%E6%94%B9%E6%9C%9F%5C%22%2C%5C%22luggageRule%5C%22%3A%5C%22100%5C%22%7D' \
-d 'fareType=1' \
-d 'outId=1'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripItFareUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.extendAttributes="{}"
req.fareId=1
req.fareJson="{\"ticketingAirline\":\"CA\",\"saleAirline\":\"CA\",\"addressOption\":\"城市\",\"tripType\":\"直达\",\"originLand\":\"SHA,BJS\",\"destination\":\"HKG,SHA\",\"cabin\":\"N\",\"restrictFlightNo\":\"\",\"excludeFlightNo\":\"\",\"validDate4Dep\":\"2015-05-30~2015-11-30\",\"flightDateRestrict4Dep\":\"12\",\"saleDate\":\"2015-05-30~2015-11-30\",\"adultPassengerIdentity\":\"普通\",\"ticketPrice\":2000,\"childPrice\":\"1980\",\"returnPoint\":1.0,\"adjustMoney\":0,\"refundRule\":\"费\",\"reissueRule\":\"费\",\"noshowRule\":\"改期\",\"luggageRule\":\"100\"}"
req.fareType=1
req.outId="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.alitrip.it.fare.update");
add_param(pRequest,"extendAttributes","{}");
add_param(pRequest,"fareId","1");
add_param(pRequest,"fareJson","{\"ticketingAirline\":\"CA\",\"saleAirline\":\"CA\",\"addressOption\":\"城市\",\"tripType\":\"直达\",\"originLand\":\"SHA,BJS\",\"destination\":\"HKG,SHA\",\"cabin\":\"N\",\"restrictFlightNo\":\"\",\"excludeFlightNo\":\"\",\"validDate4Dep\":\"2015-05-30~2015-11-30\",\"flightDateRestrict4Dep\":\"12\",\"saleDate\":\"2015-05-30~2015-11-30\",\"adultPassengerIdentity\":\"普通\",\"ticketPrice\":2000,\"childPrice\":\"1980\",\"returnPoint\":1.0,\"adjustMoney\":0,\"refundRule\":\"费\",\"reissueRule\":\"费\",\"noshowRule\":\"改期\",\"luggageRule\":\"100\"}");
add_param(pRequest,"fareType","1");
add_param(pRequest,"outId","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.alitrip.it.fare.update', {
'extendAttributes':'{}',
'fareId':'1',
'fareJson':'{\"ticketingAirline\":\"CA\",\"saleAirline\":\"CA\",\"addressOption\":\"城市\",\"tripType\":\"直达\",\"originLand\":\"SHA,BJS\",\"destination\":\"HKG,SHA\",\"cabin\":\"N\",\"restrictFlightNo\":\"\",\"excludeFlightNo\":\"\",\"validDate4Dep\":\"2015-05-30~2015-11-30\",\"flightDateRestrict4Dep\":\"12\",\"saleDate\":\"2015-05-30~2015-11-30\",\"adultPassengerIdentity\":\"普通\",\"ticketPrice\":2000,\"childPrice\":\"1980\",\"returnPoint\":1.0,\"adjustMoney\":0,\"refundRule\":\"费\",\"reissueRule\":\"费\",\"noshowRule\":\"改期\",\"luggageRule\":\"100\"}',
'fareType':'1',
'outId':'1'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})