TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelProductSkuOverrideRequest req = new AlitripTravelProductSkuOverrideRequest();
req.setOutProductId("111");
req.setItemId(123L);
List<AlitripTravelProductSkuOverrideRequest.ItemSkuInfo> list2 = new ArrayList<AlitripTravelProductSkuOverrideRequest.ItemSkuInfo>();
AlitripTravelProductSkuOverrideRequest.ItemSkuInfo obj3 = new AlitripTravelProductSkuOverrideRequest.ItemSkuInfo();
list2.add(obj3);
obj3.setPackageName("套餐名称");
obj3.setOuterSkuId("111");
List<AlitripTravelProductSkuOverrideRequest.Prices> list6 = new ArrayList<AlitripTravelProductSkuOverrideRequest.Prices>();
AlitripTravelProductSkuOverrideRequest.Prices obj7 = new AlitripTravelProductSkuOverrideRequest.Prices();
list6.add(obj7);
obj7.setPriceType(1L);
obj7.setStock(123L);
obj7.setPrice(1234L);
obj7.setDate(StringUtils.parseDateTime("2015-09-19 09:42:24"));
list4.setPrices(list6);
obj3.setPackageDesc("套餐描述");
List<AlitripTravelProductSkuOverrideRequest.Product> list10 = new ArrayList<AlitripTravelProductSkuOverrideRequest.Product>();
AlitripTravelProductSkuOverrideRequest.Product obj11 = new AlitripTravelProductSkuOverrideRequest.Product();
list10.add(obj11);
obj11.setElementId("123");
obj11.setNum(2L);
list8.setProducts(list10);
req.setSkus(list2);
AlitripTravelProductSkuOverrideResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelProductSkuOverrideRequest req = new AlitripTravelProductSkuOverrideRequest();
req.OutProductId = "111";
req.ItemId = 123L;
List<AlitripTravelProductSkuOverrideRequest.ItemSkuInfoDomain> list2 = new List<AlitripTravelProductSkuOverrideRequest.ItemSkuInfoDomain>();
AlitripTravelProductSkuOverrideRequest.ItemSkuInfoDomain obj3 = new AlitripTravelProductSkuOverrideRequest.ItemSkuInfoDomain();
list2.Add(obj3);
obj3.PackageName = "套餐名称";
obj3.OuterSkuId = "111";
List<AlitripTravelProductSkuOverrideRequest.PricesDomain> list5 = new List<AlitripTravelProductSkuOverrideRequest.PricesDomain>();
AlitripTravelProductSkuOverrideRequest.PricesDomain obj6 = new AlitripTravelProductSkuOverrideRequest.PricesDomain();
list5.Add(obj6);
obj6.PriceType = 1L;
obj6.Stock = 123L;
obj6.Price = 1234L;
obj6.Date = DateTime.Parse(2015-09-19 09:42:24");
obj3.Prices= list5;
obj3.PackageDesc = "套餐描述";
List<AlitripTravelProductSkuOverrideRequest.ProductDomain> list8 = new List<AlitripTravelProductSkuOverrideRequest.ProductDomain>();
AlitripTravelProductSkuOverrideRequest.ProductDomain obj9 = new AlitripTravelProductSkuOverrideRequest.ProductDomain();
list8.Add(obj9);
obj9.ElementId = "123";
obj9.Num = 2L;
obj3.Products= list8;
req.Skus_ = list2;
AlitripTravelProductSkuOverrideResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelProductSkuOverrideRequest;
$req->setOutProductId("111");
$req->setItemId("123");
$skus = new ItemSkuInfo;
$skus->package_name="套餐名称";
$skus->outer_sku_id="111";
$prices = new Prices;
$prices->price_type="1";
$prices->stock="123";
$prices->price="1234";
$prices->date="2015-09-19 09:42:24";
$skus->prices = $prices;
$skus->package_desc="套餐描述";
$products = new Product;
$products->element_id="123";
$products->num="2";
$skus->products = $products;
$req->setSkus(json_encode($skus));
$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.sku.override' \
-d 'partner_id=apidoc' \
-d 'session=b4569c6a-c808-4985-a57d-93247176bb66' \
-d 'sign=D8F68958931F1F34AD1A361699D0B4C5' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+21%3A09%3A37' \
-d 'v=2.0' \
-d 'item_id=123' \
-d 'out_product_id=111' \
-d 'skus=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelProductSkuOverrideRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.out_product_id="111"
req.item_id=123
req.skus=""
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.sku.override");
add_param(pRequest,"out_product_id","111");
add_param(pRequest,"item_id","123");
add_param(pRequest,"skus","数据结构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.sku.override', {
'out_product_id':'111',
'item_id':'123',
'skus':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})