604 lines
13 KiB
PHP
604 lines
13 KiB
PHP
<?php
|
|
/**
|
|
* CouponInfoDTO
|
|
*
|
|
* 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;
|
|
|
|
/**
|
|
* CouponInfoDTO Class Doc Comment
|
|
*
|
|
* @category Class
|
|
* @description 请修改我
|
|
* @package Yeepay\Yop\Sdk\
|
|
* @author Swagger Codegen team
|
|
* @link https://github.com/swagger-api/swagger-codegen
|
|
*/
|
|
class CouponInfoDTO implements ModelInterface, ArrayAccess
|
|
{
|
|
const DISCRIMINATOR = null;
|
|
|
|
/**
|
|
* The original name of the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected static $swaggerModelName = 'CouponInfoDTO';
|
|
|
|
/**
|
|
* Array of property to type mappings. Used for (de)serialization
|
|
*
|
|
* @var string[]
|
|
*/
|
|
protected static $swaggerTypes = [
|
|
'couponName' => 'string',
|
|
'useScope' => 'string',
|
|
'expireTime' => 'string',
|
|
'couponType' => 'string',
|
|
'maxDiscountAmount' => 'float',
|
|
'discountAmount' => 'float',
|
|
'couponNo' => 'string',
|
|
'effectTime' => 'string',
|
|
'couponRemark' => 'string',
|
|
'minUseAmount' => 'float',
|
|
'discountRatio' => 'float'
|
|
];
|
|
|
|
/**
|
|
* Array of property to format mappings. Used for (de)serialization
|
|
*
|
|
* @var string[]
|
|
*/
|
|
protected static $swaggerFormats = [
|
|
'couponName' => null,
|
|
'useScope' => null,
|
|
'expireTime' => null,
|
|
'couponType' => null,
|
|
'maxDiscountAmount' => null,
|
|
'discountAmount' => null,
|
|
'couponNo' => null,
|
|
'effectTime' => null,
|
|
'couponRemark' => null,
|
|
'minUseAmount' => null,
|
|
'discountRatio' => null
|
|
];
|
|
|
|
/**
|
|
* 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 = [
|
|
'couponName' => 'couponName',
|
|
'useScope' => 'useScope',
|
|
'expireTime' => 'expireTime',
|
|
'couponType' => 'couponType',
|
|
'maxDiscountAmount' => 'maxDiscountAmount',
|
|
'discountAmount' => 'discountAmount',
|
|
'couponNo' => 'couponNo',
|
|
'effectTime' => 'effectTime',
|
|
'couponRemark' => 'couponRemark',
|
|
'minUseAmount' => 'minUseAmount',
|
|
'discountRatio' => 'discountRatio'
|
|
];
|
|
|
|
/**
|
|
* Array of attributes to setter functions (for deserialization of responses)
|
|
*
|
|
* @var string[]
|
|
*/
|
|
protected static $setters = [
|
|
'couponName' => 'setCouponName',
|
|
'useScope' => 'setUseScope',
|
|
'expireTime' => 'setExpireTime',
|
|
'couponType' => 'setCouponType',
|
|
'maxDiscountAmount' => 'setMaxDiscountAmount',
|
|
'discountAmount' => 'setDiscountAmount',
|
|
'couponNo' => 'setCouponNo',
|
|
'effectTime' => 'setEffectTime',
|
|
'couponRemark' => 'setCouponRemark',
|
|
'minUseAmount' => 'setMinUseAmount',
|
|
'discountRatio' => 'setDiscountRatio'
|
|
];
|
|
|
|
/**
|
|
* Array of attributes to getter functions (for serialization of requests)
|
|
*
|
|
* @var string[]
|
|
*/
|
|
protected static $getters = [
|
|
'couponName' => 'getCouponName',
|
|
'useScope' => 'getUseScope',
|
|
'expireTime' => 'getExpireTime',
|
|
'couponType' => 'getCouponType',
|
|
'maxDiscountAmount' => 'getMaxDiscountAmount',
|
|
'discountAmount' => 'getDiscountAmount',
|
|
'couponNo' => 'getCouponNo',
|
|
'effectTime' => 'getEffectTime',
|
|
'couponRemark' => 'getCouponRemark',
|
|
'minUseAmount' => 'getMinUseAmount',
|
|
'discountRatio' => 'getDiscountRatio'
|
|
];
|
|
|
|
/**
|
|
* 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;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* 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['couponName'] = isset($data['couponName']) ? $data['couponName'] : null;
|
|
$this->container['useScope'] = isset($data['useScope']) ? $data['useScope'] : null;
|
|
$this->container['expireTime'] = isset($data['expireTime']) ? $data['expireTime'] : null;
|
|
$this->container['couponType'] = isset($data['couponType']) ? $data['couponType'] : null;
|
|
$this->container['maxDiscountAmount'] = isset($data['maxDiscountAmount']) ? $data['maxDiscountAmount'] : null;
|
|
$this->container['discountAmount'] = isset($data['discountAmount']) ? $data['discountAmount'] : null;
|
|
$this->container['couponNo'] = isset($data['couponNo']) ? $data['couponNo'] : null;
|
|
$this->container['effectTime'] = isset($data['effectTime']) ? $data['effectTime'] : null;
|
|
$this->container['couponRemark'] = isset($data['couponRemark']) ? $data['couponRemark'] : null;
|
|
$this->container['minUseAmount'] = isset($data['minUseAmount']) ? $data['minUseAmount'] : null;
|
|
$this->container['discountRatio'] = isset($data['discountRatio']) ? $data['discountRatio'] : null;
|
|
}
|
|
|
|
/**
|
|
* Show all the invalid properties with reasons.
|
|
*
|
|
* @return array invalid properties with reasons
|
|
*/
|
|
public function listInvalidProperties()
|
|
{
|
|
$invalidProperties = [];
|
|
|
|
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 couponName
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getCouponName()
|
|
{
|
|
return $this->container['couponName'];
|
|
}
|
|
|
|
/**
|
|
* Sets couponName
|
|
*
|
|
* @param string $couponName couponName
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setCouponName($couponName)
|
|
{
|
|
$this->container['couponName'] = $couponName;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets useScope
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getUseScope()
|
|
{
|
|
return $this->container['useScope'];
|
|
}
|
|
|
|
/**
|
|
* Sets useScope
|
|
*
|
|
* @param string $useScope useScope
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setUseScope($useScope)
|
|
{
|
|
$this->container['useScope'] = $useScope;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets expireTime
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getExpireTime()
|
|
{
|
|
return $this->container['expireTime'];
|
|
}
|
|
|
|
/**
|
|
* Sets expireTime
|
|
*
|
|
* @param string $expireTime expireTime
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setExpireTime($expireTime)
|
|
{
|
|
$this->container['expireTime'] = $expireTime;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets couponType
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getCouponType()
|
|
{
|
|
return $this->container['couponType'];
|
|
}
|
|
|
|
/**
|
|
* Sets couponType
|
|
*
|
|
* @param string $couponType couponType
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setCouponType($couponType)
|
|
{
|
|
$this->container['couponType'] = $couponType;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets maxDiscountAmount
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getMaxDiscountAmount()
|
|
{
|
|
return $this->container['maxDiscountAmount'];
|
|
}
|
|
|
|
/**
|
|
* Sets maxDiscountAmount
|
|
*
|
|
* @param float $maxDiscountAmount maxDiscountAmount
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setMaxDiscountAmount($maxDiscountAmount)
|
|
{
|
|
$this->container['maxDiscountAmount'] = $maxDiscountAmount;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets discountAmount
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getDiscountAmount()
|
|
{
|
|
return $this->container['discountAmount'];
|
|
}
|
|
|
|
/**
|
|
* Sets discountAmount
|
|
*
|
|
* @param float $discountAmount discountAmount
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setDiscountAmount($discountAmount)
|
|
{
|
|
$this->container['discountAmount'] = $discountAmount;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets couponNo
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getCouponNo()
|
|
{
|
|
return $this->container['couponNo'];
|
|
}
|
|
|
|
/**
|
|
* Sets couponNo
|
|
*
|
|
* @param string $couponNo couponNo
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setCouponNo($couponNo)
|
|
{
|
|
$this->container['couponNo'] = $couponNo;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets effectTime
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getEffectTime()
|
|
{
|
|
return $this->container['effectTime'];
|
|
}
|
|
|
|
/**
|
|
* Sets effectTime
|
|
*
|
|
* @param string $effectTime effectTime
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setEffectTime($effectTime)
|
|
{
|
|
$this->container['effectTime'] = $effectTime;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets couponRemark
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getCouponRemark()
|
|
{
|
|
return $this->container['couponRemark'];
|
|
}
|
|
|
|
/**
|
|
* Sets couponRemark
|
|
*
|
|
* @param string $couponRemark couponRemark
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setCouponRemark($couponRemark)
|
|
{
|
|
$this->container['couponRemark'] = $couponRemark;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets minUseAmount
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getMinUseAmount()
|
|
{
|
|
return $this->container['minUseAmount'];
|
|
}
|
|
|
|
/**
|
|
* Sets minUseAmount
|
|
*
|
|
* @param float $minUseAmount minUseAmount
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setMinUseAmount($minUseAmount)
|
|
{
|
|
$this->container['minUseAmount'] = $minUseAmount;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Gets discountRatio
|
|
*
|
|
* @return float
|
|
*/
|
|
public function getDiscountRatio()
|
|
{
|
|
return $this->container['discountRatio'];
|
|
}
|
|
|
|
/**
|
|
* Sets discountRatio
|
|
*
|
|
* @param float $discountRatio discountRatio
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setDiscountRatio($discountRatio)
|
|
{
|
|
$this->container['discountRatio'] = $discountRatio;
|
|
|
|
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));
|
|
}
|
|
}
|
|
|
|
|