Skip to content

Commit

Permalink
update SDK from api-definitions (#722)
Browse files Browse the repository at this point in the history
Co-authored-by: rebilly-machine-user <[email protected]>
  • Loading branch information
1 parent 6e01f66 commit 7ad8fb6
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 0 deletions.
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

0 comments on commit 7ad8fb6

Please sign in to comment.