TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripIeAgentChangeFillchangeRequest req = new AlitripIeAgentChangeFillchangeRequest();
AlitripIeAgentChangeFillchangeRequest.IeChangeItemVo obj1 = new AlitripIeAgentChangeFillchangeRequest.IeChangeItemVo();
obj1.setAdultServiceFee(100L);
obj1.setAdultUpgradeFee(100L);
obj1.setBaggageRule("30KG");
obj1.setChildServiceFee(100L);
obj1.setChildUpgradeFee(100L);
List<AlitripIeAgentChangeFillchangeRequest.IeChangeItineraryVo> list3 = new ArrayList<AlitripIeAgentChangeFillchangeRequest.IeChangeItineraryVo>();
AlitripIeAgentChangeFillchangeRequest.IeChangeItineraryVo obj4 = new AlitripIeAgentChangeFillchangeRequest.IeChangeItineraryVo();
list3.add(obj4);
obj4.setArrCityCode("BJS");
List<AlitripIeAgentChangeFillchangeRequest.IeChangeFlightSegmentVo> list7 = new ArrayList<AlitripIeAgentChangeFillchangeRequest.IeChangeFlightSegmentVo>();
AlitripIeAgentChangeFillchangeRequest.IeChangeFlightSegmentVo obj8 = new AlitripIeAgentChangeFillchangeRequest.IeChangeFlightSegmentVo();
list7.add(obj8);
obj8.setArrAirport("SHA");
obj8.setArrCity("SHA");
obj8.setArrTerminal("1");
obj8.setArrTime(StringUtils.parseDateTime("2017-10-01 00:00:00"));
obj8.setCabinClassCode("Y");
obj8.setCabinCode("Q");
obj8.setCodeShare(true);
obj8.setDepAirport("SHA");
obj8.setDepCity("SHA");
obj8.setDepTerminal("1");
obj8.setDepTime(StringUtils.parseDateTime("2017-10-01 00:00:00"));
obj8.setMarketingFlightNumber("CZ1001");
obj8.setOperatingFlightNumber("CZ1001");
obj8.setSegmentIndex(1L);
list5.setChangeFlights(list7);
obj4.setDepCityCode("BJS");
obj4.setIndex(1L);
obj1.setDestinationItinerary(list3);
obj1.setInfantUpgradeFee(100L);
obj1.setInfantServiceFee(100L);
req.setChangeItemParam(obj1);
List<AlitripIeAgentChangeFillchangeRequest.IeChangePnrParamVo> list10 = new ArrayList<AlitripIeAgentChangeFillchangeRequest.IeChangePnrParamVo>();
AlitripIeAgentChangeFillchangeRequest.IeChangePnrParamVo obj11 = new AlitripIeAgentChangeFillchangeRequest.IeChangePnrParamVo();
list10.add(obj11);
obj11.setPassengerName("taobao");
obj11.setPnrNO("PNRSZ");
req.setChangePnrParams(list10);
req.setChangeOrderId(123456L);
AlitripIeAgentChangeFillchangeResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripIeAgentChangeFillchangeRequest req = new AlitripIeAgentChangeFillchangeRequest();
AlitripIeAgentChangeFillchangeRequest.IeChangeItemVoDomain obj1 = new AlitripIeAgentChangeFillchangeRequest.IeChangeItemVoDomain();
obj1.AdultServiceFee = 100L;
obj1.AdultUpgradeFee = 100L;
obj1.BaggageRule = "30KG";
obj1.ChildServiceFee = 100L;
obj1.ChildUpgradeFee = 100L;
List<AlitripIeAgentChangeFillchangeRequest.IeChangeItineraryVoDomain> list3 = new List<AlitripIeAgentChangeFillchangeRequest.IeChangeItineraryVoDomain>();
AlitripIeAgentChangeFillchangeRequest.IeChangeItineraryVoDomain obj4 = new AlitripIeAgentChangeFillchangeRequest.IeChangeItineraryVoDomain();
list3.Add(obj4);
obj4.ArrCityCode = "BJS";
List<AlitripIeAgentChangeFillchangeRequest.IeChangeFlightSegmentVoDomain> list6 = new List<AlitripIeAgentChangeFillchangeRequest.IeChangeFlightSegmentVoDomain>();
AlitripIeAgentChangeFillchangeRequest.IeChangeFlightSegmentVoDomain obj7 = new AlitripIeAgentChangeFillchangeRequest.IeChangeFlightSegmentVoDomain();
list6.Add(obj7);
obj7.ArrAirport = "SHA";
obj7.ArrCity = "SHA";
obj7.ArrTerminal = "1";
obj7.ArrTime = DateTime.Parse(2017-10-01 00:00:00");
obj7.CabinClassCode = "Y";
obj7.CabinCode = "Q";
obj7.CodeShare = true;
obj7.DepAirport = "SHA";
obj7.DepCity = "SHA";
obj7.DepTerminal = "1";
obj7.DepTime = DateTime.Parse(2017-10-01 00:00:00");
obj7.MarketingFlightNumber = "CZ1001";
obj7.OperatingFlightNumber = "CZ1001";
obj7.SegmentIndex = 1L;
obj4.ChangeFlights= list6;
obj4.DepCityCode = "BJS";
obj4.Index = 1L;
obj1.DestinationItinerary= list3;
obj1.InfantUpgradeFee = 100L;
obj1.InfantServiceFee = 100L;
req.ChangeItemParam_ = obj1;
List<AlitripIeAgentChangeFillchangeRequest.IeChangePnrParamVoDomain> list9 = new List<AlitripIeAgentChangeFillchangeRequest.IeChangePnrParamVoDomain>();
AlitripIeAgentChangeFillchangeRequest.IeChangePnrParamVoDomain obj10 = new AlitripIeAgentChangeFillchangeRequest.IeChangePnrParamVoDomain();
list9.Add(obj10);
obj10.PassengerName = "taobao";
obj10.PnrNO = "PNRSZ";
req.ChangePnrParams_ = list9;
req.ChangeOrderId = 123456L;
AlitripIeAgentChangeFillchangeResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripIeAgentChangeFillchangeRequest;
$change_item_param = new IeChangeItemVo;
$change_item_param->adult_service_fee="100";
$change_item_param->adult_upgrade_fee="100";
$change_item_param->baggage_rule="30KG";
$change_item_param->child_service_fee="100";
$change_item_param->child_upgrade_fee="100";
$destination_itinerary = new IeChangeItineraryVo;
$destination_itinerary->arr_city_code="BJS";
$change_flights = new IeChangeFlightSegmentVo;
$change_flights->arr_airport="SHA";
$change_flights->arr_city="SHA";
$change_flights->arr_terminal="1";
$change_flights->arr_time="2017-10-01 00:00:00";
$change_flights->cabin_class_code="Y";
$change_flights->cabin_code="Q";
$change_flights->code_share="true";
$change_flights->dep_airport="SHA";
$change_flights->dep_city="SHA";
$change_flights->dep_terminal="1";
$change_flights->dep_time="2017-10-01 00:00:00";
$change_flights->marketing_flight_number="CZ1001";
$change_flights->operating_flight_number="CZ1001";
$change_flights->segment_index="1";
$destination_itinerary->change_flights = $change_flights;
$destination_itinerary->dep_city_code="BJS";
$destination_itinerary->index="1";
$change_item_param->destination_itinerary = $destination_itinerary;
$change_item_param->infant_upgrade_fee="100";
$change_item_param->infant_service_fee="100";
$req->setChangeItemParam(json_encode($change_item_param));
$change_pnr_params = new IeChangePnrParamVo;
$change_pnr_params->passenger_name="taobao";
$change_pnr_params->pnr_n_o="PNRSZ";
$req->setChangePnrParams(json_encode($change_pnr_params));
$req->setChangeOrderId("123456");
$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.ie.agent.change.fillchange' \
-d 'partner_id=apidoc' \
-d 'session=d8574859-5782-443f-9381-e225e856f56b' \
-d 'sign=BB3EE208620D8E010DD07927333F6056' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+22%3A25%3A19' \
-d 'v=2.0' \
-d 'change_item_param=null' \
-d 'change_order_id=123456' \
-d 'change_pnr_params=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripIeAgentChangeFillchangeRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.change_item_param=""
req.change_pnr_params=""
req.change_order_id=123456
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.ie.agent.change.fillchange");
add_param(pRequest,"change_item_param","数据结构JSON示例");
add_param(pRequest,"change_pnr_params","数据结构JSON示例");
add_param(pRequest,"change_order_id","123456");
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.ie.agent.change.fillchange', {
'change_item_param':'数据结构JSON示例',
'change_pnr_params':'数据结构JSON示例',
'change_order_id':'123456'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})