From 467f14e5478714d28aa61270ec4f0db6a1e30348 Mon Sep 17 00:00:00 2001 From: Rebilly Machine User Date: Thu, 14 Nov 2024 08:56:39 +0200 Subject: [PATCH] chore: update SDK from api-definitions (#724) Co-authored-by: rebilly-machine-user --- .changeset/clever-lobsters-move.md | 5 +++++ .changeset/fuzzy-bugs-approve.md | 5 +++++ .changeset/thirty-cobras-wash.md | 5 +++++ .changeset/warm-cheetahs-poke.md | 5 +++++ .changeset/wicked-melons-melt.md | 5 +++++ src/Model/DepositRequest.php | 18 +++++++++++++++ src/Model/Paysafe.php | 22 +++++++++++++++++++ src/Model/SchedulingMethodImmediately.php | 2 +- src/Model/ServicePeriodAnchorInstruction.php | 4 ++++ .../ServicePeriodAnchorInstructionFactory.php | 1 - 10 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .changeset/clever-lobsters-move.md create mode 100644 .changeset/fuzzy-bugs-approve.md create mode 100644 .changeset/thirty-cobras-wash.md create mode 100644 .changeset/warm-cheetahs-poke.md create mode 100644 .changeset/wicked-melons-melt.md diff --git a/.changeset/clever-lobsters-move.md b/.changeset/clever-lobsters-move.md new file mode 100644 index 000000000..4d0998a5a --- /dev/null +++ b/.changeset/clever-lobsters-move.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +SDK Generator updated diff --git a/.changeset/fuzzy-bugs-approve.md b/.changeset/fuzzy-bugs-approve.md new file mode 100644 index 000000000..7808c7e5a --- /dev/null +++ b/.changeset/fuzzy-bugs-approve.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Fix lint errors Rebilly/rebilly#8540 diff --git a/.changeset/thirty-cobras-wash.md b/.changeset/thirty-cobras-wash.md new file mode 100644 index 000000000..1118688e5 --- /dev/null +++ b/.changeset/thirty-cobras-wash.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +build(deps): merge passing FE dependabot PRs Rebilly/rebilly#8272 diff --git a/.changeset/warm-cheetahs-poke.md b/.changeset/warm-cheetahs-poke.md new file mode 100644 index 000000000..175f3c696 --- /dev/null +++ b/.changeset/warm-cheetahs-poke.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be): Add 3DS support to Paysafe Rebilly/rebilly#8434 diff --git a/.changeset/wicked-melons-melt.md b/.changeset/wicked-melons-melt.md new file mode 100644 index 000000000..579fd0c03 --- /dev/null +++ b/.changeset/wicked-melons-melt.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api-definitions, backend): Add JWT to DepositRequest response Rebilly/rebilly#8345 diff --git a/src/Model/DepositRequest.php b/src/Model/DepositRequest.php index 86875a4e3..0bfdb7560 100644 --- a/src/Model/DepositRequest.php +++ b/src/Model/DepositRequest.php @@ -77,6 +77,9 @@ public function __construct(array $data = []) if (array_key_exists('notificationUrl', $data)) { $this->setNotificationUrl($data['notificationUrl']); } + if (array_key_exists('cashierToken', $data)) { + $this->setCashierToken($data['cashierToken']); + } if (array_key_exists('customFields', $data)) { $this->setCustomFields($data['customFields']); } @@ -260,6 +263,11 @@ public function setNotificationUrl(null|string $notificationUrl): static return $this; } + public function getCashierToken(): ?string + { + return $this->fields['cashierToken'] ?? null; + } + public function getCustomFields(): ?array { return $this->fields['customFields'] ?? null; @@ -351,6 +359,9 @@ public function jsonSerialize(): array if (array_key_exists('notificationUrl', $this->fields)) { $data['notificationUrl'] = $this->fields['notificationUrl']; } + if (array_key_exists('cashierToken', $this->fields)) { + $data['cashierToken'] = $this->fields['cashierToken']; + } if (array_key_exists('customFields', $this->fields)) { $data['customFields'] = $this->fields['customFields']; } @@ -413,6 +424,13 @@ private function setProperties(null|array $properties): static return $this; } + private function setCashierToken(null|string $cashierToken): static + { + $this->fields['cashierToken'] = $cashierToken; + + return $this; + } + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static { if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { diff --git a/src/Model/Paysafe.php b/src/Model/Paysafe.php index 1a1c4afed..f35b0e974 100644 --- a/src/Model/Paysafe.php +++ b/src/Model/Paysafe.php @@ -26,6 +26,9 @@ public function __construct(array $data = []) if (array_key_exists('credentials', $data)) { $this->setCredentials($data['credentials']); } + if (array_key_exists('threeDSecureServer', $data)) { + $this->setThreeDSecureServer($data['threeDSecureServer']); + } } public static function from(array $data = []): self @@ -49,12 +52,31 @@ public function setCredentials(PaysafeCredentials|array $credentials): static return $this; } + public function getThreeDSecureServer(): ?ThreeDSecureIO3dsServer + { + return $this->fields['threeDSecureServer'] ?? null; + } + + public function setThreeDSecureServer(null|ThreeDSecureIO3dsServer|array $threeDSecureServer): static + { + if ($threeDSecureServer !== null && !($threeDSecureServer instanceof ThreeDSecureIO3dsServer)) { + $threeDSecureServer = ThreeDSecureIO3dsServer::from($threeDSecureServer); + } + + $this->fields['threeDSecureServer'] = $threeDSecureServer; + + return $this; + } + public function jsonSerialize(): array { $data = []; if (array_key_exists('credentials', $this->fields)) { $data['credentials'] = $this->fields['credentials']->jsonSerialize(); } + if (array_key_exists('threeDSecureServer', $this->fields)) { + $data['threeDSecureServer'] = $this->fields['threeDSecureServer']?->jsonSerialize(); + } return parent::jsonSerialize() + $data; } diff --git a/src/Model/SchedulingMethodImmediately.php b/src/Model/SchedulingMethodImmediately.php index fad71ee0c..210b89717 100644 --- a/src/Model/SchedulingMethodImmediately.php +++ b/src/Model/SchedulingMethodImmediately.php @@ -13,7 +13,7 @@ namespace Rebilly\Sdk\Model; -class SchedulingMethodImmediately implements ServicePeriodAnchorInstruction, InvoiceRetryScheduleInstruction, SettlementPeriod, ScheduleInstruction +class SchedulingMethodImmediately implements InvoiceRetryScheduleInstruction, SettlementPeriod, ScheduleInstruction { public function __construct(array $data = []) { diff --git a/src/Model/ServicePeriodAnchorInstruction.php b/src/Model/ServicePeriodAnchorInstruction.php index 6c7f958fa..1b736f663 100644 --- a/src/Model/ServicePeriodAnchorInstruction.php +++ b/src/Model/ServicePeriodAnchorInstruction.php @@ -18,4 +18,8 @@ interface ServicePeriodAnchorInstruction extends JsonSerializable { public function getMethod(): string; + + public function getTime(): ?string; + + public function setTime(null|string $time): static; } diff --git a/src/Model/ServicePeriodAnchorInstructionFactory.php b/src/Model/ServicePeriodAnchorInstructionFactory.php index fcabe0945..e2c9e30fa 100644 --- a/src/Model/ServicePeriodAnchorInstructionFactory.php +++ b/src/Model/ServicePeriodAnchorInstructionFactory.php @@ -22,7 +22,6 @@ public static function from(array $data = []): ServicePeriodAnchorInstruction return match ($data['method']) { 'day-of-month' => SchedulingMethodDayOfMonth::from($data), 'day-of-week' => SchedulingMethodDayOfWeek::from($data), - 'immediately' => SchedulingMethodImmediately::from($data), default => throw new UnknownDiscriminatorValueException(), }; }