From 9e937a602829735b43740d09d7d341d280aa9a5a Mon Sep 17 00:00:00 2001 From: Simon Freytag Date: Wed, 28 Aug 2024 14:42:32 +0100 Subject: [PATCH] Add listing availability via the 'when' field (#14) --- src/Dto/ListingDto.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/Dto/ListingDto.php b/src/Dto/ListingDto.php index 05144cc..924e8c6 100644 --- a/src/Dto/ListingDto.php +++ b/src/Dto/ListingDto.php @@ -20,6 +20,12 @@ enum PriceType: string case EXACT = 'EXACT'; } +enum ListingWhen: string +{ + case NOW = 'NOW'; + case FUTURE = 'FUTURE'; +} + /** * ListingDto defines the shape of the listing data used by the CloudForest API. * @@ -62,13 +68,21 @@ class ListingDto public $description = 'A testing listing created from the CloudForest PHP ApiClient'; /** - * The price type. Set it to NONE until the user has a chance to got to + * The price type. Set it to NONE until the user has a chance to go to * CloudForest to enter their preferred pricing. * * @var value-of */ public $priceType = 'NONE'; + /** + * When the listing is available. Set it to NOW until the user has a chance + * to go to CloudForest to enter their preferred availability. + * + * @var value-of + */ + public $when = 'NOW'; + /** * The units in which the listing is available as a freeform string. EG * "tonnes", "m^3".