TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripFlightServiceCloseRequest req = new AlitripFlightServiceCloseRequest();
AlitripFlightServiceCloseRequest.CloseOrderReq obj1 = new AlitripFlightServiceCloseRequest.CloseOrderReq();
obj1.setOrderId(3523452345234L);
obj1.setChannelName("feiye");
req.setCloseOrderReq(obj1);
AlitripFlightServiceCloseResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripFlightServiceCloseRequest req = new AlitripFlightServiceCloseRequest();
AlitripFlightServiceCloseRequest.CloseOrderReqDomain obj1 = new AlitripFlightServiceCloseRequest.CloseOrderReqDomain();
obj1.OrderId = 3523452345234L;
obj1.ChannelName = "feiye";
req.CloseOrderReq_ = obj1;
AlitripFlightServiceCloseResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripFlightServiceCloseRequest;
$close_order_req = new CloseOrderReq;
$close_order_req->order_id="3523452345234";
$close_order_req->channel_name="feiye";
$req->setCloseOrderReq(json_encode($close_order_req));
$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.flight.service.close' \
-d 'partner_id=apidoc' \
-d 'session=b577c9f0-854f-492a-8765-3fd0fcfcbbb0' \
-d 'sign=29270898447880D1BE13FAC2E77A2D61' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-30+13%3A07%3A17' \
-d 'v=2.0' \
-d 'close_order_req=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripFlightServiceCloseRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.close_order_req="数据结构示例JSON格式"
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.flight.service.close");
add_param(pRequest,"close_order_req","数据结构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.flight.service.close', {
'close_order_req':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})