TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaMosCurrentChargeBillCreateRequest req = new AlibabaMosCurrentChargeBillCreateRequest();
AlibabaMosCurrentChargeBillCreateRequest.ChargeApiDto obj1 = new AlibabaMosCurrentChargeBillCreateRequest.ChargeApiDto();
obj1.setApproveStatus(1L);
obj1.setGmtModified(StringUtils.parseDateTime("2021-01-01 12:00:00"));
obj1.setChargeTypeId("1");
obj1.setChargeTypeName("1");
obj1.setCounterNo("1");
obj1.setContractType(1L);
obj1.setDepartmentCode("1");
obj1.setOuCode("1");
obj1.setSupplierCode("1");
obj1.setSource(1L);
obj1.setCounterName("1");
obj1.setSupplierInsideOutside(1L);
obj1.setStoreName("1");
obj1.setId(1L);
obj1.setBillNo("1");
obj1.setSupplierName("1");
obj1.setDepartmentName("1");
obj1.setChargeNum("1");
obj1.setAccountDate(StringUtils.parseDateTime("2021-01-01 12:00:00"));
obj1.setIncludingTaxAmount(1L);
obj1.setChargeDateStart(StringUtils.parseDateTime("2021-01-01 12:00:00"));
obj1.setIsDelete(1L);
obj1.setChargeDateEnd(StringUtils.parseDateTime("2021-01-01 12:00:00"));
obj1.setGmtCreate(StringUtils.parseDateTime("2021-01-01 12:00:00"));
obj1.setOuName("1");
obj1.setTaxRate("1");
obj1.setStoreNo("1");
obj1.setChargeId(1L);
obj1.setTaxRateNo("1");
obj1.setBusinessType(1L);
obj1.setSupplierType(1L);
obj1.setTaxAmount(1L);
obj1.setContractCode("1");
obj1.setSettleType(1L);
obj1.setExcludingTaxAmount(1L);
req.setChargeApiDto(obj1);
AlibabaMosCurrentChargeBillCreateResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaMosCurrentChargeBillCreateRequest req = new AlibabaMosCurrentChargeBillCreateRequest();
AlibabaMosCurrentChargeBillCreateRequest.ChargeApiDtoDomain obj1 = new AlibabaMosCurrentChargeBillCreateRequest.ChargeApiDtoDomain();
obj1.ApproveStatus = 1L;
obj1.GmtModified = DateTime.Parse(2021-01-01 12:00:00");
obj1.ChargeTypeId = "1";
obj1.ChargeTypeName = "1";
obj1.CounterNo = "1";
obj1.ContractType = 1L;
obj1.DepartmentCode = "1";
obj1.OuCode = "1";
obj1.SupplierCode = "1";
obj1.Source = 1L;
obj1.CounterName = "1";
obj1.SupplierInsideOutside = 1L;
obj1.StoreName = "1";
obj1.Id = 1L;
obj1.BillNo = "1";
obj1.SupplierName = "1";
obj1.DepartmentName = "1";
obj1.ChargeNum = "1";
obj1.AccountDate = DateTime.Parse(2021-01-01 12:00:00");
obj1.IncludingTaxAmount = 1L;
obj1.ChargeDateStart = DateTime.Parse(2021-01-01 12:00:00");
obj1.IsDelete = 1L;
obj1.ChargeDateEnd = DateTime.Parse(2021-01-01 12:00:00");
obj1.GmtCreate = DateTime.Parse(2021-01-01 12:00:00");
obj1.OuName = "1";
obj1.TaxRate = "1";
obj1.StoreNo = "1";
obj1.ChargeId = 1L;
obj1.TaxRateNo = "1";
obj1.BusinessType = 1L;
obj1.SupplierType = 1L;
obj1.TaxAmount = 1L;
obj1.ContractCode = "1";
obj1.SettleType = 1L;
obj1.ExcludingTaxAmount = 1L;
req.ChargeApiDto_ = obj1;
AlibabaMosCurrentChargeBillCreateResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaMosCurrentChargeBillCreateRequest;
$charge_api_dto = new ChargeApiDto;
$charge_api_dto->approve_status="1";
$charge_api_dto->gmt_modified="2021-01-01 12:00:00";
$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="1";
$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-01-01 12:00:00";
$charge_api_dto->including_tax_amount="1";
$charge_api_dto->charge_date_start="2021-01-01 12:00:00";
$charge_api_dto->is_delete="1";
$charge_api_dto->charge_date_end="2021-01-01 12:00:00";
$charge_api_dto->gmt_create="2021-01-01 12:00:00";
$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.charge.bill.create' \
-d 'partner_id=apidoc' \
-d 'sign=1DB4E6E57AA83A71E422D1A7A22BA029' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-10-25+10%3A47%3A55' \
-d 'v=2.0' \
-d 'charge_api_dto=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaMosCurrentChargeBillCreateRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
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.charge.bill.create");
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.charge.bill.create', {
'charge_api_dto':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})