TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaMosCurrentReceivableBillCreateRequest req = new AlibabaMosCurrentReceivableBillCreateRequest();
AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDto obj1 = new AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDto();
obj1.setTaxExcludeAmount(1L);
obj1.setGmtModified(StringUtils.parseDateTime("2021-08-04 11:12:13"));
obj1.setCounterNo("1");
obj1.setOldNo("1");
obj1.setDepartmentCode("1");
obj1.setCreatorId("1");
obj1.setCreatorName("系统");
obj1.setDiscountAmount(1L);
obj1.setOuCode("I57");
obj1.setSupplierCode("1");
obj1.setConsumeDate(StringUtils.parseDateTime("2021-08-04 11:12:13"));
obj1.setSource("1");
obj1.setChangeAmount(1L);
obj1.setBatchId(1L);
obj1.setType(5L);
obj1.setCounterName("专柜名称");
obj1.setIsFirst(1L);
obj1.setAreaName("柜区名称");
obj1.setLimit(-1L);
obj1.setStoreName("HZ01");
obj1.setId(1L);
obj1.setSupplierName("1");
obj1.setDepartmentName("1");
obj1.setBrandName("1");
obj1.setStart(-1L);
obj1.setAdjustAmount(1L);
obj1.setReceivedAmount(1L);
obj1.setGmtCreate(StringUtils.parseDateTime("2021-08-04 11:12:13"));
obj1.setVersion(1L);
obj1.setOuName("1");
obj1.setTags("1");
obj1.setReceiveAmount(1L);
obj1.setStoreNo("1");
obj1.setAreaCode("1");
obj1.setBrandId(1L);
obj1.setContractId(1L);
obj1.setAfterAdjustAmount(1L);
obj1.setSyncShop(1L);
obj1.setAttributes("{}");
obj1.setStatementStatus(1L);
obj1.setTaxAmount(1L);
obj1.setContractCode("1");
obj1.setBookingMonth("2021-09-01");
obj1.setCurrencyCode("CNY");
obj1.setStatus(1L);
req.setReceivableBillDto(obj1);
List<AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDetailDto> list3 = new ArrayList<AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDetailDto>();
AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDetailDto obj4 = new AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDetailDto();
list3.add(obj4);
obj4.setTaxExcludeAmount(1L);
obj4.setChargeTypeId("1");
obj4.setGmtModified(StringUtils.parseDateTime("2021-08-04 11:12:13"));
obj4.setChargeTypeName("1");
obj4.setEndDate(StringUtils.parseDateTime("2021-08-04 11:12:13"));
obj4.setOldNo("1");
obj4.setDiscountAmount(1L);
obj4.setSource(1L);
obj4.setChangeAmount(1L);
obj4.setLimit(1L);
obj4.setId(1L);
obj4.setReceiveType(1L);
obj4.setStart(1L);
obj4.setAdjustAmount(1L);
obj4.setReceivedAmount(1L);
obj4.setTaxCode("1");
obj4.setGmtCreate(StringUtils.parseDateTime("2021-08-04 11:12:13"));
obj4.setVersion(0L);
obj4.setTags("0");
obj4.setReceiveAmount(0L);
obj4.setTaxRate("0");
obj4.setBillId(0L);
obj4.setAfterAdjustAmount(0L);
obj4.setAttributes("0");
obj4.setCostNumber("0");
obj4.setTaxAmount(0L);
obj4.setCurrencyCode("0");
obj4.setStartDate(StringUtils.parseDateTime("2021-08-04 11:12:13"));
obj4.setStatus(1L);
req.setReceivableBillDetailDto(list3);
AlibabaMosCurrentReceivableBillCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaMosCurrentReceivableBillCreateRequest req = new AlibabaMosCurrentReceivableBillCreateRequest();
AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDtoDomain obj1 = new AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDtoDomain();
obj1.TaxExcludeAmount = 1L;
obj1.GmtModified = DateTime.Parse(2021-08-04 11:12:13");
obj1.CounterNo = "1";
obj1.OldNo = "1";
obj1.DepartmentCode = "1";
obj1.CreatorId = "1";
obj1.CreatorName = "系统";
obj1.DiscountAmount = 1L;
obj1.OuCode = "I57";
obj1.SupplierCode = "1";
obj1.ConsumeDate = DateTime.Parse(2021-08-04 11:12:13");
obj1.Source = "1";
obj1.ChangeAmount = 1L;
obj1.BatchId = 1L;
obj1.Type = 5L;
obj1.CounterName = "专柜名称";
obj1.IsFirst = 1L;
obj1.AreaName = "柜区名称";
obj1.Limit = -1L;
obj1.StoreName = "HZ01";
obj1.Id = 1L;
obj1.SupplierName = "1";
obj1.DepartmentName = "1";
obj1.BrandName = "1";
obj1.Start = -1L;
obj1.AdjustAmount = 1L;
obj1.ReceivedAmount = 1L;
obj1.GmtCreate = DateTime.Parse(2021-08-04 11:12:13");
obj1.Version = 1L;
obj1.OuName = "1";
obj1.Tags = "1";
obj1.ReceiveAmount = 1L;
obj1.StoreNo = "1";
obj1.AreaCode = "1";
obj1.BrandId = 1L;
obj1.ContractId = 1L;
obj1.AfterAdjustAmount = 1L;
obj1.SyncShop = 1L;
obj1.Attributes = "{}";
obj1.StatementStatus = 1L;
obj1.TaxAmount = 1L;
obj1.ContractCode = "1";
obj1.BookingMonth = "2021-09-01";
obj1.CurrencyCode = "CNY";
obj1.Status = 1L;
req.ReceivableBillDto_ = obj1;
List<AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDetailDtoDomain> list3 = new List<AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDetailDtoDomain>();
AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDetailDtoDomain obj4 = new AlibabaMosCurrentReceivableBillCreateRequest.ReceivableBillDetailDtoDomain();
list3.Add(obj4);
obj4.TaxExcludeAmount = 1L;
obj4.ChargeTypeId = "1";
obj4.GmtModified = DateTime.Parse(2021-08-04 11:12:13");
obj4.ChargeTypeName = "1";
obj4.EndDate = DateTime.Parse(2021-08-04 11:12:13");
obj4.OldNo = "1";
obj4.DiscountAmount = 1L;
obj4.Source = 1L;
obj4.ChangeAmount = 1L;
obj4.Limit = 1L;
obj4.Id = 1L;
obj4.ReceiveType = 1L;
obj4.Start = 1L;
obj4.AdjustAmount = 1L;
obj4.ReceivedAmount = 1L;
obj4.TaxCode = "1";
obj4.GmtCreate = DateTime.Parse(2021-08-04 11:12:13");
obj4.Version = 0L;
obj4.Tags = "0";
obj4.ReceiveAmount = 0L;
obj4.TaxRate = "0";
obj4.BillId = 0L;
obj4.AfterAdjustAmount = 0L;
obj4.Attributes = "0";
obj4.CostNumber = "0";
obj4.TaxAmount = 0L;
obj4.CurrencyCode = "0";
obj4.StartDate = DateTime.Parse(2021-08-04 11:12:13");
obj4.Status = 1L;
req.ReceivableBillDetailDto_ = list3;
AlibabaMosCurrentReceivableBillCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaMosCurrentReceivableBillCreateRequest;
$receivable_bill_dto = new ReceivableBillDto;
$receivable_bill_dto->tax_exclude_amount="1";
$receivable_bill_dto->gmt_modified="2021-08-04 11:12:13";
$receivable_bill_dto->counter_no="1";
$receivable_bill_dto->old_no="1";
$receivable_bill_dto->department_code="1";
$receivable_bill_dto->creator_id="1";
$receivable_bill_dto->creator_name="系统";
$receivable_bill_dto->discount_amount="1";
$receivable_bill_dto->ou_code="I57";
$receivable_bill_dto->supplier_code="1";
$receivable_bill_dto->consume_date="2021-08-04 11:12:13";
$receivable_bill_dto->source="1";
$receivable_bill_dto->change_amount="1";
$receivable_bill_dto->batch_id="1";
$receivable_bill_dto->type="5";
$receivable_bill_dto->counter_name="专柜名称";
$receivable_bill_dto->is_first="1";
$receivable_bill_dto->area_name="柜区名称";
$receivable_bill_dto->limit="-1";
$receivable_bill_dto->store_name="HZ01";
$receivable_bill_dto->id="1";
$receivable_bill_dto->supplier_name="1";
$receivable_bill_dto->department_name="1";
$receivable_bill_dto->brand_name="1";
$receivable_bill_dto->start="-1";
$receivable_bill_dto->adjust_amount="1";
$receivable_bill_dto->received_amount="1";
$receivable_bill_dto->gmt_create="2021-08-04 11:12:13";
$receivable_bill_dto->version="1";
$receivable_bill_dto->ou_name="1";
$receivable_bill_dto->tags="1";
$receivable_bill_dto->receive_amount="1";
$receivable_bill_dto->store_no="1";
$receivable_bill_dto->area_code="1";
$receivable_bill_dto->brand_id="1";
$receivable_bill_dto->contract_id="1";
$receivable_bill_dto->after_adjust_amount="1";
$receivable_bill_dto->sync_shop="1";
$receivable_bill_dto->attributes="{}";
$receivable_bill_dto->statement_status="1";
$receivable_bill_dto->tax_amount="1";
$receivable_bill_dto->contract_code="1";
$receivable_bill_dto->booking_month="2021-09-01";
$receivable_bill_dto->currency_code="CNY";
$receivable_bill_dto->status="1";
$req->setReceivableBillDto(json_encode($receivable_bill_dto));
$receivable_bill_detail_dto = new ReceivableBillDetailDto;
$receivable_bill_detail_dto->tax_exclude_amount="1";
$receivable_bill_detail_dto->charge_type_id="1";
$receivable_bill_detail_dto->gmt_modified="2021-08-04 11:12:13";
$receivable_bill_detail_dto->charge_type_name="1";
$receivable_bill_detail_dto->end_date="2021-08-04 11:12:13";
$receivable_bill_detail_dto->old_no="1";
$receivable_bill_detail_dto->discount_amount="1";
$receivable_bill_detail_dto->source="1";
$receivable_bill_detail_dto->change_amount="1";
$receivable_bill_detail_dto->limit="1";
$receivable_bill_detail_dto->id="1";
$receivable_bill_detail_dto->receive_type="1";
$receivable_bill_detail_dto->start="1";
$receivable_bill_detail_dto->adjust_amount="1";
$receivable_bill_detail_dto->received_amount="1";
$receivable_bill_detail_dto->tax_code="1";
$receivable_bill_detail_dto->gmt_create="2021-08-04 11:12:13";
$receivable_bill_detail_dto->version="0";
$receivable_bill_detail_dto->tags="0";
$receivable_bill_detail_dto->receive_amount="0";
$receivable_bill_detail_dto->tax_rate="0";
$receivable_bill_detail_dto->bill_id="0";
$receivable_bill_detail_dto->after_adjust_amount="0";
$receivable_bill_detail_dto->attributes="0";
$receivable_bill_detail_dto->cost_number="0";
$receivable_bill_detail_dto->tax_amount="0";
$receivable_bill_detail_dto->currency_code="0";
$receivable_bill_detail_dto->start_date="2021-08-04 11:12:13";
$receivable_bill_detail_dto->status="1";
$req->setReceivableBillDetailDto(json_encode($receivable_bill_detail_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.receivable.bill.create' \
-d 'partner_id=apidoc' \
-d 'sign=2D3D74ABA2F807835129B97DF9EB3731' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-10-25+10%3A47%3A56' \
-d 'v=2.0' \
-d 'receivable_bill_detail_dto=null' \
-d 'receivable_bill_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaMosCurrentReceivableBillCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.receivable_bill_dto=""
req.receivable_bill_detail_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.receivable.bill.create");
add_param(pRequest,"receivable_bill_dto","数据结构JSON示例");
add_param(pRequest,"receivable_bill_detail_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.receivable.bill.create', {
'receivable_bill_dto':'数据结构JSON示例',
'receivable_bill_detail_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})