diff --git a/.changeset/lemon-dogs-return.md b/.changeset/lemon-dogs-return.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/lemon-dogs-return.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/src/Model/AML.php b/src/Model/AML.php index e9e6cd216..f1f989552 100644 --- a/src/Model/AML.php +++ b/src/Model/AML.php @@ -211,16 +211,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -446,4 +436,19 @@ private function setComments(null|string $comments): static 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/AlternativePaymentToken.php b/src/Model/AlternativePaymentToken.php index 797d11b5b..8a9fc6605 100644 --- a/src/Model/AlternativePaymentToken.php +++ b/src/Model/AlternativePaymentToken.php @@ -465,16 +465,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getPaymentInstrument(): KlarnaTokenPaymentInstrument { return $this->fields['paymentInstrument']; @@ -584,4 +574,19 @@ private function setExpirationTime(null|DateTimeImmutable|string $expirationTime 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/AmlCheck.php b/src/Model/AmlCheck.php index 9defb3414..7f3c09fbe 100644 --- a/src/Model/AmlCheck.php +++ b/src/Model/AmlCheck.php @@ -265,21 +265,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public 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; - } - public function jsonSerialize(): array { $data = []; @@ -375,4 +360,19 @@ private function setTags(null|array $tags): static 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/ApiKey.php b/src/Model/ApiKey.php index 506056651..8b943d441 100644 --- a/src/Model/ApiKey.php +++ b/src/Model/ApiKey.php @@ -167,16 +167,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -256,4 +246,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/ApiTracking.php b/src/Model/ApiTracking.php index 2cc60cdea..88c2c3986 100644 --- a/src/Model/ApiTracking.php +++ b/src/Model/ApiTracking.php @@ -282,16 +282,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getEmbedded(): ?ApiTrackingEmbedded { return $this->fields['_embedded'] ?? null; @@ -405,4 +395,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/ApplicationInstance.php b/src/Model/ApplicationInstance.php index 7b8e9d190..f11d054ca 100644 --- a/src/Model/ApplicationInstance.php +++ b/src/Model/ApplicationInstance.php @@ -92,16 +92,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -172,4 +162,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/ArrayCustomField.php b/src/Model/ArrayCustomField.php index 21d30419f..ad1203c6d 100644 --- a/src/Model/ArrayCustomField.php +++ b/src/Model/ArrayCustomField.php @@ -86,16 +86,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -123,4 +113,19 @@ private function setName(null|string $name): static 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/AuthenticationOptions.php b/src/Model/AuthenticationOptions.php index 56b2917f0..f60ac506d 100644 --- a/src/Model/AuthenticationOptions.php +++ b/src/Model/AuthenticationOptions.php @@ -114,16 +114,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -148,4 +138,19 @@ public function jsonSerialize(): array return $data; } + + /** + * @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/AuthenticationToken.php b/src/Model/AuthenticationToken.php index 97df7b313..51e110c9d 100644 --- a/src/Model/AuthenticationToken.php +++ b/src/Model/AuthenticationToken.php @@ -37,9 +37,4 @@ public function setExpiredTime(null|DateTimeImmutable|string $expiredTime): stat * @return null|ResourceLink[] */ public function getLinks(): ?array; - - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static; } diff --git a/src/Model/AuthenticationTokenPasswordMode.php b/src/Model/AuthenticationTokenPasswordMode.php index e50f246e5..a56bc3b1f 100644 --- a/src/Model/AuthenticationTokenPasswordMode.php +++ b/src/Model/AuthenticationTokenPasswordMode.php @@ -148,16 +148,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -197,4 +187,19 @@ private function setToken(null|string $token): static 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/AuthenticationTokenPasswordlessMode.php b/src/Model/AuthenticationTokenPasswordlessMode.php index a7218e581..5e76c6c18 100644 --- a/src/Model/AuthenticationTokenPasswordlessMode.php +++ b/src/Model/AuthenticationTokenPasswordlessMode.php @@ -124,16 +124,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getPassword(): string { return $this->fields['password']; @@ -197,4 +187,19 @@ private function setToken(null|string $token): static 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/AuthenticationTokenResponse.php b/src/Model/AuthenticationTokenResponse.php index a26aac201..89f670678 100644 --- a/src/Model/AuthenticationTokenResponse.php +++ b/src/Model/AuthenticationTokenResponse.php @@ -128,16 +128,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -172,4 +162,19 @@ private function setToken(null|string $token): static 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/AvalaraCredential.php b/src/Model/AvalaraCredential.php index 9ef4a3824..789622937 100644 --- a/src/Model/AvalaraCredential.php +++ b/src/Model/AvalaraCredential.php @@ -214,16 +214,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getCode(): string { return $this->fields['code']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/BalanceTransaction.php b/src/Model/BalanceTransaction.php index d5518b1a4..d96fccc35 100644 --- a/src/Model/BalanceTransaction.php +++ b/src/Model/BalanceTransaction.php @@ -47,9 +47,4 @@ public function getUpdatedTime(): ?DateTimeImmutable; * @return null|ResourceLink[] */ public function getLinks(): ?array; - - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static; } diff --git a/src/Model/BankAccountToken.php b/src/Model/BankAccountToken.php index fc30bb1a8..eb32ccc68 100644 --- a/src/Model/BankAccountToken.php +++ b/src/Model/BankAccountToken.php @@ -191,16 +191,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -294,4 +284,19 @@ private function setExpirationTime(null|DateTimeImmutable|string $expirationTime 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/BillingPortal.php b/src/Model/BillingPortal.php index 0c3a9835d..b70465803 100644 --- a/src/Model/BillingPortal.php +++ b/src/Model/BillingPortal.php @@ -182,16 +182,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -260,4 +250,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/Blocklist.php b/src/Model/Blocklist.php index b4a0a5afb..37de0bc0b 100644 --- a/src/Model/Blocklist.php +++ b/src/Model/Blocklist.php @@ -134,16 +134,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -200,4 +190,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/BooleanCustomField.php b/src/Model/BooleanCustomField.php index 266da1760..dffa02cbd 100644 --- a/src/Model/BooleanCustomField.php +++ b/src/Model/BooleanCustomField.php @@ -86,16 +86,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -123,4 +113,19 @@ private function setName(null|string $name): static 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/BroadcastMessage.php b/src/Model/BroadcastMessage.php index f2fa31e97..e2ac50c74 100644 --- a/src/Model/BroadcastMessage.php +++ b/src/Model/BroadcastMessage.php @@ -164,16 +164,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -257,4 +247,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/BuyFeeTransaction.php b/src/Model/BuyFeeTransaction.php index d681d3872..138285912 100644 --- a/src/Model/BuyFeeTransaction.php +++ b/src/Model/BuyFeeTransaction.php @@ -183,16 +183,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getRiskReserve(): ?RiskReserveTransactionRiskReserve { return $this->fields['riskReserve'] ?? null; @@ -293,4 +283,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/ChargeTransaction.php b/src/Model/ChargeTransaction.php index 87234bb82..fc948a7ce 100644 --- a/src/Model/ChargeTransaction.php +++ b/src/Model/ChargeTransaction.php @@ -167,16 +167,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getRiskReserve(): ?RiskReserveTransactionRiskReserve { return $this->fields['riskReserve'] ?? null; @@ -293,4 +283,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/Company.php b/src/Model/Company.php index 227b2ee17..1c6c9deae 100644 --- a/src/Model/Company.php +++ b/src/Model/Company.php @@ -144,21 +144,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public 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; - } - public function jsonSerialize(): array { $data = []; @@ -189,4 +174,19 @@ public function jsonSerialize(): array return $data; } + + /** + * @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/CompositeToken.php b/src/Model/CompositeToken.php index a52474f52..3743fd2c0 100644 --- a/src/Model/CompositeToken.php +++ b/src/Model/CompositeToken.php @@ -43,9 +43,4 @@ public function getExpirationTime(): ?DateTimeImmutable; * @return null|ResourceLink[] */ public function getLinks(): ?array; - - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static; } diff --git a/src/Model/Coupon.php b/src/Model/Coupon.php index 9106a34ae..607908d5b 100644 --- a/src/Model/Coupon.php +++ b/src/Model/Coupon.php @@ -193,16 +193,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -295,4 +285,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/CreditMemoTimeline.php b/src/Model/CreditMemoTimeline.php index 355c36f75..7dd13295a 100644 --- a/src/Model/CreditMemoTimeline.php +++ b/src/Model/CreditMemoTimeline.php @@ -121,16 +121,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -190,4 +180,19 @@ private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): s 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/CustomDomain.php b/src/Model/CustomDomain.php index 36182c1bd..1f00578e3 100644 --- a/src/Model/CustomDomain.php +++ b/src/Model/CustomDomain.php @@ -88,16 +88,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -158,4 +148,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/CustomField.php b/src/Model/CustomField.php index c004445bd..c2b110c44 100644 --- a/src/Model/CustomField.php +++ b/src/Model/CustomField.php @@ -27,9 +27,4 @@ public function setDescription(null|string $description): static; * @return null|ResourceLink[] */ public function getLinks(): ?array; - - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static; } diff --git a/src/Model/CustomerTimeline.php b/src/Model/CustomerTimeline.php index b911743d5..ceaf03eb0 100644 --- a/src/Model/CustomerTimeline.php +++ b/src/Model/CustomerTimeline.php @@ -318,16 +318,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -386,4 +376,19 @@ private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): s 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/DateCustomField.php b/src/Model/DateCustomField.php index 2ddef57f2..ca6001101 100644 --- a/src/Model/DateCustomField.php +++ b/src/Model/DateCustomField.php @@ -86,16 +86,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -123,4 +113,19 @@ private function setName(null|string $name): static 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/DateTimeCustomField.php b/src/Model/DateTimeCustomField.php index ff0f78a39..6f44cf89f 100644 --- a/src/Model/DateTimeCustomField.php +++ b/src/Model/DateTimeCustomField.php @@ -86,16 +86,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -123,4 +113,19 @@ private function setName(null|string $name): static 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/DepositCustomPropertySet.php b/src/Model/DepositCustomPropertySet.php index 058314d8f..0f232ee5c 100644 --- a/src/Model/DepositCustomPropertySet.php +++ b/src/Model/DepositCustomPropertySet.php @@ -95,16 +95,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -158,4 +148,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/DepositStrategy.php b/src/Model/DepositStrategy.php index f4b1bff4a..48d022d9e 100644 --- a/src/Model/DepositStrategy.php +++ b/src/Model/DepositStrategy.php @@ -133,16 +133,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -202,4 +192,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/DigitalWalletToken.php b/src/Model/DigitalWalletToken.php index a71c3ca6b..cca461be9 100644 --- a/src/Model/DigitalWalletToken.php +++ b/src/Model/DigitalWalletToken.php @@ -177,16 +177,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -279,4 +269,19 @@ private function setExpirationTime(null|DateTimeImmutable|string $expirationTime 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/EddTimeline.php b/src/Model/EddTimeline.php index 3a7d5bd5b..24a5b8744 100644 --- a/src/Model/EddTimeline.php +++ b/src/Model/EddTimeline.php @@ -119,16 +119,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -188,4 +178,19 @@ private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): s 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/EmailDeliverySetting.php b/src/Model/EmailDeliverySetting.php index 3f67e356e..717af05ec 100644 --- a/src/Model/EmailDeliverySetting.php +++ b/src/Model/EmailDeliverySetting.php @@ -157,16 +157,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -246,4 +236,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/EmailMessage.php b/src/Model/EmailMessage.php index 4caa287b9..d3f8fbf87 100644 --- a/src/Model/EmailMessage.php +++ b/src/Model/EmailMessage.php @@ -322,16 +322,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -460,4 +450,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/EmailNotification.php b/src/Model/EmailNotification.php index 349422cbe..fdffaa1a3 100644 --- a/src/Model/EmailNotification.php +++ b/src/Model/EmailNotification.php @@ -73,16 +73,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -123,4 +113,19 @@ private function setNotifications(null|array $notifications): static 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/ExperianCredential.php b/src/Model/ExperianCredential.php index 4306c4114..f808b7942 100644 --- a/src/Model/ExperianCredential.php +++ b/src/Model/ExperianCredential.php @@ -238,16 +238,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getCode(): string { return $this->fields['code']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/Fee.php b/src/Model/Fee.php index ee67a743f..c505b8ea0 100644 --- a/src/Model/Fee.php +++ b/src/Model/Fee.php @@ -152,16 +152,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -224,4 +214,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/FlexiblePlan.php b/src/Model/FlexiblePlan.php index 1ac5826a1..5c904f75c 100644 --- a/src/Model/FlexiblePlan.php +++ b/src/Model/FlexiblePlan.php @@ -272,21 +272,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public 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; - } - public function getRecurringInterval(): SubscriptionOrderPlanRecurringInterval { return $this->fields['recurringInterval']; @@ -463,4 +448,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/GatewayAccountDowntimeSchedule.php b/src/Model/GatewayAccountDowntimeSchedule.php index cfb6ac2dd..9b9572d43 100644 --- a/src/Model/GatewayAccountDowntimeSchedule.php +++ b/src/Model/GatewayAccountDowntimeSchedule.php @@ -131,16 +131,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -214,4 +204,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/GatewayAccountLimit.php b/src/Model/GatewayAccountLimit.php index f5a42a93c..1b3da4343 100644 --- a/src/Model/GatewayAccountLimit.php +++ b/src/Model/GatewayAccountLimit.php @@ -147,16 +147,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -268,4 +258,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/GatewayAccountTimeline.php b/src/Model/GatewayAccountTimeline.php index b536cad1b..3f3cf8bba 100644 --- a/src/Model/GatewayAccountTimeline.php +++ b/src/Model/GatewayAccountTimeline.php @@ -135,16 +135,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -204,4 +194,19 @@ private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): s 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/GlobalWebhook.php b/src/Model/GlobalWebhook.php index 65cc658d5..c6102383b 100644 --- a/src/Model/GlobalWebhook.php +++ b/src/Model/GlobalWebhook.php @@ -221,16 +221,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -302,4 +292,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/IntegerCustomField.php b/src/Model/IntegerCustomField.php index 59fc745d2..91642c732 100644 --- a/src/Model/IntegerCustomField.php +++ b/src/Model/IntegerCustomField.php @@ -86,16 +86,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -123,4 +113,19 @@ private function setName(null|string $name): static 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/InvoiceTimeline.php b/src/Model/InvoiceTimeline.php index 027fe4769..80e4143cc 100644 --- a/src/Model/InvoiceTimeline.php +++ b/src/Model/InvoiceTimeline.php @@ -173,16 +173,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -242,4 +232,19 @@ private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): s 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/JournalAccount.php b/src/Model/JournalAccount.php index 7bdfa395f..74bacd692 100644 --- a/src/Model/JournalAccount.php +++ b/src/Model/JournalAccount.php @@ -95,16 +95,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -158,4 +148,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/JournalEntry.php b/src/Model/JournalEntry.php index 2dcdd467f..85a0fa7a2 100644 --- a/src/Model/JournalEntry.php +++ b/src/Model/JournalEntry.php @@ -114,16 +114,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -180,4 +170,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/KhelocardCardToken.php b/src/Model/KhelocardCardToken.php index e46e1606b..18a525e52 100644 --- a/src/Model/KhelocardCardToken.php +++ b/src/Model/KhelocardCardToken.php @@ -177,16 +177,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -279,4 +269,19 @@ private function setExpirationTime(null|DateTimeImmutable|string $expirationTime 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/KlarnaToken.php b/src/Model/KlarnaToken.php index 4fffe1a9c..58fb3835c 100644 --- a/src/Model/KlarnaToken.php +++ b/src/Model/KlarnaToken.php @@ -177,16 +177,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -279,4 +269,19 @@ private function setExpirationTime(null|DateTimeImmutable|string $expirationTime 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/MailgunCredential.php b/src/Model/MailgunCredential.php index 36b424015..273ce1bc8 100644 --- a/src/Model/MailgunCredential.php +++ b/src/Model/MailgunCredential.php @@ -226,16 +226,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getCode(): string { return $this->fields['code']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/Membership.php b/src/Model/Membership.php index 739457c31..db9f5ffa5 100644 --- a/src/Model/Membership.php +++ b/src/Model/Membership.php @@ -207,16 +207,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getEmbedded(): ?MembershipEmbedded { return $this->fields['_embedded'] ?? null; @@ -276,4 +266,19 @@ private function setIsDefault(null|bool $isDefault): static 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/MonetaryCustomField.php b/src/Model/MonetaryCustomField.php index d70f5e969..e458a7a2a 100644 --- a/src/Model/MonetaryCustomField.php +++ b/src/Model/MonetaryCustomField.php @@ -86,16 +86,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -123,4 +113,19 @@ private function setName(null|string $name): static 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/NumberCustomField.php b/src/Model/NumberCustomField.php index 51617bcdf..568918b49 100644 --- a/src/Model/NumberCustomField.php +++ b/src/Model/NumberCustomField.php @@ -86,16 +86,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -123,4 +113,19 @@ private function setName(null|string $name): static 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/OAuth2Credential.php b/src/Model/OAuth2Credential.php index 6860ffe19..16988f24c 100644 --- a/src/Model/OAuth2Credential.php +++ b/src/Model/OAuth2Credential.php @@ -247,16 +247,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getApiKey(): string { return $this->fields['apiKey']; @@ -698,4 +688,19 @@ private function setRefreshToken(null|string $refreshToken): static 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/OrderItemPlan.php b/src/Model/OrderItemPlan.php index 4f0ad065c..e82e7030a 100644 --- a/src/Model/OrderItemPlan.php +++ b/src/Model/OrderItemPlan.php @@ -272,21 +272,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public 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; - } - public function getRecurringInterval(): SubscriptionOrderPlanRecurringInterval { return $this->fields['recurringInterval']; @@ -463,4 +448,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/OrderTimeline.php b/src/Model/OrderTimeline.php index 25a4f3622..e059a66ce 100644 --- a/src/Model/OrderTimeline.php +++ b/src/Model/OrderTimeline.php @@ -195,16 +195,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -264,4 +254,19 @@ private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): s 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/OwnerApplicationInstance.php b/src/Model/OwnerApplicationInstance.php index 045373dd9..c3165f328 100644 --- a/src/Model/OwnerApplicationInstance.php +++ b/src/Model/OwnerApplicationInstance.php @@ -98,16 +98,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getOrganizationId(): ?string { return $this->fields['organizationId'] ?? null; @@ -202,6 +192,21 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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; + } + private function setToken(null|string $token): static { $this->fields['token'] = $token; diff --git a/src/Model/PatchSubscriptionCancellationRequest.php b/src/Model/PatchSubscriptionCancellationRequest.php index aeb31eaff..c6019f757 100644 --- a/src/Model/PatchSubscriptionCancellationRequest.php +++ b/src/Model/PatchSubscriptionCancellationRequest.php @@ -277,16 +277,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -395,4 +385,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/PayPalToken.php b/src/Model/PayPalToken.php index 52bc77e16..0677b15c1 100644 --- a/src/Model/PayPalToken.php +++ b/src/Model/PayPalToken.php @@ -177,16 +177,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -279,4 +269,19 @@ private function setExpirationTime(null|DateTimeImmutable|string $expirationTime 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/PaymentCardToken.php b/src/Model/PaymentCardToken.php index 196fff6da..646835929 100644 --- a/src/Model/PaymentCardToken.php +++ b/src/Model/PaymentCardToken.php @@ -177,16 +177,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -279,4 +269,19 @@ private function setExpirationTime(null|DateTimeImmutable|string $expirationTime 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/PaymentMethodMetadata.php b/src/Model/PaymentMethodMetadata.php index 9f563cf40..868b1350b 100644 --- a/src/Model/PaymentMethodMetadata.php +++ b/src/Model/PaymentMethodMetadata.php @@ -163,16 +163,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -206,4 +196,19 @@ public function jsonSerialize(): array return $data; } + + /** + * @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/PlaidAccountToken.php b/src/Model/PlaidAccountToken.php index 4df1c9182..b63b37bb5 100644 --- a/src/Model/PlaidAccountToken.php +++ b/src/Model/PlaidAccountToken.php @@ -177,16 +177,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -279,4 +269,19 @@ private function setExpirationTime(null|DateTimeImmutable|string $expirationTime 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/PlaidCredential.php b/src/Model/PlaidCredential.php index ed9aca3d8..ac9c69429 100644 --- a/src/Model/PlaidCredential.php +++ b/src/Model/PlaidCredential.php @@ -238,16 +238,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getCode(): string { return $this->fields['code']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/Plan.php b/src/Model/Plan.php index f99b6c690..7c1a10578 100644 --- a/src/Model/Plan.php +++ b/src/Model/Plan.php @@ -265,21 +265,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public 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; - } - public function getRecurringInterval(): SubscriptionOrderPlanRecurringInterval { return $this->fields['recurringInterval']; @@ -463,4 +448,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/PostServiceCredentialRequest.php b/src/Model/PostServiceCredentialRequest.php index 8fb14accd..2632db8d5 100644 --- a/src/Model/PostServiceCredentialRequest.php +++ b/src/Model/PostServiceCredentialRequest.php @@ -247,16 +247,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getUsername(): string { return $this->fields['username']; @@ -698,6 +688,21 @@ private function setType(string $type): static 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/PostmarkCredential.php b/src/Model/PostmarkCredential.php index 9cd6630c7..e29d62d1a 100644 --- a/src/Model/PostmarkCredential.php +++ b/src/Model/PostmarkCredential.php @@ -202,16 +202,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getCode(): string { return $this->fields['code']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/Product.php b/src/Model/Product.php index 3b7af7929..50662f130 100644 --- a/src/Model/Product.php +++ b/src/Model/Product.php @@ -215,16 +215,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -299,4 +289,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/Profile.php b/src/Model/Profile.php index 243771655..83d4b461d 100644 --- a/src/Model/Profile.php +++ b/src/Model/Profile.php @@ -226,16 +226,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -424,4 +414,19 @@ private function setHash(null|string $hash): static 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/QuoteTimeline.php b/src/Model/QuoteTimeline.php index c4b33da92..e27bffc52 100644 --- a/src/Model/QuoteTimeline.php +++ b/src/Model/QuoteTimeline.php @@ -131,16 +131,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -200,4 +190,19 @@ private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): s 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/RefundTransaction.php b/src/Model/RefundTransaction.php index 2728c78ca..a428be317 100644 --- a/src/Model/RefundTransaction.php +++ b/src/Model/RefundTransaction.php @@ -167,16 +167,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getRiskReserve(): ?RiskReserveTransactionRiskReserve { return $this->fields['riskReserve'] ?? null; @@ -293,4 +283,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/ResetPasswordToken.php b/src/Model/ResetPasswordToken.php index c41b218a7..847178e85 100644 --- a/src/Model/ResetPasswordToken.php +++ b/src/Model/ResetPasswordToken.php @@ -91,16 +91,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -136,4 +126,19 @@ private function setCredentialId(null|string $credentialId): static 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/ReverseTransaction.php b/src/Model/ReverseTransaction.php index 25c34987d..c0824c517 100644 --- a/src/Model/ReverseTransaction.php +++ b/src/Model/ReverseTransaction.php @@ -167,16 +167,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getRiskReserve(): ?RiskReserveTransactionRiskReserve { return $this->fields['riskReserve'] ?? null; @@ -293,4 +283,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/RiskReserveReleaseTransaction.php b/src/Model/RiskReserveReleaseTransaction.php index 4dcd2c0d8..3a493e270 100644 --- a/src/Model/RiskReserveReleaseTransaction.php +++ b/src/Model/RiskReserveReleaseTransaction.php @@ -167,16 +167,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getRiskReserve(): ?RiskReserveTransactionRiskReserve { return $this->fields['riskReserve'] ?? null; @@ -293,4 +283,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/RiskReserveTransaction.php b/src/Model/RiskReserveTransaction.php index af5a5b6a9..632a1cf6a 100644 --- a/src/Model/RiskReserveTransaction.php +++ b/src/Model/RiskReserveTransaction.php @@ -183,16 +183,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getFee(): ?BuyFeeTransactionFee { return $this->fields['fee'] ?? null; @@ -293,4 +283,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/RuleSet.php b/src/Model/RuleSet.php index 7c617035e..9b1c02956 100644 --- a/src/Model/RuleSet.php +++ b/src/Model/RuleSet.php @@ -117,16 +117,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -180,4 +170,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/RuleSetVersion.php b/src/Model/RuleSetVersion.php index f7f0d728f..5621cd55c 100644 --- a/src/Model/RuleSetVersion.php +++ b/src/Model/RuleSetVersion.php @@ -124,16 +124,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -180,4 +170,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/RulesEngineTimeline.php b/src/Model/RulesEngineTimeline.php index 892bd12d5..294deac21 100644 --- a/src/Model/RulesEngineTimeline.php +++ b/src/Model/RulesEngineTimeline.php @@ -119,16 +119,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -188,4 +178,19 @@ private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): s 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/SESCredential.php b/src/Model/SESCredential.php index dbee6c4ed..eb8605ac9 100644 --- a/src/Model/SESCredential.php +++ b/src/Model/SESCredential.php @@ -238,16 +238,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getCode(): string { return $this->fields['code']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/SellFeeTransaction.php b/src/Model/SellFeeTransaction.php index 9c262e269..8595e9f01 100644 --- a/src/Model/SellFeeTransaction.php +++ b/src/Model/SellFeeTransaction.php @@ -183,16 +183,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getRiskReserve(): ?RiskReserveTransactionRiskReserve { return $this->fields['riskReserve'] ?? null; @@ -293,4 +283,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/SendGridCredential.php b/src/Model/SendGridCredential.php index 2014eb8ce..f7da25bcc 100644 --- a/src/Model/SendGridCredential.php +++ b/src/Model/SendGridCredential.php @@ -202,16 +202,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getCode(): string { return $this->fields['code']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/Session.php b/src/Model/Session.php index 345c0cfc1..defbcf304 100644 --- a/src/Model/Session.php +++ b/src/Model/Session.php @@ -133,16 +133,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -209,4 +199,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/ShippingRate.php b/src/Model/ShippingRate.php index be225e2cd..50519b73d 100644 --- a/src/Model/ShippingRate.php +++ b/src/Model/ShippingRate.php @@ -163,16 +163,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -238,4 +228,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/SmtpCredential.php b/src/Model/SmtpCredential.php index fd1fbc8ac..8751ecae2 100644 --- a/src/Model/SmtpCredential.php +++ b/src/Model/SmtpCredential.php @@ -242,16 +242,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getCode(): string { return $this->fields['code']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/StringCustomField.php b/src/Model/StringCustomField.php index 732f6c651..e55efe477 100644 --- a/src/Model/StringCustomField.php +++ b/src/Model/StringCustomField.php @@ -86,16 +86,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = [ @@ -123,4 +113,19 @@ private function setName(null|string $name): static 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/SubscriptionCancellation.php b/src/Model/SubscriptionCancellation.php index a25611cbb..d725947ba 100644 --- a/src/Model/SubscriptionCancellation.php +++ b/src/Model/SubscriptionCancellation.php @@ -277,16 +277,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -395,4 +385,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/SubscriptionPause.php b/src/Model/SubscriptionPause.php index e40cae9ac..99a573e6c 100644 --- a/src/Model/SubscriptionPause.php +++ b/src/Model/SubscriptionPause.php @@ -183,16 +183,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -268,4 +258,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/SubscriptionReactivation.php b/src/Model/SubscriptionReactivation.php index 51b2283bf..f30848e23 100644 --- a/src/Model/SubscriptionReactivation.php +++ b/src/Model/SubscriptionReactivation.php @@ -156,16 +156,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -238,4 +228,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/Tag.php b/src/Model/Tag.php index 23fe44b99..5d027a755 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -108,16 +108,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -164,4 +154,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/TaxJarCredential.php b/src/Model/TaxJarCredential.php index 96e531e7a..f5f2e8067 100644 --- a/src/Model/TaxJarCredential.php +++ b/src/Model/TaxJarCredential.php @@ -214,16 +214,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getCode(): string { return $this->fields['code']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/TaxTracking.php b/src/Model/TaxTracking.php index 776e9db0c..2fc82582b 100644 --- a/src/Model/TaxTracking.php +++ b/src/Model/TaxTracking.php @@ -267,16 +267,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -342,4 +332,19 @@ private function setInitiatedTime(null|DateTimeImmutable|string $initiatedTime): 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/TransactionTimeline.php b/src/Model/TransactionTimeline.php index 8467724db..859e148cb 100644 --- a/src/Model/TransactionTimeline.php +++ b/src/Model/TransactionTimeline.php @@ -213,16 +213,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -282,4 +272,19 @@ private function setOccurredTime(null|DateTimeImmutable|string $occurredTime): s 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/UpcomingInvoice.php b/src/Model/UpcomingInvoice.php index fda4a4432..ec6802a14 100644 --- a/src/Model/UpcomingInvoice.php +++ b/src/Model/UpcomingInvoice.php @@ -391,21 +391,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public 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; - } - public function getEmbedded(): ?UpcomingInvoiceEmbedded { return $this->fields['_embedded'] ?? null; @@ -615,4 +600,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/UpcomingInvoiceItem.php b/src/Model/UpcomingInvoiceItem.php index ace2438f9..0ab64283f 100644 --- a/src/Model/UpcomingInvoiceItem.php +++ b/src/Model/UpcomingInvoiceItem.php @@ -294,21 +294,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public 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; - } - public function getEmbedded(): ?UpcomingInvoiceItemEmbedded { return $this->fields['_embedded'] ?? null; @@ -407,4 +392,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/Usage.php b/src/Model/Usage.php index 889d8d09e..28302ac03 100644 --- a/src/Model/Usage.php +++ b/src/Model/Usage.php @@ -149,16 +149,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -238,4 +228,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/User.php b/src/Model/User.php index bc7b786e1..89000304e 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -315,16 +315,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -457,4 +447,19 @@ private function setStatus(null|string $status): static 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/ValueList.php b/src/Model/ValueList.php index 3e80ff9ad..a9bede0db 100644 --- a/src/Model/ValueList.php +++ b/src/Model/ValueList.php @@ -114,16 +114,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -187,4 +177,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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/WebhookCredential.php b/src/Model/WebhookCredential.php index 113d875a2..9aa57eea5 100644 --- a/src/Model/WebhookCredential.php +++ b/src/Model/WebhookCredential.php @@ -338,16 +338,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function getKey(): string { return $this->fields['key']; @@ -685,6 +675,21 @@ private function setDeactivationTime(null|DateTimeImmutable|string $deactivation 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; + } + private function setAccessToken(null|string $accessToken): static { $this->fields['accessToken'] = $accessToken; diff --git a/src/Model/WebhookTracking.php b/src/Model/WebhookTracking.php index 489dd8704..b131dd2fc 100644 --- a/src/Model/WebhookTracking.php +++ b/src/Model/WebhookTracking.php @@ -287,16 +287,6 @@ public function getLinks(): ?array return $this->fields['_links'] ?? null; } - /** - * @param null|array[]|ResourceLink[] $links - */ - public function setLinks(null|array $links): static - { - $this->fields['_links'] = $links; - - return $this; - } - public function jsonSerialize(): array { $data = []; @@ -404,4 +394,19 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta 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; + } }