TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaEinvoicePaperDreviceSaveRequest req = new AlibabaEinvoicePaperDreviceSaveRequest();
AlibabaEinvoicePaperDreviceSaveRequest.InvoicePaperDeviceDto obj1 = new AlibabaEinvoicePaperDreviceSaveRequest.InvoicePaperDeviceDto();
obj1.setTerminalNo("123");
obj1.setCaPassword("QWERTY123");
obj1.setPassword("123456");
obj1.setProvider("bw");
obj1.setRegistrationCode("qwerty123456789");
obj1.setDeviceNo("001");
obj1.setDiskNo("1234566");
obj1.setPayeeRegisterNo("9123456789987N");
obj1.setStatus("1");
req.setInvoicePaperDevice(obj1);
AlibabaEinvoicePaperDreviceSaveResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaEinvoicePaperDreviceSaveRequest req = new AlibabaEinvoicePaperDreviceSaveRequest();
AlibabaEinvoicePaperDreviceSaveRequest.InvoicePaperDeviceDtoDomain obj1 = new AlibabaEinvoicePaperDreviceSaveRequest.InvoicePaperDeviceDtoDomain();
obj1.TerminalNo = "123";
obj1.CaPassword = "QWERTY123";
obj1.Password = "123456";
obj1.Provider = "bw";
obj1.RegistrationCode = "qwerty123456789";
obj1.DeviceNo = "001";
obj1.DiskNo = "1234566";
obj1.PayeeRegisterNo = "9123456789987N";
obj1.Status = "1";
req.InvoicePaperDevice_ = obj1;
AlibabaEinvoicePaperDreviceSaveResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaEinvoicePaperDreviceSaveRequest;
$invoice_paper_device = new InvoicePaperDeviceDto;
$invoice_paper_device->terminal_no="123";
$invoice_paper_device->ca_password="QWERTY123";
$invoice_paper_device->password="123456";
$invoice_paper_device->provider="bw";
$invoice_paper_device->registration_code="qwerty123456789";
$invoice_paper_device->device_no="001";
$invoice_paper_device->disk_no="1234566";
$invoice_paper_device->payee_register_no="9123456789987N";
$invoice_paper_device->status="1";
$req->setInvoicePaperDevice(json_encode($invoice_paper_device));
$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=alibaba.einvoice.paper.drevice.save' \
-d 'partner_id=apidoc' \
-d 'sign=ECCEE4E6310C682EA73952442EE79B85' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-04-27+21%3A06%3A57' \
-d 'v=2.0' \
-d 'invoice_paper_device=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaEinvoicePaperDreviceSaveRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.invoice_paper_device=""
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,"alibaba.einvoice.paper.drevice.save");
add_param(pRequest,"invoice_paper_device","数据结构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('alibaba.einvoice.paper.drevice.save', {
'invoice_paper_device':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})