diff --git a/.changeset/big-dolls-hug.md b/.changeset/big-dolls-hug.md new file mode 100644 index 000000000..772c74c0f --- /dev/null +++ b/.changeset/big-dolls-hug.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(be, recomm, api-definitions): Add amount and currency filters for payout requests and allocations Rebilly/rebilly#21413 diff --git a/.changeset/chilled-falcons-complain.md b/.changeset/chilled-falcons-complain.md new file mode 100644 index 000000000..d1bde7532 --- /dev/null +++ b/.changeset/chilled-falcons-complain.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +build(deps): bump @redocly/cli from 2.30.3 to 2.30.4 in /website/api-definitions Rebilly/rebilly#21318 diff --git a/.changeset/dirty-insects-judge.md b/.changeset/dirty-insects-judge.md new file mode 100644 index 000000000..3423fdee6 --- /dev/null +++ b/.changeset/dirty-insects-judge.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +build(deps): bump es-toolkit from 1.46.0 to 1.46.1 in /website/api-definitions Rebilly/rebilly#21083 diff --git a/.changeset/fifty-yaks-perform.md b/.changeset/fifty-yaks-perform.md new file mode 100644 index 000000000..cbf0db3de --- /dev/null +++ b/.changeset/fifty-yaks-perform.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be, api-definitions): Add payoutRequest block to Website settings Rebilly/rebilly#21020 diff --git a/.changeset/five-pots-love.md b/.changeset/five-pots-love.md new file mode 100644 index 000000000..827dcd773 --- /dev/null +++ b/.changeset/five-pots-love.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(backend): KYC improve MRZ handling Rebilly/rebilly#19874 diff --git a/.changeset/fuzzy-seahorses-wait.md b/.changeset/fuzzy-seahorses-wait.md new file mode 100644 index 000000000..eaba18bc0 --- /dev/null +++ b/.changeset/fuzzy-seahorses-wait.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be, api-definitions): Remove deprecated field from payout request allocation Rebilly/rebilly#20999 diff --git a/.changeset/happy-lions-hug.md b/.changeset/happy-lions-hug.md new file mode 100644 index 000000000..d8da252b8 --- /dev/null +++ b/.changeset/happy-lions-hug.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(be, api-definitions): Change quotation credit memo invoice relation and add quote relation Rebilly/rebilly#20287 diff --git a/.changeset/honest-donkeys-explode.md b/.changeset/honest-donkeys-explode.md new file mode 100644 index 000000000..e45e66b58 --- /dev/null +++ b/.changeset/honest-donkeys-explode.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be,docs): Add visa to Wallet88 paymentCardMethod setting Rebilly/rebilly#21063 diff --git a/.changeset/moody-moose-smile.md b/.changeset/moody-moose-smile.md new file mode 100644 index 000000000..ed28ba97d --- /dev/null +++ b/.changeset/moody-moose-smile.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(doc, be, payment-gateways): Add level 2/3 data custom field and send to Adyen Rebilly/rebilly#21188 diff --git a/.changeset/nice-peas-fix.md b/.changeset/nice-peas-fix.md new file mode 100644 index 000000000..b460bab9e --- /dev/null +++ b/.changeset/nice-peas-fix.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +refactor(api-definitions): Remove status from PayoutRequestBatch definition Rebilly/rebilly#21375 diff --git a/.changeset/odd-melons-lick.md b/.changeset/odd-melons-lick.md new file mode 100644 index 000000000..3a9768565 --- /dev/null +++ b/.changeset/odd-melons-lick.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be): Add current period to recurring order Rebilly/rebilly#21461 diff --git a/.changeset/purple-dryers-tickle.md b/.changeset/purple-dryers-tickle.md new file mode 100644 index 000000000..1425503fd --- /dev/null +++ b/.changeset/purple-dryers-tickle.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(recomm, api-definitions, be): Remove deprecated payout request reversal statuses Rebilly/rebilly#20929 diff --git a/.changeset/rich-trees-drum.md b/.changeset/rich-trees-drum.md new file mode 100644 index 000000000..97c664624 --- /dev/null +++ b/.changeset/rich-trees-drum.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(regenerator): Make generated PHP SDK compatible with 8.4 Rebilly/rebilly#21311 diff --git a/.changeset/silent-bees-repeat.md b/.changeset/silent-bees-repeat.md new file mode 100644 index 000000000..0d3375583 --- /dev/null +++ b/.changeset/silent-bees-repeat.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +build(deps): bump @redocly/cli from 2.30.0 to 2.30.3 in /website/api-definitions Rebilly/rebilly#21081 diff --git a/.changeset/sixty-pandas-sell.md b/.changeset/sixty-pandas-sell.md new file mode 100644 index 000000000..0836c0502 --- /dev/null +++ b/.changeset/sixty-pandas-sell.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be,api-definitions): Remove EDD API Rebilly/rebilly#21118 diff --git a/.changeset/strong-ducks-juggle.md b/.changeset/strong-ducks-juggle.md new file mode 100644 index 000000000..a42d4d165 --- /dev/null +++ b/.changeset/strong-ducks-juggle.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +docs(website, api-defintions): Define acronyms Rebilly/rebilly#21017 diff --git a/.changeset/thirty-books-itch.md b/.changeset/thirty-books-itch.md new file mode 100644 index 000000000..af01cc716 --- /dev/null +++ b/.changeset/thirty-books-itch.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be,api-definitions,metadata): Migrate to a new EMS SFTP Rebilly/rebilly#21123 diff --git a/.changeset/three-eels-attend.md b/.changeset/three-eels-attend.md new file mode 100644 index 000000000..390c4312b --- /dev/null +++ b/.changeset/three-eels-attend.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +refactor(be, api-definitions): Add service period start and end times Rebilly/rebilly#21059 diff --git a/.changeset/tidy-impalas-wave.md b/.changeset/tidy-impalas-wave.md new file mode 100644 index 000000000..f8a6ea6f2 --- /dev/null +++ b/.changeset/tidy-impalas-wave.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be,docs): Support confirmation flow for Forced DCC Rebilly/rebilly#21007 diff --git a/.changeset/tough-bikes-join.md b/.changeset/tough-bikes-join.md new file mode 100644 index 000000000..a086d9264 --- /dev/null +++ b/.changeset/tough-bikes-join.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be, recomm): Add address editing for change/reactivation quotes Rebilly/rebilly#21250 diff --git a/.changeset/tough-mirrors-dream.md b/.changeset/tough-mirrors-dream.md new file mode 100644 index 000000000..f715e9412 --- /dev/null +++ b/.changeset/tough-mirrors-dream.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +refactor(be,api-definitions): remove partially-fulfilled payout status; drop legacy linkTransaction Rebilly/rebilly#20174 diff --git a/src/Api/CustomersApi.php b/src/Api/CustomersApi.php index 144987f99..24c3f5df8 100644 --- a/src/Api/CustomersApi.php +++ b/src/Api/CustomersApi.php @@ -22,9 +22,6 @@ use Rebilly\Sdk\Model\CustomerCreditBalance; use Rebilly\Sdk\Model\CustomerInformation; use Rebilly\Sdk\Model\CustomerTimeline; -use Rebilly\Sdk\Model\Edd; -use Rebilly\Sdk\Model\EddSearchResult; -use Rebilly\Sdk\Model\EddTimeline; use Rebilly\Sdk\Model\LeadSource; use Rebilly\Sdk\Paginator; @@ -206,61 +203,6 @@ public function getAllPaginator( ); } - /** - * @return Collection - */ - public function getAllEddSearchResults( - string $id, - ?int $limit = null, - ?int $offset = null, - ): Collection { - $pathParams = [ - '{id}' => $id, - ]; - - $queryParams = [ - 'limit' => $limit, - 'offset' => $offset, - ]; - $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/customers/{id}/edd-search-results?') . http_build_query($queryParams); - - $request = new Request('GET', $uri, headers: [ - 'Accept' => 'application/json', - ]); - $response = $this->client->send($request); - $data = Utils::jsonDecode((string) $response->getBody(), true); - - return new Collection( - array_map(fn (array $item): EddSearchResult => EddSearchResult::from($item, ['headers' => $response->getHeaders()]), $data), - (int) $response->getHeaderLine(Collection::HEADER_LIMIT), - (int) $response->getHeaderLine(Collection::HEADER_OFFSET), - (int) $response->getHeaderLine(Collection::HEADER_TOTAL), - [ - 'headers' => $response->getHeaders(), - ] - ); - } - - /** - * @return Paginator - */ - public function getAllEddSearchResultsPaginator( - string $id, - ?int $limit = null, - ?int $offset = null, - ): Paginator { - $closure = fn (?int $limit, ?int $offset): Collection => $this->getAllEddSearchResults( - id: $id, - limit: $limit, - offset: $offset, - ); - - return new Paginator( - $limit !== null || $offset !== null ? $closure(limit: $limit, offset: $offset) : null, - $closure, - ); - } - /** * @return Collection */ @@ -346,24 +288,6 @@ public function getCustomerCreditBalance( return CustomerCreditBalance::from($data, ['headers' => $response->getHeaders()]); } - public function getCustomerEddScore( - string $id, - ): Edd { - $pathParams = [ - '{id}' => $id, - ]; - - $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/customers/{id}/edd-score'); - - $request = new Request('GET', $uri, headers: [ - 'Accept' => 'application/json', - ]); - $response = $this->client->send($request); - $data = Utils::jsonDecode((string) $response->getBody(), true); - - return Edd::from($data, ['headers' => $response->getHeaders()]); - } - public function getCustomerLifetimeSummaryMetrics( string $customerId, ): CustomerInformation { @@ -382,113 +306,6 @@ public function getCustomerLifetimeSummaryMetrics( return CustomerInformation::from($data, ['headers' => $response->getHeaders()]); } - public function getEddSearchResult( - string $id, - string $searchResultId, - ): EddSearchResult { - $pathParams = [ - '{id}' => $id, - '{searchResultId}' => $searchResultId, - ]; - - $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/customers/{id}/edd-search-results/{searchResultId}'); - - $request = new Request('GET', $uri, headers: [ - 'Accept' => 'application/json', - ]); - $response = $this->client->send($request); - $data = Utils::jsonDecode((string) $response->getBody(), true); - - return EddSearchResult::from($data, ['headers' => $response->getHeaders()]); - } - - /** - * @return Collection - */ - public function getEddTimelineCollection( - string $id, - ?int $limit = null, - ?int $offset = null, - ?string $filter = null, - ?array $sort = null, - ?string $q = null, - ): Collection { - $pathParams = [ - '{id}' => $id, - ]; - - $queryParams = [ - 'limit' => $limit, - 'offset' => $offset, - 'filter' => $filter, - 'sort' => $sort ? implode(',', $sort) : null, - 'q' => $q, - ]; - $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/customers/{id}/edd-timeline?') . http_build_query($queryParams); - - $request = new Request('GET', $uri, headers: [ - 'Accept' => 'application/json', - ]); - $response = $this->client->send($request); - $data = Utils::jsonDecode((string) $response->getBody(), true); - - return new Collection( - array_map(fn (array $item): EddTimeline => EddTimeline::from($item, ['headers' => $response->getHeaders()]), $data), - (int) $response->getHeaderLine(Collection::HEADER_LIMIT), - (int) $response->getHeaderLine(Collection::HEADER_OFFSET), - (int) $response->getHeaderLine(Collection::HEADER_TOTAL), - [ - 'headers' => $response->getHeaders(), - ] - ); - } - - /** - * @return Paginator - */ - public function getEddTimelineCollectionPaginator( - string $id, - ?int $limit = null, - ?int $offset = null, - ?string $filter = null, - ?array $sort = null, - ?string $q = null, - ): Paginator { - $closure = fn (?int $limit, ?int $offset): Collection => $this->getEddTimelineCollection( - id: $id, - limit: $limit, - offset: $offset, - filter: $filter, - sort: $sort, - q: $q, - ); - - return new Paginator( - $limit !== null || $offset !== null ? $closure(limit: $limit, offset: $offset) : null, - $closure, - ); - } - - public function getEddTimelineMessage( - string $id, - string $messageId, - ): EddTimeline { - $pathParams = [ - '{id}' => $id, - '{messageId}' => $messageId, - ]; - - $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/customers/{id}/edd-timeline/{messageId}'); - - $request = new Request('GET', $uri, headers: [ - 'Accept' => 'application/json', - ]); - $response = $this->client->send($request); - $data = Utils::jsonDecode((string) $response->getBody(), true); - - return EddTimeline::from($data, ['headers' => $response->getHeaders()]); - } - public function getLeadSource( string $id, ): LeadSource { diff --git a/src/Model/AdyenSettings.php b/src/Model/AdyenSettings.php index b9c2fede8..fbdef9990 100644 --- a/src/Model/AdyenSettings.php +++ b/src/Model/AdyenSettings.php @@ -43,6 +43,9 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('riskProfile', $data)) { $this->setRiskProfile($data['riskProfile']); } + if (array_key_exists('levelTwoThreeDataCustomField', $data)) { + $this->setLevelTwoThreeDataCustomField($data['levelTwoThreeDataCustomField']); + } $this->setMetadata($metadata); } @@ -138,6 +141,18 @@ public function setRiskProfile(null|string $riskProfile): static return $this; } + public function getLevelTwoThreeDataCustomField(): ?string + { + return $this->fields['levelTwoThreeDataCustomField'] ?? null; + } + + public function setLevelTwoThreeDataCustomField(null|string $levelTwoThreeDataCustomField): static + { + $this->fields['levelTwoThreeDataCustomField'] = $levelTwoThreeDataCustomField; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -164,6 +179,9 @@ public function jsonSerialize(): array if (array_key_exists('riskProfile', $this->fields)) { $data['riskProfile'] = $this->fields['riskProfile']; } + if (array_key_exists('levelTwoThreeDataCustomField', $this->fields)) { + $data['levelTwoThreeDataCustomField'] = $this->fields['levelTwoThreeDataCustomField']; + } return $data; } diff --git a/src/Model/Attachment.php b/src/Model/Attachment.php index b1f78611b..92370d772 100644 --- a/src/Model/Attachment.php +++ b/src/Model/Attachment.php @@ -27,8 +27,6 @@ class Attachment implements JsonSerializable public const RELATED_TYPE_CUSTOMER_TIMELINE_COMMENT = 'customer-timeline-comment'; - public const RELATED_TYPE_CUSTOMER_EDD_TIMELINE_COMMENT = 'customer-edd-timeline-comment'; - public const RELATED_TYPE_DISPUTE = 'dispute'; public const RELATED_TYPE_GATEWAY_TIMELINE_COMMENT = 'gateway-timeline-comment'; diff --git a/src/Model/ChangeQuoteOrder.php b/src/Model/ChangeQuoteOrder.php index 74fc3422d..0a218bfe6 100644 --- a/src/Model/ChangeQuoteOrder.php +++ b/src/Model/ChangeQuoteOrder.php @@ -61,6 +61,12 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('shipping', $data)) { $this->setShipping($data['shipping']); } + if (array_key_exists('deliveryAddress', $data)) { + $this->setDeliveryAddress($data['deliveryAddress']); + } + if (array_key_exists('billingAddress', $data)) { + $this->setBillingAddress($data['billingAddress']); + } $this->setMetadata($metadata); } @@ -219,6 +225,38 @@ public function setShipping(null|Shipping|array $shipping): static return $this; } + public function getDeliveryAddress(): ?ContactObject + { + return $this->fields['deliveryAddress'] ?? null; + } + + public function setDeliveryAddress(null|ContactObject|array $deliveryAddress): static + { + if ($deliveryAddress !== null && !($deliveryAddress instanceof ContactObject)) { + $deliveryAddress = ContactObject::from($deliveryAddress); + } + + $this->fields['deliveryAddress'] = $deliveryAddress; + + return $this; + } + + public function getBillingAddress(): ?ContactObject + { + return $this->fields['billingAddress'] ?? null; + } + + public function setBillingAddress(null|ContactObject|array $billingAddress): static + { + if ($billingAddress !== null && !($billingAddress instanceof ContactObject)) { + $billingAddress = ContactObject::from($billingAddress); + } + + $this->fields['billingAddress'] = $billingAddress; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -260,6 +298,12 @@ public function jsonSerialize(): array if (array_key_exists('shipping', $this->fields)) { $data['shipping'] = $this->fields['shipping']?->jsonSerialize(); } + if (array_key_exists('deliveryAddress', $this->fields)) { + $data['deliveryAddress'] = $this->fields['deliveryAddress']?->jsonSerialize(); + } + if (array_key_exists('billingAddress', $this->fields)) { + $data['billingAddress'] = $this->fields['billingAddress']?->jsonSerialize(); + } return $data; } diff --git a/src/Model/CreditMemo.php b/src/Model/CreditMemo.php index a47e792b9..8017a444f 100644 --- a/src/Model/CreditMemo.php +++ b/src/Model/CreditMemo.php @@ -104,6 +104,9 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('invoiceId', $data)) { $this->setInvoiceId($data['invoiceId']); } + if (array_key_exists('quoteId', $data)) { + $this->setQuoteId($data['quoteId']); + } if (array_key_exists('createdTime', $data)) { $this->setCreatedTime($data['createdTime']); } @@ -274,6 +277,11 @@ public function setInvoiceId(null|string $invoiceId): static return $this; } + public function getQuoteId(): ?string + { + return $this->fields['quoteId'] ?? null; + } + public function getCreatedTime(): ?DateTimeImmutable { return $this->fields['createdTime'] ?? null; @@ -361,6 +369,9 @@ public function jsonSerialize(): array if (array_key_exists('invoiceId', $this->fields)) { $data['invoiceId'] = $this->fields['invoiceId']; } + if (array_key_exists('quoteId', $this->fields)) { + $data['quoteId'] = $this->fields['quoteId']; + } if (array_key_exists('createdTime', $this->fields)) { $data['createdTime'] = $this->fields['createdTime']?->format(DateTimeInterface::RFC3339); } @@ -443,6 +454,13 @@ private function setRevision(null|int $revision): static return $this; } + private function setQuoteId(null|string $quoteId): static + { + $this->fields['quoteId'] = $quoteId; + + return $this; + } + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static { if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { diff --git a/src/Model/Customer.php b/src/Model/Customer.php index e41f29f82..0b03c731c 100644 --- a/src/Model/Customer.php +++ b/src/Model/Customer.php @@ -87,9 +87,6 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('revision', $data)) { $this->setRevision($data['revision']); } - if (array_key_exists('isEddRequired', $data)) { - $this->setIsEddRequired($data['isEddRequired']); - } if (array_key_exists('hasFulfilledKyc', $data)) { $this->setHasFulfilledKyc($data['hasFulfilledKyc']); } @@ -311,18 +308,6 @@ public function getRevision(): ?int return $this->fields['revision'] ?? null; } - public function getIsEddRequired(): ?bool - { - return $this->fields['isEddRequired'] ?? null; - } - - public function setIsEddRequired(null|bool $isEddRequired): static - { - $this->fields['isEddRequired'] = $isEddRequired; - - return $this; - } - public function getHasFulfilledKyc(): ?bool { return $this->fields['hasFulfilledKyc'] ?? null; @@ -506,9 +491,6 @@ public function jsonSerialize(): array if (array_key_exists('revision', $this->fields)) { $data['revision'] = $this->fields['revision']; } - if (array_key_exists('isEddRequired', $this->fields)) { - $data['isEddRequired'] = $this->fields['isEddRequired']; - } if (array_key_exists('hasFulfilledKyc', $this->fields)) { $data['hasFulfilledKyc'] = $this->fields['hasFulfilledKyc']; } diff --git a/src/Model/EMSCredentials.php b/src/Model/EMSCredentials.php index d0ebc8289..e9e5e2798 100644 --- a/src/Model/EMSCredentials.php +++ b/src/Model/EMSCredentials.php @@ -52,9 +52,18 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('merchantName', $data)) { $this->setMerchantName($data['merchantName']); } + if (array_key_exists('sftpUsername', $data)) { + $this->setSftpUsername($data['sftpUsername']); + } + if (array_key_exists('sftpPassword', $data)) { + $this->setSftpPassword($data['sftpPassword']); + } if (array_key_exists('sftpPrivateKey', $data)) { $this->setSftpPrivateKey($data['sftpPrivateKey']); } + if (array_key_exists('sftpKeyPassphrase', $data)) { + $this->setSftpKeyPassphrase($data['sftpKeyPassphrase']); + } $this->setMetadata($metadata); } @@ -171,6 +180,30 @@ public function setMerchantName(null|string $merchantName): static return $this; } + public function getSftpUsername(): ?string + { + return $this->fields['sftpUsername'] ?? null; + } + + public function setSftpUsername(null|string $sftpUsername): static + { + $this->fields['sftpUsername'] = $sftpUsername; + + return $this; + } + + public function getSftpPassword(): ?string + { + return $this->fields['sftpPassword'] ?? null; + } + + public function setSftpPassword(null|string $sftpPassword): static + { + $this->fields['sftpPassword'] = $sftpPassword; + + return $this; + } + public function getSftpPrivateKey(): ?string { return $this->fields['sftpPrivateKey'] ?? null; @@ -183,6 +216,18 @@ public function setSftpPrivateKey(null|string $sftpPrivateKey): static return $this; } + public function getSftpKeyPassphrase(): ?string + { + return $this->fields['sftpKeyPassphrase'] ?? null; + } + + public function setSftpKeyPassphrase(null|string $sftpKeyPassphrase): static + { + $this->fields['sftpKeyPassphrase'] = $sftpKeyPassphrase; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -213,9 +258,18 @@ public function jsonSerialize(): array if (array_key_exists('merchantName', $this->fields)) { $data['merchantName'] = $this->fields['merchantName']; } + if (array_key_exists('sftpUsername', $this->fields)) { + $data['sftpUsername'] = $this->fields['sftpUsername']; + } + if (array_key_exists('sftpPassword', $this->fields)) { + $data['sftpPassword'] = $this->fields['sftpPassword']; + } if (array_key_exists('sftpPrivateKey', $this->fields)) { $data['sftpPrivateKey'] = $this->fields['sftpPrivateKey']; } + if (array_key_exists('sftpKeyPassphrase', $this->fields)) { + $data['sftpKeyPassphrase'] = $this->fields['sftpKeyPassphrase']; + } return $data; } diff --git a/src/Model/Edd.php b/src/Model/Edd.php deleted file mode 100644 index 92e620e85..000000000 --- a/src/Model/Edd.php +++ /dev/null @@ -1,188 +0,0 @@ -setParsedScore($data['parsedScore']); - } - if (array_key_exists('score', $data)) { - $this->setScore($data['score']); - } - if (array_key_exists('nextUpdateTime', $data)) { - $this->setNextUpdateTime($data['nextUpdateTime']); - } - if (array_key_exists('createdTime', $data)) { - $this->setCreatedTime($data['createdTime']); - } - if (array_key_exists('updatedTime', $data)) { - $this->setUpdatedTime($data['updatedTime']); - } - if (array_key_exists('_links', $data)) { - $this->setLinks($data['_links']); - } - $this->setMetadata($metadata); - } - - public static function from(array $data = [], array $metadata = []): self - { - return new self($data, $metadata); - } - - public function getParsedScore(): ?EddParsedScore - { - return $this->fields['parsedScore'] ?? null; - } - - public function setParsedScore(null|EddParsedScore|array $parsedScore): static - { - if ($parsedScore !== null && !($parsedScore instanceof EddParsedScore)) { - $parsedScore = EddParsedScore::from($parsedScore); - } - - $this->fields['parsedScore'] = $parsedScore; - - return $this; - } - - public function getScore(): ?EddScore - { - return $this->fields['score'] ?? null; - } - - public function setScore(null|EddScore|array $score): static - { - if ($score !== null && !($score instanceof EddScore)) { - $score = EddScore::from($score); - } - - $this->fields['score'] = $score; - - return $this; - } - - public function getNextUpdateTime(): ?DateTimeImmutable - { - return $this->fields['nextUpdateTime'] ?? null; - } - - public function setNextUpdateTime(null|DateTimeImmutable|string $nextUpdateTime): static - { - if ($nextUpdateTime !== null && !($nextUpdateTime instanceof DateTimeImmutable)) { - $nextUpdateTime = new DateTimeImmutable($nextUpdateTime); - } - - $this->fields['nextUpdateTime'] = $nextUpdateTime; - - return $this; - } - - public function getCreatedTime(): ?DateTimeImmutable - { - return $this->fields['createdTime'] ?? null; - } - - public function getUpdatedTime(): ?DateTimeImmutable - { - return $this->fields['updatedTime'] ?? null; - } - - /** - * @return null|ResourceLink[] - */ - public function getLinks(): ?array - { - return $this->fields['_links'] ?? null; - } - - public function jsonSerialize(): array - { - $data = []; - if (array_key_exists('parsedScore', $this->fields)) { - $data['parsedScore'] = $this->fields['parsedScore']?->jsonSerialize(); - } - if (array_key_exists('score', $this->fields)) { - $data['score'] = $this->fields['score']?->jsonSerialize(); - } - if (array_key_exists('nextUpdateTime', $this->fields)) { - $data['nextUpdateTime'] = $this->fields['nextUpdateTime']?->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('_links', $this->fields)) { - $data['_links'] = $this->fields['_links'] !== null - ? array_map( - static fn (ResourceLink $resourceLink) => $resourceLink->jsonSerialize(), - $this->fields['_links'], - ) - : null; - } - - return $data; - } - - 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 - */ - private function setLinks(null|array $links): static - { - $links = $links !== null ? array_map( - fn ($value) => $value instanceof ResourceLink ? $value : ResourceLink::from($value), - $links, - ) : null; - - $this->fields['_links'] = $links; - - return $this; - } -} diff --git a/src/Model/EddParsedScore.php b/src/Model/EddParsedScore.php deleted file mode 100644 index 0221e3645..000000000 --- a/src/Model/EddParsedScore.php +++ /dev/null @@ -1,242 +0,0 @@ -setOccupation($data['occupation']); - } - if (array_key_exists('arrest', $data)) { - $this->setArrest($data['arrest']); - } - if (array_key_exists('bankruptcy', $data)) { - $this->setBankruptcy($data['bankruptcy']); - } - if (array_key_exists('fraud', $data)) { - $this->setFraud($data['fraud']); - } - if (array_key_exists('occupationDetails', $data)) { - $this->setOccupationDetails($data['occupationDetails']); - } - if (array_key_exists('arrestDetails', $data)) { - $this->setArrestDetails($data['arrestDetails']); - } - if (array_key_exists('bankruptcyDetails', $data)) { - $this->setBankruptcyDetails($data['bankruptcyDetails']); - } - if (array_key_exists('fraudDetails', $data)) { - $this->setFraudDetails($data['fraudDetails']); - } - $this->setMetadata($metadata); - } - - public static function from(array $data = [], array $metadata = []): self - { - return new self($data, $metadata); - } - - public function getOccupation(): ?string - { - return $this->fields['occupation'] ?? null; - } - - public function setOccupation(null|string $occupation): static - { - $this->fields['occupation'] = $occupation; - - return $this; - } - - public function getArrest(): ?string - { - return $this->fields['arrest'] ?? null; - } - - public function setArrest(null|string $arrest): static - { - $this->fields['arrest'] = $arrest; - - return $this; - } - - public function getBankruptcy(): ?string - { - return $this->fields['bankruptcy'] ?? null; - } - - public function setBankruptcy(null|string $bankruptcy): static - { - $this->fields['bankruptcy'] = $bankruptcy; - - return $this; - } - - public function getFraud(): ?string - { - return $this->fields['fraud'] ?? null; - } - - public function setFraud(null|string $fraud): static - { - $this->fields['fraud'] = $fraud; - - return $this; - } - - public function getOccupationDetails(): ?EddScoreDetails - { - return $this->fields['occupationDetails'] ?? null; - } - - public function setOccupationDetails(null|EddScoreDetails|array $occupationDetails): static - { - if ($occupationDetails !== null && !($occupationDetails instanceof EddScoreDetails)) { - $occupationDetails = EddScoreDetails::from($occupationDetails); - } - - $this->fields['occupationDetails'] = $occupationDetails; - - return $this; - } - - public function getArrestDetails(): ?EddScoreDetails - { - return $this->fields['arrestDetails'] ?? null; - } - - public function setArrestDetails(null|EddScoreDetails|array $arrestDetails): static - { - if ($arrestDetails !== null && !($arrestDetails instanceof EddScoreDetails)) { - $arrestDetails = EddScoreDetails::from($arrestDetails); - } - - $this->fields['arrestDetails'] = $arrestDetails; - - return $this; - } - - public function getBankruptcyDetails(): ?EddScoreDetails - { - return $this->fields['bankruptcyDetails'] ?? null; - } - - public function setBankruptcyDetails(null|EddScoreDetails|array $bankruptcyDetails): static - { - if ($bankruptcyDetails !== null && !($bankruptcyDetails instanceof EddScoreDetails)) { - $bankruptcyDetails = EddScoreDetails::from($bankruptcyDetails); - } - - $this->fields['bankruptcyDetails'] = $bankruptcyDetails; - - return $this; - } - - public function getFraudDetails(): ?EddScoreDetails - { - return $this->fields['fraudDetails'] ?? null; - } - - public function setFraudDetails(null|EddScoreDetails|array $fraudDetails): static - { - if ($fraudDetails !== null && !($fraudDetails instanceof EddScoreDetails)) { - $fraudDetails = EddScoreDetails::from($fraudDetails); - } - - $this->fields['fraudDetails'] = $fraudDetails; - - return $this; - } - - public function jsonSerialize(): array - { - $data = []; - if (array_key_exists('occupation', $this->fields)) { - $data['occupation'] = $this->fields['occupation']; - } - if (array_key_exists('arrest', $this->fields)) { - $data['arrest'] = $this->fields['arrest']; - } - if (array_key_exists('bankruptcy', $this->fields)) { - $data['bankruptcy'] = $this->fields['bankruptcy']; - } - if (array_key_exists('fraud', $this->fields)) { - $data['fraud'] = $this->fields['fraud']; - } - if (array_key_exists('occupationDetails', $this->fields)) { - $data['occupationDetails'] = $this->fields['occupationDetails']?->jsonSerialize(); - } - if (array_key_exists('arrestDetails', $this->fields)) { - $data['arrestDetails'] = $this->fields['arrestDetails']?->jsonSerialize(); - } - if (array_key_exists('bankruptcyDetails', $this->fields)) { - $data['bankruptcyDetails'] = $this->fields['bankruptcyDetails']?->jsonSerialize(); - } - if (array_key_exists('fraudDetails', $this->fields)) { - $data['fraudDetails'] = $this->fields['fraudDetails']?->jsonSerialize(); - } - - return $data; - } -} diff --git a/src/Model/EddScore.php b/src/Model/EddScore.php deleted file mode 100644 index 628862893..000000000 --- a/src/Model/EddScore.php +++ /dev/null @@ -1,154 +0,0 @@ -setOccupation($data['occupation']); - } - if (array_key_exists('arrest', $data)) { - $this->setArrest($data['arrest']); - } - if (array_key_exists('bankruptcy', $data)) { - $this->setBankruptcy($data['bankruptcy']); - } - if (array_key_exists('fraud', $data)) { - $this->setFraud($data['fraud']); - } - $this->setMetadata($metadata); - } - - public static function from(array $data = [], array $metadata = []): self - { - return new self($data, $metadata); - } - - public function getOccupation(): ?string - { - return $this->fields['occupation'] ?? null; - } - - public function setOccupation(null|string $occupation): static - { - $this->fields['occupation'] = $occupation; - - return $this; - } - - public function getArrest(): ?string - { - return $this->fields['arrest'] ?? null; - } - - public function setArrest(null|string $arrest): static - { - $this->fields['arrest'] = $arrest; - - return $this; - } - - public function getBankruptcy(): ?string - { - return $this->fields['bankruptcy'] ?? null; - } - - public function setBankruptcy(null|string $bankruptcy): static - { - $this->fields['bankruptcy'] = $bankruptcy; - - return $this; - } - - public function getFraud(): ?string - { - return $this->fields['fraud'] ?? null; - } - - public function setFraud(null|string $fraud): static - { - $this->fields['fraud'] = $fraud; - - return $this; - } - - public function jsonSerialize(): array - { - $data = []; - if (array_key_exists('occupation', $this->fields)) { - $data['occupation'] = $this->fields['occupation']; - } - if (array_key_exists('arrest', $this->fields)) { - $data['arrest'] = $this->fields['arrest']; - } - if (array_key_exists('bankruptcy', $this->fields)) { - $data['bankruptcy'] = $this->fields['bankruptcy']; - } - if (array_key_exists('fraud', $this->fields)) { - $data['fraud'] = $this->fields['fraud']; - } - - return $data; - } -} diff --git a/src/Model/EddScoreDetails.php b/src/Model/EddScoreDetails.php deleted file mode 100644 index 83f7294ab..000000000 --- a/src/Model/EddScoreDetails.php +++ /dev/null @@ -1,78 +0,0 @@ -setUrl($data['url']); - } - if (array_key_exists('details', $data)) { - $this->setDetails($data['details']); - } - $this->setMetadata($metadata); - } - - public static function from(array $data = [], array $metadata = []): self - { - return new self($data, $metadata); - } - - public function getUrl(): ?string - { - return $this->fields['url'] ?? null; - } - - public function setUrl(null|string $url): static - { - $this->fields['url'] = $url; - - return $this; - } - - public function getDetails(): ?string - { - return $this->fields['details'] ?? null; - } - - public function setDetails(null|string $details): static - { - $this->fields['details'] = $details; - - return $this; - } - - public function jsonSerialize(): array - { - $data = []; - if (array_key_exists('url', $this->fields)) { - $data['url'] = $this->fields['url']; - } - if (array_key_exists('details', $this->fields)) { - $data['details'] = $this->fields['details']; - } - - return $data; - } -} diff --git a/src/Model/EddSearchResult.php b/src/Model/EddSearchResult.php deleted file mode 100644 index 677513af5..000000000 --- a/src/Model/EddSearchResult.php +++ /dev/null @@ -1,166 +0,0 @@ -setId($data['id']); - } - if (array_key_exists('type', $data)) { - $this->setType($data['type']); - } - if (array_key_exists('searchResultData', $data)) { - $this->setSearchResultData($data['searchResultData']); - } - if (array_key_exists('createdTime', $data)) { - $this->setCreatedTime($data['createdTime']); - } - if (array_key_exists('updatedTime', $data)) { - $this->setUpdatedTime($data['updatedTime']); - } - $this->setMetadata($metadata); - } - - public static function from(array $data = [], array $metadata = []): self - { - return new self($data, $metadata); - } - - public function getId(): ?string - { - return $this->fields['id'] ?? null; - } - - public function getType(): ?string - { - return $this->fields['type'] ?? null; - } - - /** - * @return null|EddScoreDetails[] - */ - public function getSearchResultData(): ?array - { - return $this->fields['searchResultData'] ?? null; - } - - public function getCreatedTime(): ?DateTimeImmutable - { - return $this->fields['createdTime'] ?? null; - } - - public function getUpdatedTime(): ?DateTimeImmutable - { - return $this->fields['updatedTime'] ?? null; - } - - public function jsonSerialize(): array - { - $data = []; - if (array_key_exists('id', $this->fields)) { - $data['id'] = $this->fields['id']; - } - if (array_key_exists('type', $this->fields)) { - $data['type'] = $this->fields['type']; - } - if (array_key_exists('searchResultData', $this->fields)) { - $data['searchResultData'] = $this->fields['searchResultData'] !== null - ? array_map( - static fn (EddScoreDetails $eddScoreDetails) => $eddScoreDetails->jsonSerialize(), - $this->fields['searchResultData'], - ) - : null; - } - 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); - } - - return $data; - } - - private function setId(null|string $id): static - { - $this->fields['id'] = $id; - - return $this; - } - - private function setType(null|string $type): static - { - $this->fields['type'] = $type; - - return $this; - } - - /** - * @param null|array[]|EddScoreDetails[] $searchResultData - */ - private function setSearchResultData(null|array $searchResultData): static - { - $searchResultData = $searchResultData !== null ? array_map( - fn ($value) => $value instanceof EddScoreDetails ? $value : EddScoreDetails::from($value), - $searchResultData, - ) : null; - - $this->fields['searchResultData'] = $searchResultData; - - 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; - } -} diff --git a/src/Model/EddTimeline.php b/src/Model/EddTimeline.php deleted file mode 100644 index 1949cd861..000000000 --- a/src/Model/EddTimeline.php +++ /dev/null @@ -1,206 +0,0 @@ -setId($data['id']); - } - if (array_key_exists('type', $data)) { - $this->setType($data['type']); - } - if (array_key_exists('triggeredBy', $data)) { - $this->setTriggeredBy($data['triggeredBy']); - } - if (array_key_exists('message', $data)) { - $this->setMessage($data['message']); - } - if (array_key_exists('extraData', $data)) { - $this->setExtraData($data['extraData']); - } - if (array_key_exists('occurredTime', $data)) { - $this->setOccurredTime($data['occurredTime']); - } - if (array_key_exists('_links', $data)) { - $this->setLinks($data['_links']); - } - $this->setMetadata($metadata); - } - - public static function from(array $data = [], array $metadata = []): self - { - return new self($data, $metadata); - } - - public function getId(): ?string - { - return $this->fields['id'] ?? null; - } - - public function getType(): ?string - { - return $this->fields['type'] ?? null; - } - - public function getTriggeredBy(): ?string - { - return $this->fields['triggeredBy'] ?? null; - } - - public function getMessage(): ?string - { - return $this->fields['message'] ?? null; - } - - public function setMessage(null|string $message): static - { - $this->fields['message'] = $message; - - return $this; - } - - public function getExtraData(): ?TimelineExtraData - { - return $this->fields['extraData'] ?? null; - } - - public function setExtraData(null|TimelineExtraData|array $extraData): static - { - if ($extraData !== null && !($extraData instanceof TimelineExtraData)) { - $extraData = TimelineExtraData::from($extraData); - } - - $this->fields['extraData'] = $extraData; - - return $this; - } - - public function getOccurredTime(): ?DateTimeImmutable - { - return $this->fields['occurredTime'] ?? null; - } - - /** - * @return null|ResourceLink[] - */ - public function getLinks(): ?array - { - return $this->fields['_links'] ?? null; - } - - public function jsonSerialize(): array - { - $data = []; - if (array_key_exists('id', $this->fields)) { - $data['id'] = $this->fields['id']; - } - if (array_key_exists('type', $this->fields)) { - $data['type'] = $this->fields['type']; - } - if (array_key_exists('triggeredBy', $this->fields)) { - $data['triggeredBy'] = $this->fields['triggeredBy']; - } - if (array_key_exists('message', $this->fields)) { - $data['message'] = $this->fields['message']; - } - if (array_key_exists('extraData', $this->fields)) { - $data['extraData'] = $this->fields['extraData']?->jsonSerialize(); - } - if (array_key_exists('occurredTime', $this->fields)) { - $data['occurredTime'] = $this->fields['occurredTime']?->format(DateTimeInterface::RFC3339); - } - if (array_key_exists('_links', $this->fields)) { - $data['_links'] = $this->fields['_links'] !== null - ? array_map( - static fn (ResourceLink $resourceLink) => $resourceLink->jsonSerialize(), - $this->fields['_links'], - ) - : null; - } - - return $data; - } - - private function setId(null|string $id): static - { - $this->fields['id'] = $id; - - return $this; - } - - private function setType(null|string $type): static - { - $this->fields['type'] = $type; - - return $this; - } - - private function setTriggeredBy(null|string $triggeredBy): static - { - $this->fields['triggeredBy'] = $triggeredBy; - - return $this; - } - - private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): static - { - if ($occurredTime !== null && !($occurredTime instanceof DateTimeImmutable)) { - $occurredTime = new DateTimeImmutable($occurredTime); - } - - $this->fields['occurredTime'] = $occurredTime; - - return $this; - } - - /** - * @param null|array[]|ResourceLink[] $links - */ - private function setLinks(null|array $links): static - { - $links = $links !== null ? array_map( - fn ($value) => $value instanceof ResourceLink ? $value : ResourceLink::from($value), - $links, - ) : null; - - $this->fields['_links'] = $links; - - return $this; - } -} diff --git a/src/Model/GatewayAccount.php b/src/Model/GatewayAccount.php index 52e804e8e..c23f33ad3 100644 --- a/src/Model/GatewayAccount.php +++ b/src/Model/GatewayAccount.php @@ -1372,6 +1372,9 @@ protected function __construct(array $data = [], array $metadata = []) if (array_key_exists('dccForceCurrency', $data)) { $this->setDccForceCurrency($data['dccForceCurrency']); } + if (array_key_exists('dccForceConfirmation', $data)) { + $this->setDccForceConfirmation($data['dccForceConfirmation']); + } if (array_key_exists('dccForceRounding', $data)) { $this->setDccForceRounding($data['dccForceRounding']); } @@ -2020,6 +2023,18 @@ public function setDccForceCurrency(null|string $dccForceCurrency): static return $this; } + public function getDccForceConfirmation(): ?bool + { + return $this->fields['dccForceConfirmation'] ?? null; + } + + public function setDccForceConfirmation(null|bool $dccForceConfirmation): static + { + $this->fields['dccForceConfirmation'] = $dccForceConfirmation; + + return $this; + } + public function getDccForceRounding(): ?bool { return $this->fields['dccForceRounding'] ?? null; @@ -2316,6 +2331,9 @@ public function jsonSerialize(): array if (array_key_exists('dccForceCurrency', $this->fields)) { $data['dccForceCurrency'] = $this->fields['dccForceCurrency']; } + if (array_key_exists('dccForceConfirmation', $this->fields)) { + $data['dccForceConfirmation'] = $this->fields['dccForceConfirmation']; + } if (array_key_exists('dccForceRounding', $this->fields)) { $data['dccForceRounding'] = $this->fields['dccForceRounding']; } diff --git a/src/Model/KycIdentityMatches.php b/src/Model/KycIdentityMatches.php index 4875b163c..bb0524903 100644 --- a/src/Model/KycIdentityMatches.php +++ b/src/Model/KycIdentityMatches.php @@ -122,6 +122,12 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('documentNumber', $data)) { $this->setDocumentNumber($data['documentNumber']); } + if (array_key_exists('sex', $data)) { + $this->setSex($data['sex']); + } + if (array_key_exists('mrzChecksumValid', $data)) { + $this->setMrzChecksumValid($data['mrzChecksumValid']); + } if (array_key_exists('documentSubtype', $data)) { $this->setDocumentSubtype($data['documentSubtype']); } @@ -320,6 +326,23 @@ public function setDocumentNumber(null|string $documentNumber): static return $this; } + public function getSex(): ?string + { + return $this->fields['sex'] ?? null; + } + + public function setSex(null|string $sex): static + { + $this->fields['sex'] = $sex; + + return $this; + } + + public function getMrzChecksumValid(): ?bool + { + return $this->fields['mrzChecksumValid'] ?? null; + } + public function getDocumentSubtype(): ?string { return $this->fields['documentSubtype'] ?? null; @@ -446,6 +469,12 @@ public function jsonSerialize(): array if (array_key_exists('documentNumber', $this->fields)) { $data['documentNumber'] = $this->fields['documentNumber']; } + if (array_key_exists('sex', $this->fields)) { + $data['sex'] = $this->fields['sex']; + } + if (array_key_exists('mrzChecksumValid', $this->fields)) { + $data['mrzChecksumValid'] = $this->fields['mrzChecksumValid']; + } if (array_key_exists('documentSubtype', $this->fields)) { $data['documentSubtype'] = $this->fields['documentSubtype']; } @@ -488,6 +517,13 @@ private function setHasMinimalAge(null|bool $hasMinimalAge): static return $this; } + private function setMrzChecksumValid(null|bool $mrzChecksumValid): static + { + $this->fields['mrzChecksumValid'] = $mrzChecksumValid; + + return $this; + } + private function setHasCompletedFaceLiveness(null|bool $hasCompletedFaceLiveness): static { $this->fields['hasCompletedFaceLiveness'] = $hasCompletedFaceLiveness; diff --git a/src/Model/KycSettingsIdentityWeights.php b/src/Model/KycSettingsIdentityWeights.php index f5b11c280..cb3990f7c 100644 --- a/src/Model/KycSettingsIdentityWeights.php +++ b/src/Model/KycSettingsIdentityWeights.php @@ -67,6 +67,9 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('isPhotocopy', $data)) { $this->setIsPhotocopy($data['isPhotocopy']); } + if (array_key_exists('mrzChecksum', $data)) { + $this->setMrzChecksum($data['mrzChecksum']); + } $this->setMetadata($metadata); } @@ -243,6 +246,18 @@ public function setIsPhotocopy(null|int $isPhotocopy): static return $this; } + public function getMrzChecksum(): ?int + { + return $this->fields['mrzChecksum'] ?? null; + } + + public function setMrzChecksum(null|int $mrzChecksum): static + { + $this->fields['mrzChecksum'] = $mrzChecksum; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -288,6 +303,9 @@ public function jsonSerialize(): array if (array_key_exists('isPhotocopy', $this->fields)) { $data['isPhotocopy'] = $this->fields['isPhotocopy']; } + if (array_key_exists('mrzChecksum', $this->fields)) { + $data['mrzChecksum'] = $this->fields['mrzChecksum']; + } return $data; } diff --git a/src/Model/PayoutRequest.php b/src/Model/PayoutRequest.php index 3c673d891..c399e8ac1 100644 --- a/src/Model/PayoutRequest.php +++ b/src/Model/PayoutRequest.php @@ -31,18 +31,10 @@ class PayoutRequest implements JsonSerializable public const STATUS_IN_PROGRESS = 'in-progress'; - public const STATUS_PARTIALLY_FULFILLED = 'partially-fulfilled'; - public const STATUS_FULFILLED = 'fulfilled'; public const STATUS_CANCELED = 'canceled'; - public const STATUS_CUSTOMER_REVERSED = 'customer-reversed'; - - public const STATUS_SYSTEM_REVERSED = 'system-reversed'; - - public const STATUS_ADMIN_REVERSED = 'admin-reversed'; - public const STATUS_SPLIT = 'split'; public const STATUS_MERGED = 'merged'; diff --git a/src/Model/PayoutRequestAllocation.php b/src/Model/PayoutRequestAllocation.php index 5d8d2399a..8667430be 100644 --- a/src/Model/PayoutRequestAllocation.php +++ b/src/Model/PayoutRequestAllocation.php @@ -23,392 +23,6 @@ class PayoutRequestAllocation implements JsonSerializable { use HasMetadata; - public const METHOD_ADV_CASH = 'AdvCash'; - - public const METHOD_AERA = 'Aera'; - - public const METHOD_AFFIRM = 'Affirm'; - - public const METHOD_AFTERPAY = 'Afterpay'; - - public const METHOD_AIRCASH = 'Aircash'; - - public const METHOD_AIRPAY = 'Airpay'; - - public const METHOD_ALFA_CLICK = 'Alfa-click'; - - public const METHOD_ALIPAY = 'Alipay'; - - public const METHOD_AMAZON_PAY = 'AmazonPay'; - - public const METHOD_APPLE_PAY = 'Apple Pay'; - - public const METHOD_ASTRO_PAY_CARD = 'AstroPay Card'; - - public const METHOD_ASTRO_PAY_GO = 'AstroPay-GO'; - - public const METHOD_BANK_SEND = 'BankSEND'; - - public const METHOD_BANK_REFERENCED = 'BankReferenced'; - - public const METHOD_BANK_TRANSFER = 'bank-transfer'; - - public const METHOD_BANK_TRANSFER2 = 'bank-transfer-2'; - - public const METHOD_BANK_TRANSFER3 = 'bank-transfer-3'; - - public const METHOD_BANK_TRANSFER4 = 'bank-transfer-4'; - - public const METHOD_BANK_TRANSFER5 = 'bank-transfer-5'; - - public const METHOD_BANK_TRANSFER6 = 'bank-transfer-6'; - - public const METHOD_BANK_TRANSFER7 = 'bank-transfer-7'; - - public const METHOD_BANK_TRANSFER8 = 'bank-transfer-8'; - - public const METHOD_BANK_TRANSFER9 = 'bank-transfer-9'; - - public const METHOD_BALOTO = 'Baloto'; - - public const METHOD_BEELINE = 'Beeline'; - - public const METHOD_BELFIUS_DIRECT_NET = 'Belfius-direct-net'; - - public const METHOD_BITCOIN = 'bitcoin'; - - public const METHOD_BIZUM = 'Bizum'; - - public const METHOD_BLIK = 'Blik'; - - public const METHOD_BOLETO = 'Boleto'; - - public const METHOD_BOLETO2 = 'Boleto-2'; - - public const METHOD_BOLETO3 = 'Boleto-3'; - - public const METHOD_CASH_DEPOSIT = 'cash-deposit'; - - public const METHOD_CAS_HLIB = 'CASHlib'; - - public const METHOD_CASH_TO_CODE = 'CashToCode'; - - public const METHOD_CC_AVENUE = 'CCAvenue'; - - public const METHOD_CHINA_UNION_PAY = 'China UnionPay'; - - public const METHOD_CLEARPAY = 'Clearpay'; - - public const METHOD_CLEO = 'Cleo'; - - public const METHOD_COD_VOUCHER = 'CODVoucher'; - - public const METHOD_CONEKTA_OXXO = 'Conekta-oxxo'; - - public const METHOD_CONEKTA_SPEI = 'Conekta-spei'; - - public const METHOD_CRYPTOCURRENCY = 'cryptocurrency'; - - public const METHOD_CUPON_DE_PAGOS = 'Cupon-de-pagos'; - - public const METHOD_CYBER_SOURCE = 'CyberSource'; - - public const METHOD_DIMOCO_PAY_SMART = 'Dimoco-pay-smart'; - - public const METHOD_DIRECTA24_CARD = 'Directa24Card'; - - public const METHOD_DOMESTIC_CARDS = 'domestic-cards'; - - public const METHOD_EFECTY = 'Efecty'; - - public const METHOD_ECHECK = 'echeck'; - - public const METHOD_ECO_PAYZ = 'ecoPayz'; - - public const METHOD_ECO_PAYZ_TURKEY = 'ecoPayzTurkey'; - - public const METHOD_ECO_VOUCHER = 'ecoVoucher'; - - public const METHOD_EPS = 'EPS'; - - public const METHOD_E_PAY_BG = 'ePay.bg'; - - public const METHOD_ETHEREUM = 'Ethereum'; - - public const METHOD_E_WALLET = 'e-wallet'; - - public const METHOD_EZY_EFT = 'ezyEFT'; - - public const METHOD_E_ZEE_WALLET = 'eZeeWallet'; - - public const METHOD_FASTER_PAY = 'FasterPay'; - - public const METHOD_FLEXEPIN = 'Flexepin'; - - public const METHOD_GIROPAY = 'Giropay'; - - public const METHOD_GOOGLE_PAY = 'Google Pay'; - - public const METHOD_GPAYSAFE = 'Gpaysafe'; - - public const METHOD_I_CASH_ONE_VOUCHER = 'iCashOne Voucher'; - - public const METHOD_I_DEBIT = 'iDebit'; - - public const METHOD_I_DEAL = 'iDEAL'; - - public const METHOD_ING_HOMEPAY = 'ING-homepay'; - - public const METHOD_INOVAPAY_PIN = 'INOVAPAY-pin'; - - public const METHOD_INOVAPAY_WALLET = 'INOVAPAY-wallet'; - - public const METHOD_INSTA_DEBIT = 'InstaDebit'; - - public const METHOD_INSTANT_PAYMENTS = 'InstantPayments'; - - public const METHOD_INSTANT_BANK_TRANSFER = 'instant-bank-transfer'; - - public const METHOD_INTERAC_ONLINE = 'Interac-online'; - - public const METHOD_INTERAC_E_TRANSFER = 'Interac-eTransfer'; - - public const METHOD_INTERAC_EXPRESS_CONNECT = 'Interac-express-connect'; - - public const METHOD_INTERAC = 'Interac'; - - public const METHOD_INVOICE = 'invoice'; - - public const METHOD_I_WALLET = 'iWallet'; - - public const METHOD_JETON = 'Jeton'; - - public const METHOD_JETON_CASH = 'JetonCash'; - - public const METHOD_JPAY = 'jpay'; - - public const METHOD_KAKAO_PAY = 'KakaoPay'; - - public const METHOD_KHELOCARD = 'Khelocard'; - - public const METHOD_KLARNA = 'Klarna'; - - public const METHOD_KNOT = 'KNOT'; - - public const METHOD_LITECOIN = 'Litecoin'; - - public const METHOD_LOONIE = 'loonie'; - - public const METHOD_LPG_ONLINE = 'LPG-online'; - - public const METHOD_LPG_PAYMENT_CARD = 'LPG-payment-card'; - - public const METHOD_MATRIX = 'Matrix'; - - public const METHOD_MAXI_CASH = 'MaxiCash'; - - public const METHOD_MEGAFON = 'Megafon'; - - public const METHOD_MERCADO_PAGO = 'MercadoPago'; - - public const METHOD_MI_FINITY_E_WALLET = 'MiFinity-eWallet'; - - public const METHOD_MISCELLANEOUS = 'miscellaneous'; - - public const METHOD_MOBILE_PAY = 'MobilePay'; - - public const METHOD_MOLLIE = 'Mollie'; - - public const METHOD_MULTIBANCO = 'Multibanco'; - - public const METHOD_BANCONTACT = 'Bancontact'; - - public const METHOD_BANCONTACT_MOBILE = 'Bancontact-mobile'; - - public const METHOD_MTS = 'MTS'; - - public const METHOD_MUCH_BETTER = 'MuchBetter'; - - public const METHOD_MUCH_BETTER_VOUCHER = 'MuchBetterVoucher'; - - public const METHOD_MY_FATOORAH = 'MyFatoorah'; - - public const METHOD_NEOSURF = 'Neosurf'; - - public const METHOD_NETBANKING = 'Netbanking'; - - public const METHOD_NETELLER = 'Neteller'; - - public const METHOD_NORDEA_SOLO = 'Nordea-Solo'; - - public const METHOD_NORDIK_COIN = 'NordikCoin'; - - public const METHOD_OCHA_PAY = 'OchaPay'; - - public const METHOD_ONLINE_BANK_TRANSFER = 'online-bank-transfer'; - - public const METHOD_ONLINEUEBERWEISEN = 'Onlineueberweisen'; - - public const METHOD_ORIENTAL_WALLET = 'oriental-wallet'; - - public const METHOD_OXXO = 'OXXO'; - - public const METHOD_P24 = 'P24'; - - public const METHOD_PAGADITO = 'Pagadito'; - - public const METHOD_PAGO_EFFECTIVO = 'PagoEffectivo'; - - public const METHOD_PAGSMILE_LOTTERY = 'Pagsmile-lottery'; - - public const METHOD_PAGSMILE_DEPOSIT_EXPRESS = 'Pagsmile-deposit-express'; - - public const METHOD_PAY_CASH = 'PayCash'; - - public const METHOD_PAYCO = 'Payco'; - - public const METHOD_PAYEER = 'Payeer'; - - public const METHOD_PAYMENT_ASIA_CRYPTO = 'PaymentAsia-crypto'; - - public const METHOD_PAYSAFECARD = 'Paysafecard'; - - public const METHOD_PAY_TABS = 'PayTabs'; - - public const METHOD_PAY4_FUN = 'Pay4Fun'; - - public const METHOD_PAYNOTE = 'Paynote'; - - public const METHOD_PAYMERO = 'Paymero'; - - public const METHOD_PAYMERO_QR = 'Paymero-QR'; - - public const METHOD_PAY_U = 'PayU'; - - public const METHOD_PAY_U_LATAM = 'PayULatam'; - - public const METHOD_PERFECT_MONEY = 'Perfect-money'; - - public const METHOD_PIASTRIX = 'Piastrix'; - - public const METHOD_PIX = 'PIX'; - - public const METHOD_PIN_PAY = 'PinPay'; - - public const METHOD_PHONE = 'phone'; - - public const METHOD_PHONE_PE = 'PhonePe'; - - public const METHOD_PO_LI = 'POLi'; - - public const METHOD_POST_FINANCE_CARD = 'PostFinance-card'; - - public const METHOD_POST_FINANCE_E_FINANCE = 'PostFinance-e-finance'; - - public const METHOD_QIWI = 'QIWI'; - - public const METHOD_Q_PAY = 'QPay'; - - public const METHOD_QQ_PAY = 'QQPay'; - - public const METHOD_QUICKPAY = 'Quickpay'; - - public const METHOD_RAPYD_CHECKOUT = 'rapyd-checkout'; - - public const METHOD_REBILLY_HOSTED_PAYMENT_FORM = 'rebilly-hosted-payment-form'; - - public const METHOD_RESURS = 'Resurs'; - - public const METHOD_REVERSE_WITHDRAWAL = 'reverse-withdrawal'; - - public const METHOD_RIPPLE = 'Ripple'; - - public const METHOD_SAFETY_PAY = 'SafetyPay'; - - public const METHOD_SAMSUNG_PAY = 'Samsung Pay'; - - public const METHOD_SEPA = 'SEPA'; - - public const METHOD_SIIRTO = 'Siirto'; - - public const METHOD_SKRILL = 'Skrill'; - - public const METHOD_SKRILL_RAPID_TRANSFER = 'Skrill Rapid Transfer'; - - public const METHOD_SMS_VOUCHER = 'SMSVoucher'; - - public const METHOD_SOFORT = 'Sofort'; - - public const METHOD_SPARK_PAY = 'SparkPay'; - - public const METHOD_SPEI = 'SPEI'; - - public const METHOD_SWIFT_DBT = 'swift-dbt'; - - public const METHOD_TELE2 = 'Tele2'; - - public const METHOD_TELR = 'Telr'; - - public const METHOD_TERMINALY_RF = 'Terminaly-RF'; - - public const METHOD_TETHER = 'Tether'; - - public const METHOD_TODITO_CASH_CARD = 'ToditoCash-card'; - - public const METHOD_TRUSTLY = 'Trustly'; - - public const METHOD_TUPAY = 'Tupay'; - - public const METHOD_TWINT = 'TWINT'; - - public const METHOD_UNI_CRYPT = 'UniCrypt'; - - public const METHOD_U_PAY_CARD = 'UPayCard'; - - public const METHOD_UPI = 'UPI'; - - public const METHOD_USD_COIN = 'USD-coin'; - - public const METHOD_V_CREDITOS = 'VCreditos'; - - public const METHOD_VEGA_WALLET = 'VegaWallet'; - - public const METHOD_VENUS_POINT = 'VenusPoint'; - - public const METHOD_VIVA = 'Viva'; - - public const METHOD_VOUCHER = 'voucher'; - - public const METHOD_VOUCHER2 = 'voucher-2'; - - public const METHOD_VOUCHER3 = 'voucher-3'; - - public const METHOD_VOUCHER4 = 'voucher-4'; - - public const METHOD_WALLET88 = 'Wallet88'; - - public const METHOD_WEBMONEY = 'Webmoney'; - - public const METHOD_WEBPAY = 'Webpay'; - - public const METHOD_WEBPAY2 = 'Webpay-2'; - - public const METHOD_WEBPAY_CARD = 'Webpay Card'; - - public const METHOD_WE_CHAT_PAY = 'WeChat Pay'; - - public const METHOD_X_PAY_P2_P = 'XPay-P2P'; - - public const METHOD_X_PAY_QR = 'XPay-QR'; - - public const METHOD_YANDEX_MONEY = 'Yandex-money'; - - public const METHOD_ZOTAPAY = 'Zotapay'; - - public const METHOD_ZIMPLER = 'Zimpler'; - - public const METHOD_ZIP = 'Zip'; - public const PAYMENT_METHOD_ADV_CASH = 'AdvCash'; public const PAYMENT_METHOD_AERA = 'Aera'; @@ -869,9 +483,6 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('paymentInstrumentId', $data)) { $this->setPaymentInstrumentId($data['paymentInstrumentId']); } - if (array_key_exists('method', $data)) { - $this->setMethod($data['method']); - } if (array_key_exists('paymentMethod', $data)) { $this->setPaymentMethod($data['paymentMethod']); } @@ -943,11 +554,6 @@ public function setPaymentInstrumentId(string $paymentInstrumentId): static return $this; } - public function getMethod(): ?string - { - return $this->fields['method'] ?? null; - } - public function getPaymentMethod(): ?string { return $this->fields['paymentMethod'] ?? null; @@ -1065,9 +671,6 @@ public function jsonSerialize(): array if (array_key_exists('paymentInstrumentId', $this->fields)) { $data['paymentInstrumentId'] = $this->fields['paymentInstrumentId']; } - if (array_key_exists('method', $this->fields)) { - $data['method'] = $this->fields['method']; - } if (array_key_exists('paymentMethod', $this->fields)) { $data['paymentMethod'] = $this->fields['paymentMethod']; } @@ -1134,13 +737,6 @@ private function setBatchId(null|string $batchId): static return $this; } - private function setMethod(null|string $method): static - { - $this->fields['method'] = $method; - - return $this; - } - private function setPaymentMethod(null|string $paymentMethod): static { $this->fields['paymentMethod'] = $paymentMethod; diff --git a/src/Model/PayoutRequestBatch.php b/src/Model/PayoutRequestBatch.php index f1297789b..bd1ac515d 100644 --- a/src/Model/PayoutRequestBatch.php +++ b/src/Model/PayoutRequestBatch.php @@ -23,14 +23,6 @@ class PayoutRequestBatch implements JsonSerializable { use HasMetadata; - public const STATUS_PENDING = 'pending'; - - public const STATUS_PROCESSING = 'processing'; - - public const STATUS_COMPLETED = 'completed'; - - public const STATUS_FAILED = 'failed'; - private array $fields = []; public function __construct(array $data = [], array $metadata = []) @@ -41,9 +33,6 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('userId', $data)) { $this->setUserId($data['userId']); } - if (array_key_exists('status', $data)) { - $this->setStatus($data['status']); - } if (array_key_exists('totalCount', $data)) { $this->setTotalCount($data['totalCount']); } @@ -92,11 +81,6 @@ public function getUserId(): ?string return $this->fields['userId'] ?? null; } - public function getStatus(): ?string - { - return $this->fields['status'] ?? null; - } - public function getTotalCount(): ?int { return $this->fields['totalCount'] ?? null; @@ -182,9 +166,6 @@ public function jsonSerialize(): array if (array_key_exists('userId', $this->fields)) { $data['userId'] = $this->fields['userId']; } - if (array_key_exists('status', $this->fields)) { - $data['status'] = $this->fields['status']; - } if (array_key_exists('totalCount', $this->fields)) { $data['totalCount'] = $this->fields['totalCount']; } @@ -243,13 +224,6 @@ private function setUserId(null|string $userId): static return $this; } - private function setStatus(null|string $status): static - { - $this->fields['status'] = $status; - - return $this; - } - private function setTotalCount(null|int $totalCount): static { $this->fields['totalCount'] = $totalCount; diff --git a/src/Model/ReactivationQuoteOrder.php b/src/Model/ReactivationQuoteOrder.php index fff2eb4ba..3b89323ee 100644 --- a/src/Model/ReactivationQuoteOrder.php +++ b/src/Model/ReactivationQuoteOrder.php @@ -48,6 +48,12 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('shipping', $data)) { $this->setShipping($data['shipping']); } + if (array_key_exists('deliveryAddress', $data)) { + $this->setDeliveryAddress($data['deliveryAddress']); + } + if (array_key_exists('billingAddress', $data)) { + $this->setBillingAddress($data['billingAddress']); + } $this->setMetadata($metadata); } @@ -163,6 +169,38 @@ public function setShipping(null|Shipping|array $shipping): static return $this; } + public function getDeliveryAddress(): ?ContactObject + { + return $this->fields['deliveryAddress'] ?? null; + } + + public function setDeliveryAddress(null|ContactObject|array $deliveryAddress): static + { + if ($deliveryAddress !== null && !($deliveryAddress instanceof ContactObject)) { + $deliveryAddress = ContactObject::from($deliveryAddress); + } + + $this->fields['deliveryAddress'] = $deliveryAddress; + + return $this; + } + + public function getBillingAddress(): ?ContactObject + { + return $this->fields['billingAddress'] ?? null; + } + + public function setBillingAddress(null|ContactObject|array $billingAddress): static + { + if ($billingAddress !== null && !($billingAddress instanceof ContactObject)) { + $billingAddress = ContactObject::from($billingAddress); + } + + $this->fields['billingAddress'] = $billingAddress; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -190,6 +228,12 @@ public function jsonSerialize(): array if (array_key_exists('shipping', $this->fields)) { $data['shipping'] = $this->fields['shipping']?->jsonSerialize(); } + if (array_key_exists('deliveryAddress', $this->fields)) { + $data['deliveryAddress'] = $this->fields['deliveryAddress']?->jsonSerialize(); + } + if (array_key_exists('billingAddress', $this->fields)) { + $data['billingAddress'] = $this->fields['billingAddress']?->jsonSerialize(); + } return $data; } diff --git a/src/Model/RecurringOrder.php b/src/Model/RecurringOrder.php index ff4e5b8c3..107122e33 100644 --- a/src/Model/RecurringOrder.php +++ b/src/Model/RecurringOrder.php @@ -198,6 +198,12 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('revision', $data)) { $this->setRevision($data['revision']); } + if (array_key_exists('currentPeriodStart', $data)) { + $this->setCurrentPeriodStart($data['currentPeriodStart']); + } + if (array_key_exists('currentPeriodEnd', $data)) { + $this->setCurrentPeriodEnd($data['currentPeriodEnd']); + } if (array_key_exists('renewalTime', $data)) { $this->setRenewalTime($data['renewalTime']); } @@ -614,6 +620,16 @@ public function getRevision(): ?int return $this->fields['revision'] ?? null; } + public function getCurrentPeriodStart(): ?DateTimeImmutable + { + return $this->fields['currentPeriodStart'] ?? null; + } + + public function getCurrentPeriodEnd(): ?DateTimeImmutable + { + return $this->fields['currentPeriodEnd'] ?? null; + } + public function getRenewalTime(): ?DateTimeImmutable { return $this->fields['renewalTime'] ?? null; @@ -786,6 +802,12 @@ public function jsonSerialize(): array if (array_key_exists('revision', $this->fields)) { $data['revision'] = $this->fields['revision']; } + if (array_key_exists('currentPeriodStart', $this->fields)) { + $data['currentPeriodStart'] = $this->fields['currentPeriodStart']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('currentPeriodEnd', $this->fields)) { + $data['currentPeriodEnd'] = $this->fields['currentPeriodEnd']?->format(DateTimeInterface::RFC3339); + } if (array_key_exists('renewalTime', $this->fields)) { $data['renewalTime'] = $this->fields['renewalTime']?->format(DateTimeInterface::RFC3339); } @@ -981,6 +1003,28 @@ private function setRevision(null|int $revision): static return $this; } + private function setCurrentPeriodStart(null|DateTimeImmutable|string $currentPeriodStart): static + { + if ($currentPeriodStart !== null && !($currentPeriodStart instanceof DateTimeImmutable)) { + $currentPeriodStart = new DateTimeImmutable($currentPeriodStart); + } + + $this->fields['currentPeriodStart'] = $currentPeriodStart; + + return $this; + } + + private function setCurrentPeriodEnd(null|DateTimeImmutable|string $currentPeriodEnd): static + { + if ($currentPeriodEnd !== null && !($currentPeriodEnd instanceof DateTimeImmutable)) { + $currentPeriodEnd = new DateTimeImmutable($currentPeriodEnd); + } + + $this->fields['currentPeriodEnd'] = $currentPeriodEnd; + + return $this; + } + private function setRenewalTime(null|DateTimeImmutable|string $renewalTime): static { if ($renewalTime !== null && !($renewalTime instanceof DateTimeImmutable)) { diff --git a/src/Model/ShowEddSearchLogsTimelineAction.php b/src/Model/ShowEddSearchLogsTimelineAction.php deleted file mode 100644 index 23da570b0..000000000 --- a/src/Model/ShowEddSearchLogsTimelineAction.php +++ /dev/null @@ -1,92 +0,0 @@ -setSearchLogId($data['searchLogId']); - } - if (array_key_exists('type', $data)) { - $this->setType($data['type']); - } - $this->setMetadata($metadata); - } - - public static function from(array $data = [], array $metadata = []): self - { - return new self($data, $metadata); - } - - public function getAction(): string - { - return 'show-edd-search-logs'; - } - - public function getSearchLogId(): ?string - { - return $this->fields['searchLogId'] ?? null; - } - - public function setSearchLogId(null|string $searchLogId): static - { - $this->fields['searchLogId'] = $searchLogId; - - return $this; - } - - public function getType(): ?string - { - return $this->fields['type'] ?? null; - } - - public function setType(null|string $type): static - { - $this->fields['type'] = $type; - - return $this; - } - - public function jsonSerialize(): array - { - $data = [ - 'action' => 'show-edd-search-logs', - ]; - if (array_key_exists('searchLogId', $this->fields)) { - $data['searchLogId'] = $this->fields['searchLogId']; - } - if (array_key_exists('type', $this->fields)) { - $data['type'] = $this->fields['type']; - } - - return $data; - } -} diff --git a/src/Model/Subscription.php b/src/Model/Subscription.php index 3e8ce1b29..1ef58c484 100644 --- a/src/Model/Subscription.php +++ b/src/Model/Subscription.php @@ -156,6 +156,12 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('renewalTime', $data)) { $this->setRenewalTime($data['renewalTime']); } + if (array_key_exists('currentPeriodStart', $data)) { + $this->setCurrentPeriodStart($data['currentPeriodStart']); + } + if (array_key_exists('currentPeriodEnd', $data)) { + $this->setCurrentPeriodEnd($data['currentPeriodEnd']); + } if (array_key_exists('rebillNumber', $data)) { $this->setRebillNumber($data['rebillNumber']); } @@ -431,6 +437,16 @@ public function setRenewalTime(null|DateTimeImmutable|string $renewalTime): stat return $this; } + public function getCurrentPeriodStart(): ?DateTimeImmutable + { + return $this->fields['currentPeriodStart'] ?? null; + } + + public function getCurrentPeriodEnd(): ?DateTimeImmutable + { + return $this->fields['currentPeriodEnd'] ?? null; + } + public function getRebillNumber(): ?int { return $this->fields['rebillNumber'] ?? null; @@ -806,6 +822,12 @@ public function jsonSerialize(): array if (array_key_exists('renewalTime', $this->fields)) { $data['renewalTime'] = $this->fields['renewalTime']?->format(DateTimeInterface::RFC3339); } + if (array_key_exists('currentPeriodStart', $this->fields)) { + $data['currentPeriodStart'] = $this->fields['currentPeriodStart']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('currentPeriodEnd', $this->fields)) { + $data['currentPeriodEnd'] = $this->fields['currentPeriodEnd']?->format(DateTimeInterface::RFC3339); + } if (array_key_exists('rebillNumber', $this->fields)) { $data['rebillNumber'] = $this->fields['rebillNumber']; } @@ -1005,6 +1027,28 @@ private function setChurnTime(null|DateTimeImmutable|string $churnTime): static return $this; } + private function setCurrentPeriodStart(null|DateTimeImmutable|string $currentPeriodStart): static + { + if ($currentPeriodStart !== null && !($currentPeriodStart instanceof DateTimeImmutable)) { + $currentPeriodStart = new DateTimeImmutable($currentPeriodStart); + } + + $this->fields['currentPeriodStart'] = $currentPeriodStart; + + return $this; + } + + private function setCurrentPeriodEnd(null|DateTimeImmutable|string $currentPeriodEnd): static + { + if ($currentPeriodEnd !== null && !($currentPeriodEnd instanceof DateTimeImmutable)) { + $currentPeriodEnd = new DateTimeImmutable($currentPeriodEnd); + } + + $this->fields['currentPeriodEnd'] = $currentPeriodEnd; + + return $this; + } + private function setRebillNumber(null|int $rebillNumber): static { $this->fields['rebillNumber'] = $rebillNumber; diff --git a/src/Model/SubscriptionItem.php b/src/Model/SubscriptionItem.php index 2cb64350e..d4c64f288 100644 --- a/src/Model/SubscriptionItem.php +++ b/src/Model/SubscriptionItem.php @@ -41,6 +41,12 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('renewalTime', $data)) { $this->setRenewalTime($data['renewalTime']); } + if (array_key_exists('currentPeriodStart', $data)) { + $this->setCurrentPeriodStart($data['currentPeriodStart']); + } + if (array_key_exists('currentPeriodEnd', $data)) { + $this->setCurrentPeriodEnd($data['currentPeriodEnd']); + } if (array_key_exists('rebillNumber', $data)) { $this->setRebillNumber($data['rebillNumber']); } @@ -137,6 +143,16 @@ public function setRenewalTime(null|DateTimeImmutable|string $renewalTime): stat return $this; } + public function getCurrentPeriodStart(): ?DateTimeImmutable + { + return $this->fields['currentPeriodStart'] ?? null; + } + + public function getCurrentPeriodEnd(): ?DateTimeImmutable + { + return $this->fields['currentPeriodEnd'] ?? null; + } + public function getRebillNumber(): ?int { return $this->fields['rebillNumber'] ?? null; @@ -282,6 +298,12 @@ public function jsonSerialize(): array if (array_key_exists('renewalTime', $this->fields)) { $data['renewalTime'] = $this->fields['renewalTime']?->format(DateTimeInterface::RFC3339); } + if (array_key_exists('currentPeriodStart', $this->fields)) { + $data['currentPeriodStart'] = $this->fields['currentPeriodStart']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('currentPeriodEnd', $this->fields)) { + $data['currentPeriodEnd'] = $this->fields['currentPeriodEnd']?->format(DateTimeInterface::RFC3339); + } if (array_key_exists('rebillNumber', $this->fields)) { $data['rebillNumber'] = $this->fields['rebillNumber']; } @@ -347,6 +369,28 @@ private function setRenewalReminderNumber(null|int $renewalReminderNumber): stat return $this; } + private function setCurrentPeriodStart(null|DateTimeImmutable|string $currentPeriodStart): static + { + if ($currentPeriodStart !== null && !($currentPeriodStart instanceof DateTimeImmutable)) { + $currentPeriodStart = new DateTimeImmutable($currentPeriodStart); + } + + $this->fields['currentPeriodStart'] = $currentPeriodStart; + + return $this; + } + + private function setCurrentPeriodEnd(null|DateTimeImmutable|string $currentPeriodEnd): static + { + if ($currentPeriodEnd !== null && !($currentPeriodEnd instanceof DateTimeImmutable)) { + $currentPeriodEnd = new DateTimeImmutable($currentPeriodEnd); + } + + $this->fields['currentPeriodEnd'] = $currentPeriodEnd; + + return $this; + } + private function setRebillNumber(null|int $rebillNumber): static { $this->fields['rebillNumber'] = $rebillNumber; diff --git a/src/Model/TimelineActionFactory.php b/src/Model/TimelineActionFactory.php index 23868fad3..c4cfa618c 100644 --- a/src/Model/TimelineActionFactory.php +++ b/src/Model/TimelineActionFactory.php @@ -24,7 +24,6 @@ public static function from(array $data = [], array $metadata = []): TimelineAct 'redemption-cancel' => RedemptionCancelTimelineAction::from($data, $metadata), 'resend-email' => ResendEmailTimelineAction::from($data, $metadata), 'ruleset-restore' => RulesetRestoreTimelineAction::from($data, $metadata), - 'show-edd-search-logs' => ShowEddSearchLogsTimelineAction::from($data, $metadata), default => throw new UnknownDiscriminatorValueException(), }; } diff --git a/src/Model/TransactionDcc.php b/src/Model/TransactionDcc.php index 304f42977..b875b33c9 100644 --- a/src/Model/TransactionDcc.php +++ b/src/Model/TransactionDcc.php @@ -43,6 +43,9 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('outcome', $data)) { $this->setOutcome($data['outcome']); } + if (array_key_exists('isForceDcc', $data)) { + $this->setIsForceDcc($data['isForceDcc']); + } $this->setMetadata($metadata); } @@ -111,6 +114,18 @@ public function setOutcome(null|string $outcome): static return $this; } + public function getIsForceDcc(): ?bool + { + return $this->fields['isForceDcc'] ?? null; + } + + public function setIsForceDcc(null|bool $isForceDcc): static + { + $this->fields['isForceDcc'] = $isForceDcc; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -126,6 +141,9 @@ public function jsonSerialize(): array if (array_key_exists('outcome', $this->fields)) { $data['outcome'] = $this->fields['outcome']; } + if (array_key_exists('isForceDcc', $this->fields)) { + $data['isForceDcc'] = $this->fields['isForceDcc']; + } return $data; } diff --git a/src/Model/Wallet88Settings.php b/src/Model/Wallet88Settings.php index 4bf323a74..6c45e32d3 100644 --- a/src/Model/Wallet88Settings.php +++ b/src/Model/Wallet88Settings.php @@ -25,6 +25,8 @@ class Wallet88Settings implements JsonSerializable public const PAYMENT_CARD_METHOD_MASTERCARD = 'mastercard'; + public const PAYMENT_CARD_METHOD_VISA = 'visa'; + private array $fields = []; public function __construct(array $data = [], array $metadata = []) diff --git a/src/Model/WebsiteSettings.php b/src/Model/WebsiteSettings.php index ed04f4cf0..0a1bd7c2d 100644 --- a/src/Model/WebsiteSettings.php +++ b/src/Model/WebsiteSettings.php @@ -34,6 +34,9 @@ public function __construct(array $data = [], array $metadata = []) if (array_key_exists('amplitude', $data)) { $this->setAmplitude($data['amplitude']); } + if (array_key_exists('payoutRequest', $data)) { + $this->setPayoutRequest($data['payoutRequest']); + } $this->setMetadata($metadata); } @@ -90,6 +93,22 @@ public function setAmplitude(null|WebsiteSettingsAmplitude|array $amplitude): st return $this; } + public function getPayoutRequest(): ?WebsiteSettingsPayoutRequest + { + return $this->fields['payoutRequest'] ?? null; + } + + public function setPayoutRequest(null|WebsiteSettingsPayoutRequest|array $payoutRequest): static + { + if ($payoutRequest !== null && !($payoutRequest instanceof WebsiteSettingsPayoutRequest)) { + $payoutRequest = WebsiteSettingsPayoutRequest::from($payoutRequest); + } + + $this->fields['payoutRequest'] = $payoutRequest; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -102,6 +121,9 @@ public function jsonSerialize(): array if (array_key_exists('amplitude', $this->fields)) { $data['amplitude'] = $this->fields['amplitude']?->jsonSerialize(); } + if (array_key_exists('payoutRequest', $this->fields)) { + $data['payoutRequest'] = $this->fields['payoutRequest']?->jsonSerialize(); + } return $data; } diff --git a/src/Model/WebsiteSettingsPayoutRequest.php b/src/Model/WebsiteSettingsPayoutRequest.php new file mode 100644 index 000000000..3889f0e82 --- /dev/null +++ b/src/Model/WebsiteSettingsPayoutRequest.php @@ -0,0 +1,78 @@ +setAutomaticReadinessEnabled($data['automaticReadinessEnabled']); + } + if (array_key_exists('pendingPeriodHours', $data)) { + $this->setPendingPeriodHours($data['pendingPeriodHours']); + } + $this->setMetadata($metadata); + } + + public static function from(array $data = [], array $metadata = []): self + { + return new self($data, $metadata); + } + + public function getAutomaticReadinessEnabled(): ?bool + { + return $this->fields['automaticReadinessEnabled'] ?? null; + } + + public function setAutomaticReadinessEnabled(null|bool $automaticReadinessEnabled): static + { + $this->fields['automaticReadinessEnabled'] = $automaticReadinessEnabled; + + return $this; + } + + public function getPendingPeriodHours(): ?int + { + return $this->fields['pendingPeriodHours'] ?? null; + } + + public function setPendingPeriodHours(null|int $pendingPeriodHours): static + { + $this->fields['pendingPeriodHours'] = $pendingPeriodHours; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('automaticReadinessEnabled', $this->fields)) { + $data['automaticReadinessEnabled'] = $this->fields['automaticReadinessEnabled']; + } + if (array_key_exists('pendingPeriodHours', $this->fields)) { + $data['pendingPeriodHours'] = $this->fields['pendingPeriodHours']; + } + + return $data; + } +}