TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
XhotelOrderFutureFacescanPutRequest req = new XhotelOrderFutureFacescanPutRequest();
XhotelOrderFutureFacescanPutRequest.FaceScanParam obj1 = new XhotelOrderFutureFacescanPutRequest.FaceScanParam();
obj1.setGuestName("张三");
obj1.setCertificateNum("412789189006232389");
obj1.setCertificateType(20L);
obj1.setDeviceId("10000");
obj1.setDeviceFirm("xi_er");
req.setFaceScanParam(obj1);
XhotelOrderFutureFacescanPutResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
XhotelOrderFutureFacescanPutRequest req = new XhotelOrderFutureFacescanPutRequest();
XhotelOrderFutureFacescanPutRequest.FaceScanParamDomain obj1 = new XhotelOrderFutureFacescanPutRequest.FaceScanParamDomain();
obj1.GuestName = "张三";
obj1.CertificateNum = "412789189006232389";
obj1.CertificateType = 20L;
obj1.DeviceId = "10000";
obj1.DeviceFirm = "xi_er";
req.FaceScanParam_ = obj1;
XhotelOrderFutureFacescanPutResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new XhotelOrderFutureFacescanPutRequest;
$face_scan_param = new FaceScanParam;
$face_scan_param->guest_name="张三";
$face_scan_param->certificate_num="412789189006232389";
$face_scan_param->certificate_type="20";
$face_scan_param->device_id="10000";
$face_scan_param->device_firm="xi_er";
$req->setFaceScanParam(json_encode($face_scan_param));
$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=taobao.xhotel.order.future.facescan.put' \
-d 'partner_id=apidoc' \
-d 'sign=BE66831A4FEF328D5873FE0DD0E6DB45' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+20%3A19%3A01' \
-d 'v=2.0' \
-d 'face_scan_param=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.XhotelOrderFutureFacescanPutRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.face_scan_param=""
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,"taobao.xhotel.order.future.facescan.put");
add_param(pRequest,"face_scan_param","数据结构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('taobao.xhotel.order.future.facescan.put', {
'face_scan_param':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})