TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripFlightDistributionChangeNewapplyRequest req = new AlitripBtripFlightDistributionChangeNewapplyRequest();
AlitripBtripFlightDistributionChangeNewapplyRequest.BtripFlightModifyApplyRq obj1 = new AlitripBtripFlightDistributionChangeNewapplyRequest.BtripFlightModifyApplyRq();
obj1.setDisOrderId("jianhang1231");
obj1.setDisSubOrderId("jianhang1234");
obj1.setReason("demo");
obj1.setContactPhone("demo");
obj1.setOtaItemId("demo");
obj1.setSessionId("demo");
obj1.setIsVoluntary(1L);
List<AlitripBtripFlightDistributionChangeNewapplyRequest.ModifyFlightInfo> list3 = new ArrayList<AlitripBtripFlightDistributionChangeNewapplyRequest.ModifyFlightInfo>();
AlitripBtripFlightDistributionChangeNewapplyRequest.ModifyFlightInfo obj4 = new AlitripBtripFlightDistributionChangeNewapplyRequest.ModifyFlightInfo();
list3.add(obj4);
obj4.setFlightNo("MU8431");
obj4.setDepDate("2021-07-29");
obj4.setArrCity("HGH");
obj4.setDepCity("BJS");
obj4.setCabin("2");
List<AlitripBtripFlightDistributionChangeNewapplyRequest.PassengerCabinInfo> list7 = new ArrayList<AlitripBtripFlightDistributionChangeNewapplyRequest.PassengerCabinInfo>();
AlitripBtripFlightDistributionChangeNewapplyRequest.PassengerCabinInfo obj8 = new AlitripBtripFlightDistributionChangeNewapplyRequest.PassengerCabinInfo();
list7.add(obj8);
obj8.setOriginFlightNo("MU6754");
obj8.setPassengerName("张三");
obj8.setUserId("836472");
list5.setPassengerInfoList(list7);
obj1.setModifyFlightInfoList(list3);
obj1.setSubChannel("jianhang001");
obj1.setWhetherRetry(false);
req.setParamBtripFlightModifyApplyRq(obj1);
AlitripBtripFlightDistributionChangeNewapplyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripFlightDistributionChangeNewapplyRequest req = new AlitripBtripFlightDistributionChangeNewapplyRequest();
AlitripBtripFlightDistributionChangeNewapplyRequest.BtripFlightModifyApplyRqDomain obj1 = new AlitripBtripFlightDistributionChangeNewapplyRequest.BtripFlightModifyApplyRqDomain();
obj1.DisOrderId = "jianhang1231";
obj1.DisSubOrderId = "jianhang1234";
obj1.Reason = "demo";
obj1.ContactPhone = "demo";
obj1.OtaItemId = "demo";
obj1.SessionId = "demo";
obj1.IsVoluntary = 1L;
List<AlitripBtripFlightDistributionChangeNewapplyRequest.ModifyFlightInfoDomain> list3 = new List<AlitripBtripFlightDistributionChangeNewapplyRequest.ModifyFlightInfoDomain>();
AlitripBtripFlightDistributionChangeNewapplyRequest.ModifyFlightInfoDomain obj4 = new AlitripBtripFlightDistributionChangeNewapplyRequest.ModifyFlightInfoDomain();
list3.Add(obj4);
obj4.FlightNo = "MU8431";
obj4.DepDate = "2021-07-29";
obj4.ArrCity = "HGH";
obj4.DepCity = "BJS";
obj4.Cabin = "2";
List<AlitripBtripFlightDistributionChangeNewapplyRequest.PassengerCabinInfoDomain> list6 = new List<AlitripBtripFlightDistributionChangeNewapplyRequest.PassengerCabinInfoDomain>();
AlitripBtripFlightDistributionChangeNewapplyRequest.PassengerCabinInfoDomain obj7 = new AlitripBtripFlightDistributionChangeNewapplyRequest.PassengerCabinInfoDomain();
list6.Add(obj7);
obj7.OriginFlightNo = "MU6754";
obj7.PassengerName = "张三";
obj7.UserId = "836472";
obj4.PassengerInfoList= list6;
obj1.ModifyFlightInfoList= list3;
obj1.SubChannel = "jianhang001";
obj1.WhetherRetry = false;
req.ParamBtripFlightModifyApplyRq_ = obj1;
AlitripBtripFlightDistributionChangeNewapplyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripFlightDistributionChangeNewapplyRequest;
$param_btrip_flight_modify_apply_rq = new BtripFlightModifyApplyRq;
$param_btrip_flight_modify_apply_rq->dis_order_id="jianhang1231";
$param_btrip_flight_modify_apply_rq->dis_sub_order_id="jianhang1234";
$param_btrip_flight_modify_apply_rq->reason="demo";
$param_btrip_flight_modify_apply_rq->contact_phone="demo";
$param_btrip_flight_modify_apply_rq->ota_item_id="demo";
$param_btrip_flight_modify_apply_rq->session_id="demo";
$param_btrip_flight_modify_apply_rq->is_voluntary="1";
$modify_flight_info_list = new ModifyFlightInfo;
$modify_flight_info_list->flight_no="MU8431";
$modify_flight_info_list->dep_date="2021-07-29";
$modify_flight_info_list->arr_city="HGH";
$modify_flight_info_list->dep_city="BJS";
$modify_flight_info_list->cabin="2";
$passenger_info_list = new PassengerCabinInfo;
$passenger_info_list->origin_flight_no="MU6754";
$passenger_info_list->passenger_name="张三";
$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->sub_channel="jianhang001";
$param_btrip_flight_modify_apply_rq->whether_retry="false";
$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.newapply' \
-d 'partner_id=apidoc' \
-d 'session=45c51de0-2a8b-4b66-a7aa-df281265218a' \
-d 'sign=044663644E49C45A8B69C866981AD40B' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+19%3A28%3A11' \
-d 'v=2.0' \
-d 'param_btrip_flight_modify_apply_rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripFlightDistributionChangeNewapplyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_btrip_flight_modify_apply_rq="数据结构示例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.btrip.flight.distribution.change.newapply");
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.newapply', {
'param_btrip_flight_modify_apply_rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})