Skip to content

Commit 37fbc7f

Browse files
committed
Release v1.9.1
* Making **price** and **description** fields in **UpdateAddressServiceRequest** nullable as they are not required
1 parent 1093ddd commit 37fbc7f

2 files changed

Lines changed: 74 additions & 2 deletions

File tree

docs/Api/SlotsApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Name | Type | Description | Notes
196196
197197

198198

199-
Adds or replaces the slots. This will override all existing slots for given date ranges. If a duplicate request (with the same address and payload) is received before the original request is processed, it will be rejected with a 429 Too Many Requests status code.
199+
Adds or replaces the slots. This will override all existing slots for given date ranges. If a duplicate request (with the same address and payload) is received: * it will be rejected with a 429 \"Too Many Requests\" status code if the original request was not fully processed yet * it will be ignored with a 201 status code for 3 minutes after the original request finished processing
200200

201201
### Example
202202
```php

lib/Model/BookingPaymentStatusChangedNotificationDataVisitPaymentStatus.php

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,45 @@ public function getModelName()
162162
return self::$swaggerModelName;
163163
}
164164

165-
165+
const STATUS_FROM_PAID = 'paid';
166+
const STATUS_FROM_WAITING_FOR_CONFIRMATION = 'waiting_for_confirmation';
167+
const STATUS_FROM_NOT_PAID = 'not-paid';
168+
const STATUS_FROM_REFUNDED = 'refunded';
169+
const STATUS_FROM_CHARGED_BACK = 'charged_back';
170+
const STATUS_TO_PAID = 'paid';
171+
const STATUS_TO_WAITING_FOR_CONFIRMATION = 'waiting_for_confirmation';
172+
const STATUS_TO_NOT_PAID = 'not-paid';
173+
const STATUS_TO_REFUNDED = 'refunded';
174+
const STATUS_TO_CHARGED_BACK = 'charged_back';
175+
176+
/**
177+
* Gets allowable values of the enum
178+
*
179+
* @return string[]
180+
*/
181+
public function getStatusFromAllowableValues()
182+
{
183+
return [
184+
self::STATUS_FROM_PAID,
185+
self::STATUS_FROM_WAITING_FOR_CONFIRMATION,
186+
self::STATUS_FROM_NOT_PAID,
187+
self::STATUS_FROM_REFUNDED,
188+
self::STATUS_FROM_CHARGED_BACK, ];
189+
}
190+
/**
191+
* Gets allowable values of the enum
192+
*
193+
* @return string[]
194+
*/
195+
public function getStatusToAllowableValues()
196+
{
197+
return [
198+
self::STATUS_TO_PAID,
199+
self::STATUS_TO_WAITING_FOR_CONFIRMATION,
200+
self::STATUS_TO_NOT_PAID,
201+
self::STATUS_TO_REFUNDED,
202+
self::STATUS_TO_CHARGED_BACK, ];
203+
}
166204

167205
/**
168206
* Associative array for storing property values
@@ -193,6 +231,22 @@ public function listInvalidProperties()
193231
{
194232
$invalidProperties = [];
195233

234+
$allowedValues = $this->getStatusFromAllowableValues();
235+
if (!is_null($this->container['status_from']) && !in_array($this->container['status_from'], $allowedValues, true)) {
236+
$invalidProperties[] = sprintf(
237+
"invalid value for 'status_from', must be one of '%s'",
238+
implode("', '", $allowedValues)
239+
);
240+
}
241+
242+
$allowedValues = $this->getStatusToAllowableValues();
243+
if (!is_null($this->container['status_to']) && !in_array($this->container['status_to'], $allowedValues, true)) {
244+
$invalidProperties[] = sprintf(
245+
"invalid value for 'status_to', must be one of '%s'",
246+
implode("', '", $allowedValues)
247+
);
248+
}
249+
196250
return $invalidProperties;
197251
}
198252

@@ -227,6 +281,15 @@ public function getStatusFrom()
227281
*/
228282
public function setStatusFrom($status_from)
229283
{
284+
$allowedValues = $this->getStatusFromAllowableValues();
285+
if (!is_null($status_from) && !in_array($status_from, $allowedValues, true)) {
286+
throw new \InvalidArgumentException(
287+
sprintf(
288+
"Invalid value for 'status_from', must be one of '%s'",
289+
implode("', '", $allowedValues)
290+
)
291+
);
292+
}
230293
$this->container['status_from'] = $status_from;
231294

232295
return $this;
@@ -251,6 +314,15 @@ public function getStatusTo()
251314
*/
252315
public function setStatusTo($status_to)
253316
{
317+
$allowedValues = $this->getStatusToAllowableValues();
318+
if (!is_null($status_to) && !in_array($status_to, $allowedValues, true)) {
319+
throw new \InvalidArgumentException(
320+
sprintf(
321+
"Invalid value for 'status_to', must be one of '%s'",
322+
implode("', '", $allowedValues)
323+
)
324+
);
325+
}
254326
$this->container['status_to'] = $status_to;
255327

256328
return $this;

0 commit comments

Comments
 (0)