TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelProductBaseModifyRequest req = new AlitripTravelProductBaseModifyRequest();
List<AlitripTravelProductBaseModifyRequest.ItemItineraryInfo> list2 = new ArrayList<AlitripTravelProductBaseModifyRequest.ItemItineraryInfo>();
AlitripTravelProductBaseModifyRequest.ItemItineraryInfo obj3 = new AlitripTravelProductBaseModifyRequest.ItemItineraryInfo();
list2.add(obj3);
obj3.setContent("<txt>文本描述</txt><img>https://img.daily.taobaocdn.net/imgextra/i4/3651880377/TB2p4JaXXXXXXabXXXXXXXXXXXX_!!3651880377.jpg</img><txt>文本描述2</txt><txt>文本描述3</txt><img>https://img.daily.taobaocdn.net/imgextra/i4/3651880377/TB2p4JaXXXXXXabXXXXXXXXXXXX_!!3651880377.jpg</img>");
obj3.setTitle("行程标题");
obj3.setItineraryNo(1L);
req.setItineraries(list2);
AlitripTravelProductBaseModifyRequest.ProductBaseInfo obj4 = new AlitripTravelProductBaseModifyRequest.ProductBaseInfo();
obj4.setTripMaxDays(3L);
obj4.setDesc("产品描述");
obj4.setWapDesc("<wapDesc><shortDesc>标题</shortDesc> <txt>描述</txt> <img>图片路径</img></wapDesc>");
obj4.setItemType(9L);
obj4.setToLocations("上海");
obj4.setOutId("123");
obj4.setPicUrls("https://img.alicdn.com/tfs/TB1QyC0RxTpK1RjSZFMXXbG_VXa-246-246.jpg,https://img.alicdn.com/tfs/TB1QyC0RxTpK1RjSZFMXXbG_VXa-246-246.jpg");
obj4.setAccomNights(2L);
obj4.setTitle("产品标题");
obj4.setSubTitles("亮点1,亮点2");
obj4.setTravellerTemplateId(0L);
req.setBaseInfo(obj4);
req.setItemId(12345L);
AlitripTravelProductBaseModifyRequest.ItemRefundInfo obj5 = new AlitripTravelProductBaseModifyRequest.ItemRefundInfo();
obj5.setRefundRegulations(""30_30_0","30_15_5","14_7_15","6_4_70","3_1_85","1_1_90"");
obj5.setRefundRegulationsJson("[{\"firstDay\":-1,\"secondDay\":5,\"percent\":50,\"sellerPercent\":20},{\"firstDay\":4,\"secondDay\":1,\"percent\":80,\"sellerPercent\":50},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":70},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":90,\"isHoliday\":true}]");
obj5.setRefundType(0L);
req.setRefundInfo(obj5);
List<AlitripTravelProductBaseModifyRequest.BookingRuleInfo> list7 = new ArrayList<AlitripTravelProductBaseModifyRequest.BookingRuleInfo>();
AlitripTravelProductBaseModifyRequest.BookingRuleInfo obj8 = new AlitripTravelProductBaseModifyRequest.BookingRuleInfo();
list7.add(obj8);
obj8.setRuleType("fee_included");
obj8.setRuleDesc("描述");
req.setBookingRules(list7);
AlitripTravelProductBaseModifyRequest.CruiseProductExt obj9 = new AlitripTravelProductBaseModifyRequest.CruiseProductExt();
obj9.setShipFeeInclude("1");
obj9.setShipName("蓝宝石公主号");
obj9.setShipDown("中国(上海)");
obj9.setShipUp("中国(厦门)");
obj9.setCruiseLine("日韩航线");
obj9.setCruiseCompany("美国公主邮轮");
req.setCruiseProductExt(obj9);
AlitripTravelProductBaseModifyRequest.ProductSaleInfo obj10 = new AlitripTravelProductBaseModifyRequest.ProductSaleInfo();
obj10.setConfirmTime(1L);
obj10.setDuration(2L);
obj10.setDistribute(false);
obj10.setProductLine(1001L);
obj10.setSaleType(0L);
obj10.setEndComboDate(StringUtils.parseDateTime("2019-09-18 19:47:45"));
obj10.setAgent(true);
obj10.setPriceUpper("11.11");
obj10.setStartComboDate(StringUtils.parseDateTime("2019-09-18 19:47:45"));
obj10.setConfirmType(1L);
obj10.setPriceLower("0.01");
req.setProductSaleInfo(obj10);
AlitripTravelProductBaseModifyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelProductBaseModifyRequest req = new AlitripTravelProductBaseModifyRequest();
List<AlitripTravelProductBaseModifyRequest.ItemItineraryInfoDomain> list2 = new List<AlitripTravelProductBaseModifyRequest.ItemItineraryInfoDomain>();
AlitripTravelProductBaseModifyRequest.ItemItineraryInfoDomain obj3 = new AlitripTravelProductBaseModifyRequest.ItemItineraryInfoDomain();
list2.Add(obj3);
obj3.Content = "<txt>文本描述</txt><img>https://img.daily.taobaocdn.net/imgextra/i4/3651880377/TB2p4JaXXXXXXabXXXXXXXXXXXX_!!3651880377.jpg</img><txt>文本描述2</txt><txt>文本描述3</txt><img>https://img.daily.taobaocdn.net/imgextra/i4/3651880377/TB2p4JaXXXXXXabXXXXXXXXXXXX_!!3651880377.jpg</img>";
obj3.Title = "行程标题";
obj3.ItineraryNo = 1L;
req.Itineraries_ = list2;
AlitripTravelProductBaseModifyRequest.ProductBaseInfoDomain obj4 = new AlitripTravelProductBaseModifyRequest.ProductBaseInfoDomain();
obj4.TripMaxDays = 3L;
obj4.Desc = "产品描述";
obj4.WapDesc = "<wapDesc><shortDesc>标题</shortDesc> <txt>描述</txt> <img>图片路径</img></wapDesc>";
obj4.ItemType = 9L;
obj4.ToLocations = "上海";
obj4.OutId = "123";
obj4.PicUrls = "https://img.alicdn.com/tfs/TB1QyC0RxTpK1RjSZFMXXbG_VXa-246-246.jpg,https://img.alicdn.com/tfs/TB1QyC0RxTpK1RjSZFMXXbG_VXa-246-246.jpg";
obj4.AccomNights = 2L;
obj4.Title = "产品标题";
obj4.SubTitles = "亮点1,亮点2";
obj4.TravellerTemplateId = 0L;
req.BaseInfo_ = obj4;
req.ItemId = 12345L;
AlitripTravelProductBaseModifyRequest.ItemRefundInfoDomain obj5 = new AlitripTravelProductBaseModifyRequest.ItemRefundInfoDomain();
obj5.RefundRegulations = ""30_30_0","30_15_5","14_7_15","6_4_70","3_1_85","1_1_90"";
obj5.RefundRegulationsJson = "[{\"firstDay\":-1,\"secondDay\":5,\"percent\":50,\"sellerPercent\":20},{\"firstDay\":4,\"secondDay\":1,\"percent\":80,\"sellerPercent\":50},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":70},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":90,\"isHoliday\":true}]";
obj5.RefundType = 0L;
req.RefundInfo_ = obj5;
List<AlitripTravelProductBaseModifyRequest.BookingRuleInfoDomain> list7 = new List<AlitripTravelProductBaseModifyRequest.BookingRuleInfoDomain>();
AlitripTravelProductBaseModifyRequest.BookingRuleInfoDomain obj8 = new AlitripTravelProductBaseModifyRequest.BookingRuleInfoDomain();
list7.Add(obj8);
obj8.RuleType = "fee_included";
obj8.RuleDesc = "描述";
req.BookingRules_ = list7;
AlitripTravelProductBaseModifyRequest.CruiseProductExtDomain obj9 = new AlitripTravelProductBaseModifyRequest.CruiseProductExtDomain();
obj9.ShipFeeInclude = "1";
obj9.ShipName = "蓝宝石公主号";
obj9.ShipDown = "中国(上海)";
obj9.ShipUp = "中国(厦门)";
obj9.CruiseLine = "日韩航线";
obj9.CruiseCompany = "美国公主邮轮";
req.CruiseProductExt_ = obj9;
AlitripTravelProductBaseModifyRequest.ProductSaleInfoDomain obj10 = new AlitripTravelProductBaseModifyRequest.ProductSaleInfoDomain();
obj10.ConfirmTime = 1L;
obj10.Duration = 2L;
obj10.Distribute = false;
obj10.ProductLine = 1001L;
obj10.SaleType = 0L;
obj10.EndComboDate = DateTime.Parse(2019-09-18 19:47:45");
obj10.Agent = true;
obj10.PriceUpper = "11.11";
obj10.StartComboDate = DateTime.Parse(2019-09-18 19:47:45");
obj10.ConfirmType = 1L;
obj10.PriceLower = "0.01";
req.ProductSaleInfo_ = obj10;
AlitripTravelProductBaseModifyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelProductBaseModifyRequest;
$itineraries = new ItemItineraryInfo;
$itineraries->content="<txt>文本描述</txt><img>https://img.daily.taobaocdn.net/imgextra/i4/3651880377/TB2p4JaXXXXXXabXXXXXXXXXXXX_!!3651880377.jpg</img><txt>文本描述2</txt><txt>文本描述3</txt><img>https://img.daily.taobaocdn.net/imgextra/i4/3651880377/TB2p4JaXXXXXXabXXXXXXXXXXXX_!!3651880377.jpg</img>";
$itineraries->title="行程标题";
$itineraries->itinerary_no="1";
$req->setItineraries(json_encode($itineraries));
$base_info = new ProductBaseInfo;
$base_info->trip_max_days="3";
$base_info->desc="产品描述";
$base_info->wap_desc="<wapDesc><shortDesc>标题</shortDesc> <txt>描述</txt> <img>图片路径</img></wapDesc>";
$base_info->item_type="9";
$base_info->to_locations="上海";
$base_info->out_id="123";
$base_info->pic_urls="https://img.alicdn.com/tfs/TB1QyC0RxTpK1RjSZFMXXbG_VXa-246-246.jpg,https://img.alicdn.com/tfs/TB1QyC0RxTpK1RjSZFMXXbG_VXa-246-246.jpg";
$base_info->accom_nights="2";
$base_info->title="产品标题";
$base_info->sub_titles="亮点1,亮点2";
$base_info->traveller_template_id="0";
$req->setBaseInfo(json_encode($base_info));
$req->setItemId("12345");
$refund_info = new ItemRefundInfo;
$refund_info->refund_regulations="[\"30_30_0\",\"30_15_5\",\"14_7_15\",\"6_4_70\",\"3_1_85\",\"1_1_90\"]";
$refund_info->refund_regulations_json="[{\"firstDay\":-1,\"secondDay\":5,\"percent\":50,\"sellerPercent\":20},{\"firstDay\":4,\"secondDay\":1,\"percent\":80,\"sellerPercent\":50},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":70},{\"firstDay\":0,\"secondDay\":0,\"percent\":100,\"sellerPercent\":90,\"isHoliday\":true}]";
$refund_info->refund_type="0";
$req->setRefundInfo(json_encode($refund_info));
$booking_rules = new BookingRuleInfo;
$booking_rules->rule_type="fee_included";
$booking_rules->rule_desc="描述";
$req->setBookingRules(json_encode($booking_rules));
$cruise_product_ext = new CruiseProductExt;
$cruise_product_ext->ship_fee_include="1";
$cruise_product_ext->ship_name="蓝宝石公主号";
$cruise_product_ext->ship_down="中国(上海)";
$cruise_product_ext->ship_up="中国(厦门)";
$cruise_product_ext->cruise_line="日韩航线";
$cruise_product_ext->cruise_company="美国公主邮轮";
$req->setCruiseProductExt(json_encode($cruise_product_ext));
$product_sale_info = new ProductSaleInfo;
$product_sale_info->confirm_time="1";
$product_sale_info->duration="2";
$product_sale_info->distribute="false";
$product_sale_info->product_line="1001";
$product_sale_info->sale_type="0";
$product_sale_info->end_combo_date="2019-09-18 19:47:45";
$product_sale_info->agent="true";
$product_sale_info->price_upper="11.11";
$product_sale_info->start_combo_date="2019-09-18 19:47:45";
$product_sale_info->confirm_type="1";
$product_sale_info->price_lower="0.01";
$req->setProductSaleInfo(json_encode($product_sale_info));
$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=taobao.alitrip.travel.product.base.modify' \
-d 'partner_id=apidoc' \
-d 'session=14cb4134-5d6c-4bf9-a266-42c7a93dc29c' \
-d 'sign=DC67AEA61F126CBBDCCF17F0E28D73EA' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+21%3A10%3A47' \
-d 'v=2.0' \
-d 'base_info=null' \
-d 'booking_rules=null' \
-d 'cruise_product_ext=null' \
-d 'item_id=12345' \
-d 'itineraries=null' \
-d 'product_sale_info=null' \
-d 'refund_info=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelProductBaseModifyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.itineraries=""
req.base_info=""
req.item_id=12345
req.refund_info=""
req.booking_rules=""
req.cruise_product_ext=""
req.product_sale_info=""
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,"taobao.alitrip.travel.product.base.modify");
add_param(pRequest,"itineraries","数据结构JSON示例");
add_param(pRequest,"base_info","数据结构JSON示例");
add_param(pRequest,"item_id","12345");
add_param(pRequest,"refund_info","数据结构JSON示例");
add_param(pRequest,"booking_rules","数据结构JSON示例");
add_param(pRequest,"cruise_product_ext","数据结构JSON示例");
add_param(pRequest,"product_sale_info","数据结构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('taobao.alitrip.travel.product.base.modify', {
'itineraries':'数据结构JSON示例',
'base_info':'数据结构JSON示例',
'item_id':'12345',
'refund_info':'数据结构JSON示例',
'booking_rules':'数据结构JSON示例',
'cruise_product_ext':'数据结构JSON示例',
'product_sale_info':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})