From dfe991731170a4bd7d711afbd0db69ee5d635b6b Mon Sep 17 00:00:00 2001 From: rebilly-machine-user Date: Mon, 4 Nov 2024 19:58:24 +0000 Subject: [PATCH] update SDK from api-definitions --- .changeset/yellow-frogs-compete.md | 5 +++ src/Model/Quote.php | 4 +++ src/Model/QuoteChangeOrder.php | 44 +++++++++++++++++++++++++ src/Model/QuoteCreateOrder.php | 44 +++++++++++++++++++++++++ src/Model/QuoteReactivateOrder.php | 44 +++++++++++++++++++++++++ src/Model/QuoteTrialConversionOrder.php | 44 +++++++++++++++++++++++++ 6 files changed, 185 insertions(+) create mode 100644 .changeset/yellow-frogs-compete.md diff --git a/.changeset/yellow-frogs-compete.md b/.changeset/yellow-frogs-compete.md new file mode 100644 index 00000000..c4546a41 --- /dev/null +++ b/.changeset/yellow-frogs-compete.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Add missing createdTime and updatedTime to Quote schema Rebilly/rebilly#8374 diff --git a/src/Model/Quote.php b/src/Model/Quote.php index 2785cce8..9bde1e2c 100644 --- a/src/Model/Quote.php +++ b/src/Model/Quote.php @@ -68,6 +68,10 @@ public function getRejectedTime(): ?DateTimeImmutable; public function getCanceledTime(): ?DateTimeImmutable; + public function getCreatedTime(): ?DateTimeImmutable; + + public function getUpdatedTime(): ?DateTimeImmutable; + public function getRedirectUrl(): ?string; public function setRedirectUrl(null|string $redirectUrl): static; diff --git a/src/Model/QuoteChangeOrder.php b/src/Model/QuoteChangeOrder.php index ce5739d8..90ab5132 100644 --- a/src/Model/QuoteChangeOrder.php +++ b/src/Model/QuoteChangeOrder.php @@ -118,6 +118,12 @@ public function __construct(array $data = []) if (array_key_exists('canceledTime', $data)) { $this->setCanceledTime($data['canceledTime']); } + if (array_key_exists('createdTime', $data)) { + $this->setCreatedTime($data['createdTime']); + } + if (array_key_exists('updatedTime', $data)) { + $this->setUpdatedTime($data['updatedTime']); + } if (array_key_exists('redirectUrl', $data)) { $this->setRedirectUrl($data['redirectUrl']); } @@ -419,6 +425,16 @@ public function getCanceledTime(): ?DateTimeImmutable return $this->fields['canceledTime'] ?? null; } + public function getCreatedTime(): ?DateTimeImmutable + { + return $this->fields['createdTime'] ?? null; + } + + public function getUpdatedTime(): ?DateTimeImmutable + { + return $this->fields['updatedTime'] ?? null; + } + public function getRedirectUrl(): ?string { return $this->fields['redirectUrl'] ?? null; @@ -611,6 +627,12 @@ public function jsonSerialize(): array if (array_key_exists('canceledTime', $this->fields)) { $data['canceledTime'] = $this->fields['canceledTime']?->format(DateTimeInterface::RFC3339); } + if (array_key_exists('createdTime', $this->fields)) { + $data['createdTime'] = $this->fields['createdTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('updatedTime', $this->fields)) { + $data['updatedTime'] = $this->fields['updatedTime']?->format(DateTimeInterface::RFC3339); + } if (array_key_exists('redirectUrl', $this->fields)) { $data['redirectUrl'] = $this->fields['redirectUrl']; } @@ -728,6 +750,28 @@ private function setCanceledTime(null|DateTimeImmutable|string $canceledTime): s return $this; } + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static + { + if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { + $createdTime = new DateTimeImmutable($createdTime); + } + + $this->fields['createdTime'] = $createdTime; + + return $this; + } + + private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): static + { + if ($updatedTime !== null && !($updatedTime instanceof DateTimeImmutable)) { + $updatedTime = new DateTimeImmutable($updatedTime); + } + + $this->fields['updatedTime'] = $updatedTime; + + return $this; + } + /** * @param null|array[]|ResourceLink[] $links */ diff --git a/src/Model/QuoteCreateOrder.php b/src/Model/QuoteCreateOrder.php index 023dc954..698ad704 100644 --- a/src/Model/QuoteCreateOrder.php +++ b/src/Model/QuoteCreateOrder.php @@ -102,6 +102,12 @@ public function __construct(array $data = []) if (array_key_exists('canceledTime', $data)) { $this->setCanceledTime($data['canceledTime']); } + if (array_key_exists('createdTime', $data)) { + $this->setCreatedTime($data['createdTime']); + } + if (array_key_exists('updatedTime', $data)) { + $this->setUpdatedTime($data['updatedTime']); + } if (array_key_exists('redirectUrl', $data)) { $this->setRedirectUrl($data['redirectUrl']); } @@ -341,6 +347,16 @@ public function getCanceledTime(): ?DateTimeImmutable return $this->fields['canceledTime'] ?? null; } + public function getCreatedTime(): ?DateTimeImmutable + { + return $this->fields['createdTime'] ?? null; + } + + public function getUpdatedTime(): ?DateTimeImmutable + { + return $this->fields['updatedTime'] ?? null; + } + public function getRedirectUrl(): ?string { return $this->fields['redirectUrl'] ?? null; @@ -516,6 +532,12 @@ public function jsonSerialize(): array if (array_key_exists('canceledTime', $this->fields)) { $data['canceledTime'] = $this->fields['canceledTime']?->format(DateTimeInterface::RFC3339); } + if (array_key_exists('createdTime', $this->fields)) { + $data['createdTime'] = $this->fields['createdTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('updatedTime', $this->fields)) { + $data['updatedTime'] = $this->fields['updatedTime']?->format(DateTimeInterface::RFC3339); + } if (array_key_exists('redirectUrl', $this->fields)) { $data['redirectUrl'] = $this->fields['redirectUrl']; } @@ -640,6 +662,28 @@ private function setCanceledTime(null|DateTimeImmutable|string $canceledTime): s return $this; } + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static + { + if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { + $createdTime = new DateTimeImmutable($createdTime); + } + + $this->fields['createdTime'] = $createdTime; + + return $this; + } + + private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): static + { + if ($updatedTime !== null && !($updatedTime instanceof DateTimeImmutable)) { + $updatedTime = new DateTimeImmutable($updatedTime); + } + + $this->fields['updatedTime'] = $updatedTime; + + return $this; + } + /** * @param null|array[]|ResourceLink[] $links */ diff --git a/src/Model/QuoteReactivateOrder.php b/src/Model/QuoteReactivateOrder.php index 73c7c94f..d253d870 100644 --- a/src/Model/QuoteReactivateOrder.php +++ b/src/Model/QuoteReactivateOrder.php @@ -105,6 +105,12 @@ public function __construct(array $data = []) if (array_key_exists('canceledTime', $data)) { $this->setCanceledTime($data['canceledTime']); } + if (array_key_exists('createdTime', $data)) { + $this->setCreatedTime($data['createdTime']); + } + if (array_key_exists('updatedTime', $data)) { + $this->setUpdatedTime($data['updatedTime']); + } if (array_key_exists('redirectUrl', $data)) { $this->setRedirectUrl($data['redirectUrl']); } @@ -363,6 +369,16 @@ public function getCanceledTime(): ?DateTimeImmutable return $this->fields['canceledTime'] ?? null; } + public function getCreatedTime(): ?DateTimeImmutable + { + return $this->fields['createdTime'] ?? null; + } + + public function getUpdatedTime(): ?DateTimeImmutable + { + return $this->fields['updatedTime'] ?? null; + } + public function getRedirectUrl(): ?string { return $this->fields['redirectUrl'] ?? null; @@ -541,6 +557,12 @@ public function jsonSerialize(): array if (array_key_exists('canceledTime', $this->fields)) { $data['canceledTime'] = $this->fields['canceledTime']?->format(DateTimeInterface::RFC3339); } + if (array_key_exists('createdTime', $this->fields)) { + $data['createdTime'] = $this->fields['createdTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('updatedTime', $this->fields)) { + $data['updatedTime'] = $this->fields['updatedTime']?->format(DateTimeInterface::RFC3339); + } if (array_key_exists('redirectUrl', $this->fields)) { $data['redirectUrl'] = $this->fields['redirectUrl']; } @@ -658,6 +680,28 @@ private function setCanceledTime(null|DateTimeImmutable|string $canceledTime): s return $this; } + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static + { + if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { + $createdTime = new DateTimeImmutable($createdTime); + } + + $this->fields['createdTime'] = $createdTime; + + return $this; + } + + private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): static + { + if ($updatedTime !== null && !($updatedTime instanceof DateTimeImmutable)) { + $updatedTime = new DateTimeImmutable($updatedTime); + } + + $this->fields['updatedTime'] = $updatedTime; + + return $this; + } + /** * @param null|array[]|ResourceLink[] $links */ diff --git a/src/Model/QuoteTrialConversionOrder.php b/src/Model/QuoteTrialConversionOrder.php index 66c9e5af..398f4f65 100644 --- a/src/Model/QuoteTrialConversionOrder.php +++ b/src/Model/QuoteTrialConversionOrder.php @@ -96,6 +96,12 @@ public function __construct(array $data = []) if (array_key_exists('canceledTime', $data)) { $this->setCanceledTime($data['canceledTime']); } + if (array_key_exists('createdTime', $data)) { + $this->setCreatedTime($data['createdTime']); + } + if (array_key_exists('updatedTime', $data)) { + $this->setUpdatedTime($data['updatedTime']); + } if (array_key_exists('redirectUrl', $data)) { $this->setRedirectUrl($data['redirectUrl']); } @@ -310,6 +316,16 @@ public function getCanceledTime(): ?DateTimeImmutable return $this->fields['canceledTime'] ?? null; } + public function getCreatedTime(): ?DateTimeImmutable + { + return $this->fields['createdTime'] ?? null; + } + + public function getUpdatedTime(): ?DateTimeImmutable + { + return $this->fields['updatedTime'] ?? null; + } + public function getRedirectUrl(): ?string { return $this->fields['redirectUrl'] ?? null; @@ -479,6 +495,12 @@ public function jsonSerialize(): array if (array_key_exists('canceledTime', $this->fields)) { $data['canceledTime'] = $this->fields['canceledTime']?->format(DateTimeInterface::RFC3339); } + if (array_key_exists('createdTime', $this->fields)) { + $data['createdTime'] = $this->fields['createdTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('updatedTime', $this->fields)) { + $data['updatedTime'] = $this->fields['updatedTime']?->format(DateTimeInterface::RFC3339); + } if (array_key_exists('redirectUrl', $this->fields)) { $data['redirectUrl'] = $this->fields['redirectUrl']; } @@ -596,6 +618,28 @@ private function setCanceledTime(null|DateTimeImmutable|string $canceledTime): s return $this; } + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static + { + if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { + $createdTime = new DateTimeImmutable($createdTime); + } + + $this->fields['createdTime'] = $createdTime; + + return $this; + } + + private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): static + { + if ($updatedTime !== null && !($updatedTime instanceof DateTimeImmutable)) { + $updatedTime = new DateTimeImmutable($updatedTime); + } + + $this->fields['updatedTime'] = $updatedTime; + + return $this; + } + /** * @param null|array[]|ResourceLink[] $links */