TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripFlightChangeOrderCreateRequest req = new AlitripFlightChangeOrderCreateRequest();
AlitripFlightChangeOrderCreateRequest.ChangeOrderCreateRequest obj1 = new AlitripFlightChangeOrderCreateRequest.ChangeOrderCreateRequest();
obj1.setContactMobileNumber("18310000000");
obj1.setOrderId(3865460347907L);
obj1.setUpgradeCabinClass(false);
List<AlitripFlightChangeOrderCreateRequest.ChangePassengerParam> list3 = new ArrayList<AlitripFlightChangeOrderCreateRequest.ChangePassengerParam>();
AlitripFlightChangeOrderCreateRequest.ChangePassengerParam obj4 = new AlitripFlightChangeOrderCreateRequest.ChangePassengerParam();
list3.add(obj4);
obj4.setPassengerName("张三");
obj4.setCredentialNo("412020101010101010");
obj1.setChangePassengerParams(list3);
List<AlitripFlightChangeOrderCreateRequest.ChangeFlightSegmentParam> list6 = new ArrayList<AlitripFlightChangeOrderCreateRequest.ChangeFlightSegmentParam>();
AlitripFlightChangeOrderCreateRequest.ChangeFlightSegmentParam obj7 = new AlitripFlightChangeOrderCreateRequest.ChangeFlightSegmentParam();
list6.add(obj7);
obj7.setDepAirportCode("PEK");
obj7.setOperatingFlightNo("SC2210");
obj7.setArrCityCode("HGH");
obj7.setMarketingFlightNo("MU5147");
obj7.setArrDateTime("2022-03-30 14:35:00");
obj7.setArrAirportCode("HGH");
obj7.setDepCityCode("BJS");
obj7.setDepDateTime("2022-03-30 12:35:00");
obj1.setChangeFlightSegmentParams(list6);
req.setChangeOrderCreateRequest(obj1);
AlitripFlightChangeOrderCreateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripFlightChangeOrderCreateRequest req = new AlitripFlightChangeOrderCreateRequest();
AlitripFlightChangeOrderCreateRequest.ChangeOrderCreateRequestDomain obj1 = new AlitripFlightChangeOrderCreateRequest.ChangeOrderCreateRequestDomain();
obj1.ContactMobileNumber = "18310000000";
obj1.OrderId = 3865460347907L;
obj1.UpgradeCabinClass = false;
List<AlitripFlightChangeOrderCreateRequest.ChangePassengerParamDomain> list3 = new List<AlitripFlightChangeOrderCreateRequest.ChangePassengerParamDomain>();
AlitripFlightChangeOrderCreateRequest.ChangePassengerParamDomain obj4 = new AlitripFlightChangeOrderCreateRequest.ChangePassengerParamDomain();
list3.Add(obj4);
obj4.PassengerName = "张三";
obj4.CredentialNo = "412020101010101010";
obj1.ChangePassengerParams= list3;
List<AlitripFlightChangeOrderCreateRequest.ChangeFlightSegmentParamDomain> list6 = new List<AlitripFlightChangeOrderCreateRequest.ChangeFlightSegmentParamDomain>();
AlitripFlightChangeOrderCreateRequest.ChangeFlightSegmentParamDomain obj7 = new AlitripFlightChangeOrderCreateRequest.ChangeFlightSegmentParamDomain();
list6.Add(obj7);
obj7.DepAirportCode = "PEK";
obj7.OperatingFlightNo = "SC2210";
obj7.ArrCityCode = "HGH";
obj7.MarketingFlightNo = "MU5147";
obj7.ArrDateTime = "2022-03-30 14:35:00";
obj7.ArrAirportCode = "HGH";
obj7.DepCityCode = "BJS";
obj7.DepDateTime = "2022-03-30 12:35:00";
obj1.ChangeFlightSegmentParams= list6;
req.ChangeOrderCreateRequest_ = obj1;
AlitripFlightChangeOrderCreateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripFlightChangeOrderCreateRequest;
$change_order_create_request = new ChangeOrderCreateRequest;
$change_order_create_request->contact_mobile_number="18310000000";
$change_order_create_request->order_id="3865460347907";
$change_order_create_request->upgrade_cabin_class="false";
$change_passenger_params = new ChangePassengerParam;
$change_passenger_params->passenger_name="张三";
$change_passenger_params->credential_no="412020101010101010";
$change_order_create_request->change_passenger_params = $change_passenger_params;
$change_flight_segment_params = new ChangeFlightSegmentParam;
$change_flight_segment_params->dep_airport_code="PEK";
$change_flight_segment_params->operating_flight_no="SC2210";
$change_flight_segment_params->arr_city_code="HGH";
$change_flight_segment_params->marketing_flight_no="MU5147";
$change_flight_segment_params->arr_date_time="2022-03-30 14:35:00";
$change_flight_segment_params->arr_airport_code="HGH";
$change_flight_segment_params->dep_city_code="BJS";
$change_flight_segment_params->dep_date_time="2022-03-30 12:35:00";
$change_order_create_request->change_flight_segment_params = $change_flight_segment_params;
$req->setChangeOrderCreateRequest(json_encode($change_order_create_request));
$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=alitrip.flight.change.order.create' \
-d 'partner_id=apidoc' \
-d 'session=dae652bb-ff0a-4237-9068-563daf66ed34' \
-d 'sign=A75F10C4B86545FFD913C6EBD420EEE4' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-30+13%3A02%3A02' \
-d 'v=2.0' \
-d 'change_order_create_request=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripFlightChangeOrderCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.change_order_create_request="数据结构示例JSON格式"
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,"alitrip.flight.change.order.create");
add_param(pRequest,"change_order_create_request","数据结构JSON示例");
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('alitrip.flight.change.order.create', {
'change_order_create_request':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})