TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripFlightDistributionRefundNewapplyRequest req = new AlitripBtripFlightDistributionRefundNewapplyRequest();
AlitripBtripFlightDistributionRefundNewapplyRequest.BtripFlightRefundApplyRq obj1 = new AlitripBtripFlightDistributionRefundNewapplyRequest.BtripFlightRefundApplyRq();
obj1.setDisOrderId("janhang123");
obj1.setDisSubOrderId("421431241");
obj1.setIsVoluntary(1L);
obj1.setReasoType(1L);
obj1.setRefundVoucherInfo("URL1,url2");
obj1.setReasonDetail("航变");
obj1.setTotalRefundPrice(1000L);
obj1.setCorpRefundPrice(900L);
obj1.setPersonalRefundPrice(100L);
obj1.setExtra("");
obj1.setItemUnitIds("demo");
obj1.setSessionId("demo");
obj1.setDisplayRefundMoney("0");
obj1.setSubChannel("jianhang001");
List<AlitripBtripFlightDistributionRefundNewapplyRequest.PassengerSegmentInfo> list3 = new ArrayList<AlitripBtripFlightDistributionRefundNewapplyRequest.PassengerSegmentInfo>();
AlitripBtripFlightDistributionRefundNewapplyRequest.PassengerSegmentInfo obj4 = new AlitripBtripFlightDistributionRefundNewapplyRequest.PassengerSegmentInfo();
list3.add(obj4);
obj4.setFlightNo("MU5481");
obj4.setPassengerName("张三");
obj4.setUserId("32523");
obj1.setPassengerSegmentInfoList(list3);
req.setParamBtripFlightRefundApplyRq(obj1);
AlitripBtripFlightDistributionRefundNewapplyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripFlightDistributionRefundNewapplyRequest req = new AlitripBtripFlightDistributionRefundNewapplyRequest();
AlitripBtripFlightDistributionRefundNewapplyRequest.BtripFlightRefundApplyRqDomain obj1 = new AlitripBtripFlightDistributionRefundNewapplyRequest.BtripFlightRefundApplyRqDomain();
obj1.DisOrderId = "janhang123";
obj1.DisSubOrderId = "421431241";
obj1.IsVoluntary = 1L;
obj1.ReasoType = 1L;
obj1.RefundVoucherInfo = "URL1,url2";
obj1.ReasonDetail = "航变";
obj1.TotalRefundPrice = 1000L;
obj1.CorpRefundPrice = 900L;
obj1.PersonalRefundPrice = 100L;
obj1.Extra = "";
obj1.ItemUnitIds = "demo";
obj1.SessionId = "demo";
obj1.DisplayRefundMoney = "0";
obj1.SubChannel = "jianhang001";
List<AlitripBtripFlightDistributionRefundNewapplyRequest.PassengerSegmentInfoDomain> list3 = new List<AlitripBtripFlightDistributionRefundNewapplyRequest.PassengerSegmentInfoDomain>();
AlitripBtripFlightDistributionRefundNewapplyRequest.PassengerSegmentInfoDomain obj4 = new AlitripBtripFlightDistributionRefundNewapplyRequest.PassengerSegmentInfoDomain();
list3.Add(obj4);
obj4.FlightNo = "MU5481";
obj4.PassengerName = "张三";
obj4.UserId = "32523";
obj1.PassengerSegmentInfoList= list3;
req.ParamBtripFlightRefundApplyRq_ = obj1;
AlitripBtripFlightDistributionRefundNewapplyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripFlightDistributionRefundNewapplyRequest;
$param_btrip_flight_refund_apply_rq = new BtripFlightRefundApplyRq;
$param_btrip_flight_refund_apply_rq->dis_order_id="janhang123";
$param_btrip_flight_refund_apply_rq->dis_sub_order_id="421431241";
$param_btrip_flight_refund_apply_rq->is_voluntary="1";
$param_btrip_flight_refund_apply_rq->reaso_type="1";
$param_btrip_flight_refund_apply_rq->refund_voucher_info="URL1,url2";
$param_btrip_flight_refund_apply_rq->reason_detail="航变";
$param_btrip_flight_refund_apply_rq->total_refund_price="1000";
$param_btrip_flight_refund_apply_rq->corp_refund_price="900";
$param_btrip_flight_refund_apply_rq->personal_refund_price="100";
$param_btrip_flight_refund_apply_rq->extra="";
$param_btrip_flight_refund_apply_rq->item_unit_ids="demo";
$param_btrip_flight_refund_apply_rq->session_id="demo";
$param_btrip_flight_refund_apply_rq->display_refund_money="0";
$param_btrip_flight_refund_apply_rq->sub_channel="jianhang001";
$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;
$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.newapply' \
-d 'partner_id=apidoc' \
-d 'session=d301512e-5d92-4edd-ab06-fede5ef97345' \
-d 'sign=D4C21DEF6C2F13EDA2669CF57FCEA515' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+20%3A09%3A35' \
-d 'v=2.0' \
-d 'param_btrip_flight_refund_apply_rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripFlightDistributionRefundNewapplyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param_btrip_flight_refund_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.refund.newapply");
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.newapply', {
'param_btrip_flight_refund_apply_rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})