TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelProductGereralskuUpdateRequest req = new AlitripTravelProductGereralskuUpdateRequest();
List<AlitripTravelProductGereralskuUpdateRequest.PropertyAliasInfo> list2 = new ArrayList<AlitripTravelProductGereralskuUpdateRequest.PropertyAliasInfo>();
AlitripTravelProductGereralskuUpdateRequest.PropertyAliasInfo obj3 = new AlitripTravelProductGereralskuUpdateRequest.PropertyAliasInfo();
list2.add(obj3);
obj3.setProperties("20000:33564");
obj3.setValue("香港直飞");
req.setAlias(list2);
List<AlitripTravelProductGereralskuUpdateRequest.CatPropInfo> list5 = new ArrayList<AlitripTravelProductGereralskuUpdateRequest.CatPropInfo>();
AlitripTravelProductGereralskuUpdateRequest.CatPropInfo obj6 = new AlitripTravelProductGereralskuUpdateRequest.CatPropInfo();
list5.add(obj6);
obj6.setVid("111");
obj6.setPid("222");
req.setProperties(list5);
req.setItemId(123L);
req.setPrice(1000L);
req.setQuantity(200L);
req.setOuterId("111");
List<AlitripTravelProductGereralskuUpdateRequest.DateInventoryAndPrice> list8 = new ArrayList<AlitripTravelProductGereralskuUpdateRequest.DateInventoryAndPrice>();
AlitripTravelProductGereralskuUpdateRequest.DateInventoryAndPrice obj9 = new AlitripTravelProductGereralskuUpdateRequest.DateInventoryAndPrice();
list8.add(obj9);
obj9.setPrice(200L);
obj9.setStock(100L);
obj9.setDate(StringUtils.parseDateTime("2017-10-23 09:42:12"));
req.setDateList(list8);
AlitripTravelProductGereralskuUpdateResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelProductGereralskuUpdateRequest req = new AlitripTravelProductGereralskuUpdateRequest();
List<AlitripTravelProductGereralskuUpdateRequest.PropertyAliasInfoDomain> list2 = new List<AlitripTravelProductGereralskuUpdateRequest.PropertyAliasInfoDomain>();
AlitripTravelProductGereralskuUpdateRequest.PropertyAliasInfoDomain obj3 = new AlitripTravelProductGereralskuUpdateRequest.PropertyAliasInfoDomain();
list2.Add(obj3);
obj3.Properties = "20000:33564";
obj3.Value = "香港直飞";
req.Alias_ = list2;
List<AlitripTravelProductGereralskuUpdateRequest.CatPropInfoDomain> list5 = new List<AlitripTravelProductGereralskuUpdateRequest.CatPropInfoDomain>();
AlitripTravelProductGereralskuUpdateRequest.CatPropInfoDomain obj6 = new AlitripTravelProductGereralskuUpdateRequest.CatPropInfoDomain();
list5.Add(obj6);
obj6.Vid = "111";
obj6.Pid = "222";
req.Properties_ = list5;
req.ItemId = 123L;
req.Price = 1000L;
req.Quantity = 200L;
req.OuterId = "111";
List<AlitripTravelProductGereralskuUpdateRequest.DateInventoryAndPriceDomain> list8 = new List<AlitripTravelProductGereralskuUpdateRequest.DateInventoryAndPriceDomain>();
AlitripTravelProductGereralskuUpdateRequest.DateInventoryAndPriceDomain obj9 = new AlitripTravelProductGereralskuUpdateRequest.DateInventoryAndPriceDomain();
list8.Add(obj9);
obj9.Price = 200L;
obj9.Stock = 100L;
obj9.Date = DateTime.Parse(2017-10-23 09:42:12");
req.DateList_ = list8;
AlitripTravelProductGereralskuUpdateResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelProductGereralskuUpdateRequest;
$alias = new PropertyAliasInfo;
$alias->properties="20000:33564";
$alias->value="香港直飞";
$req->setAlias(json_encode($alias));
$properties = new CatPropInfo;
$properties->vid="111";
$properties->pid="222";
$req->setProperties(json_encode($properties));
$req->setItemId("123");
$req->setPrice("1000");
$req->setQuantity("200");
$req->setOuterId("111");
$date_list = new DateInventoryAndPrice;
$date_list->price="200";
$date_list->stock="100";
$date_list->date="2017-10-23 09:42:12";
$req->setDateList(json_encode($date_list));
$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.travel.product.gereralsku.update' \
-d 'partner_id=apidoc' \
-d 'session=2496a26a-8056-488f-8605-7790ff3acb7d' \
-d 'sign=7BF9B49A32BF640903A96D201E75FE0F' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+21%3A34%3A11' \
-d 'v=2.0' \
-d 'alias=null' \
-d 'date_list=null' \
-d 'item_id=123' \
-d 'outer_id=111' \
-d 'price=1000' \
-d 'properties=null' \
-d 'quantity=200'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelProductGereralskuUpdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.alias=""
req.properties=""
req.item_id=123
req.price=1000
req.quantity=200
req.outer_id="111"
req.date_list=""
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.travel.product.gereralsku.update");
add_param(pRequest,"alias","数据结构JSON示例");
add_param(pRequest,"properties","数据结构JSON示例");
add_param(pRequest,"item_id","123");
add_param(pRequest,"price","1000");
add_param(pRequest,"quantity","200");
add_param(pRequest,"outer_id","111");
add_param(pRequest,"date_list","数据结构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.travel.product.gereralsku.update', {
'alias':'数据结构JSON示例',
'properties':'数据结构JSON示例',
'item_id':'123',
'price':'1000',
'quantity':'200',
'outer_id':'111',
'date_list':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})