TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripAslanPolicyQuerypriceRequest req = new AlitripAslanPolicyQuerypriceRequest();
AlitripAslanPolicyQuerypriceRequest.IatkfpRq obj1 = new AlitripAslanPolicyQuerypriceRequest.IatkfpRq();
obj1.setBuyOrderId(12345L);
AlitripAslanPolicyQuerypriceRequest.QueryPricePar obj2 = new AlitripAslanPolicyQuerypriceRequest.QueryPricePar();
obj2.setIssueOffice("SHA384");
obj2.setIssueAirline("MU");
obj2.setPassengerType(1L);
List<AlitripAslanPolicyQuerypriceRequest.QuerySegmentPar> list4 = new ArrayList<AlitripAslanPolicyQuerypriceRequest.QuerySegmentPar>();
AlitripAslanPolicyQuerypriceRequest.QuerySegmentPar obj5 = new AlitripAslanPolicyQuerypriceRequest.QuerySegmentPar();
list4.add(obj5);
obj5.setDepAirport("WUH");
obj5.setArrAirport("PEK");
obj5.setDepDate(StringUtils.parseDateTime("2018-01-01 00:00:00"));
obj5.setMarketingAirline("MU");
obj5.setOperateAirline("CZ");
obj5.setMarketingFlightNo("MU123");
obj5.setCabin("Y");
obj5.setFareBasis("Y12ERFF");
obj2.setSegmentPars(list4);
obj2.setFareCalc("FC");
obj2.setItFlag(1L);
obj2.setTourCode("Y12ERFF");
obj2.setPricingSource("Publish");
obj2.setTicketPrice(300000L);
obj2.setTaxPrice(12000L);
obj2.setBuyChannel(1L);
obj2.setCommission(300L);
obj2.setCommissionFee(0L);
List<AlitripAslanPolicyQuerypriceRequest.AmountPar> list7 = new ArrayList<AlitripAslanPolicyQuerypriceRequest.AmountPar>();
AlitripAslanPolicyQuerypriceRequest.AmountPar obj8 = new AlitripAslanPolicyQuerypriceRequest.AmountPar();
list7.add(obj8);
obj8.setCurrency("CNY");
obj8.setAmountCode("YQ");
obj8.setAmount(9000L);
obj2.setAmountPars(list7);
List<AlitripAslanPolicyQuerypriceRequest.AppointPar> list10 = new ArrayList<AlitripAslanPolicyQuerypriceRequest.AppointPar>();
AlitripAslanPolicyQuerypriceRequest.AppointPar obj11 = new AlitripAslanPolicyQuerypriceRequest.AppointPar();
list10.add(obj11);
obj11.setCommission(300L);
obj11.setReward(200L);
obj11.setRewardAmont(0L);
obj11.setTaobaoPolicyId("1234");
obj2.setAppointPars(list10);
obj1.setQueryParam(obj2);
req.setParam0(obj1);
AlitripAslanPolicyQuerypriceResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripAslanPolicyQuerypriceRequest req = new AlitripAslanPolicyQuerypriceRequest();
AlitripAslanPolicyQuerypriceRequest.IatkfpRqDomain obj1 = new AlitripAslanPolicyQuerypriceRequest.IatkfpRqDomain();
obj1.BuyOrderId = 12345L;
AlitripAslanPolicyQuerypriceRequest.QueryPriceParDomain obj2 = new AlitripAslanPolicyQuerypriceRequest.QueryPriceParDomain();
obj2.IssueOffice = "SHA384";
obj2.IssueAirline = "MU";
obj2.PassengerType = 1L;
List<AlitripAslanPolicyQuerypriceRequest.QuerySegmentParDomain> list4 = new List<AlitripAslanPolicyQuerypriceRequest.QuerySegmentParDomain>();
AlitripAslanPolicyQuerypriceRequest.QuerySegmentParDomain obj5 = new AlitripAslanPolicyQuerypriceRequest.QuerySegmentParDomain();
list4.Add(obj5);
obj5.DepAirport = "WUH";
obj5.ArrAirport = "PEK";
obj5.DepDate = DateTime.Parse(2018-01-01 00:00:00");
obj5.MarketingAirline = "MU";
obj5.OperateAirline = "CZ";
obj5.MarketingFlightNo = "MU123";
obj5.Cabin = "Y";
obj5.FareBasis = "Y12ERFF";
obj2.SegmentPars= list4;
obj2.FareCalc = "FC";
obj2.ItFlag = 1L;
obj2.TourCode = "Y12ERFF";
obj2.PricingSource = "Publish";
obj2.TicketPrice = 300000L;
obj2.TaxPrice = 12000L;
obj2.BuyChannel = 1L;
obj2.Commission = 300L;
obj2.CommissionFee = 0L;
List<AlitripAslanPolicyQuerypriceRequest.AmountParDomain> list7 = new List<AlitripAslanPolicyQuerypriceRequest.AmountParDomain>();
AlitripAslanPolicyQuerypriceRequest.AmountParDomain obj8 = new AlitripAslanPolicyQuerypriceRequest.AmountParDomain();
list7.Add(obj8);
obj8.Currency = "CNY";
obj8.AmountCode = "YQ";
obj8.Amount = 9000L;
obj2.AmountPars= list7;
List<AlitripAslanPolicyQuerypriceRequest.AppointParDomain> list10 = new List<AlitripAslanPolicyQuerypriceRequest.AppointParDomain>();
AlitripAslanPolicyQuerypriceRequest.AppointParDomain obj11 = new AlitripAslanPolicyQuerypriceRequest.AppointParDomain();
list10.Add(obj11);
obj11.Commission = 300L;
obj11.Reward = 200L;
obj11.RewardAmont = 0L;
obj11.TaobaoPolicyId = "1234";
obj2.AppointPars= list10;
obj1.QueryParam= obj2;
req.Param0_ = obj1;
AlitripAslanPolicyQuerypriceResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripAslanPolicyQuerypriceRequest;
$param0 = new IatkfpRq;
$param0->buy_order_id="12345";
$query_param = new QueryPricePar;
$query_param->issue_office="SHA384";
$query_param->issue_airline="MU";
$query_param->passenger_type="1";
$segment_pars = new QuerySegmentPar;
$segment_pars->dep_airport="WUH";
$segment_pars->arr_airport="PEK";
$segment_pars->dep_date="2018-01-01 00:00:00";
$segment_pars->marketing_airline="MU";
$segment_pars->operate_airline="CZ";
$segment_pars->marketing_flight_no="MU123";
$segment_pars->cabin="Y";
$segment_pars->fare_basis="Y12ERFF";
$query_param->segment_pars = $segment_pars;
$query_param->fare_calc="FC";
$query_param->it_flag="1";
$query_param->tour_code="Y12ERFF";
$query_param->pricing_source="Publish";
$query_param->ticket_price="300000";
$query_param->tax_price="12000";
$query_param->buy_channel="1";
$query_param->commission="300";
$query_param->commission_fee="0";
$amount_pars = new AmountPar;
$amount_pars->currency="CNY";
$amount_pars->amount_code="YQ";
$amount_pars->amount="9000";
$query_param->amount_pars = $amount_pars;
$appoint_pars = new AppointPar;
$appoint_pars->commission="300";
$appoint_pars->reward="200";
$appoint_pars->reward_amont="0";
$appoint_pars->taobao_policy_id="1234";
$query_param->appoint_pars = $appoint_pars;
$param0->query_param = $query_param;
$req->setParam0(json_encode($param0));
$resp = $c->execute($req);
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.aslan.policy.queryprice' \
-d 'partner_id=apidoc' \
-d 'sign=FDCABA7B53D98EC558061D352C80E033' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+16%3A14%3A28' \
-d 'v=2.0' \
-d 'param0=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripAslanPolicyQuerypriceRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.param0=""
try:
resp= req.getResponse()
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.aslan.policy.queryprice");
add_param(pRequest,"param0","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
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.aslan.policy.queryprice', {
'param0':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})