180 lines
3.1 KiB
PHP
180 lines
3.1 KiB
PHP
<?php
|
||
/**
|
||
* TOP API: taobao.bill.bills.get request
|
||
*
|
||
* @author auto create
|
||
* @since 1.0, 2022.05.24
|
||
*/
|
||
class BillBillsGetRequest
|
||
{
|
||
/**
|
||
* 科目编号
|
||
**/
|
||
private $accountId;
|
||
|
||
/**
|
||
* 结束时间,限制:结束时间-开始时间不能大于1天(根据order_id或者trade_id查询除外)
|
||
**/
|
||
private $endTime;
|
||
|
||
/**
|
||
* 传入需要返回的字段,参见Bill结构体
|
||
**/
|
||
private $fields;
|
||
|
||
/**
|
||
* 子订单编号
|
||
**/
|
||
private $orderId;
|
||
|
||
/**
|
||
* 页数,建议不要超过100页,越大性能越低,有可能会超时
|
||
**/
|
||
private $pageNo;
|
||
|
||
/**
|
||
* 每页大小,默认40条,可选范围 :40~100
|
||
**/
|
||
private $pageSize;
|
||
|
||
/**
|
||
* 开始时间
|
||
**/
|
||
private $startTime;
|
||
|
||
/**
|
||
* 查询条件中的时间类型:1-交易订单完成时间biz_time 2-支付宝扣款时间pay_time 如果不填默认为2即根据支付时间查询,查询的结果会根据该时间倒排序
|
||
**/
|
||
private $timeType;
|
||
|
||
/**
|
||
* 交易编号
|
||
**/
|
||
private $tradeId;
|
||
|
||
private $apiParas = array();
|
||
|
||
public function setAccountId($accountId)
|
||
{
|
||
$this->accountId = $accountId;
|
||
$this->apiParas["account_id"] = $accountId;
|
||
}
|
||
|
||
public function getAccountId()
|
||
{
|
||
return $this->accountId;
|
||
}
|
||
|
||
public function setEndTime($endTime)
|
||
{
|
||
$this->endTime = $endTime;
|
||
$this->apiParas["end_time"] = $endTime;
|
||
}
|
||
|
||
public function getEndTime()
|
||
{
|
||
return $this->endTime;
|
||
}
|
||
|
||
public function setFields($fields)
|
||
{
|
||
$this->fields = $fields;
|
||
$this->apiParas["fields"] = $fields;
|
||
}
|
||
|
||
public function getFields()
|
||
{
|
||
return $this->fields;
|
||
}
|
||
|
||
public function setOrderId($orderId)
|
||
{
|
||
$this->orderId = $orderId;
|
||
$this->apiParas["order_id"] = $orderId;
|
||
}
|
||
|
||
public function getOrderId()
|
||
{
|
||
return $this->orderId;
|
||
}
|
||
|
||
public function setPageNo($pageNo)
|
||
{
|
||
$this->pageNo = $pageNo;
|
||
$this->apiParas["page_no"] = $pageNo;
|
||
}
|
||
|
||
public function getPageNo()
|
||
{
|
||
return $this->pageNo;
|
||
}
|
||
|
||
public function setPageSize($pageSize)
|
||
{
|
||
$this->pageSize = $pageSize;
|
||
$this->apiParas["page_size"] = $pageSize;
|
||
}
|
||
|
||
public function getPageSize()
|
||
{
|
||
return $this->pageSize;
|
||
}
|
||
|
||
public function setStartTime($startTime)
|
||
{
|
||
$this->startTime = $startTime;
|
||
$this->apiParas["start_time"] = $startTime;
|
||
}
|
||
|
||
public function getStartTime()
|
||
{
|
||
return $this->startTime;
|
||
}
|
||
|
||
public function setTimeType($timeType)
|
||
{
|
||
$this->timeType = $timeType;
|
||
$this->apiParas["time_type"] = $timeType;
|
||
}
|
||
|
||
public function getTimeType()
|
||
{
|
||
return $this->timeType;
|
||
}
|
||
|
||
public function setTradeId($tradeId)
|
||
{
|
||
$this->tradeId = $tradeId;
|
||
$this->apiParas["trade_id"] = $tradeId;
|
||
}
|
||
|
||
public function getTradeId()
|
||
{
|
||
return $this->tradeId;
|
||
}
|
||
|
||
public function getApiMethodName()
|
||
{
|
||
return "taobao.bill.bills.get";
|
||
}
|
||
|
||
public function getApiParas()
|
||
{
|
||
return $this->apiParas;
|
||
}
|
||
|
||
public function check()
|
||
{
|
||
|
||
RequestCheckUtil::checkNotNull($this->endTime,"endTime");
|
||
RequestCheckUtil::checkNotNull($this->fields,"fields");
|
||
RequestCheckUtil::checkMaxListSize($this->fields,20,"fields");
|
||
RequestCheckUtil::checkNotNull($this->startTime,"startTime");
|
||
}
|
||
|
||
public function putOtherTextParam($key, $value) {
|
||
$this->apiParas[$key] = $value;
|
||
$this->$key = $value;
|
||
}
|
||
}
|