diff --git a/src/Models/Price.php b/src/Models/Price.php index 8057135..b9904e2 100644 --- a/src/Models/Price.php +++ b/src/Models/Price.php @@ -68,6 +68,15 @@ class Price extends SwaggerModel */ protected $rolling_price_initial_period_per_person_per_day = 0.0; + /** + * The weekly rent per person expressed to 4 decimal places of precision. + * This mirrors price_per_person_per_week but with greater precision + * to avoid rounding errors in downstream payment calculations. + * + * @var ?float + */ + protected $price_per_person_per_week_4dp = 0.0; + /** * @return ?float @@ -177,4 +186,26 @@ public function setRollingPriceInitialPeriodPerPersonPerDay($rolling_price_initi return $this; } + + + /** + * @return ?float + */ + public function getPricePerPersonPerWeek4dp() + { + return $this->price_per_person_per_week_4dp; + } + + + /** + * @param ?float $price_per_person_per_week_4dp + * + * @return $this + */ + public function setPricePerPersonPerWeek4dp($price_per_person_per_week_4dp) + { + $this->price_per_person_per_week_4dp = $price_per_person_per_week_4dp; + + return $this; + } } diff --git a/swagger/api-channel.yml b/swagger/api-channel.yml index ce1c898..f45ddeb 100644 --- a/swagger/api-channel.yml +++ b/swagger/api-channel.yml @@ -719,6 +719,13 @@ definitions: The first payment period covers the rent from the start date to the day before the first rolling monthly payment day. The first payment rent is calculated based on the number of days in the period multiplied by the per day rate. + price_per_person_per_week_4dp: + type: number + nullable: true + description: | + The weekly rent per person expressed to 4 decimal places of precision. + This mirrors price_per_person_per_week but with greater precision + to avoid rounding errors in downstream payment calculations. PriceOutbound: description: | When fetching property details this describes a Price attached diff --git a/swagger/api-display.yml b/swagger/api-display.yml index 80f7626..4f9c45f 100644 --- a/swagger/api-display.yml +++ b/swagger/api-display.yml @@ -609,9 +609,16 @@ definitions: daily rent each tenant will pay for the first payment period for a rolling tenancy. This is required if is_fixed_term is false. - The first payment period covers the rent from the start date to - the day before the first rolling monthly payment day. The first payment rent + The first payment period covers the rent from the start date to + the day before the first rolling monthly payment day. The first payment rent is calculated based on the number of days in the period multiplied by the per day rate. + price_per_person_per_week_4dp: + type: number + nullable: true + description: | + The weekly rent per person expressed to 4 decimal places of precision. + This mirrors price_per_person_per_week but with greater precision + to avoid rounding errors in downstream payment calculations. PriceOutbound: description: | When fetching property details this describes a Price attached diff --git a/swagger/api.yml b/swagger/api.yml index 1075cba..338905f 100644 --- a/swagger/api.yml +++ b/swagger/api.yml @@ -1393,9 +1393,16 @@ definitions: daily rent each tenant will pay for the first payment period for a rolling tenancy. This is required if is_fixed_term is false. - The first payment period covers the rent from the start date to - the day before the first rolling monthly payment day. The first payment rent + The first payment period covers the rent from the start date to + the day before the first rolling monthly payment day. The first payment rent is calculated based on the number of days in the period multiplied by the per day rate. + price_per_person_per_week_4dp: + type: number + nullable: true + description: | + The weekly rent per person expressed to 4 decimal places of precision. + This mirrors price_per_person_per_week but with greater precision + to avoid rounding errors in downstream payment calculations. PriceOutbound: description: | When fetching property details this describes a Price attached