/home/desid573/public_html/payment/xero-2/lib/Models/AppStore
NameSizeModeActions
ModelInterface.php20540644editdlrm
Plan.php99840644editdlrm
Price.php76930644editdlrm
ProblemDetails.php93040644editdlrm
Product.php91860644editdlrm
Subscription.php123170644editdlrm
SubscriptionItem.php102850644editdlrm
Edit: /home/desid573/public_html/payment/xero-2/lib/Models/AppStore/SubscriptionItem.php (10285B)
'\DateTime', 'id' => 'string', 'price' => '\XeroAPI\XeroPHP\Models\AppStore\Price', 'product' => '\XeroAPI\XeroPHP\Models\AppStore\Product', 'start_date' => '\DateTime', 'test_mode' => 'bool' ]; /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $openAPIFormats = [ 'end_date' => 'date-time', 'id' => 'uuid', 'price' => null, 'product' => null, 'start_date' => 'date-time', 'test_mode' => null ]; /** * Array of property to type mappings. Used for (de)serialization * * @return array */ public static function openAPITypes() { return self::$openAPITypes; } /** * Array of property to format mappings. Used for (de)serialization * * @return array */ public static function openAPIFormats() { return self::$openAPIFormats; } /** * Array of attributes where the key is the local name, * and the value is the original name * * @var string[] */ protected static $attributeMap = [ 'end_date' => 'endDate', 'id' => 'id', 'price' => 'price', 'product' => 'product', 'start_date' => 'startDate', 'test_mode' => 'testMode' ]; /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ 'end_date' => 'setEndDate', 'id' => 'setId', 'price' => 'setPrice', 'product' => 'setProduct', 'start_date' => 'setStartDate', 'test_mode' => 'setTestMode' ]; /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ 'end_date' => 'getEndDate', 'id' => 'getId', 'price' => 'getPrice', 'product' => 'getProduct', 'start_date' => 'getStartDate', 'test_mode' => 'getTestMode' ]; /** * 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::$openAPIModelName; } /** * 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['end_date'] = isset($data['end_date']) ? $data['end_date'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['price'] = isset($data['price']) ? $data['price'] : null; $this->container['product'] = isset($data['product']) ? $data['product'] : null; $this->container['start_date'] = isset($data['start_date']) ? $data['start_date'] : null; $this->container['test_mode'] = isset($data['test_mode']) ? $data['test_mode'] : null; } /** * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function listInvalidProperties() { $invalidProperties = []; if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['price'] === null) { $invalidProperties[] = "'price' can't be null"; } if ($this->container['product'] === null) { $invalidProperties[] = "'product' can't be null"; } if ($this->container['start_date'] === null) { $invalidProperties[] = "'start_date' can't be null"; } 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 end_date * * @return \DateTime|null */ public function getEndDate() { return $this->container['end_date']; } /** * Sets end_date * * @param \DateTime|null $end_date Date when the subscription to this product will end * * @return $this */ public function setEndDate($end_date) { $this->container['end_date'] = $end_date; return $this; } /** * Gets id * * @return string */ public function getId() { return $this->container['id']; } /** * Sets id * * @param string $id The unique identifier of the subscription item. * * @return $this */ public function setId($id) { $this->container['id'] = $id; return $this; } /** * Gets price * * @return \XeroAPI\XeroPHP\Models\AppStore\Price */ public function getPrice() { return $this->container['price']; } /** * Sets price * * @param \XeroAPI\XeroPHP\Models\AppStore\Price $price price * * @return $this */ public function setPrice($price) { $this->container['price'] = $price; return $this; } /** * Gets product * * @return \XeroAPI\XeroPHP\Models\AppStore\Product */ public function getProduct() { return $this->container['product']; } /** * Sets product * * @param \XeroAPI\XeroPHP\Models\AppStore\Product $product product * * @return $this */ public function setProduct($product) { $this->container['product'] = $product; return $this; } /** * Gets start_date * * @return \DateTime */ public function getStartDate() { return $this->container['start_date']; } /** * Sets start_date * * @param \DateTime $start_date Date the subscription started, or will start. Note: this could be in the future for downgrades or reduced number of seats that haven't taken effect yet. * * @return $this */ public function setStartDate($start_date) { $this->container['start_date'] = $start_date; return $this; } /** * Gets test_mode * * @return bool|null */ public function getTestMode() { return $this->container['test_mode']; } /** * Sets test_mode * * @param bool|null $test_mode If the subscription is a test subscription * * @return $this */ public function setTestMode($test_mode) { $this->container['test_mode'] = $test_mode; 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() { return json_encode( AppStoreObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT ); } }