'string', 'couponName' => 'string', 'couponType' => 'string', 'minUseAmount' => 'string', 'preferentialAmount' => 'string', 'discountRatio' => 'string', 'maxPreferentialAmount' => 'string', 'productRule' => '\Yeepay\Yop\Sdk\Service\Promtion\Model\CouponListQueryCouponProductRuleResult', 'applyTime' => 'string', 'effectTime' => 'string', 'expireTme' => 'string', 'couponRemark' => 'string', 'couponStatus' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerFormats = [ 'couponNo' => null, 'couponName' => null, 'couponType' => null, 'minUseAmount' => null, 'preferentialAmount' => null, 'discountRatio' => null, 'maxPreferentialAmount' => null, 'productRule' => null, 'applyTime' => 'date-time', 'effectTime' => 'date-time', 'expireTme' => 'date-time', 'couponRemark' => null, 'couponStatus' => 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 = [ 'couponNo' => 'couponNo', 'couponName' => 'couponName', 'couponType' => 'couponType', 'minUseAmount' => 'minUseAmount', 'preferentialAmount' => 'preferentialAmount', 'discountRatio' => 'discountRatio', 'maxPreferentialAmount' => 'maxPreferentialAmount', 'productRule' => 'productRule', 'applyTime' => 'applyTime', 'effectTime' => 'effectTime', 'expireTme' => 'expireTme', 'couponRemark' => 'couponRemark', 'couponStatus' => 'couponStatus' ]; /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ 'couponNo' => 'setCouponNo', 'couponName' => 'setCouponName', 'couponType' => 'setCouponType', 'minUseAmount' => 'setMinUseAmount', 'preferentialAmount' => 'setPreferentialAmount', 'discountRatio' => 'setDiscountRatio', 'maxPreferentialAmount' => 'setMaxPreferentialAmount', 'productRule' => 'setProductRule', 'applyTime' => 'setApplyTime', 'effectTime' => 'setEffectTime', 'expireTme' => 'setExpireTme', 'couponRemark' => 'setCouponRemark', 'couponStatus' => 'setCouponStatus' ]; /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ 'couponNo' => 'getCouponNo', 'couponName' => 'getCouponName', 'couponType' => 'getCouponType', 'minUseAmount' => 'getMinUseAmount', 'preferentialAmount' => 'getPreferentialAmount', 'discountRatio' => 'getDiscountRatio', 'maxPreferentialAmount' => 'getMaxPreferentialAmount', 'productRule' => 'getProductRule', 'applyTime' => 'getApplyTime', 'effectTime' => 'getEffectTime', 'expireTme' => 'getExpireTme', 'couponRemark' => 'getCouponRemark', 'couponStatus' => 'getCouponStatus' ]; /** * 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['couponNo'] = isset($data['couponNo']) ? $data['couponNo'] : null; $this->container['couponName'] = isset($data['couponName']) ? $data['couponName'] : null; $this->container['couponType'] = isset($data['couponType']) ? $data['couponType'] : null; $this->container['minUseAmount'] = isset($data['minUseAmount']) ? $data['minUseAmount'] : null; $this->container['preferentialAmount'] = isset($data['preferentialAmount']) ? $data['preferentialAmount'] : null; $this->container['discountRatio'] = isset($data['discountRatio']) ? $data['discountRatio'] : null; $this->container['maxPreferentialAmount'] = isset($data['maxPreferentialAmount']) ? $data['maxPreferentialAmount'] : null; $this->container['productRule'] = isset($data['productRule']) ? $data['productRule'] : null; $this->container['applyTime'] = isset($data['applyTime']) ? $data['applyTime'] : null; $this->container['effectTime'] = isset($data['effectTime']) ? $data['effectTime'] : null; $this->container['expireTme'] = isset($data['expireTme']) ? $data['expireTme'] : null; $this->container['couponRemark'] = isset($data['couponRemark']) ? $data['couponRemark'] : null; $this->container['couponStatus'] = isset($data['couponStatus']) ? $data['couponStatus'] : 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 couponNo * * @return string */ public function getCouponNo() { return $this->container['couponNo']; } /** * Sets couponNo * * @param string $couponNo 优惠券码 * * @return $this */ public function setCouponNo($couponNo) { $this->container['couponNo'] = $couponNo; return $this; } /** * Gets couponName * * @return string */ public function getCouponName() { return $this->container['couponName']; } /** * Sets couponName * * @param string $couponName 优惠券名称 * * @return $this */ public function setCouponName($couponName) { $this->container['couponName'] = $couponName; return $this; } /** * Gets couponType * * @return string */ public function getCouponType() { return $this->container['couponType']; } /** * Sets couponType * * @param string $couponType 优惠券类型 * * @return $this */ public function setCouponType($couponType) { $this->container['couponType'] = $couponType; return $this; } /** * Gets minUseAmount * * @return string */ public function getMinUseAmount() { return $this->container['minUseAmount']; } /** * Sets minUseAmount * * @param string $minUseAmount 最小使用金额 * * @return $this */ public function setMinUseAmount($minUseAmount) { $this->container['minUseAmount'] = $minUseAmount; return $this; } /** * Gets preferentialAmount * * @return string */ public function getPreferentialAmount() { return $this->container['preferentialAmount']; } /** * Sets preferentialAmount * * @param string $preferentialAmount 优惠金额 * * @return $this */ public function setPreferentialAmount($preferentialAmount) { $this->container['preferentialAmount'] = $preferentialAmount; return $this; } /** * Gets discountRatio * * @return string */ public function getDiscountRatio() { return $this->container['discountRatio']; } /** * Sets discountRatio * * @param string $discountRatio 折扣比例 * * @return $this */ public function setDiscountRatio($discountRatio) { $this->container['discountRatio'] = $discountRatio; return $this; } /** * Gets maxPreferentialAmount * * @return string */ public function getMaxPreferentialAmount() { return $this->container['maxPreferentialAmount']; } /** * Sets maxPreferentialAmount * * @param string $maxPreferentialAmount 最大优惠金额 * * @return $this */ public function setMaxPreferentialAmount($maxPreferentialAmount) { $this->container['maxPreferentialAmount'] = $maxPreferentialAmount; return $this; } /** * Gets productRule * * @return \Yeepay\Yop\Sdk\Service\Promtion\Model\CouponListQueryCouponProductRuleResult */ public function getProductRule() { return $this->container['productRule']; } /** * Sets productRule * * @param \Yeepay\Yop\Sdk\Service\Promtion\Model\CouponListQueryCouponProductRuleResult $productRule 支持产品规则 * * @return $this */ public function setProductRule($productRule) { $this->container['productRule'] = $productRule; return $this; } /** * Gets applyTime * * @return string */ public function getApplyTime() { return $this->container['applyTime']; } /** * Sets applyTime * * @param string $applyTime 申请时间 * * @return $this */ public function setApplyTime($applyTime) { $this->container['applyTime'] = $applyTime; return $this; } /** * Gets effectTime * * @return string */ public function getEffectTime() { return $this->container['effectTime']; } /** * Sets effectTime * * @param string $effectTime 生效时间 * * @return $this */ public function setEffectTime($effectTime) { $this->container['effectTime'] = $effectTime; return $this; } /** * Gets expireTme * * @return string */ public function getExpireTme() { return $this->container['expireTme']; } /** * Sets expireTme * * @param string $expireTme 失效时间 * * @return $this */ public function setExpireTme($expireTme) { $this->container['expireTme'] = $expireTme; return $this; } /** * Gets couponRemark * * @return string */ public function getCouponRemark() { return $this->container['couponRemark']; } /** * Sets couponRemark * * @param string $couponRemark 优惠券说明 * * @return $this */ public function setCouponRemark($couponRemark) { $this->container['couponRemark'] = $couponRemark; return $this; } /** * Gets couponStatus * * @return string */ public function getCouponStatus() { return $this->container['couponStatus']; } /** * Sets couponStatus * * @param string $couponStatus 优惠券状态 * * @return $this */ public function setCouponStatus($couponStatus) { $this->container['couponStatus'] = $couponStatus; 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)); } }