TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelItemSkuPriceModifyRequest req = new AlitripTravelItemSkuPriceModifyRequest();
req.setItemId(123L);
List<AlitripTravelItemSkuPriceModifyRequest.PontusTravelItemSkuInfo> list2 = new ArrayList<AlitripTravelItemSkuPriceModifyRequest.PontusTravelItemSkuInfo>();
AlitripTravelItemSkuPriceModifyRequest.PontusTravelItemSkuInfo obj3 = new AlitripTravelItemSkuPriceModifyRequest.PontusTravelItemSkuInfo();
list2.add(obj3);
obj3.setOuterSkuId("1111");
List<AlitripTravelItemSkuPriceModifyRequest.PontusTravelPrices> list6 = new ArrayList<AlitripTravelItemSkuPriceModifyRequest.PontusTravelPrices>();
AlitripTravelItemSkuPriceModifyRequest.PontusTravelPrices obj7 = new AlitripTravelItemSkuPriceModifyRequest.PontusTravelPrices();
list6.add(obj7);
obj7.setDate(StringUtils.parseDateTime("2015-09-19 09:42:24"));
obj7.setOperation(1L);
obj7.setPrice(1234L);
obj7.setPriceType(1L);
obj7.setStock(123L);
obj7.setOuterPriceId("123456");
list4.setPrices(list6);
req.setSkus(list2);
req.setOutProductId("111");
req.setModifyType(0L);
AlitripTravelItemSkuPriceModifyResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelItemSkuPriceModifyRequest req = new AlitripTravelItemSkuPriceModifyRequest();
req.ItemId = 123L;
List<AlitripTravelItemSkuPriceModifyRequest.PontusTravelItemSkuInfoDomain> list2 = new List<AlitripTravelItemSkuPriceModifyRequest.PontusTravelItemSkuInfoDomain>();
AlitripTravelItemSkuPriceModifyRequest.PontusTravelItemSkuInfoDomain obj3 = new AlitripTravelItemSkuPriceModifyRequest.PontusTravelItemSkuInfoDomain();
list2.Add(obj3);
obj3.OuterSkuId = "1111";
List<AlitripTravelItemSkuPriceModifyRequest.PontusTravelPricesDomain> list5 = new List<AlitripTravelItemSkuPriceModifyRequest.PontusTravelPricesDomain>();
AlitripTravelItemSkuPriceModifyRequest.PontusTravelPricesDomain obj6 = new AlitripTravelItemSkuPriceModifyRequest.PontusTravelPricesDomain();
list5.Add(obj6);
obj6.Date = DateTime.Parse(2015-09-19 09:42:24");
obj6.Operation = 1L;
obj6.Price = 1234L;
obj6.PriceType = 1L;
obj6.Stock = 123L;
obj6.OuterPriceId = "123456";
obj3.Prices= list5;
req.Skus_ = list2;
req.OutProductId = "111";
req.ModifyType = 0L;
AlitripTravelItemSkuPriceModifyResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelItemSkuPriceModifyRequest;
$req->setItemId("123");
$skus = new PontusTravelItemSkuInfo;
$skus->outer_sku_id="1111";
$prices = new PontusTravelPrices;
$prices->date="2015-09-19 09:42:24";
$prices->operation="1";
$prices->price="1234";
$prices->price_type="1";
$prices->stock="123";
$prices->outer_price_id="123456";
$skus->prices = $prices;
$req->setSkus(json_encode($skus));
$req->setOutProductId("111");
$req->setModifyType("0");
$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.item.sku.price.modify' \
-d 'partner_id=apidoc' \
-d 'session=3058e644-a9f7-415b-ba3e-d4a5f3730cdb' \
-d 'sign=456DD38EF2AEDF7C24D7FE0127FAF020' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-23+21%3A03%3A38' \
-d 'v=2.0' \
-d 'item_id=123' \
-d 'modify_type=0' \
-d 'out_product_id=111' \
-d 'skus=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelItemSkuPriceModifyRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.item_id=123
req.skus=""
req.out_product_id="111"
req.modify_type=0
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.item.sku.price.modify");
add_param(pRequest,"item_id","123");
add_param(pRequest,"skus","数据结构JSON示例");
add_param(pRequest,"out_product_id","111");
add_param(pRequest,"modify_type","0");
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.item.sku.price.modify', {
'item_id':'123',
'skus':'数据结构JSON示例',
'out_product_id':'111',
'modify_type':'0'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})