TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripCorpopApplyModifyRequest req = new AlitripBtripCorpopApplyModifyRequest();
AlitripBtripCorpopApplyModifyRequest.OpenApiApplyRq obj1 = new AlitripBtripCorpopApplyModifyRequest.OpenApiApplyRq();
obj1.setThirdpartApplyId("12345");
obj1.setThirdpartBusinessId("12345");
obj1.setCorpId("corp1");
obj1.setCorpName("阿里巴巴");
obj1.setDepartId("dept1");
obj1.setDepartName("淘宝");
List<AlitripBtripCorpopApplyModifyRequest.OpenItineraryInfo> list3 = new ArrayList<AlitripBtripCorpopApplyModifyRequest.OpenItineraryInfo>();
AlitripBtripCorpopApplyModifyRequest.OpenItineraryInfo obj4 = new AlitripBtripCorpopApplyModifyRequest.OpenItineraryInfo();
list3.add(obj4);
obj4.setArrCity("北京");
obj4.setArrCityCode("BJS");
obj4.setArrDate(StringUtils.parseDateTime("2017-01-01 00:00:00"));
obj4.setCostCenterId(123L);
obj4.setDepCity("杭州");
obj4.setDepCityCode("HGH");
obj4.setDepDate(StringUtils.parseDateTime("2017-01-01 00:00:00"));
obj4.setInvoiceId(1234L);
obj4.setItineraryId("123456");
obj4.setProjectCode("xm1");
obj4.setProjectTitle("项目1");
obj4.setThirdpartCostCenterId("12345");
obj4.setTrafficType(0L);
obj4.setTripWay(0L);
obj4.setThirdPartInvoiceId("1234");
obj4.setNeedHotel(true);
obj4.setNeedTraffic(true);
obj1.setItineraryList(list3);
obj1.setStatus(0L);
List<AlitripBtripCorpopApplyModifyRequest.OpenUserInfo> list6 = new ArrayList<AlitripBtripCorpopApplyModifyRequest.OpenUserInfo>();
AlitripBtripCorpopApplyModifyRequest.OpenUserInfo obj7 = new AlitripBtripCorpopApplyModifyRequest.OpenUserInfo();
list6.add(obj7);
obj7.setUserId("user1");
obj7.setUserName("张三");
obj1.setTravelerList(list6);
obj1.setTripCause("北京出差");
obj1.setTripDay(1L);
obj1.setTripTitle("北京出差");
obj1.setUserId("user1");
obj1.setUserName("张三");
obj1.setVersion(2L);
List<AlitripBtripCorpopApplyModifyRequest.OpenUserInfo> list9 = new ArrayList<AlitripBtripCorpopApplyModifyRequest.OpenUserInfo>();
AlitripBtripCorpopApplyModifyRequest.OpenUserInfo obj10 = new AlitripBtripCorpopApplyModifyRequest.OpenUserInfo();
list9.add(obj10);
obj10.setUserName("张三");
obj1.setExternalTravelerList(list9);
obj1.setHotelBudget(1000L);
obj1.setFlightBudget(1000L);
obj1.setTrainBudget(1000L);
obj1.setVehicleBudget(1000L);
obj1.setBudget(1000L);
obj1.setUnionNo("tste1");
obj1.setBudgetMerge(1L);
obj1.setLimitTraveler(1L);
obj1.setTogetherBookRule(1L);
AlitripBtripCorpopApplyModifyRequest.HotelShareInfo obj11 = new AlitripBtripCorpopApplyModifyRequest.HotelShareInfo();
obj11.setType("1");
obj11.setParam("70");
obj1.setHotelShare(obj11);
AlitripBtripCorpopApplyModifyRequest.ExternalUserStandard obj12 = new AlitripBtripCorpopApplyModifyRequest.ExternalUserStandard();
obj12.setFlightCabins("Y");
obj12.setEconomyDiscount(1L);
obj12.setBusinessDiscount(1L);
obj12.setFirstDiscount(1L);
obj12.setTrainSeats("1");
List<AlitripBtripCorpopApplyModifyRequest.HotelCityFee> list14 = new ArrayList<AlitripBtripCorpopApplyModifyRequest.HotelCityFee>();
AlitripBtripCorpopApplyModifyRequest.HotelCityFee obj15 = new AlitripBtripCorpopApplyModifyRequest.HotelCityFee();
list14.add(obj15);
obj15.setCityCode("330100");
obj15.setCityName("北京");
obj15.setFee(10000L);
obj12.setHotelCitys(list14);
obj12.setReserveType(1L);
obj12.setInternationalFlightCabins("Y");
obj12.setPremiumEconomyDiscount(1L);
obj1.setExternalTravelerStandard(obj12);
List<AlitripBtripCorpopApplyModifyRequest.InternalUserStandard> list17 = new ArrayList<AlitripBtripCorpopApplyModifyRequest.InternalUserStandard>();
AlitripBtripCorpopApplyModifyRequest.InternalUserStandard obj18 = new AlitripBtripCorpopApplyModifyRequest.InternalUserStandard();
list17.add(obj18);
obj18.setFlightCabins("Y");
obj18.setEconomyDiscount(1L);
obj18.setBusinessDiscount(1L);
obj18.setFirstDiscount(1L);
obj18.setTrainSeats("1");
List<AlitripBtripCorpopApplyModifyRequest.HotelCityFee> list21 = new ArrayList<AlitripBtripCorpopApplyModifyRequest.HotelCityFee>();
AlitripBtripCorpopApplyModifyRequest.HotelCityFee obj22 = new AlitripBtripCorpopApplyModifyRequest.HotelCityFee();
list21.add(obj22);
obj22.setCityCode("330100");
obj22.setCityName("北京");
obj22.setFee(10000L);
list19.setHotelCitys(list21);
obj18.setReserveType(1L);
obj18.setUserId("weifeng");
obj18.setInternationalFlightCabins("Y");
obj18.setPremiumEconomyDiscount(1L);
obj1.setTravelerStandard(list17);
List<AlitripBtripCorpopApplyModifyRequest.OpenItinerarySetInfo> list24 = new ArrayList<AlitripBtripCorpopApplyModifyRequest.OpenItinerarySetInfo>();
AlitripBtripCorpopApplyModifyRequest.OpenItinerarySetInfo obj25 = new AlitripBtripCorpopApplyModifyRequest.OpenItinerarySetInfo();
list24.add(obj25);
obj25.setItineraryId("asdfgh");
obj25.setTrafficType(0L);
obj25.setCitySet("北京,上海");
obj25.setCityCodeSet("BJS,SHA");
obj25.setDepDate("2017-01-01 00:00:00");
obj25.setArrDate("2017-01-01 00:00:00");
obj25.setCostCenterId(234567L);
obj25.setThirdpartCostCenterId("第三方成本中心id");
obj25.setInvoiceId(23456L);
obj25.setThirdPartInvoiceId("第三方发票id");
obj25.setProjectCode("项目编号");
obj25.setProjectTitle("项目名称");
obj1.setItinerarySetList(list24);
obj1.setItineraryRule(0L);
obj1.setExtendField("{\"cost_center\":\"成本中心\"}");
req.setRq(obj1);
AlitripBtripCorpopApplyModifyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripCorpopApplyModifyRequest req = new AlitripBtripCorpopApplyModifyRequest();
AlitripBtripCorpopApplyModifyRequest.OpenApiApplyRqDomain obj1 = new AlitripBtripCorpopApplyModifyRequest.OpenApiApplyRqDomain();
obj1.ThirdpartApplyId = "12345";
obj1.ThirdpartBusinessId = "12345";
obj1.CorpId = "corp1";
obj1.CorpName = "阿里巴巴";
obj1.DepartId = "dept1";
obj1.DepartName = "淘宝";
List<AlitripBtripCorpopApplyModifyRequest.OpenItineraryInfoDomain> list3 = new List<AlitripBtripCorpopApplyModifyRequest.OpenItineraryInfoDomain>();
AlitripBtripCorpopApplyModifyRequest.OpenItineraryInfoDomain obj4 = new AlitripBtripCorpopApplyModifyRequest.OpenItineraryInfoDomain();
list3.Add(obj4);
obj4.ArrCity = "北京";
obj4.ArrCityCode = "BJS";
obj4.ArrDate = DateTime.Parse(2017-01-01 00:00:00");
obj4.CostCenterId = 123L;
obj4.DepCity = "杭州";
obj4.DepCityCode = "HGH";
obj4.DepDate = DateTime.Parse(2017-01-01 00:00:00");
obj4.InvoiceId = 1234L;
obj4.ItineraryId = "123456";
obj4.ProjectCode = "xm1";
obj4.ProjectTitle = "项目1";
obj4.ThirdpartCostCenterId = "12345";
obj4.TrafficType = 0L;
obj4.TripWay = 0L;
obj4.ThirdPartInvoiceId = "1234";
obj4.NeedHotel = true;
obj4.NeedTraffic = true;
obj1.ItineraryList= list3;
obj1.Status = 0L;
List<AlitripBtripCorpopApplyModifyRequest.OpenUserInfoDomain> list6 = new List<AlitripBtripCorpopApplyModifyRequest.OpenUserInfoDomain>();
AlitripBtripCorpopApplyModifyRequest.OpenUserInfoDomain obj7 = new AlitripBtripCorpopApplyModifyRequest.OpenUserInfoDomain();
list6.Add(obj7);
obj7.UserId = "user1";
obj7.UserName = "张三";
obj1.TravelerList= list6;
obj1.TripCause = "北京出差";
obj1.TripDay = 1L;
obj1.TripTitle = "北京出差";
obj1.UserId = "user1";
obj1.UserName = "张三";
obj1.Version = 2L;
List<AlitripBtripCorpopApplyModifyRequest.OpenUserInfoDomain> list9 = new List<AlitripBtripCorpopApplyModifyRequest.OpenUserInfoDomain>();
AlitripBtripCorpopApplyModifyRequest.OpenUserInfoDomain obj10 = new AlitripBtripCorpopApplyModifyRequest.OpenUserInfoDomain();
list9.Add(obj10);
obj10.UserName = "张三";
obj1.ExternalTravelerList= list9;
obj1.HotelBudget = 1000L;
obj1.FlightBudget = 1000L;
obj1.TrainBudget = 1000L;
obj1.VehicleBudget = 1000L;
obj1.Budget = 1000L;
obj1.UnionNo = "tste1";
obj1.BudgetMerge = 1L;
obj1.LimitTraveler = 1L;
obj1.TogetherBookRule = 1L;
AlitripBtripCorpopApplyModifyRequest.HotelShareInfoDomain obj11 = new AlitripBtripCorpopApplyModifyRequest.HotelShareInfoDomain();
obj11.Type = "1";
obj11.Param = "70";
obj1.HotelShare= obj11;
AlitripBtripCorpopApplyModifyRequest.ExternalUserStandardDomain obj12 = new AlitripBtripCorpopApplyModifyRequest.ExternalUserStandardDomain();
obj12.FlightCabins = "Y";
obj12.EconomyDiscount = 1L;
obj12.BusinessDiscount = 1L;
obj12.FirstDiscount = 1L;
obj12.TrainSeats = "1";
List<AlitripBtripCorpopApplyModifyRequest.HotelCityFeeDomain> list14 = new List<AlitripBtripCorpopApplyModifyRequest.HotelCityFeeDomain>();
AlitripBtripCorpopApplyModifyRequest.HotelCityFeeDomain obj15 = new AlitripBtripCorpopApplyModifyRequest.HotelCityFeeDomain();
list14.Add(obj15);
obj15.CityCode = "330100";
obj15.CityName = "北京";
obj15.Fee = 10000L;
obj12.HotelCitys= list14;
obj12.ReserveType = 1L;
obj12.InternationalFlightCabins = "Y";
obj12.PremiumEconomyDiscount = 1L;
obj1.ExternalTravelerStandard= obj12;
List<AlitripBtripCorpopApplyModifyRequest.InternalUserStandardDomain> list17 = new List<AlitripBtripCorpopApplyModifyRequest.InternalUserStandardDomain>();
AlitripBtripCorpopApplyModifyRequest.InternalUserStandardDomain obj18 = new AlitripBtripCorpopApplyModifyRequest.InternalUserStandardDomain();
list17.Add(obj18);
obj18.FlightCabins = "Y";
obj18.EconomyDiscount = 1L;
obj18.BusinessDiscount = 1L;
obj18.FirstDiscount = 1L;
obj18.TrainSeats = "1";
List<AlitripBtripCorpopApplyModifyRequest.HotelCityFeeDomain> list20 = new List<AlitripBtripCorpopApplyModifyRequest.HotelCityFeeDomain>();
AlitripBtripCorpopApplyModifyRequest.HotelCityFeeDomain obj21 = new AlitripBtripCorpopApplyModifyRequest.HotelCityFeeDomain();
list20.Add(obj21);
obj21.CityCode = "330100";
obj21.CityName = "北京";
obj21.Fee = 10000L;
obj18.HotelCitys= list20;
obj18.ReserveType = 1L;
obj18.UserId = "weifeng";
obj18.InternationalFlightCabins = "Y";
obj18.PremiumEconomyDiscount = 1L;
obj1.TravelerStandard= list17;
List<AlitripBtripCorpopApplyModifyRequest.OpenItinerarySetInfoDomain> list23 = new List<AlitripBtripCorpopApplyModifyRequest.OpenItinerarySetInfoDomain>();
AlitripBtripCorpopApplyModifyRequest.OpenItinerarySetInfoDomain obj24 = new AlitripBtripCorpopApplyModifyRequest.OpenItinerarySetInfoDomain();
list23.Add(obj24);
obj24.ItineraryId = "asdfgh";
obj24.TrafficType = 0L;
obj24.CitySet = "北京,上海";
obj24.CityCodeSet = "BJS,SHA";
obj24.DepDate = "2017-01-01 00:00:00";
obj24.ArrDate = "2017-01-01 00:00:00";
obj24.CostCenterId = 234567L;
obj24.ThirdpartCostCenterId = "第三方成本中心id";
obj24.InvoiceId = 23456L;
obj24.ThirdPartInvoiceId = "第三方发票id";
obj24.ProjectCode = "项目编号";
obj24.ProjectTitle = "项目名称";
obj1.ItinerarySetList= list23;
obj1.ItineraryRule = 0L;
obj1.ExtendField = "{\"cost_center\":\"成本中心\"}";
req.Rq_ = obj1;
AlitripBtripCorpopApplyModifyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripCorpopApplyModifyRequest;
$rq = new OpenApiApplyRq;
$rq->thirdpart_apply_id="12345";
$rq->thirdpart_business_id="12345";
$rq->corp_id="corp1";
$rq->corp_name="阿里巴巴";
$rq->depart_id="dept1";
$rq->depart_name="淘宝";
$itinerary_list = new OpenItineraryInfo;
$itinerary_list->arr_city="北京";
$itinerary_list->arr_city_code="BJS";
$itinerary_list->arr_date="2017-01-01 00:00:00";
$itinerary_list->cost_center_id="123";
$itinerary_list->dep_city="杭州";
$itinerary_list->dep_city_code="HGH";
$itinerary_list->dep_date="2017-01-01 00:00:00";
$itinerary_list->invoice_id="1234";
$itinerary_list->itinerary_id="123456";
$itinerary_list->project_code="xm1";
$itinerary_list->project_title="项目1";
$itinerary_list->thirdpart_cost_center_id="12345";
$itinerary_list->traffic_type="0";
$itinerary_list->trip_way="0";
$itinerary_list->third_part_invoice_id="1234";
$itinerary_list->need_hotel="true";
$itinerary_list->need_traffic="true";
$rq->itinerary_list = $itinerary_list;
$rq->status="0";
$traveler_list = new OpenUserInfo;
$traveler_list->user_id="user1";
$traveler_list->user_name="张三";
$rq->traveler_list = $traveler_list;
$rq->trip_cause="北京出差";
$rq->trip_day="1";
$rq->trip_title="北京出差";
$rq->user_id="user1";
$rq->user_name="张三";
$rq->version="2";
$external_traveler_list = new OpenUserInfo;
$external_traveler_list->user_name="张三";
$rq->external_traveler_list = $external_traveler_list;
$rq->hotel_budget="1000";
$rq->flight_budget="1000";
$rq->train_budget="1000";
$rq->vehicle_budget="1000";
$rq->budget="1000";
$rq->union_no="tste1";
$rq->budget_merge="1";
$rq->limit_traveler="1";
$rq->together_book_rule="1";
$hotel_share = new HotelShareInfo;
$hotel_share->type="1";
$hotel_share->param="70";
$rq->hotel_share = $hotel_share;
$external_traveler_standard = new ExternalUserStandard;
$external_traveler_standard->flight_cabins="Y";
$external_traveler_standard->economy_discount="1";
$external_traveler_standard->business_discount="1";
$external_traveler_standard->first_discount="1";
$external_traveler_standard->train_seats="1";
$hotel_citys = new HotelCityFee;
$hotel_citys->city_code="330100";
$hotel_citys->city_name="北京";
$hotel_citys->fee="10000";
$external_traveler_standard->hotel_citys = $hotel_citys;
$external_traveler_standard->reserve_type="1";
$external_traveler_standard->international_flight_cabins="Y";
$external_traveler_standard->premium_economy_discount="1";
$rq->external_traveler_standard = $external_traveler_standard;
$traveler_standard = new InternalUserStandard;
$traveler_standard->flight_cabins="Y";
$traveler_standard->economy_discount="1";
$traveler_standard->business_discount="1";
$traveler_standard->first_discount="1";
$traveler_standard->train_seats="1";
$hotel_citys = new HotelCityFee;
$hotel_citys->city_code="330100";
$hotel_citys->city_name="北京";
$hotel_citys->fee="10000";
$traveler_standard->hotel_citys = $hotel_citys;
$traveler_standard->reserve_type="1";
$traveler_standard->user_id="weifeng";
$traveler_standard->international_flight_cabins="Y";
$traveler_standard->premium_economy_discount="1";
$rq->traveler_standard = $traveler_standard;
$itinerary_set_list = new OpenItinerarySetInfo;
$itinerary_set_list->itinerary_id="asdfgh";
$itinerary_set_list->traffic_type="0";
$itinerary_set_list->city_set="北京,上海";
$itinerary_set_list->city_code_set="BJS,SHA";
$itinerary_set_list->dep_date="2017-01-01 00:00:00";
$itinerary_set_list->arr_date="2017-01-01 00:00:00";
$itinerary_set_list->cost_center_id="234567";
$itinerary_set_list->thirdpart_cost_center_id="第三方成本中心id";
$itinerary_set_list->invoice_id="23456";
$itinerary_set_list->third_part_invoice_id="第三方发票id";
$itinerary_set_list->project_code="项目编号";
$itinerary_set_list->project_title="项目名称";
$rq->itinerary_set_list = $itinerary_set_list;
$rq->itinerary_rule="0";
$rq->extend_field="{\"cost_center\":\"成本中心\"}";
$req->setRq(json_encode($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.corpop.apply.modify' \
-d 'partner_id=apidoc' \
-d 'session=27611cfd-418f-4865-8a6a-127a6641f465' \
-d 'sign=EF5A04748F42E1F4B009B01F861F50B7' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+19%3A51%3A12' \
-d 'v=2.0' \
-d 'rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripCorpopApplyModifyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.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.corpop.apply.modify");
add_param(pRequest,"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.corpop.apply.modify', {
'rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})