diff --git a/README.md b/README.md index ac48167..d26fb74 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # StuRents API Helper -_Master branch is for v2.0 which is not available yet; please check releases for previous versions. For outbound data check 1.3.*, for inbound use 1.2.*_ +_Master branch is for v2.0. Install using composer: diff --git a/src/Models/ContractWithRooms.php b/src/Models/ContractWithRooms.php index 18ddf12..f26d7d8 100644 --- a/src/Models/ContractWithRooms.php +++ b/src/Models/ContractWithRooms.php @@ -19,6 +19,21 @@ class ContractWithRooms extends ContractAbstract */ protected $book_now_url = ''; + /** + * A URL where you are able to book a viewing online. + * Will be blank if the property is not set up for this feature + * + * @var string + */ + protected $viewing_url = ''; + + /** + * Is true if the availability is restricted + * + * @var bool + */ + protected $restricted = false; + /** * A list of 1 or more prices with optional room name. It may * be the case that all the price values are equal but still @@ -53,6 +68,50 @@ public function setBookNowUrl($book_now_url) } + /** + * @return string + */ + public function getViewingUrl() + { + return $this->viewing_url; + } + + + /** + * @param string $viewing_url + * + * @return $this + */ + public function setViewingUrl($viewing_url) + { + $this->viewing_url = $viewing_url; + + return $this; + } + + + /** + * @return bool + */ + public function getRestricted() + { + return $this->restricted; + } + + + /** + * @param bool $restricted + * + * @return $this + */ + public function setRestricted($restricted) + { + $this->restricted = $restricted; + + return $this; + } + + /** * @return PriceOutbound[] */ diff --git a/src/Models/Media.php b/src/Models/Media.php index 93ca07a..1fc6212 100644 --- a/src/Models/Media.php +++ b/src/Models/Media.php @@ -26,7 +26,7 @@ class Media extends SwaggerModel /** * Zero or more video embed URLs. Any video source can be * supplied but at present only videos from YouTube will - * be rendered as embeded videos on the property profile pages + * be rendered as embedded videos on the property profile pages * * @var string[] */ diff --git a/src/Models/Price.php b/src/Models/Price.php index 78f84fb..4aee9d0 100644 --- a/src/Models/Price.php +++ b/src/Models/Price.php @@ -20,7 +20,7 @@ class Price extends SwaggerModel * will be used to calculate total and scheduled payments when * creating a tenancy and/or rent collection for the property. * - * @var float + * @var string * @required */ protected $price_per_person_per_week; @@ -29,9 +29,9 @@ class Price extends SwaggerModel * A monetary value indicating the deposit each tenant will be * expected to pay upon signing a contract to rent the property * - * @var float + * @var string */ - protected $deposit_per_person = 0.0; + protected $deposit_per_person = ''; /** * A monetary value indicating the fee to the property manager which @@ -40,11 +40,11 @@ class Price extends SwaggerModel * * @var float */ - protected $fee_per_person = 0.0; + protected $fee_per_person; /** - * @return float + * @return string */ public function getPricePerPersonPerWeek() { @@ -53,7 +53,7 @@ public function getPricePerPersonPerWeek() /** - * @param float $price_per_person_per_week + * @param string $price_per_person_per_week * * @return $this */ @@ -66,7 +66,7 @@ public function setPricePerPersonPerWeek($price_per_person_per_week) /** - * @return float + * @return string */ public function getDepositPerPerson() { @@ -75,7 +75,7 @@ public function getDepositPerPerson() /** - * @param float $deposit_per_person + * @param string $deposit_per_person * * @return $this */ @@ -101,7 +101,7 @@ public function getFeePerPerson() * * @return $this */ - public function setFeePerPerson($fee_per_person) + public function setFeePerPerson(float $fee_per_person) { $this->fee_per_person = $fee_per_person; diff --git a/src/Models/Property.php b/src/Models/Property.php index bd26d3b..cae4b5a 100644 --- a/src/Models/Property.php +++ b/src/Models/Property.php @@ -57,7 +57,7 @@ class Property extends SwaggerModel /** * When designation is set to "pbsa" this describes the total - * number of identical rooms (including those currrently let). + * number of identical rooms (including those currently let). * If designation is "house" then this should be set to 0 * * @var int @@ -67,7 +67,8 @@ class Property extends SwaggerModel /** * When designation is set to “pbsa” this describes the number * of identical rooms still available. If designation is "house" - * then this should be set to 0 + * then this should be set to 0. Please note this field manually + * updated by the property manager so is not live data. * * @var int */ @@ -118,7 +119,7 @@ class Property extends SwaggerModel /** * The unique ID for a bank account where it is intended that * the rent for this property will be paid to. This ID can be - * retrived from the /bank-accounts endpoint. Note that this ID + * retrieved from the /bank-accounts endpoint. Note that this ID * will not contain sensitive information, e.g. account number * or sort code - that information cannot be retrieved * diff --git a/src/Models/Room.php b/src/Models/Room.php index 7c3befd..6ac76e6 100644 --- a/src/Models/Room.php +++ b/src/Models/Room.php @@ -9,7 +9,7 @@ class Room extends SwaggerModel { /** - * Can be precise, e.g. 1a, or descrptive e.g. "downstairs front" + * Can be precise, e.g. 1a, or descriptive e.g. "downstairs front" * * @var string */ diff --git a/swagger/api.yml b/swagger/api.yml index 4e9685e..3f987c3 100644 --- a/swagger/api.yml +++ b/swagger/api.yml @@ -799,14 +799,15 @@ definitions: type: integer description: | When designation is set to "pbsa" this describes the total - number of identical rooms (including those currrently let). + number of identical rooms (including those currently let). If designation is "house" then this should be set to 0 quantity_available: type: integer description: | When designation is set to “pbsa” this describes the number of identical rooms still available. If designation is "house" - then this should be set to 0 + then this should be set to 0. Please note this field manually + updated by the property manager so is not live data. room_type: type: string description: | @@ -839,7 +840,7 @@ definitions: description: | The unique ID for a bank account where it is intended that the rent for this property will be paid to. This ID can be - retrived from the /bank-accounts endpoint. Note that this ID + retrieved from the /bank-accounts endpoint. Note that this ID will not contain sensitive information, e.g. account number or sort code - that information cannot be retrieved accreditations: @@ -1006,7 +1007,7 @@ definitions: description: | Zero or more video embed URLs. Any video source can be supplied but at present only videos from YouTube will - be rendered as embeded videos on the property profile pages + be rendered as embedded videos on the property profile pages items: type: string floorplans: @@ -1187,6 +1188,15 @@ definitions: description: | A URL where the property may be booked online using this contract. Will be blank if the property is not set up for this feature + viewing_url: + type: string + description: | + A URL where you are able to book a viewing online. + Will be blank if the property is not set up for this feature + restricted: + type: boolean + description: | + Is true if the availability is restricted prices: type: array description: | @@ -1316,7 +1326,7 @@ definitions: - price_per_person_per_week properties: price_per_person_per_week: - type: number + type: string description: | A monetary value indicating the weekly rent each tenant will be expected to pay during their tenancy in the property. @@ -1326,12 +1336,12 @@ definitions: will be used to calculate total and scheduled payments when creating a tenancy and/or rent collection for the property. deposit_per_person: - type: number + type: string description: | A monetary value indicating the deposit each tenant will be expected to pay upon signing a contract to rent the property fee_per_person: - type: number + type: float description: | A monetary value indicating the fee to the property manager which each tenant will be expected to pay upon signing a contract to @@ -1384,7 +1394,7 @@ definitions: room_name: type: string description: | - Can be precise, e.g. 1a, or descrptive e.g. "downstairs front" + Can be precise, e.g. 1a, or descriptive e.g. "downstairs front" floor: type: string description: |