TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlitripBtripCorpopApplyApproveRequest req = new AlitripBtripCorpopApplyApproveRequest();
AlitripBtripCorpopApplyApproveRequest.OpenApiUpdateApplyRq obj1 = new AlitripBtripCorpopApplyApproveRequest.OpenApiUpdateApplyRq();
obj1.setThirdpartApplyId("12345");
obj1.setCorpId("corp1");
obj1.setNote("同意");
obj1.setOperateTime(StringUtils.parseDateTime("2017-01-01 00:00:00"));
obj1.setStatus(1L);
obj1.setUserId("user1");
obj1.setUserName("张三");
obj1.setVersion(2L);
req.setRq(obj1);
AlitripBtripCorpopApplyApproveResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlitripBtripCorpopApplyApproveRequest req = new AlitripBtripCorpopApplyApproveRequest();
AlitripBtripCorpopApplyApproveRequest.OpenApiUpdateApplyRqDomain obj1 = new AlitripBtripCorpopApplyApproveRequest.OpenApiUpdateApplyRqDomain();
obj1.ThirdpartApplyId = "12345";
obj1.CorpId = "corp1";
obj1.Note = "同意";
obj1.OperateTime = DateTime.Parse(2017-01-01 00:00:00");
obj1.Status = 1L;
obj1.UserId = "user1";
obj1.UserName = "张三";
obj1.Version = 2L;
req.Rq_ = obj1;
AlitripBtripCorpopApplyApproveResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlitripBtripCorpopApplyApproveRequest;
$rq = new OpenApiUpdateApplyRq;
$rq->thirdpart_apply_id="12345";
$rq->corp_id="corp1";
$rq->note="同意";
$rq->operate_time="2017-01-01 00:00:00";
$rq->status="1";
$rq->user_id="user1";
$rq->user_name="张三";
$rq->version="2";
$req->setRq(json_encode($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=alitrip.btrip.corpop.apply.approve' \
-d 'partner_id=apidoc' \
-d 'session=721b2cd7-b846-41f7-940d-649687022ea7' \
-d 'sign=A2A6E9D5AB97E8CFB528BD71573D52D2' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+20%3A21%3A44' \
-d 'v=2.0' \
-d 'rq=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlitripBtripCorpopApplyApproveRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.rq=""
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.btrip.corpop.apply.approve");
add_param(pRequest,"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('alitrip.btrip.corpop.apply.approve', {
'rq':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})