TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripTravelHotelticketProductProductupdateRequest req = new AlitripTravelHotelticketProductProductupdateRequest();
req.setAccessKey("ak342");
AlitripTravelHotelticketProductProductupdateRequest.ProductUpdateDTO obj1 = new AlitripTravelHotelticketProductProductupdateRequest.ProductUpdateDTO();
obj1.setExtendParamsString("{\"example\": \"例子\"}");
obj1.setNotifyType(1L);
obj1.setProductId("prd1234");
obj1.setSessionIds("S123");
obj1.setStartDate("2022-07-05");
obj1.setEndDate("2022-07-15");
req.setProductUpdates(obj1);
AlitripTravelHotelticketProductProductupdateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripTravelHotelticketProductProductupdateRequest req = new AlitripTravelHotelticketProductProductupdateRequest();
req.AccessKey = "ak342";
AlitripTravelHotelticketProductProductupdateRequest.ProductUpdateDTODomain obj1 = new AlitripTravelHotelticketProductProductupdateRequest.ProductUpdateDTODomain();
obj1.ExtendParams = "{\"example\": \"例子\"}";
obj1.NotifyType = 1L;
obj1.ProductId = "prd1234";
obj1.SessionIds = "S123";
obj1.StartDate = "2022-07-05";
obj1.EndDate = "2022-07-15";
req.ProductUpdates_ = obj1;
AlitripTravelHotelticketProductProductupdateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripTravelHotelticketProductProductupdateRequest;
$req->setAccessKey("ak342");
$product_updates = new ProductUpdateDTO;
$product_updates->extend_params=json_decode("{\"example\": \"例子\"}");
$product_updates->notify_type="1";
$product_updates->product_id="prd1234";
$product_updates->session_ids="S123";
$product_updates->start_date="2022-07-05";
$product_updates->end_date="2022-07-15";
$req->setProductUpdates(json_encode($product_updates));
$resp = $c->execute($req);
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.hotelticket.product.productupdate' \
-d 'partner_id=apidoc' \
-d 'sign=EF6CC8D32A59F7C1D3263FE45EA084F0' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-12-05+03%3A15%3A15' \
-d 'v=2.0' \
-d 'access_key=ak342' \
-d 'product_updates=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripTravelHotelticketProductProductupdateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.access_key="ak342"
req.product_updates="[]"
try:
resp= req.getResponse()
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.hotelticket.product.productupdate");
add_param(pRequest,"access_key","ak342");
add_param(pRequest,"product_updates","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
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.hotelticket.product.productupdate', {
'access_key':'ak342',
'product_updates':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})