TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripFlightDistributionRefundApplyRequest req = new AlitripBtripFlightDistributionRefundApplyRequest();
AlitripBtripFlightDistributionRefundApplyRequest.BtripFlightRefundApplyRq obj1 = new AlitripBtripFlightDistributionRefundApplyRequest.BtripFlightRefundApplyRq();
obj1.setIsVoluntary(1L);
obj1.setDisOrderId("2576541235");
List<AlitripBtripFlightDistributionRefundApplyRequest.PassengerSegmentInfo> list3 = new ArrayList<AlitripBtripFlightDistributionRefundApplyRequest.PassengerSegmentInfo>();
AlitripBtripFlightDistributionRefundApplyRequest.PassengerSegmentInfo obj4 = new AlitripBtripFlightDistributionRefundApplyRequest.PassengerSegmentInfo();
list3.add(obj4);
obj4.setFlightNo("MU5481");
obj4.setPassengerName("张三");
obj4.setUserId("32523");
obj1.setPassengerSegmentInfoList(list3);
obj1.setReasonDetail("航变");
obj1.setReasonType(1L);
obj1.setRefundVoucherInfo("URL1,url2");
obj1.setSubChannel("jianhang001");
obj1.setTicketNos("1111,2222");
obj1.setDisSubOrderId("421431241");
req.setParamBtripFlightRefundApplyRq(obj1);
AlitripBtripFlightDistributionRefundApplyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripFlightDistributionRefundApplyRequest req = new AlitripBtripFlightDistributionRefundApplyRequest();
AlitripBtripFlightDistributionRefundApplyRequest.BtripFlightRefundApplyRqDomain obj1 = new AlitripBtripFlightDistributionRefundApplyRequest.BtripFlightRefundApplyRqDomain();
obj1.IsVoluntary = 1L;
obj1.DisOrderId = "2576541235";
List<AlitripBtripFlightDistributionRefundApplyRequest.PassengerSegmentInfoDomain> list3 = new List<AlitripBtripFlightDistributionRefundApplyRequest.PassengerSegmentInfoDomain>();
AlitripBtripFlightDistributionRefundApplyRequest.PassengerSegmentInfoDomain obj4 = new AlitripBtripFlightDistributionRefundApplyRequest.PassengerSegmentInfoDomain();
list3.Add(obj4);
obj4.FlightNo = "MU5481";
obj4.PassengerName = "张三";
obj4.UserId = "32523";
obj1.PassengerSegmentInfoList= list3;
obj1.ReasonDetail = "航变";
obj1.ReasonType = 1L;
obj1.RefundVoucherInfo = "URL1,url2";
obj1.SubChannel = "jianhang001";
obj1.TicketNos = "1111,2222";
obj1.DisSubOrderId = "421431241";
req.ParamBtripFlightRefundApplyRq_ = obj1;
AlitripBtripFlightDistributionRefundApplyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripFlightDistributionRefundApplyRequest;
$param_btrip_flight_refund_apply_rq = new BtripFlightRefundApplyRq;
$param_btrip_flight_refund_apply_rq->is_voluntary="1";
$param_btrip_flight_refund_apply_rq->dis_order_id="2576541235";
$passenger_segment_info_list = new PassengerSegmentInfo;
$passenger_segment_info_list->flight_no="MU5481";
$passenger_segment_info_list->passenger_name="张三";
$passenger_segment_info_list->user_id="32523";
$param_btrip_flight_refund_apply_rq->passenger_segment_info_list = $passenger_segment_info_list;
$param_btrip_flight_refund_apply_rq->reason_detail="航变";
$param_btrip_flight_refund_apply_rq->reason_type="1";
$param_btrip_flight_refund_apply_rq->refund_voucher_info="URL1,url2";
$param_btrip_flight_refund_apply_rq->sub_channel="jianhang001";
$param_btrip_flight_refund_apply_rq->ticket_nos="1111,2222";
$param_btrip_flight_refund_apply_rq->dis_sub_order_id="421431241";
$req->setParamBtripFlightRefundApplyRq(json_encode($param_btrip_flight_refund_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.refund.apply' \
-d 'partner_id=apidoc' \
-d 'session=423c1fdf-a883-406f-b020-c42debbe7ee6' \
-d 'sign=07531355046CD0B12BB307298A06B42D' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+20%3A13%3A07' \
-d 'v=2.0' \
-d 'param_btrip_flight_refund_apply_rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripFlightDistributionRefundApplyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_btrip_flight_refund_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.refund.apply");
add_param(pRequest,"param_btrip_flight_refund_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.refund.apply', {
'param_btrip_flight_refund_apply_rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})