Skip to content

Commit

Permalink
Add listing availability via the 'when' field (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfreytag authored Aug 28, 2024
1 parent adad9f9 commit 9e937a6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/Dto/ListingDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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<PriceType>
*/
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<ListingWhen>
*/
public $when = 'NOW';

/**
* The units in which the listing is available as a freeform string. EG
* "tonnes", "m^3".
Expand Down

0 comments on commit 9e937a6

Please sign in to comment.