'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

订单类型

可选项如下: 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

订单金额

* * @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

订单创建时间

yyyy-MM-dd HH:mm:ss
* * @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

订单状态

可选项如下: 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)); } }