TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripAgentFlightSellRefundApproveRequest req = new AlitripAgentFlightSellRefundApproveRequest();
AlitripAgentFlightSellRefundApproveRequest.RefundApproveRequestDto obj1 = new AlitripAgentFlightSellRefundApproveRequest.RefundApproveRequestDto();
obj1.setApplyId("123456");
obj1.setDomesticIntl(1L);
List<AlitripAgentFlightSellRefundApproveRequest.RefundList> list3 = new ArrayList<AlitripAgentFlightSellRefundApproveRequest.RefundList>();
AlitripAgentFlightSellRefundApproveRequest.RefundList obj4 = new AlitripAgentFlightSellRefundApproveRequest.RefundList();
list3.add(obj4);
obj4.setPassengerName("tester");
obj4.setRefundFee(10000L);
obj4.setRefundUpgradeFee(10000L);
obj4.setRefundModifyFee(10000L);
List<AlitripAgentFlightSellRefundApproveRequest.RefundSegments> list7 = new ArrayList<AlitripAgentFlightSellRefundApproveRequest.RefundSegments>();
AlitripAgentFlightSellRefundApproveRequest.RefundSegments obj8 = new AlitripAgentFlightSellRefundApproveRequest.RefundSegments();
list7.add(obj8);
obj8.setCabinClass("E");
obj8.setFlightNo("SQ123");
obj8.setDepTime(StringUtils.parseDateTime("2020-12-12 11:11:00"));
obj8.setArrCity("HKG");
obj8.setDepCity("CKH");
obj8.setCabin("Y");
obj8.setSegmentIndex(0L);
obj8.setArrAirport("PEK");
obj8.setDepAirport("LON");
obj8.setArrTime(StringUtils.parseDateTime("2020-12-12 11:11:00"));
obj8.setOdIndex(0L);
list5.setRefundSegments(list7);
obj4.setPassengerType(1L);
obj1.setRefundList(list3);
obj1.setCurrency("CNY");
req.setParam(obj1);
AlitripAgentFlightSellRefundApproveResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripAgentFlightSellRefundApproveRequest req = new AlitripAgentFlightSellRefundApproveRequest();
AlitripAgentFlightSellRefundApproveRequest.RefundApproveRequestDtoDomain obj1 = new AlitripAgentFlightSellRefundApproveRequest.RefundApproveRequestDtoDomain();
obj1.ApplyId = "123456";
obj1.DomesticIntl = 1L;
List<AlitripAgentFlightSellRefundApproveRequest.RefundListDomain> list3 = new List<AlitripAgentFlightSellRefundApproveRequest.RefundListDomain>();
AlitripAgentFlightSellRefundApproveRequest.RefundListDomain obj4 = new AlitripAgentFlightSellRefundApproveRequest.RefundListDomain();
list3.Add(obj4);
obj4.PassengerName = "tester";
obj4.RefundFee = 10000L;
obj4.RefundUpgradeFee = 10000L;
obj4.RefundModifyFee = 10000L;
List<AlitripAgentFlightSellRefundApproveRequest.RefundSegmentsDomain> list6 = new List<AlitripAgentFlightSellRefundApproveRequest.RefundSegmentsDomain>();
AlitripAgentFlightSellRefundApproveRequest.RefundSegmentsDomain obj7 = new AlitripAgentFlightSellRefundApproveRequest.RefundSegmentsDomain();
list6.Add(obj7);
obj7.CabinClass = "E";
obj7.FlightNo = "SQ123";
obj7.DepTime = DateTime.Parse(2020-12-12 11:11:00");
obj7.ArrCity = "HKG";
obj7.DepCity = "CKH";
obj7.Cabin = "Y";
obj7.SegmentIndex = 0L;
obj7.ArrAirport = "PEK";
obj7.DepAirport = "LON";
obj7.ArrTime = DateTime.Parse(2020-12-12 11:11:00");
obj7.OdIndex = 0L;
obj4.RefundSegments= list6;
obj4.PassengerType = 1L;
obj1.RefundList= list3;
obj1.Currency = "CNY";
req.Param_ = obj1;
AlitripAgentFlightSellRefundApproveResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripAgentFlightSellRefundApproveRequest;
$param = new RefundApproveRequestDto;
$param->apply_id="123456";
$param->domestic_intl="1";
$refund_list = new RefundList;
$refund_list->passenger_name="tester";
$refund_list->refund_fee="10000";
$refund_list->refund_upgrade_fee="10000";
$refund_list->refund_modify_fee="10000";
$refund_segments = new RefundSegments;
$refund_segments->cabin_class="E";
$refund_segments->flight_no="SQ123";
$refund_segments->dep_time="2020-12-12 11:11:00";
$refund_segments->arr_city="HKG";
$refund_segments->dep_city="CKH";
$refund_segments->cabin="Y";
$refund_segments->segment_index="0";
$refund_segments->arr_airport="PEK";
$refund_segments->dep_airport="LON";
$refund_segments->arr_time="2020-12-12 11:11:00";
$refund_segments->od_index="0";
$refund_list->refund_segments = $refund_segments;
$refund_list->passenger_type="1";
$param->refund_list = $refund_list;
$param->currency="CNY";
$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.refund.approve' \
-d 'partner_id=apidoc' \
-d 'session=eb9c4bea-7c18-46e9-abd3-fcc3c60dc0b4' \
-d 'sign=FB2D38609ABA1CEF0C019A8B6738434F' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-29+05%3A44%3A36' \
-d 'v=2.0' \
-d 'param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripAgentFlightSellRefundApproveRequest(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.refund.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.refund.approve', {
'param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})