TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TrainAgentReserveorderoccupyFailRequest req = new TrainAgentReserveorderoccupyFailRequest();
TrainAgentReserveorderoccupyFailRequest.ReserveOrderOccupyRQ obj1 = new TrainAgentReserveorderoccupyFailRequest.ReserveOrderOccupyRQ();
obj1.setTaskId(1635187060363644928L);
obj1.setGrabId(123L);
obj1.setErrorMsg("无");
obj1.setAccountUsername("用户名");
TrainAgentReserveorderoccupyFailRequest.MonitorInfo obj2 = new TrainAgentReserveorderoccupyFailRequest.MonitorInfo();
List<TrainAgentReserveorderoccupyFailRequest.MonitorItem> list4 = new ArrayList<TrainAgentReserveorderoccupyFailRequest.MonitorItem>();
TrainAgentReserveorderoccupyFailRequest.MonitorItem obj5 = new TrainAgentReserveorderoccupyFailRequest.MonitorItem();
list4.add(obj5);
obj5.setStepName("com.cars.otsmobile.queryPassenger");
obj5.setStepStartTimeMillis(1734681315716L);
obj5.setStepCostTime(181L);
obj5.setStepSuccess(true);
obj5.setStepResult("成功");
obj2.setMonitorList(list4);
obj1.setMonitorInfo(obj2);
req.setReserveOrderOccupyRq(obj1);
TrainAgentReserveorderoccupyFailResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TrainAgentReserveorderoccupyFailRequest req = new TrainAgentReserveorderoccupyFailRequest();
TrainAgentReserveorderoccupyFailRequest.ReserveOrderOccupyRQDomain obj1 = new TrainAgentReserveorderoccupyFailRequest.ReserveOrderOccupyRQDomain();
obj1.TaskId = 1635187060363644928L;
obj1.GrabId = 123L;
obj1.ErrorMsg = "无";
obj1.AccountUsername = "用户名";
TrainAgentReserveorderoccupyFailRequest.MonitorInfoDomain obj2 = new TrainAgentReserveorderoccupyFailRequest.MonitorInfoDomain();
List<TrainAgentReserveorderoccupyFailRequest.MonitorItemDomain> list4 = new List<TrainAgentReserveorderoccupyFailRequest.MonitorItemDomain>();
TrainAgentReserveorderoccupyFailRequest.MonitorItemDomain obj5 = new TrainAgentReserveorderoccupyFailRequest.MonitorItemDomain();
list4.Add(obj5);
obj5.StepName = "com.cars.otsmobile.queryPassenger";
obj5.StepStartTimeMillis = 1734681315716L;
obj5.StepCostTime = 181L;
obj5.StepSuccess = true;
obj5.StepResult = "成功";
obj2.MonitorList= list4;
obj1.MonitorInfo= obj2;
req.ReserveOrderOccupyRq_ = obj1;
TrainAgentReserveorderoccupyFailResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TrainAgentReserveorderoccupyFailRequest;
$reserve_order_occupy_rq = new ReserveOrderOccupyRQ;
$reserve_order_occupy_rq->task_id="1635187060363644928";
$reserve_order_occupy_rq->grab_id="123";
$reserve_order_occupy_rq->error_msg="无";
$reserve_order_occupy_rq->account_username="用户名";
$monitor_info = new MonitorInfo;
$monitor_list = new MonitorItem;
$monitor_list->step_name="com.cars.otsmobile.queryPassenger";
$monitor_list->step_start_time_millis="1734681315716";
$monitor_list->step_cost_time="181";
$monitor_list->step_success="true";
$monitor_list->step_result="成功";
$monitor_info->monitor_list = $monitor_list;
$reserve_order_occupy_rq->monitor_info = $monitor_info;
$req->setReserveOrderOccupyRq(json_encode($reserve_order_occupy_rq));
$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.train.agent.reserveorderoccupy.fail' \
-d 'partner_id=apidoc' \
-d 'session=1c4913af-c188-4a0f-8ca7-7c343b37db77' \
-d 'sign=8F0E5DB65EB8EF6384C7C66A3CBB0EF0' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-01-30+03%3A57%3A20' \
-d 'v=2.0' \
-d 'reserve_order_occupy_rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TrainAgentReserveorderoccupyFailRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.reserve_order_occupy_rq="数据结构示例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,"taobao.train.agent.reserveorderoccupy.fail");
add_param(pRequest,"reserve_order_occupy_rq","数据结构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.train.agent.reserveorderoccupy.fail', {
'reserve_order_occupy_rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})