Files
YeePay/lib/Service/MWallet/Model/BillListDetailDto.php

538 lines
13 KiB
PHP

<?php
/**
* BillListDetailDto
*
* PHP version 5
*
* @category Class
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
/**
* 会员钱包
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0
*
* Generated by: https://github.com/swagger-api/swagger-codegen.git
* Swagger Codegen version: 3.0.13
*/
/**
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
namespace Yeepay\Yop\Sdk\Service\MWallet\Model;
use \ArrayAccess;
use Yeepay\Yop\Sdk\Model\ModelInterface;
use Yeepay\Yop\Sdk\Utils\ObjectSerializer;
/**
* BillListDetailDto Class Doc Comment
*
* @category Class
* @description 请修改我
* @package Yeepay\Yop\Sdk\
* @author Swagger Codegen team
* @link https://github.com/swagger-api/swagger-codegen
*/
class BillListDetailDto implements ModelInterface, ArrayAccess
{
const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $swaggerModelName = 'BillListDetailDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerTypes = [
'orderType' => 'string',
'amount' => 'string',
'createTime' => 'string',
'uniqueOrderNo' => 'string',
'productName' => 'string',
'status' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $swaggerFormats = [
'orderType' => 'enum',
'amount' => null,
'createTime' => null,
'uniqueOrderNo' => null,
'productName' => null,
'status' => 'enum'
];
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerTypes()
{
return self::$swaggerTypes;
}
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function swaggerFormats()
{
return self::$swaggerFormats;
}
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @var string[]
*/
protected static $attributeMap = [
'orderType' => 'orderType',
'amount' => 'amount',
'createTime' => 'createTime',
'uniqueOrderNo' => 'uniqueOrderNo',
'productName' => 'productName',
'status' => 'status'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'orderType' => 'setOrderType',
'amount' => 'setAmount',
'createTime' => 'setCreateTime',
'uniqueOrderNo' => 'setUniqueOrderNo',
'productName' => 'setProductName',
'status' => 'setStatus'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'orderType' => 'getOrderType',
'amount' => 'getAmount',
'createTime' => 'getCreateTime',
'uniqueOrderNo' => 'getUniqueOrderNo',
'productName' => 'getProductName',
'status' => 'getStatus'
];
/**
* Array of attributes where the key is the local name,
* and the value is the original name
*
* @return array
*/
public static function attributeMap()
{
return self::$attributeMap;
}
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters()
{
return self::$setters;
}
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters()
{
return self::$getters;
}
/**
* The original name of the model.
*
* @return string
*/
public function getModelName()
{
return self::$swaggerModelName;
}
const ORDER_TYPE_WITHDRAW = 'WITHDRAW';
const ORDER_TYPE_RECHARGE = 'RECHARGE';
const ORDER_TYPE_PAYMENT = 'PAYMENT';
const ORDER_TYPE_DIVIDE = 'DIVIDE';
const ORDER_TYPE_DIVIDE_REFUND = 'DIVIDE_REFUND';
const ORDER_TYPE_REFUND = 'REFUND';
const ORDER_TYPE_PAYMENT_MANAGE = 'PAYMENT_MANAGE';
const ORDER_TYPE_BONUS = 'BONUS';
const STATUS_PROCESSING = 'PROCESSING';
const STATUS_SUCCESS = 'SUCCESS';
const STATUS_FAIL = 'FAIL';
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getOrderTypeAllowableValues()
{
return [
self::ORDER_TYPE_WITHDRAW,
self::ORDER_TYPE_RECHARGE,
self::ORDER_TYPE_PAYMENT,
self::ORDER_TYPE_DIVIDE,
self::ORDER_TYPE_DIVIDE_REFUND,
self::ORDER_TYPE_REFUND,
self::ORDER_TYPE_PAYMENT_MANAGE,
self::ORDER_TYPE_BONUS,
];
}
/**
* Gets allowable values of the enum
*
* @return string[]
*/
public function getStatusAllowableValues()
{
return [
self::STATUS_PROCESSING,
self::STATUS_SUCCESS,
self::STATUS_FAIL,
];
}
/**
* Associative array for storing property values
*
* @var mixed[]
*/
protected $container = [];
/**
* Constructor
*
* @param mixed[] $data Associated array of property values
* initializing the model
*/
public function __construct(array $data = null)
{
$this->container['orderType'] = isset($data['orderType']) ? $data['orderType'] : null;
$this->container['amount'] = isset($data['amount']) ? $data['amount'] : null;
$this->container['createTime'] = isset($data['createTime']) ? $data['createTime'] : null;
$this->container['uniqueOrderNo'] = isset($data['uniqueOrderNo']) ? $data['uniqueOrderNo'] : null;
$this->container['productName'] = isset($data['productName']) ? $data['productName'] : null;
$this->container['status'] = isset($data['status']) ? $data['status'] : null;
}
/**
* Show all the invalid properties with reasons.
*
* @return array invalid properties with reasons
*/
public function listInvalidProperties()
{
$invalidProperties = [];
if ($this->container['orderType'] === null) {
$invalidProperties[] = "'orderType' can't be null";
}
$allowedValues = $this->getOrderTypeAllowableValues();
if (!is_null($this->container['orderType']) && !in_array($this->container['orderType'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value for 'orderType', must be one of '%s'",
implode("', '", $allowedValues)
);
}
if ($this->container['status'] === null) {
$invalidProperties[] = "'status' can't be null";
}
$allowedValues = $this->getStatusAllowableValues();
if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {
$invalidProperties[] = sprintf(
"invalid value for 'status', must be one of '%s'",
implode("', '", $allowedValues)
);
}
return $invalidProperties;
}
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool True if all properties are valid
*/
public function valid()
{
return count($this->listInvalidProperties()) === 0;
}
/**
* Gets orderType
*
* @return string
*/
public function getOrderType()
{
return $this->container['orderType'];
}
/**
* Sets orderType
*
* @param string $orderType <p>订单类型</p> 可选项如下: WITHDRAW:提现 RECHARGE:充值 PAYMENT:支付 DIVIDE:分账 DIVIDE_REFUND:分账退回 REFUND:退款 PAYMENT_MANAGE:管理费 BONUS:红包
*
* @return $this
*/
public function setOrderType($orderType)
{
$allowedValues = $this->getOrderTypeAllowableValues();
if (!in_array($orderType, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'orderType', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['orderType'] = $orderType;
return $this;
}
/**
* Gets amount
*
* @return string
*/
public function getAmount()
{
return $this->container['amount'];
}
/**
* Sets amount
*
* @param string $amount <p>订单金额</p>
*
* @return $this
*/
public function setAmount($amount)
{
$this->container['amount'] = $amount;
return $this;
}
/**
* Gets createTime
*
* @return string
*/
public function getCreateTime()
{
return $this->container['createTime'];
}
/**
* Sets createTime
*
* @param string $createTime <p>订单创建时间</p> <pre>yyyy-MM-dd HH:mm:ss</pre>
*
* @return $this
*/
public function setCreateTime($createTime)
{
$this->container['createTime'] = $createTime;
return $this;
}
/**
* Gets uniqueOrderNo
*
* @return string
*/
public function getUniqueOrderNo()
{
return $this->container['uniqueOrderNo'];
}
/**
* Sets uniqueOrderNo
*
* @param string $uniqueOrderNo uniqueOrderNo
*
* @return $this
*/
public function setUniqueOrderNo($uniqueOrderNo)
{
$this->container['uniqueOrderNo'] = $uniqueOrderNo;
return $this;
}
/**
* Gets productName
*
* @return string
*/
public function getProductName()
{
return $this->container['productName'];
}
/**
* Sets productName
*
* @param string $productName productName
*
* @return $this
*/
public function setProductName($productName)
{
$this->container['productName'] = $productName;
return $this;
}
/**
* Gets status
*
* @return string
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string $status <p>订单状态</p> 可选项如下: PROCESSING:处理中 SUCCESS:成功 FAIL:失败
*
* @return $this
*/
public function setStatus($status)
{
$allowedValues = $this->getStatusAllowableValues();
if (!in_array($status, $allowedValues, true)) {
throw new \InvalidArgumentException(
sprintf(
"Invalid value for 'status', must be one of '%s'",
implode("', '", $allowedValues)
)
);
}
$this->container['status'] = $status;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
* @param integer $offset Offset
*
* @return boolean
*/
public function offsetExists($offset)
{
return isset($this->container[$offset]);
}
/**
* Gets offset.
*
* @param integer $offset Offset
*
* @return mixed
*/
public function offsetGet($offset)
{
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
/**
* Sets value based on offset.
*
* @param integer $offset Offset
* @param mixed $value Value to be set
*
* @return void
*/
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
$this->container[] = $value;
} else {
$this->container[$offset] = $value;
}
}
/**
* Unsets offset.
*
* @param integer $offset Offset
*
* @return void
*/
public function offsetUnset($offset)
{
unset($this->container[$offset]);
}
/**
* Gets the string presentation of the object
*
* @return string
*/
public function __toString()
{
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(
ObjectSerializer::sanitizeForSerialization($this),
JSON_PRETTY_PRINT
);
}
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
}
}