TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripFlightDistributionChangeApplyRequest req = new AlitripBtripFlightDistributionChangeApplyRequest();
AlitripBtripFlightDistributionChangeApplyRequest.BtripFlightModifyApplyRq obj1 = new AlitripBtripFlightDistributionChangeApplyRequest.BtripFlightModifyApplyRq();
obj1.setIsVoluntary(1L);
List<AlitripBtripFlightDistributionChangeApplyRequest.ModifyFlightInfo> list3 = new ArrayList<AlitripBtripFlightDistributionChangeApplyRequest.ModifyFlightInfo>();
AlitripBtripFlightDistributionChangeApplyRequest.ModifyFlightInfo obj4 = new AlitripBtripFlightDistributionChangeApplyRequest.ModifyFlightInfo();
list3.add(obj4);
obj4.setArrCity("HGH");
obj4.setCabin("2");
obj4.setDepCity("BJS");
obj4.setDepDate("2021-07-29");
obj4.setFlightNo("MU8431");
List<AlitripBtripFlightDistributionChangeApplyRequest.PassengerCabinInfo> list7 = new ArrayList<AlitripBtripFlightDistributionChangeApplyRequest.PassengerCabinInfo>();
AlitripBtripFlightDistributionChangeApplyRequest.PassengerCabinInfo obj8 = new AlitripBtripFlightDistributionChangeApplyRequest.PassengerCabinInfo();
list7.add(obj8);
obj8.setChangeFee(40000L);
obj8.setOriginFlightNo("MU6754");
obj8.setPassengerName("张三");
obj8.setUpgradeFee(30000L);
obj8.setUserId("836472");
list5.setPassengerInfoList(list7);
obj1.setModifyFlightInfoList(list3);
obj1.setDisOrderId("214351216");
obj1.setReason("工作需要");
obj1.setSubChannel("jianhang001");
obj1.setDisSubOrderId("2565168");
req.setParamBtripFlightModifyApplyRq(obj1);
AlitripBtripFlightDistributionChangeApplyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripFlightDistributionChangeApplyRequest req = new AlitripBtripFlightDistributionChangeApplyRequest();
AlitripBtripFlightDistributionChangeApplyRequest.BtripFlightModifyApplyRqDomain obj1 = new AlitripBtripFlightDistributionChangeApplyRequest.BtripFlightModifyApplyRqDomain();
obj1.IsVoluntary = 1L;
List<AlitripBtripFlightDistributionChangeApplyRequest.ModifyFlightInfoDomain> list3 = new List<AlitripBtripFlightDistributionChangeApplyRequest.ModifyFlightInfoDomain>();
AlitripBtripFlightDistributionChangeApplyRequest.ModifyFlightInfoDomain obj4 = new AlitripBtripFlightDistributionChangeApplyRequest.ModifyFlightInfoDomain();
list3.Add(obj4);
obj4.ArrCity = "HGH";
obj4.Cabin = "2";
obj4.DepCity = "BJS";
obj4.DepDate = "2021-07-29";
obj4.FlightNo = "MU8431";
List<AlitripBtripFlightDistributionChangeApplyRequest.PassengerCabinInfoDomain> list6 = new List<AlitripBtripFlightDistributionChangeApplyRequest.PassengerCabinInfoDomain>();
AlitripBtripFlightDistributionChangeApplyRequest.PassengerCabinInfoDomain obj7 = new AlitripBtripFlightDistributionChangeApplyRequest.PassengerCabinInfoDomain();
list6.Add(obj7);
obj7.ChangeFee = 40000L;
obj7.OriginFlightNo = "MU6754";
obj7.PassengerName = "张三";
obj7.UpgradeFee = 30000L;
obj7.UserId = "836472";
obj4.PassengerInfoList= list6;
obj1.ModifyFlightInfoList= list3;
obj1.DisOrderId = "214351216";
obj1.Reason = "工作需要";
obj1.SubChannel = "jianhang001";
obj1.DisSubOrderId = "2565168";
req.ParamBtripFlightModifyApplyRq_ = obj1;
AlitripBtripFlightDistributionChangeApplyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripFlightDistributionChangeApplyRequest;
$param_btrip_flight_modify_apply_rq = new BtripFlightModifyApplyRq;
$param_btrip_flight_modify_apply_rq->is_voluntary="1";
$modify_flight_info_list = new ModifyFlightInfo;
$modify_flight_info_list->arr_city="HGH";
$modify_flight_info_list->cabin="2";
$modify_flight_info_list->dep_city="BJS";
$modify_flight_info_list->dep_date="2021-07-29";
$modify_flight_info_list->flight_no="MU8431";
$passenger_info_list = new PassengerCabinInfo;
$passenger_info_list->change_fee="40000";
$passenger_info_list->origin_flight_no="MU6754";
$passenger_info_list->passenger_name="张三";
$passenger_info_list->upgrade_fee="30000";
$passenger_info_list->user_id="836472";
$modify_flight_info_list->passenger_info_list = $passenger_info_list;
$param_btrip_flight_modify_apply_rq->modify_flight_info_list = $modify_flight_info_list;
$param_btrip_flight_modify_apply_rq->dis_order_id="214351216";
$param_btrip_flight_modify_apply_rq->reason="工作需要";
$param_btrip_flight_modify_apply_rq->sub_channel="jianhang001";
$param_btrip_flight_modify_apply_rq->dis_sub_order_id="2565168";
$req->setParamBtripFlightModifyApplyRq(json_encode($param_btrip_flight_modify_apply_rq));
$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.btrip.flight.distribution.change.apply' \
-d 'partner_id=apidoc' \
-d 'session=086d1176-297d-43f7-b086-39474501b063' \
-d 'sign=77F32A22F7F62EF00FAD601B4B5DC494' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+20%3A23%3A49' \
-d 'v=2.0' \
-d 'param_btrip_flight_modify_apply_rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripFlightDistributionChangeApplyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_btrip_flight_modify_apply_rq=""
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.btrip.flight.distribution.change.apply");
add_param(pRequest,"param_btrip_flight_modify_apply_rq","数据结构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.btrip.flight.distribution.change.apply', {
'param_btrip_flight_modify_apply_rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})