TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaMosCurrentSettlementBillCreateRequest req = new AlibabaMosCurrentSettlementBillCreateRequest();
AlibabaMosCurrentSettlementBillCreateRequest.StatementDto obj1 = new AlibabaMosCurrentSettlementBillCreateRequest.StatementDto();
obj1.setTaxExcludeAmount(1L);
obj1.setGmtModified(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj1.setCounterNo("1");
obj1.setEndDate(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj1.setBizCode("1");
obj1.setOldNo("1");
obj1.setOuCode("1");
obj1.setSupplierCode("1");
obj1.setSource(1L);
obj1.setType(1L);
obj1.setBizTagJson("1");
obj1.setPayAmount(1L);
obj1.setPaymentId(1L);
obj1.setPdfPath("1");
obj1.setLimit(1L);
obj1.setStoreName("1");
obj1.setId(1L);
obj1.setSupplierName("1");
obj1.setDepartmentName("1");
obj1.setQuantity("1");
obj1.setFreeAmount(1L);
obj1.setStart(1L);
obj1.setTax(1L);
obj1.setTaxCode("1");
obj1.setGmtCreate(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj1.setInvoiceCode("1");
obj1.setVersion(1L);
obj1.setOuName("1");
obj1.setTaxRate("1");
obj1.setStoreNo("1");
obj1.setTaxIncludeAmount(1L);
obj1.setCheckAmount(1L);
obj1.setDepartmentNo("1");
obj1.setInvoiceId(1L);
obj1.setAttributes("1");
obj1.setSubContractCode("1");
obj1.setContractCode("1");
obj1.setCurrencyCode("1");
obj1.setStartDate(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj1.setStatus(1L);
obj1.setAccountingPeriod(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj1.setBillDate(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj1.setCounterName("1");
req.setStatementDto(obj1);
List<AlibabaMosCurrentSettlementBillCreateRequest.ChargeApiDto> list3 = new ArrayList<AlibabaMosCurrentSettlementBillCreateRequest.ChargeApiDto>();
AlibabaMosCurrentSettlementBillCreateRequest.ChargeApiDto obj4 = new AlibabaMosCurrentSettlementBillCreateRequest.ChargeApiDto();
list3.add(obj4);
obj4.setApproveStatus(1L);
obj4.setGmtModified(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj4.setChargeTypeId("1");
obj4.setChargeTypeName("1");
obj4.setCounterNo("1");
obj4.setContractType(1L);
obj4.setDepartmentCode("1");
obj4.setOuCode("1");
obj4.setSupplierCode("1");
obj4.setSource(1L);
obj4.setCounterName("11");
obj4.setSupplierInsideOutside(1L);
obj4.setStoreName("1");
obj4.setId(1L);
obj4.setBillNo("1");
obj4.setSupplierName("1");
obj4.setDepartmentName("1");
obj4.setChargeNum("1");
obj4.setAccountDate(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj4.setIncludingTaxAmount(1L);
obj4.setChargeDateStart(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj4.setIsDelete(1L);
obj4.setChargeDateEnd(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj4.setGmtCreate(StringUtils.parseDateTime("2021-08-21 21:27:19"));
obj4.setOuName("1");
obj4.setTaxRate("1");
obj4.setStoreNo("1");
obj4.setChargeId(1L);
obj4.setTaxRateNo("1");
obj4.setBusinessType(1L);
obj4.setSupplierType(1L);
obj4.setTaxAmount(1L);
obj4.setContractCode("1");
obj4.setSettleType(1L);
obj4.setExcludingTaxAmount(1L);
req.setChargeApiDto(list3);
AlibabaMosCurrentSettlementBillCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaMosCurrentSettlementBillCreateRequest req = new AlibabaMosCurrentSettlementBillCreateRequest();
AlibabaMosCurrentSettlementBillCreateRequest.StatementDtoDomain obj1 = new AlibabaMosCurrentSettlementBillCreateRequest.StatementDtoDomain();
obj1.TaxExcludeAmount = 1L;
obj1.GmtModified = DateTime.Parse(2021-08-21 21:27:19");
obj1.CounterNo = "1";
obj1.EndDate = DateTime.Parse(2021-08-21 21:27:19");
obj1.BizCode = "1";
obj1.OldNo = "1";
obj1.OuCode = "1";
obj1.SupplierCode = "1";
obj1.Source = 1L;
obj1.Type = 1L;
obj1.BizTagJson = "1";
obj1.PayAmount = 1L;
obj1.PaymentId = 1L;
obj1.PdfPath = "1";
obj1.Limit = 1L;
obj1.StoreName = "1";
obj1.Id = 1L;
obj1.SupplierName = "1";
obj1.DepartmentName = "1";
obj1.Quantity = "1";
obj1.FreeAmount = 1L;
obj1.Start = 1L;
obj1.Tax = 1L;
obj1.TaxCode = "1";
obj1.GmtCreate = DateTime.Parse(2021-08-21 21:27:19");
obj1.InvoiceCode = "1";
obj1.Version = 1L;
obj1.OuName = "1";
obj1.TaxRate = "1";
obj1.StoreNo = "1";
obj1.TaxIncludeAmount = 1L;
obj1.CheckAmount = 1L;
obj1.DepartmentNo = "1";
obj1.InvoiceId = 1L;
obj1.Attributes = "1";
obj1.SubContractCode = "1";
obj1.ContractCode = "1";
obj1.CurrencyCode = "1";
obj1.StartDate = DateTime.Parse(2021-08-21 21:27:19");
obj1.Status = 1L;
obj1.AccountingPeriod = DateTime.Parse(2021-08-21 21:27:19");
obj1.BillDate = DateTime.Parse(2021-08-21 21:27:19");
obj1.CounterName = "1";
req.StatementDto_ = obj1;
List<AlibabaMosCurrentSettlementBillCreateRequest.ChargeApiDtoDomain> list3 = new List<AlibabaMosCurrentSettlementBillCreateRequest.ChargeApiDtoDomain>();
AlibabaMosCurrentSettlementBillCreateRequest.ChargeApiDtoDomain obj4 = new AlibabaMosCurrentSettlementBillCreateRequest.ChargeApiDtoDomain();
list3.Add(obj4);
obj4.ApproveStatus = 1L;
obj4.GmtModified = DateTime.Parse(2021-08-21 21:27:19");
obj4.ChargeTypeId = "1";
obj4.ChargeTypeName = "1";
obj4.CounterNo = "1";
obj4.ContractType = 1L;
obj4.DepartmentCode = "1";
obj4.OuCode = "1";
obj4.SupplierCode = "1";
obj4.Source = 1L;
obj4.CounterName = "11";
obj4.SupplierInsideOutside = 1L;
obj4.StoreName = "1";
obj4.Id = 1L;
obj4.BillNo = "1";
obj4.SupplierName = "1";
obj4.DepartmentName = "1";
obj4.ChargeNum = "1";
obj4.AccountDate = DateTime.Parse(2021-08-21 21:27:19");
obj4.IncludingTaxAmount = 1L;
obj4.ChargeDateStart = DateTime.Parse(2021-08-21 21:27:19");
obj4.IsDelete = 1L;
obj4.ChargeDateEnd = DateTime.Parse(2021-08-21 21:27:19");
obj4.GmtCreate = DateTime.Parse(2021-08-21 21:27:19");
obj4.OuName = "1";
obj4.TaxRate = "1";
obj4.StoreNo = "1";
obj4.ChargeId = 1L;
obj4.TaxRateNo = "1";
obj4.BusinessType = 1L;
obj4.SupplierType = 1L;
obj4.TaxAmount = 1L;
obj4.ContractCode = "1";
obj4.SettleType = 1L;
obj4.ExcludingTaxAmount = 1L;
req.ChargeApiDto_ = list3;
AlibabaMosCurrentSettlementBillCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaMosCurrentSettlementBillCreateRequest;
$statement_dto = new StatementDto;
$statement_dto->tax_exclude_amount="1";
$statement_dto->gmt_modified="2021-08-21 21:27:19";
$statement_dto->counter_no="1";
$statement_dto->end_date="2021-08-21 21:27:19";
$statement_dto->biz_code="1";
$statement_dto->old_no="1";
$statement_dto->ou_code="1";
$statement_dto->supplier_code="1";
$statement_dto->source="1";
$statement_dto->type="1";
$statement_dto->biz_tag_json="1";
$statement_dto->pay_amount="1";
$statement_dto->payment_id="1";
$statement_dto->pdf_path="1";
$statement_dto->limit="1";
$statement_dto->store_name="1";
$statement_dto->id="1";
$statement_dto->supplier_name="1";
$statement_dto->department_name="1";
$statement_dto->quantity="1";
$statement_dto->free_amount="1";
$statement_dto->start="1";
$statement_dto->tax="1";
$statement_dto->tax_code="1";
$statement_dto->gmt_create="2021-08-21 21:27:19";
$statement_dto->invoice_code="1";
$statement_dto->version="1";
$statement_dto->ou_name="1";
$statement_dto->tax_rate="1";
$statement_dto->store_no="1";
$statement_dto->tax_include_amount="1";
$statement_dto->check_amount="1";
$statement_dto->department_no="1";
$statement_dto->invoice_id="1";
$statement_dto->attributes="1";
$statement_dto->sub_contract_code="1";
$statement_dto->contract_code="1";
$statement_dto->currency_code="1";
$statement_dto->start_date="2021-08-21 21:27:19";
$statement_dto->status="1";
$statement_dto->accounting_period="2021-08-21 21:27:19";
$statement_dto->bill_date="2021-08-21 21:27:19";
$statement_dto->counter_name="1";
$req->setStatementDto(json_encode($statement_dto));
$charge_api_dto = new ChargeApiDto;
$charge_api_dto->approve_status="1";
$charge_api_dto->gmt_modified="2021-08-21 21:27:19";
$charge_api_dto->charge_type_id="1";
$charge_api_dto->charge_type_name="1";
$charge_api_dto->counter_no="1";
$charge_api_dto->contract_type="1";
$charge_api_dto->department_code="1";
$charge_api_dto->ou_code="1";
$charge_api_dto->supplier_code="1";
$charge_api_dto->source="1";
$charge_api_dto->counter_name="11";
$charge_api_dto->supplier_inside_outside="1";
$charge_api_dto->store_name="1";
$charge_api_dto->id="1";
$charge_api_dto->bill_no="1";
$charge_api_dto->supplier_name="1";
$charge_api_dto->department_name="1";
$charge_api_dto->charge_num="1";
$charge_api_dto->account_date="2021-08-21 21:27:19";
$charge_api_dto->including_tax_amount="1";
$charge_api_dto->charge_date_start="2021-08-21 21:27:19";
$charge_api_dto->is_delete="1";
$charge_api_dto->charge_date_end="2021-08-21 21:27:19";
$charge_api_dto->gmt_create="2021-08-21 21:27:19";
$charge_api_dto->ou_name="1";
$charge_api_dto->tax_rate="1";
$charge_api_dto->store_no="1";
$charge_api_dto->charge_id="1";
$charge_api_dto->tax_rate_no="1";
$charge_api_dto->business_type="1";
$charge_api_dto->supplier_type="1";
$charge_api_dto->tax_amount="1";
$charge_api_dto->contract_code="1";
$charge_api_dto->settle_type="1";
$charge_api_dto->excluding_tax_amount="1";
$req->setChargeApiDto(json_encode($charge_api_dto));
$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.mos.current.settlement.bill.create' \
-d 'partner_id=apidoc' \
-d 'sign=D493273FD756A298DD39B3F5D16ED097' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-10-25+10%3A47%3A56' \
-d 'v=2.0' \
-d 'charge_api_dto=null' \
-d 'statement_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaMosCurrentSettlementBillCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.statement_dto=""
req.charge_api_dto=""
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.mos.current.settlement.bill.create");
add_param(pRequest,"statement_dto","数据结构JSON示例");
add_param(pRequest,"charge_api_dto","数据结构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.mos.current.settlement.bill.create', {
'statement_dto':'数据结构JSON示例',
'charge_api_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})