From 6b8c81404567a25e5de8e0c07502342047891628 Mon Sep 17 00:00:00 2001 From: johncroker Date: Thu, 24 Apr 2025 10:19:56 +0100 Subject: [PATCH 1/4] PS-286: add contract promo props to doc --- swagger/api-channel.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/swagger/api-channel.yml b/swagger/api-channel.yml index c3e852a..5d1effc 100644 --- a/swagger/api-channel.yml +++ b/swagger/api-channel.yml @@ -587,6 +587,14 @@ definitions: description: | The latest date at which it is possible to vacate the property in yyyy-mm-dd format + promo_value: + type: integer + description: | + The discount value of the promotion for this contract + restricted_code: + type: string + description: | + Reporting code for tracking promotion usage. Will appear in the Tenants report in Report Builder on the StuRents platform min_contract_days: type: integer description: | From ed5035a45fe481df5b9c27a6cb45580df4171e8a Mon Sep 17 00:00:00 2001 From: johncroker Date: Thu, 24 Apr 2025 10:23:36 +0100 Subject: [PATCH 2/4] PS-286: type --- swagger/api-channel.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swagger/api-channel.yml b/swagger/api-channel.yml index 5d1effc..0a118c1 100644 --- a/swagger/api-channel.yml +++ b/swagger/api-channel.yml @@ -588,7 +588,7 @@ definitions: The latest date at which it is possible to vacate the property in yyyy-mm-dd format promo_value: - type: integer + type: number description: | The discount value of the promotion for this contract restricted_code: From 1c7cd1d00d859c6463489ca228f520037959e52c Mon Sep 17 00:00:00 2001 From: johncroker Date: Thu, 24 Apr 2025 11:31:01 +0100 Subject: [PATCH 3/4] PS-286: gen models --- src/Models/ContractAbstract.php | 58 +++++++++++++++++++++++++++++++++ swagger/api.yml | 8 +++++ 2 files changed, 66 insertions(+) diff --git a/src/Models/ContractAbstract.php b/src/Models/ContractAbstract.php index 5c32e50..416247c 100644 --- a/src/Models/ContractAbstract.php +++ b/src/Models/ContractAbstract.php @@ -34,6 +34,20 @@ class ContractAbstract extends SwaggerModel */ protected $end_date; + /** + * The discount value of the promotion for this contract + * + * @var float + */ + protected $promo_value = 0.0; + + /** + * Reporting code for tracking promotion usage. Will appear in the Tenants report in Report Builder on the StuRents platform + * + * @var string + */ + protected $restricted_code = ''; + /** * The minimum time a tenant may rent the property for in days * @@ -120,6 +134,50 @@ public function setEndDate($end_date) } + /** + * @return float + */ + public function getPromoValue() + { + return $this->promo_value; + } + + + /** + * @param float $promo_value + * + * @return $this + */ + public function setPromoValue($promo_value) + { + $this->promo_value = $promo_value; + + return $this; + } + + + /** + * @return string + */ + public function getRestrictedCode() + { + return $this->restricted_code; + } + + + /** + * @param string $restricted_code + * + * @return $this + */ + public function setRestrictedCode($restricted_code) + { + $this->restricted_code = $restricted_code; + + return $this; + } + + /** * @return int */ diff --git a/swagger/api.yml b/swagger/api.yml index 67c492c..617697b 100644 --- a/swagger/api.yml +++ b/swagger/api.yml @@ -1150,6 +1150,14 @@ definitions: description: | The latest date at which it is possible to vacate the property in yyyy-mm-dd format + promo_value: + type: number + description: | + The discount value of the promotion for this contract + restricted_code: + type: string + description: | + Reporting code for tracking promotion usage. Will appear in the Tenants report in Report Builder on the StuRents platform min_contract_days: type: integer description: | From acc1060495bbbc4afa4bda9f5c4ff33a356478b5 Mon Sep 17 00:00:00 2001 From: johncroker Date: Thu, 1 May 2025 16:58:08 +0100 Subject: [PATCH 4/4] PS-103: restricted property --- src/Models/ContractAbstract.php | 28 ++++++++++++++++++++++++++++ swagger/api-channel.yml | 3 +++ swagger/api.yml | 3 +++ 3 files changed, 34 insertions(+) diff --git a/src/Models/ContractAbstract.php b/src/Models/ContractAbstract.php index 416247c..a4cfc77 100644 --- a/src/Models/ContractAbstract.php +++ b/src/Models/ContractAbstract.php @@ -34,6 +34,12 @@ class ContractAbstract extends SwaggerModel */ protected $end_date; + /** + * Is true if the availability is restricted + * @var bool + */ + protected $restricted = false; + /** * The discount value of the promotion for this contract * @@ -134,6 +140,28 @@ public function setEndDate($end_date) } + /** + * @return bool + */ + public function getRestricted() + { + return $this->restricted; + } + + + /** + * @param bool $restricted + * + * @return $this + */ + public function setRestricted($restricted) + { + $this->restricted = $restricted; + + return $this; + } + + /** * @return float */ diff --git a/swagger/api-channel.yml b/swagger/api-channel.yml index 0a118c1..e0bd31d 100644 --- a/swagger/api-channel.yml +++ b/swagger/api-channel.yml @@ -587,6 +587,9 @@ definitions: description: | The latest date at which it is possible to vacate the property in yyyy-mm-dd format + restricted: + type: boolean + description: Is true if the availability is restricted promo_value: type: number description: | diff --git a/swagger/api.yml b/swagger/api.yml index 617697b..8768fde 100644 --- a/swagger/api.yml +++ b/swagger/api.yml @@ -1150,6 +1150,9 @@ definitions: description: | The latest date at which it is possible to vacate the property in yyyy-mm-dd format + restricted: + type: boolean + description: Is true if the availability is restricted promo_value: type: number description: |