TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripAgentFlightSellModifyApproveRequest req = new AlitripAgentFlightSellModifyApproveRequest();
AlitripAgentFlightSellModifyApproveRequest.ModifyApproveRequestDto obj1 = new AlitripAgentFlightSellModifyApproveRequest.ModifyApproveRequestDto();
obj1.setApplyId("123");
obj1.setDomesticIntl(1L);
List<AlitripAgentFlightSellModifyApproveRequest.ModifyItemDTO> list3 = new ArrayList<AlitripAgentFlightSellModifyApproveRequest.ModifyItemDTO>();
AlitripAgentFlightSellModifyApproveRequest.ModifyItemDTO obj4 = new AlitripAgentFlightSellModifyApproveRequest.ModifyItemDTO();
list3.add(obj4);
obj4.setPassengerName("tester");
obj4.setTickets("'012-123123123123'");
obj4.setPnr("HOYQ1R");
List<AlitripAgentFlightSellModifyApproveRequest.ModifySegmentDTO> list7 = new ArrayList<AlitripAgentFlightSellModifyApproveRequest.ModifySegmentDTO>();
AlitripAgentFlightSellModifyApproveRequest.ModifySegmentDTO obj8 = new AlitripAgentFlightSellModifyApproveRequest.ModifySegmentDTO();
list7.add(obj8);
obj8.setCabinClass("Y");
obj8.setFlightNo("SQ123");
obj8.setDepTime(StringUtils.parseDateTime("2020-12-12 11:11:11"));
obj8.setArrCity("HKG");
obj8.setDepCity("PEK");
obj8.setCabin("Y");
obj8.setSegmentIndex(1L);
obj8.setArrAirport("PEK");
obj8.setDepAirport("HKG");
obj8.setArrTime(StringUtils.parseDateTime("2020-12-12 11:11:11"));
obj8.setOdIndex(1L);
obj8.setTicketNo("012-123123123123");
list5.setAfterChangeSegments(list7);
obj4.setModifyFee(10000L);
obj4.setUpgradeFee(10000L);
List<AlitripAgentFlightSellModifyApproveRequest.ModifyBeforeSegmentDTO> list11 = new ArrayList<AlitripAgentFlightSellModifyApproveRequest.ModifyBeforeSegmentDTO>();
AlitripAgentFlightSellModifyApproveRequest.ModifyBeforeSegmentDTO obj12 = new AlitripAgentFlightSellModifyApproveRequest.ModifyBeforeSegmentDTO();
list11.add(obj12);
obj12.setArrCity("PEK");
obj12.setDepCity("HKG");
list9.setBeforeChangeSegments(list11);
obj1.setChangeList(list3);
obj1.setRefundWayType(0L);
req.setParam(obj1);
AlitripAgentFlightSellModifyApproveResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripAgentFlightSellModifyApproveRequest req = new AlitripAgentFlightSellModifyApproveRequest();
AlitripAgentFlightSellModifyApproveRequest.ModifyApproveRequestDtoDomain obj1 = new AlitripAgentFlightSellModifyApproveRequest.ModifyApproveRequestDtoDomain();
obj1.ApplyId = "123";
obj1.DomesticIntl = 1L;
List<AlitripAgentFlightSellModifyApproveRequest.ModifyItemDTODomain> list3 = new List<AlitripAgentFlightSellModifyApproveRequest.ModifyItemDTODomain>();
AlitripAgentFlightSellModifyApproveRequest.ModifyItemDTODomain obj4 = new AlitripAgentFlightSellModifyApproveRequest.ModifyItemDTODomain();
list3.Add(obj4);
obj4.PassengerName = "tester";
obj4.Tickets = "'012-123123123123'";
obj4.Pnr = "HOYQ1R";
List<AlitripAgentFlightSellModifyApproveRequest.ModifySegmentDTODomain> list6 = new List<AlitripAgentFlightSellModifyApproveRequest.ModifySegmentDTODomain>();
AlitripAgentFlightSellModifyApproveRequest.ModifySegmentDTODomain obj7 = new AlitripAgentFlightSellModifyApproveRequest.ModifySegmentDTODomain();
list6.Add(obj7);
obj7.CabinClass = "Y";
obj7.FlightNo = "SQ123";
obj7.DepTime = DateTime.Parse(2020-12-12 11:11:11");
obj7.ArrCity = "HKG";
obj7.DepCity = "PEK";
obj7.Cabin = "Y";
obj7.SegmentIndex = 1L;
obj7.ArrAirport = "PEK";
obj7.DepAirport = "HKG";
obj7.ArrTime = DateTime.Parse(2020-12-12 11:11:11");
obj7.OdIndex = 1L;
obj7.TicketNo = "012-123123123123";
obj4.AfterChangeSegments= list6;
obj4.ModifyFee = 10000L;
obj4.UpgradeFee = 10000L;
List<AlitripAgentFlightSellModifyApproveRequest.ModifyBeforeSegmentDTODomain> list9 = new List<AlitripAgentFlightSellModifyApproveRequest.ModifyBeforeSegmentDTODomain>();
AlitripAgentFlightSellModifyApproveRequest.ModifyBeforeSegmentDTODomain obj10 = new AlitripAgentFlightSellModifyApproveRequest.ModifyBeforeSegmentDTODomain();
list9.Add(obj10);
obj10.ArrCity = "PEK";
obj10.DepCity = "HKG";
obj4.BeforeChangeSegments= list9;
obj1.ChangeList= list3;
obj1.RefundWayType = 0L;
req.Param_ = obj1;
AlitripAgentFlightSellModifyApproveResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripAgentFlightSellModifyApproveRequest;
$param = new ModifyApproveRequestDto;
$param->apply_id="123";
$param->domestic_intl="1";
$change_list = new ModifyItemDTO;
$change_list->passenger_name="tester";
$change_list->tickets="['012-123123123123']";
$change_list->pnr="HOYQ1R";
$after_change_segments = new ModifySegmentDTO;
$after_change_segments->cabin_class="Y";
$after_change_segments->flight_no="SQ123";
$after_change_segments->dep_time="2020-12-12 11:11:11";
$after_change_segments->arr_city="HKG";
$after_change_segments->dep_city="PEK";
$after_change_segments->cabin="Y";
$after_change_segments->segment_index="1";
$after_change_segments->arr_airport="PEK";
$after_change_segments->dep_airport="HKG";
$after_change_segments->arr_time="2020-12-12 11:11:11";
$after_change_segments->od_index="1";
$after_change_segments->ticket_no="012-123123123123";
$change_list->after_change_segments = $after_change_segments;
$change_list->modify_fee="10000";
$change_list->upgrade_fee="10000";
$before_change_segments = new ModifyBeforeSegmentDTO;
$before_change_segments->arr_city="PEK";
$before_change_segments->dep_city="HKG";
$change_list->before_change_segments = $before_change_segments;
$param->change_list = $change_list;
$param->refund_way_type="0";
$req->setParam(json_encode($param));
$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.agent.flight.sell.modify.approve' \
-d 'partner_id=apidoc' \
-d 'session=6f6abeb2-545d-490f-be13-2a36472395d7' \
-d 'sign=90E007B0D16AAF32A8503D51552B7FAC' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-29+16%3A55%3A31' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripAgentFlightSellModifyApproveRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param=""
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.agent.flight.sell.modify.approve");
add_param(pRequest,"param","数据结构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.agent.flight.sell.modify.approve', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})