Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update SDK from api-definitions #722

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/yellow-frogs-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

fix(api-definitions): Add missing createdTime and updatedTime to Quote schema Rebilly/rebilly#8374
4 changes: 4 additions & 0 deletions src/Model/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
44 changes: 44 additions & 0 deletions src/Model/QuoteChangeOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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'];
}
Expand Down Expand Up @@ -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
*/
Expand Down
44 changes: 44 additions & 0 deletions src/Model/QuoteCreateOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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'];
}
Expand Down Expand Up @@ -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
*/
Expand Down
44 changes: 44 additions & 0 deletions src/Model/QuoteReactivateOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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'];
}
Expand Down Expand Up @@ -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
*/
Expand Down
44 changes: 44 additions & 0 deletions src/Model/QuoteTrialConversionOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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'];
}
Expand Down Expand Up @@ -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
*/
Expand Down
Loading