From adf7a93694fd564a91b904258ebe681f19005f59 Mon Sep 17 00:00:00 2001 From: rebilly-machine-user Date: Mon, 2 Mar 2026 20:04:54 +0000 Subject: [PATCH] update SDK from api-definitions --- .changeset/afraid-trees-impress.md | 5 + .changeset/big-dragons-yell.md | 5 + .changeset/calm-plums-kick.md | 5 + .changeset/eight-onions-decide.md | 5 + .changeset/fair-pumas-wink.md | 5 + .changeset/few-tomatoes-reply.md | 5 + .changeset/five-pets-search.md | 5 + .changeset/flat-vans-attend.md | 5 + .changeset/fluffy-candles-attack.md | 5 + .changeset/fluffy-insects-warn.md | 5 + .changeset/funny-meals-clean.md | 5 + .changeset/gentle-impalas-promise.md | 5 + .changeset/gentle-numbers-compete.md | 5 + .changeset/gentle-seas-tap.md | 5 + .changeset/gold-papayas-obey.md | 5 + .changeset/green-spoons-heal.md | 5 + .changeset/happy-houses-boil.md | 5 + .changeset/itchy-windows-joke.md | 5 + .changeset/kind-tigers-eat.md | 5 + .changeset/many-bears-exist.md | 5 + .changeset/nasty-melons-fold.md | 5 + .changeset/new-dancers-learn.md | 5 + .changeset/ninety-colts-dress.md | 5 + .changeset/old-lamps-raise.md | 5 + .changeset/olive-ducks-talk.md | 5 + .changeset/olive-peas-film.md | 5 + .changeset/orange-zebras-carry.md | 5 + .changeset/plenty-buckets-retire.md | 5 + .changeset/plenty-lemons-return.md | 5 + .changeset/polite-cobras-prove.md | 5 + .changeset/popular-bears-fix.md | 5 + .changeset/proud-cups-explode.md | 5 + .changeset/purple-jobs-remember.md | 5 + .changeset/purple-ravens-bake.md | 5 + .changeset/quick-glasses-mix.md | 5 + .changeset/quiet-baboons-press.md | 5 + .changeset/rare-maps-cry.md | 5 + .changeset/selfish-dolls-punch.md | 5 + .changeset/shaggy-plums-travel.md | 5 + .changeset/shaggy-squids-sell.md | 5 + .changeset/silent-moose-pretend.md | 5 + .changeset/six-hotels-look.md | 5 + .changeset/slimy-items-repair.md | 5 + .changeset/soft-spiders-deny.md | 5 + .changeset/spotty-badgers-cover.md | 5 + .changeset/strange-seahorses-watch.md | 5 + .changeset/strong-penguins-draw.md | 5 + .changeset/strong-poets-count.md | 5 + .changeset/stupid-doors-tell.md | 5 + .changeset/tall-nails-study.md | 5 + .changeset/tame-files-smoke.md | 5 + .changeset/tender-bobcats-joke.md | 5 + .changeset/tender-comics-teach.md | 5 + .changeset/three-carpets-relate.md | 5 + .changeset/tidy-maps-report.md | 5 + .changeset/tiny-timers-shake.md | 5 + .changeset/tricky-games-exercise.md | 5 + .changeset/two-days-doubt.md | 5 + .changeset/violet-years-cross.md | 5 + .changeset/wet-scissors-drive.md | 5 + .changeset/witty-zebras-drop.md | 5 + .changeset/yellow-foxes-hope.md | 5 + src/Api/OrdersApi.php | 5 +- src/Api/PayoutRequestAllocationsApi.php | 83 ++++ src/Api/PayoutRequestBatchesApi.php | 189 ++++++++ src/Api/PayoutRequestsApi.php | 24 + src/Api/ReportsApi.php | 34 +- src/Model/AmlCheck.php | 70 +++ src/Model/AmlCheckProvenance.php | 130 ++++++ src/Model/BraintreePayments.php | 22 + src/Model/ConfigurablePlan.php | 2 +- src/Model/CouponRestrictionFactory.php | 1 + .../CouponRestrictionMaximumOrderAmount.php | 83 ++++ src/Model/CreationQuoteOrder.php | 42 ++ src/Model/Customer.php | 24 + src/Model/DashboardResponse.php | 4 + src/Model/DataExport.php | 2 +- src/Model/DataExportFactory.php | 2 + src/Model/FlexiblePlan.php | 2 +- .../GetPayoutRequestBatchPreviewResponse.php | 74 +++ ...outRequestV2PaymentInstrumentsResponse.php | 26 ++ src/Model/GridSegmentData.php | 4 + src/Model/KycIdentityMatches.php | 18 + src/Model/KycSettingsIdentityWeights.php | 18 + src/Model/NMICredentials.php | 18 + src/Model/OneTimeSalePlan.php | 6 +- src/Model/OrderItemUpdate.php | 28 +- src/Model/OrderItemUpdatePlan.php | 62 +++ src/Model/OrderPreview.php | 44 ++ src/Model/OrderPreviewInitialAmounts.php | 148 ++++++ src/Model/OrderPreviewRecurringAmounts.php | 148 ++++++ src/Model/PatchPayoutRequestRequest.php | 42 +- src/Model/PayoutRequest.php | 58 +++ src/Model/PayoutRequestAllocation.php | 22 + .../PayoutRequestAllocationsDataExport.php | 424 ++++++++++++++++++ ...utRequestAllocationsDataExportEmbedded.php | 82 ++++ src/Model/PayoutRequestBatch.php | 276 ++++++++++++ src/Model/PayoutRequestBlockReason.php | 36 ++ src/Model/PayoutRequestSplit.php | 67 +++ src/Model/PayoutRequestTimelineMessage.php | 4 +- src/Model/PayoutRequestV2.php | 82 +++- src/Model/PayoutRequestsDataExport.php | 424 ++++++++++++++++++ .../PayoutRequestsDataExportEmbedded.php | 82 ++++ src/Model/Plan.php | 2 +- src/Model/PostDisputeRequest.php | 30 ++ ...PayoutRequestAllocationsProcessRequest.php | 62 +++ .../PostPayoutRequestBatchBlockRequest.php | 90 ++++ src/Model/PostPayoutRequestBatchRequest.php | 24 + ...stPayoutRequestBatchRequestExplicitIDs.php | 78 ++++ .../PostPayoutRequestBatchRequestFactory.php | 32 ++ ...stPayoutRequestBatchRequestFilterBased.php | 72 +++ src/Model/RecurringOrderItems.php | 2 + src/Model/RedemptionRestrictionFactory.php | 1 + src/Model/ReportAmlChecks.php | 110 +++++ src/Model/RiskScoreBlocklist.php | 220 --------- src/Model/RiskScoreBlocklistType.php | 74 --- src/Model/SubscriptionItem.php | 18 + src/Model/SubscriptionPlan.php | 28 +- src/Model/Transaction.php | 18 + src/Model/TransactionDcc.php | 4 +- src/Model/TrialOnlyPlan.php | 28 +- src/Service.php | 8 + 122 files changed, 3779 insertions(+), 344 deletions(-) create mode 100644 .changeset/afraid-trees-impress.md create mode 100644 .changeset/big-dragons-yell.md create mode 100644 .changeset/calm-plums-kick.md create mode 100644 .changeset/eight-onions-decide.md create mode 100644 .changeset/fair-pumas-wink.md create mode 100644 .changeset/few-tomatoes-reply.md create mode 100644 .changeset/five-pets-search.md create mode 100644 .changeset/flat-vans-attend.md create mode 100644 .changeset/fluffy-candles-attack.md create mode 100644 .changeset/fluffy-insects-warn.md create mode 100644 .changeset/funny-meals-clean.md create mode 100644 .changeset/gentle-impalas-promise.md create mode 100644 .changeset/gentle-numbers-compete.md create mode 100644 .changeset/gentle-seas-tap.md create mode 100644 .changeset/gold-papayas-obey.md create mode 100644 .changeset/green-spoons-heal.md create mode 100644 .changeset/happy-houses-boil.md create mode 100644 .changeset/itchy-windows-joke.md create mode 100644 .changeset/kind-tigers-eat.md create mode 100644 .changeset/many-bears-exist.md create mode 100644 .changeset/nasty-melons-fold.md create mode 100644 .changeset/new-dancers-learn.md create mode 100644 .changeset/ninety-colts-dress.md create mode 100644 .changeset/old-lamps-raise.md create mode 100644 .changeset/olive-ducks-talk.md create mode 100644 .changeset/olive-peas-film.md create mode 100644 .changeset/orange-zebras-carry.md create mode 100644 .changeset/plenty-buckets-retire.md create mode 100644 .changeset/plenty-lemons-return.md create mode 100644 .changeset/polite-cobras-prove.md create mode 100644 .changeset/popular-bears-fix.md create mode 100644 .changeset/proud-cups-explode.md create mode 100644 .changeset/purple-jobs-remember.md create mode 100644 .changeset/purple-ravens-bake.md create mode 100644 .changeset/quick-glasses-mix.md create mode 100644 .changeset/quiet-baboons-press.md create mode 100644 .changeset/rare-maps-cry.md create mode 100644 .changeset/selfish-dolls-punch.md create mode 100644 .changeset/shaggy-plums-travel.md create mode 100644 .changeset/shaggy-squids-sell.md create mode 100644 .changeset/silent-moose-pretend.md create mode 100644 .changeset/six-hotels-look.md create mode 100644 .changeset/slimy-items-repair.md create mode 100644 .changeset/soft-spiders-deny.md create mode 100644 .changeset/spotty-badgers-cover.md create mode 100644 .changeset/strange-seahorses-watch.md create mode 100644 .changeset/strong-penguins-draw.md create mode 100644 .changeset/strong-poets-count.md create mode 100644 .changeset/stupid-doors-tell.md create mode 100644 .changeset/tall-nails-study.md create mode 100644 .changeset/tame-files-smoke.md create mode 100644 .changeset/tender-bobcats-joke.md create mode 100644 .changeset/tender-comics-teach.md create mode 100644 .changeset/three-carpets-relate.md create mode 100644 .changeset/tidy-maps-report.md create mode 100644 .changeset/tiny-timers-shake.md create mode 100644 .changeset/tricky-games-exercise.md create mode 100644 .changeset/two-days-doubt.md create mode 100644 .changeset/violet-years-cross.md create mode 100644 .changeset/wet-scissors-drive.md create mode 100644 .changeset/witty-zebras-drop.md create mode 100644 .changeset/yellow-foxes-hope.md create mode 100644 src/Api/PayoutRequestBatchesApi.php create mode 100644 src/Model/AmlCheckProvenance.php create mode 100644 src/Model/CouponRestrictionMaximumOrderAmount.php create mode 100644 src/Model/GetPayoutRequestBatchPreviewResponse.php create mode 100644 src/Model/OrderItemUpdatePlan.php create mode 100644 src/Model/OrderPreviewInitialAmounts.php create mode 100644 src/Model/OrderPreviewRecurringAmounts.php create mode 100644 src/Model/PayoutRequestAllocationsDataExport.php create mode 100644 src/Model/PayoutRequestAllocationsDataExportEmbedded.php create mode 100644 src/Model/PayoutRequestBatch.php create mode 100644 src/Model/PayoutRequestBlockReason.php create mode 100644 src/Model/PayoutRequestSplit.php create mode 100644 src/Model/PayoutRequestsDataExport.php create mode 100644 src/Model/PayoutRequestsDataExportEmbedded.php create mode 100644 src/Model/PostPayoutRequestAllocationsProcessRequest.php create mode 100644 src/Model/PostPayoutRequestBatchBlockRequest.php create mode 100644 src/Model/PostPayoutRequestBatchRequest.php create mode 100644 src/Model/PostPayoutRequestBatchRequestExplicitIDs.php create mode 100644 src/Model/PostPayoutRequestBatchRequestFactory.php create mode 100644 src/Model/PostPayoutRequestBatchRequestFilterBased.php create mode 100644 src/Model/ReportAmlChecks.php delete mode 100644 src/Model/RiskScoreBlocklistType.php diff --git a/.changeset/afraid-trees-impress.md b/.changeset/afraid-trees-impress.md new file mode 100644 index 000000000..09d8513c5 --- /dev/null +++ b/.changeset/afraid-trees-impress.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(be, payment-gateways): Update Paybilt payout new flow Rebilly/rebilly#18734 diff --git a/.changeset/big-dragons-yell.md b/.changeset/big-dragons-yell.md new file mode 100644 index 000000000..2a492ec63 --- /dev/null +++ b/.changeset/big-dragons-yell.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +chore(fe): Bump fast-xml-parser to fix security issues Rebilly/rebilly#18899 diff --git a/.changeset/calm-plums-kick.md b/.changeset/calm-plums-kick.md new file mode 100644 index 000000000..bd6089fcb --- /dev/null +++ b/.changeset/calm-plums-kick.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be, recomm, api-definitions): Add MaximumOrderAmount coupon restriction Rebilly/rebilly#17757 diff --git a/.changeset/eight-onions-decide.md b/.changeset/eight-onions-decide.md new file mode 100644 index 000000000..80acb6aec --- /dev/null +++ b/.changeset/eight-onions-decide.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(docs): Add notificationEmails to Storefront account Rebilly/rebilly#19182 diff --git a/.changeset/fair-pumas-wink.md b/.changeset/fair-pumas-wink.md new file mode 100644 index 000000000..b7f204666 --- /dev/null +++ b/.changeset/fair-pumas-wink.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be, api-definitions): Add data export functionality for payout requests and allocations Rebilly/rebilly#18168 diff --git a/.changeset/few-tomatoes-reply.md b/.changeset/few-tomatoes-reply.md new file mode 100644 index 000000000..44a22096f --- /dev/null +++ b/.changeset/few-tomatoes-reply.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Fix api defs patch order item Rebilly/rebilly#18565 diff --git a/.changeset/five-pets-search.md b/.changeset/five-pets-search.md new file mode 100644 index 000000000..7261b51cb --- /dev/null +++ b/.changeset/five-pets-search.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be,metadata,api-definitions): Update NMI API key authentication Rebilly/rebilly#18559 diff --git a/.changeset/flat-vans-attend.md b/.changeset/flat-vans-attend.md new file mode 100644 index 000000000..d2b07cf80 --- /dev/null +++ b/.changeset/flat-vans-attend.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +docs(website, api-definitions ): Add more noun phrase guidance for API fields Rebilly/rebilly#18686 diff --git a/.changeset/fluffy-candles-attack.md b/.changeset/fluffy-candles-attack.md new file mode 100644 index 000000000..febc9f4dd --- /dev/null +++ b/.changeset/fluffy-candles-attack.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +chore(deps): bump @redocly/cli from 2.14.4 to 2.14.5 in /website/api-definitions Rebilly/rebilly#18058 diff --git a/.changeset/fluffy-insects-warn.md b/.changeset/fluffy-insects-warn.md new file mode 100644 index 000000000..c3c1f4904 --- /dev/null +++ b/.changeset/fluffy-insects-warn.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(be,api-definitions,recomm): Add missing Discover dispute reason codes Rebilly/rebilly#18032 diff --git a/.changeset/funny-meals-clean.md b/.changeset/funny-meals-clean.md new file mode 100644 index 000000000..d12e8c8d6 --- /dev/null +++ b/.changeset/funny-meals-clean.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Add missing required method in schemas Rebilly/rebilly#18742 diff --git a/.changeset/gentle-impalas-promise.md b/.changeset/gentle-impalas-promise.md new file mode 100644 index 000000000..212feb1dd --- /dev/null +++ b/.changeset/gentle-impalas-promise.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Fix orders experimental API fields Rebilly/rebilly#18768 diff --git a/.changeset/gentle-numbers-compete.md b/.changeset/gentle-numbers-compete.md new file mode 100644 index 000000000..677b76915 --- /dev/null +++ b/.changeset/gentle-numbers-compete.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be, api-definitions): preview orders enhancements Rebilly/rebilly#17844 diff --git a/.changeset/gentle-seas-tap.md b/.changeset/gentle-seas-tap.md new file mode 100644 index 000000000..c104238d3 --- /dev/null +++ b/.changeset/gentle-seas-tap.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api-definition, be, payment-gateways): Implement Paybilt payout Rebilly/rebilly#18651 diff --git a/.changeset/gold-papayas-obey.md b/.changeset/gold-papayas-obey.md new file mode 100644 index 000000000..4d0998a5a --- /dev/null +++ b/.changeset/gold-papayas-obey.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +SDK Generator updated diff --git a/.changeset/green-spoons-heal.md b/.changeset/green-spoons-heal.md new file mode 100644 index 000000000..4d0998a5a --- /dev/null +++ b/.changeset/green-spoons-heal.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +SDK Generator updated diff --git a/.changeset/happy-houses-boil.md b/.changeset/happy-houses-boil.md new file mode 100644 index 000000000..d1c3be73b --- /dev/null +++ b/.changeset/happy-houses-boil.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be,api-definitions): Create payout request batch using filter parameters Rebilly/rebilly#18767 diff --git a/.changeset/itchy-windows-joke.md b/.changeset/itchy-windows-joke.md new file mode 100644 index 000000000..b3159f568 --- /dev/null +++ b/.changeset/itchy-windows-joke.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api-definitions): add transferId to transaction schema Rebilly/rebilly#18563 diff --git a/.changeset/kind-tigers-eat.md b/.changeset/kind-tigers-eat.md new file mode 100644 index 000000000..e47716480 --- /dev/null +++ b/.changeset/kind-tigers-eat.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Mark invoiceTimeShift field as deprecated and readOnly Rebilly/rebilly#18532 diff --git a/.changeset/many-bears-exist.md b/.changeset/many-bears-exist.md new file mode 100644 index 000000000..b6e8632f2 --- /dev/null +++ b/.changeset/many-bears-exist.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api,be): Add batchId to payout request allocation Rebilly/rebilly#18380 diff --git a/.changeset/nasty-melons-fold.md b/.changeset/nasty-melons-fold.md new file mode 100644 index 000000000..5c7db01b2 --- /dev/null +++ b/.changeset/nasty-melons-fold.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(backend,recomm,api-definitions): Permanently block above and Temporary block above use the independent pool of attributes - remove backward compatibility Rebilly/rebilly#18099 diff --git a/.changeset/new-dancers-learn.md b/.changeset/new-dancers-learn.md new file mode 100644 index 000000000..376d2bf29 --- /dev/null +++ b/.changeset/new-dancers-learn.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be, api-definitions): Add legacy property for creation quotes Rebilly/rebilly#18930 diff --git a/.changeset/ninety-colts-dress.md b/.changeset/ninety-colts-dress.md new file mode 100644 index 000000000..2deaf8c57 --- /dev/null +++ b/.changeset/ninety-colts-dress.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be, api-definitions): Add AML report endpoint Rebilly/rebilly#18271 diff --git a/.changeset/old-lamps-raise.md b/.changeset/old-lamps-raise.md new file mode 100644 index 000000000..006314bb8 --- /dev/null +++ b/.changeset/old-lamps-raise.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +revert(api-definitions): Fix orders experimental API fields Rebilly/rebilly#18789 diff --git a/.changeset/olive-ducks-talk.md b/.changeset/olive-ducks-talk.md new file mode 100644 index 000000000..8ad19f6d6 --- /dev/null +++ b/.changeset/olive-ducks-talk.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +chore(website): Fine-tune API descriptions review in Gemini Rebilly/rebilly#18723 diff --git a/.changeset/olive-peas-film.md b/.changeset/olive-peas-film.md new file mode 100644 index 000000000..8f341ba08 --- /dev/null +++ b/.changeset/olive-peas-film.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +build(deps): merge passing FE dependabot PRs Rebilly/rebilly#18118 diff --git a/.changeset/orange-zebras-carry.md b/.changeset/orange-zebras-carry.md new file mode 100644 index 000000000..0759dc886 --- /dev/null +++ b/.changeset/orange-zebras-carry.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +chore(deps): merge passing FE dependabot PRs Rebilly/rebilly#18528 diff --git a/.changeset/plenty-buckets-retire.md b/.changeset/plenty-buckets-retire.md new file mode 100644 index 000000000..42b3aa002 --- /dev/null +++ b/.changeset/plenty-buckets-retire.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be): Implement AmlProvenance Rebilly/rebilly#17982 diff --git a/.changeset/plenty-lemons-return.md b/.changeset/plenty-lemons-return.md new file mode 100644 index 000000000..dd7fd2027 --- /dev/null +++ b/.changeset/plenty-lemons-return.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +build(deps): merge passing FE dependabot PRs Rebilly/rebilly#18191 diff --git a/.changeset/polite-cobras-prove.md b/.changeset/polite-cobras-prove.md new file mode 100644 index 000000000..beeb4ad29 --- /dev/null +++ b/.changeset/polite-cobras-prove.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api-defs): Add payout request batch operations Rebilly/rebilly#17873 diff --git a/.changeset/popular-bears-fix.md b/.changeset/popular-bears-fix.md new file mode 100644 index 000000000..ba11a9264 --- /dev/null +++ b/.changeset/popular-bears-fix.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Fix orders experimental API fields Rebilly/rebilly#18883 diff --git a/.changeset/proud-cups-explode.md b/.changeset/proud-cups-explode.md new file mode 100644 index 000000000..91377c59e --- /dev/null +++ b/.changeset/proud-cups-explode.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api-definitions): Add block reason fields to payout request related schema and body Rebilly/rebilly#18898 diff --git a/.changeset/purple-jobs-remember.md b/.changeset/purple-jobs-remember.md new file mode 100644 index 000000000..58ca776bc --- /dev/null +++ b/.changeset/purple-jobs-remember.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be): Add currency exchange rate to Storefront DCC response Rebilly/rebilly#19056 diff --git a/.changeset/purple-ravens-bake.md b/.changeset/purple-ravens-bake.md new file mode 100644 index 000000000..dfd279507 --- /dev/null +++ b/.changeset/purple-ravens-bake.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be,api-definitions): Add payout request batches data table Rebilly/rebilly#18278 diff --git a/.changeset/quick-glasses-mix.md b/.changeset/quick-glasses-mix.md new file mode 100644 index 000000000..07150897a --- /dev/null +++ b/.changeset/quick-glasses-mix.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be,api-definitions): Add payout request allocations data table Rebilly/rebilly#18273 diff --git a/.changeset/quiet-baboons-press.md b/.changeset/quiet-baboons-press.md new file mode 100644 index 000000000..edbd6d7b2 --- /dev/null +++ b/.changeset/quiet-baboons-press.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be): Include gatewayPayoutInstruction in payout request payment instruments data Rebilly/rebilly#18507 diff --git a/.changeset/rare-maps-cry.md b/.changeset/rare-maps-cry.md new file mode 100644 index 000000000..94e5fc99e --- /dev/null +++ b/.changeset/rare-maps-cry.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(backend): implements option to add additional emails to customers Rebilly/rebilly#18543 diff --git a/.changeset/selfish-dolls-punch.md b/.changeset/selfish-dolls-punch.md new file mode 100644 index 000000000..8bb569d4e --- /dev/null +++ b/.changeset/selfish-dolls-punch.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be, api-definitions): Add startTime to creation quotes Rebilly/rebilly#18022 diff --git a/.changeset/shaggy-plums-travel.md b/.changeset/shaggy-plums-travel.md new file mode 100644 index 000000000..74f66e522 --- /dev/null +++ b/.changeset/shaggy-plums-travel.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Update Transaction transferId description and remove transferId from storefrontTransaction Rebilly/rebilly#19153 diff --git a/.changeset/shaggy-squids-sell.md b/.changeset/shaggy-squids-sell.md new file mode 100644 index 000000000..c1ce3aa49 --- /dev/null +++ b/.changeset/shaggy-squids-sell.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +docs(api-definitions): Remove Trigger from summaries Rebilly/rebilly#18212 diff --git a/.changeset/silent-moose-pretend.md b/.changeset/silent-moose-pretend.md new file mode 100644 index 000000000..5ed187b4e --- /dev/null +++ b/.changeset/silent-moose-pretend.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +build(deps): merge passing FE dependabot PRs Rebilly/rebilly#18806 diff --git a/.changeset/six-hotels-look.md b/.changeset/six-hotels-look.md new file mode 100644 index 000000000..dec823861 --- /dev/null +++ b/.changeset/six-hotels-look.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +refactor(be,api-definitions): Refactor remaining reports to Symfony validation Rebilly/rebilly#19252 diff --git a/.changeset/slimy-items-repair.md b/.changeset/slimy-items-repair.md new file mode 100644 index 000000000..86d14ad39 --- /dev/null +++ b/.changeset/slimy-items-repair.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be): Add noMatchReason to AmlCheck Rebilly/rebilly#18727 diff --git a/.changeset/soft-spiders-deny.md b/.changeset/soft-spiders-deny.md new file mode 100644 index 000000000..e4adf17b1 --- /dev/null +++ b/.changeset/soft-spiders-deny.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api-definitions): Add AML checks report path Rebilly/rebilly#18613 diff --git a/.changeset/spotty-badgers-cover.md b/.changeset/spotty-badgers-cover.md new file mode 100644 index 000000000..4d0998a5a --- /dev/null +++ b/.changeset/spotty-badgers-cover.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +SDK Generator updated diff --git a/.changeset/strange-seahorses-watch.md b/.changeset/strange-seahorses-watch.md new file mode 100644 index 000000000..117c4c3e7 --- /dev/null +++ b/.changeset/strange-seahorses-watch.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +docs: Add other missing KYC tile type Rebilly/rebilly#18368 diff --git a/.changeset/strong-penguins-draw.md b/.changeset/strong-penguins-draw.md new file mode 100644 index 000000000..7bbc357d3 --- /dev/null +++ b/.changeset/strong-penguins-draw.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +revert(backend): Permanently block above and Temporary block above use the independent pool of attributes - remove backward compatibility Rebilly/rebilly#17885 diff --git a/.changeset/strong-poets-count.md b/.changeset/strong-poets-count.md new file mode 100644 index 000000000..b929b8ef9 --- /dev/null +++ b/.changeset/strong-poets-count.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(backend,api-definitions): expose tax number updates to storefront Rebilly/rebilly#18625 diff --git a/.changeset/stupid-doors-tell.md b/.changeset/stupid-doors-tell.md new file mode 100644 index 000000000..4d0998a5a --- /dev/null +++ b/.changeset/stupid-doors-tell.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +SDK Generator updated diff --git a/.changeset/tall-nails-study.md b/.changeset/tall-nails-study.md new file mode 100644 index 000000000..3fbb825b1 --- /dev/null +++ b/.changeset/tall-nails-study.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(be, website): Restrict invoice address change Rebilly/rebilly#18836 diff --git a/.changeset/tame-files-smoke.md b/.changeset/tame-files-smoke.md new file mode 100644 index 000000000..a0d0c87ea --- /dev/null +++ b/.changeset/tame-files-smoke.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +chore(builds): Bump fast-xml-parser to resolve security issues Rebilly/rebilly#18581 diff --git a/.changeset/tender-bobcats-joke.md b/.changeset/tender-bobcats-joke.md new file mode 100644 index 000000000..06b55edff --- /dev/null +++ b/.changeset/tender-bobcats-joke.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(api-definitions): Fix api defs plan id required Rebilly/rebilly#18580 diff --git a/.changeset/tender-comics-teach.md b/.changeset/tender-comics-teach.md new file mode 100644 index 000000000..81d74ee65 --- /dev/null +++ b/.changeset/tender-comics-teach.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be,api-definitions): Implement Storefront endpoints for transactions DCC offer Rebilly/rebilly#18749 diff --git a/.changeset/three-carpets-relate.md b/.changeset/three-carpets-relate.md new file mode 100644 index 000000000..34990f403 --- /dev/null +++ b/.changeset/three-carpets-relate.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(backend): KYC - detect photocopies Rebilly/rebilly#18256 diff --git a/.changeset/tidy-maps-report.md b/.changeset/tidy-maps-report.md new file mode 100644 index 000000000..abdbba75e --- /dev/null +++ b/.changeset/tidy-maps-report.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api-definitions, docs): Add split and merge operations to payout request resource Rebilly/rebilly#17834 diff --git a/.changeset/tiny-timers-shake.md b/.changeset/tiny-timers-shake.md new file mode 100644 index 000000000..e96d76eb2 --- /dev/null +++ b/.changeset/tiny-timers-shake.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be): Add payout request allocation status declined and queued Rebilly/rebilly#19064 diff --git a/.changeset/tricky-games-exercise.md b/.changeset/tricky-games-exercise.md new file mode 100644 index 000000000..b21a8285d --- /dev/null +++ b/.changeset/tricky-games-exercise.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api-definitions): Add blockReason field to PayoutRequestV2 schema Rebilly/rebilly#19061 diff --git a/.changeset/two-days-doubt.md b/.changeset/two-days-doubt.md new file mode 100644 index 000000000..0d56eb95b --- /dev/null +++ b/.changeset/two-days-doubt.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(api-definitions): Add new metrics for AML check histogram report Rebilly/rebilly#18012 diff --git a/.changeset/violet-years-cross.md b/.changeset/violet-years-cross.md new file mode 100644 index 000000000..53722b540 --- /dev/null +++ b/.changeset/violet-years-cross.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +fix(backend): Permanently block above and Temporary block above use the independent pool of attributes - remove backward compatibility Rebilly/rebilly#17885 diff --git a/.changeset/wet-scissors-drive.md b/.changeset/wet-scissors-drive.md new file mode 100644 index 000000000..a29f9362d --- /dev/null +++ b/.changeset/wet-scissors-drive.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +feat(be): Add productOptions to PatchOrderItem Rebilly/rebilly#18533 diff --git a/.changeset/witty-zebras-drop.md b/.changeset/witty-zebras-drop.md new file mode 100644 index 000000000..b53e79202 --- /dev/null +++ b/.changeset/witty-zebras-drop.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +build(deps): merge passing FE dependabot PRs Rebilly/rebilly#18610 diff --git a/.changeset/yellow-foxes-hope.md b/.changeset/yellow-foxes-hope.md new file mode 100644 index 000000000..9922ec92e --- /dev/null +++ b/.changeset/yellow-foxes-hope.md @@ -0,0 +1,5 @@ +--- +"@rebilly/client-php": patch +--- + +docs: Add missing KYC tile type Rebilly/rebilly#18362 diff --git a/src/Api/OrdersApi.php b/src/Api/OrdersApi.php index 0cf131c56..bb5bb4b0a 100644 --- a/src/Api/OrdersApi.php +++ b/src/Api/OrdersApi.php @@ -26,6 +26,7 @@ use Rebilly\Sdk\Model\OrderItemUpdate; use Rebilly\Sdk\Model\OrderUpcomingInvoice; use Rebilly\Sdk\Model\SubscriptionInvoice; +use Rebilly\Sdk\Model\SubscriptionOrOneTimeSaleItem; use Rebilly\Sdk\Model\UpcomingInvoice; use Rebilly\Sdk\Paginator; @@ -242,7 +243,7 @@ public function updateItem( string $id, string $itemId, OrderItemUpdate $orderItemUpdate, - ): Order { + ): SubscriptionOrOneTimeSaleItem { $pathParams = [ '{id}' => $id, '{itemId}' => $itemId, @@ -256,7 +257,7 @@ public function updateItem( $response = $this->client->send($request); $data = Utils::jsonDecode((string) $response->getBody(), true); - return OrderFactory::from($data); + return SubscriptionOrOneTimeSaleItem::from($data); } public function void( diff --git a/src/Api/PayoutRequestAllocationsApi.php b/src/Api/PayoutRequestAllocationsApi.php index 73e75833e..a37d74257 100644 --- a/src/Api/PayoutRequestAllocationsApi.php +++ b/src/Api/PayoutRequestAllocationsApi.php @@ -17,10 +17,13 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Psr7\Request; use GuzzleHttp\Utils; +use Rebilly\Sdk\Collection; use Rebilly\Sdk\Model\PatchPayoutRequestAllocationRequest; use Rebilly\Sdk\Model\PayoutRequestAllocation; use Rebilly\Sdk\Model\PostPayoutRequestAllocationRequest; +use Rebilly\Sdk\Model\PostPayoutRequestAllocationsProcessRequest; use Rebilly\Sdk\Model\PostPayoutRequestAutoAllocationRequest; +use Rebilly\Sdk\Paginator; class PayoutRequestAllocationsApi { @@ -51,6 +54,86 @@ public function create( return PayoutRequestAllocation::from($data); } + public function get( + string $id, + ): PayoutRequestAllocation { + $pathParams = [ + '{id}' => $id, + ]; + + $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/payout-request-allocations/{id}'); + + $request = new Request('GET', $uri, headers: [ + 'Accept' => 'application/json', + ]); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return PayoutRequestAllocation::from($data); + } + + /** + * @return Collection + */ + public function getAll( + ?int $limit = null, + ?int $offset = null, + ?string $filter = null, + ?array $sort = null, + ): Collection { + $queryParams = [ + 'limit' => $limit, + 'offset' => $offset, + 'filter' => $filter, + 'sort' => $sort ? implode(',', $sort) : null, + ]; + $uri = '/payout-request-allocations?' . http_build_query($queryParams); + + $request = new Request('GET', $uri, headers: [ + 'Accept' => 'application/json', + ]); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return new Collection( + array_map(fn (array $item): PayoutRequestAllocation => PayoutRequestAllocation::from($item), $data), + (int) $response->getHeaderLine(Collection::HEADER_LIMIT), + (int) $response->getHeaderLine(Collection::HEADER_OFFSET), + (int) $response->getHeaderLine(Collection::HEADER_TOTAL), + ); + } + + /** + * @return Paginator + */ + public function getAllPaginator( + ?int $limit = null, + ?int $offset = null, + ?string $filter = null, + ?array $sort = null, + ): Paginator { + $closure = fn (?int $limit, ?int $offset): Collection => $this->getAll( + limit: $limit, + offset: $offset, + filter: $filter, + sort: $sort, + ); + + return new Paginator( + $limit !== null || $offset !== null ? $closure(limit: $limit, offset: $offset) : null, + $closure, + ); + } + + public function process( + PostPayoutRequestAllocationsProcessRequest $postPayoutRequestAllocationsProcessRequest, + ): void { + $uri = '/payout-request-allocations/process'; + + $request = new Request('POST', $uri, body: Utils::jsonEncode($postPayoutRequestAllocationsProcessRequest)); + $this->client->send($request); + } + public function update( string $id, PatchPayoutRequestAllocationRequest $patchPayoutRequestAllocationRequest, diff --git a/src/Api/PayoutRequestBatchesApi.php b/src/Api/PayoutRequestBatchesApi.php new file mode 100644 index 000000000..bdc7a52af --- /dev/null +++ b/src/Api/PayoutRequestBatchesApi.php @@ -0,0 +1,189 @@ + $id, + ]; + + $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/payout-request-batches/{id}/approve'); + + $request = new Request('POST', $uri, headers: [ + 'Accept' => 'application/json', + ]); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return PayoutRequestBatch::from($data); + } + + public function autoAllocate( + string $id, + ): PayoutRequestBatch { + $pathParams = [ + '{id}' => $id, + ]; + + $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/payout-request-batches/{id}/auto-allocate'); + + $request = new Request('POST', $uri, headers: [ + 'Accept' => 'application/json', + ]); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return PayoutRequestBatch::from($data); + } + + public function block( + string $id, + PostPayoutRequestBatchBlockRequest $postPayoutRequestBatchBlockRequest, + ): PayoutRequestBatch { + $pathParams = [ + '{id}' => $id, + ]; + + $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/payout-request-batches/{id}/block'); + + $request = new Request('POST', $uri, headers: [ + 'Accept' => 'application/json', + ], body: Utils::jsonEncode($postPayoutRequestBatchBlockRequest)); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return PayoutRequestBatch::from($data); + } + + public function create( + PostPayoutRequestBatchRequest $postPayoutRequestBatchRequest, + ): PayoutRequestBatch { + $uri = '/payout-request-batches'; + + $request = new Request('POST', $uri, headers: [ + 'Accept' => 'application/json', + ], body: Utils::jsonEncode($postPayoutRequestBatchRequest)); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return PayoutRequestBatch::from($data); + } + + public function get( + string $id, + ): PayoutRequestBatch { + $pathParams = [ + '{id}' => $id, + ]; + + $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/payout-request-batches/{id}'); + + $request = new Request('GET', $uri, headers: [ + 'Accept' => 'application/json', + ]); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return PayoutRequestBatch::from($data); + } + + /** + * @return Collection + */ + public function getAll( + ?int $limit = null, + ?int $offset = null, + ?string $filter = null, + ?array $sort = null, + ): Collection { + $queryParams = [ + 'limit' => $limit, + 'offset' => $offset, + 'filter' => $filter, + 'sort' => $sort ? implode(',', $sort) : null, + ]; + $uri = '/payout-request-batches?' . http_build_query($queryParams); + + $request = new Request('GET', $uri, headers: [ + 'Accept' => 'application/json', + ]); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return new Collection( + array_map(fn (array $item): PayoutRequestBatch => PayoutRequestBatch::from($item), $data), + (int) $response->getHeaderLine(Collection::HEADER_LIMIT), + (int) $response->getHeaderLine(Collection::HEADER_OFFSET), + (int) $response->getHeaderLine(Collection::HEADER_TOTAL), + ); + } + + /** + * @return Paginator + */ + public function getAllPaginator( + ?int $limit = null, + ?int $offset = null, + ?string $filter = null, + ?array $sort = null, + ): Paginator { + $closure = fn (?int $limit, ?int $offset): Collection => $this->getAll( + limit: $limit, + offset: $offset, + filter: $filter, + sort: $sort, + ); + + return new Paginator( + $limit !== null || $offset !== null ? $closure(limit: $limit, offset: $offset) : null, + $closure, + ); + } + + public function preview( + ?string $filter = null, + ): GetPayoutRequestBatchPreviewResponse { + $queryParams = [ + 'filter' => $filter, + ]; + $uri = '/payout-request-batches/preview?' . http_build_query($queryParams); + + $request = new Request('GET', $uri, headers: [ + 'Accept' => 'application/json', + ]); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return GetPayoutRequestBatchPreviewResponse::from($data); + } +} diff --git a/src/Api/PayoutRequestsApi.php b/src/Api/PayoutRequestsApi.php index 422bed6cc..c3c85db9b 100644 --- a/src/Api/PayoutRequestsApi.php +++ b/src/Api/PayoutRequestsApi.php @@ -22,7 +22,9 @@ use Rebilly\Sdk\Model\PatchPayoutRequestRequest; use Rebilly\Sdk\Model\PayoutRequest; use Rebilly\Sdk\Model\PayoutRequestCancellation; +use Rebilly\Sdk\Model\PayoutRequestSplit; use Rebilly\Sdk\Model\PayoutRequestTimelineMessage; +use Rebilly\Sdk\Model\PayoutRequestV2; use Rebilly\Sdk\Paginator; class PayoutRequestsApi @@ -293,6 +295,28 @@ public function patch( return PayoutRequest::from($data); } + /** + * @return PayoutRequestV2[] + */ + public function split( + string $id, + PayoutRequestSplit $payoutRequestSplit, + ): array { + $pathParams = [ + '{id}' => $id, + ]; + + $uri = str_replace(array_keys($pathParams), array_values($pathParams), '/payout-requests/{id}/split'); + + $request = new Request('POST', $uri, headers: [ + 'Accept' => 'application/json', + ], body: Utils::jsonEncode($payoutRequestSplit)); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return array_map(fn (array $item): PayoutRequestV2 => PayoutRequestV2::from($item), $data); + } + public function update( string $id, PayoutRequest $payoutRequest, diff --git a/src/Api/ReportsApi.php b/src/Api/ReportsApi.php index e7cfab1b3..99ddc3819 100644 --- a/src/Api/ReportsApi.php +++ b/src/Api/ReportsApi.php @@ -26,6 +26,7 @@ use Rebilly\Sdk\Model\GetKycAcceptanceSummaryReportResponse; use Rebilly\Sdk\Model\JournalSummaryReport; use Rebilly\Sdk\Model\RenewalSales; +use Rebilly\Sdk\Model\ReportAmlChecks; use Rebilly\Sdk\Model\ReportAnnualRecurringRevenue; use Rebilly\Sdk\Model\ReportDeclinedTransactions; use Rebilly\Sdk\Model\ReportDeferredRevenue; @@ -52,6 +53,31 @@ public function __construct(protected ?ClientInterface $client) { } + public function getAmlChecks( + ?DateTimeImmutable $periodStart = null, + ?DateTimeImmutable $periodEnd = null, + ?string $metric = null, + ?bool $includePropagatedResults = null, + ?string $filter = null, + ): ReportAmlChecks { + $queryParams = [ + 'periodStart' => $periodStart->format('Y-m-d\TH:i:s\Z'), + 'periodEnd' => $periodEnd->format('Y-m-d\TH:i:s\Z'), + 'metric' => $metric, + 'includePropagatedResults' => $includePropagatedResults, + 'filter' => $filter, + ]; + $uri = '/experimental/reports/aml-checks?' . http_build_query($queryParams); + + $request = new Request('GET', $uri, headers: [ + 'Accept' => 'application/json', + ]); + $response = $this->client->send($request); + $data = Utils::jsonDecode((string) $response->getBody(), true); + + return ReportAmlChecks::from($data); + } + public function getAnnualRecurringRevenue( string $currency, string $periodStart, @@ -383,8 +409,8 @@ public function getKycAcceptanceSummary( } public function getKycRejectionSummary( - DateTimeImmutable $periodStart, - DateTimeImmutable $periodEnd, + ?DateTimeImmutable $periodStart = null, + ?DateTimeImmutable $periodEnd = null, ): ReportKycRejections { $queryParams = [ 'periodStart' => $periodStart->format('Y-m-d\TH:i:s\Z'), @@ -402,8 +428,8 @@ public function getKycRejectionSummary( } public function getKycRequestSummary( - DateTimeImmutable $periodStart, - DateTimeImmutable $periodEnd, + ?DateTimeImmutable $periodStart = null, + ?DateTimeImmutable $periodEnd = null, ): ReportKycRequests { $queryParams = [ 'periodStart' => $periodStart->format('Y-m-d\TH:i:s\Z'), diff --git a/src/Model/AmlCheck.php b/src/Model/AmlCheck.php index 972c2b235..415f26932 100644 --- a/src/Model/AmlCheck.php +++ b/src/Model/AmlCheck.php @@ -20,6 +20,10 @@ class AmlCheck implements JsonSerializable { + public const REVIEWER_TYPE_HUMAN = 'human'; + + public const REVIEWER_TYPE_BOT = 'bot'; + public const SOURCE_SIGN_UP = 'sign-up'; public const SOURCE_RECURRING = 'recurring'; @@ -36,6 +40,14 @@ class AmlCheck implements JsonSerializable public const STATUS_FALSE_POSITIVE = 'false-positive'; + public const NO_MATCH_REASON_NO_HITS_FOUND = 'no_hits_found'; + + public const NO_MATCH_REASON_MISMATCHED_HITS = 'mismatched_hits'; + + public const NO_MATCH_REASON_HITS_ARE_BELOW_RELEVANCE_SCORE_THRESHOLD = 'hits_are_below_relevance_score_threshold'; + + public const NO_MATCH_REASON_INTERNAL_SYSTEM_ERROR = 'internal_system_error'; + private array $fields = []; public function __construct(array $data = []) @@ -55,6 +67,9 @@ public function __construct(array $data = []) if (array_key_exists('reviewerId', $data)) { $this->setReviewerId($data['reviewerId']); } + if (array_key_exists('reviewerType', $data)) { + $this->setReviewerType($data['reviewerType']); + } if (array_key_exists('reviewerName', $data)) { $this->setReviewerName($data['reviewerName']); } @@ -82,6 +97,12 @@ public function __construct(array $data = []) if (array_key_exists('tags', $data)) { $this->setTags($data['tags']); } + if (array_key_exists('provenance', $data)) { + $this->setProvenance($data['provenance']); + } + if (array_key_exists('noMatchReason', $data)) { + $this->setNoMatchReason($data['noMatchReason']); + } if (array_key_exists('_links', $data)) { $this->setLinks($data['_links']); } @@ -138,6 +159,11 @@ public function setReviewerId(null|string $reviewerId): static return $this; } + public function getReviewerType(): ?string + { + return $this->fields['reviewerType'] ?? null; + } + public function getReviewerName(): ?string { return $this->fields['reviewerName'] ?? null; @@ -258,6 +284,27 @@ public function getTags(): ?array return $this->fields['tags'] ?? null; } + public function getProvenance(): ?AmlCheckProvenance + { + return $this->fields['provenance'] ?? null; + } + + public function setProvenance(null|AmlCheckProvenance|array $provenance): static + { + if ($provenance !== null && !($provenance instanceof AmlCheckProvenance)) { + $provenance = AmlCheckProvenance::from($provenance); + } + + $this->fields['provenance'] = $provenance; + + return $this; + } + + public function getNoMatchReason(): ?string + { + return $this->fields['noMatchReason'] ?? null; + } + /** * @return null|ResourceLink[] */ @@ -284,6 +331,9 @@ public function jsonSerialize(): array if (array_key_exists('reviewerId', $this->fields)) { $data['reviewerId'] = $this->fields['reviewerId']; } + if (array_key_exists('reviewerType', $this->fields)) { + $data['reviewerType'] = $this->fields['reviewerType']; + } if (array_key_exists('reviewerName', $this->fields)) { $data['reviewerName'] = $this->fields['reviewerName']; } @@ -321,6 +371,12 @@ public function jsonSerialize(): array ) : null; } + if (array_key_exists('provenance', $this->fields)) { + $data['provenance'] = $this->fields['provenance']?->jsonSerialize(); + } + if (array_key_exists('noMatchReason', $this->fields)) { + $data['noMatchReason'] = $this->fields['noMatchReason']; + } if (array_key_exists('_links', $this->fields)) { $data['_links'] = $this->fields['_links'] !== null ? array_map( @@ -355,6 +411,13 @@ private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): sta return $this; } + private function setReviewerType(null|string $reviewerType): static + { + $this->fields['reviewerType'] = $reviewerType; + + return $this; + } + private function setStatus(null|string $status): static { $this->fields['status'] = $status; @@ -377,6 +440,13 @@ private function setTags(null|array $tags): static return $this; } + private function setNoMatchReason(null|string $noMatchReason): static + { + $this->fields['noMatchReason'] = $noMatchReason; + + return $this; + } + /** * @param null|array[]|ResourceLink[] $links */ diff --git a/src/Model/AmlCheckProvenance.php b/src/Model/AmlCheckProvenance.php new file mode 100644 index 000000000..4e90dbeda --- /dev/null +++ b/src/Model/AmlCheckProvenance.php @@ -0,0 +1,130 @@ +setInherited($data['inherited']); + } + if (array_key_exists('inheritedFromAmlCheckId', $data)) { + $this->setInheritedFromAmlCheckId($data['inheritedFromAmlCheckId']); + } + if (array_key_exists('scope', $data)) { + $this->setScope($data['scope']); + } + if (array_key_exists('reasons', $data)) { + $this->setReasons($data['reasons']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getInherited(): ?bool + { + return $this->fields['inherited'] ?? null; + } + + public function setInherited(null|bool $inherited): static + { + $this->fields['inherited'] = $inherited; + + return $this; + } + + public function getInheritedFromAmlCheckId(): ?string + { + return $this->fields['inheritedFromAmlCheckId'] ?? null; + } + + public function setInheritedFromAmlCheckId(null|string $inheritedFromAmlCheckId): static + { + $this->fields['inheritedFromAmlCheckId'] = $inheritedFromAmlCheckId; + + return $this; + } + + /** + * @return null|string[] + */ + public function getScope(): ?array + { + return $this->fields['scope'] ?? null; + } + + /** + * @param null|string[] $scope + */ + public function setScope(null|array $scope): static + { + $this->fields['scope'] = $scope; + + return $this; + } + + /** + * @return null|string[] + */ + public function getReasons(): ?array + { + return $this->fields['reasons'] ?? null; + } + + /** + * @param null|string[] $reasons + */ + public function setReasons(null|array $reasons): static + { + $this->fields['reasons'] = $reasons; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('inherited', $this->fields)) { + $data['inherited'] = $this->fields['inherited']; + } + if (array_key_exists('inheritedFromAmlCheckId', $this->fields)) { + $data['inheritedFromAmlCheckId'] = $this->fields['inheritedFromAmlCheckId']; + } + if (array_key_exists('scope', $this->fields)) { + $data['scope'] = $this->fields['scope']; + } + if (array_key_exists('reasons', $this->fields)) { + $data['reasons'] = $this->fields['reasons']; + } + + return $data; + } +} diff --git a/src/Model/BraintreePayments.php b/src/Model/BraintreePayments.php index 2103e3b4e..616a7ccd2 100644 --- a/src/Model/BraintreePayments.php +++ b/src/Model/BraintreePayments.php @@ -27,6 +27,9 @@ public function __construct(array $data = []) if (array_key_exists('credentials', $data)) { $this->setCredentials($data['credentials']); } + if (array_key_exists('threeDSecureServer', $data)) { + $this->setThreeDSecureServer($data['threeDSecureServer']); + } } public static function from(array $data = []): self @@ -50,12 +53,31 @@ public function setCredentials(BraintreePaymentsCredentials|array $credentials): return $this; } + public function getThreeDSecureServer(): ?ThreeDSecureIO3dsServer + { + return $this->fields['threeDSecureServer'] ?? null; + } + + public function setThreeDSecureServer(null|ThreeDSecureIO3dsServer|array $threeDSecureServer): static + { + if ($threeDSecureServer !== null && !($threeDSecureServer instanceof ThreeDSecureIO3dsServer)) { + $threeDSecureServer = ThreeDSecureIO3dsServer::from($threeDSecureServer); + } + + $this->fields['threeDSecureServer'] = $threeDSecureServer; + + return $this; + } + public function jsonSerialize(): array { $data = []; if (array_key_exists('credentials', $this->fields)) { $data['credentials'] = $this->fields['credentials']->jsonSerialize(); } + if (array_key_exists('threeDSecureServer', $this->fields)) { + $data['threeDSecureServer'] = $this->fields['threeDSecureServer']?->jsonSerialize(); + } return parent::jsonSerialize() + $data; } diff --git a/src/Model/ConfigurablePlan.php b/src/Model/ConfigurablePlan.php index 24e25bc71..662fd1365 100644 --- a/src/Model/ConfigurablePlan.php +++ b/src/Model/ConfigurablePlan.php @@ -18,5 +18,5 @@ interface ConfigurablePlan extends JsonSerializable { - public function getId(): ?string; + public function getId(): string; } diff --git a/src/Model/CouponRestrictionFactory.php b/src/Model/CouponRestrictionFactory.php index 8665f8729..3bee1e431 100644 --- a/src/Model/CouponRestrictionFactory.php +++ b/src/Model/CouponRestrictionFactory.php @@ -23,6 +23,7 @@ public static function from(array $data = []): CouponRestriction return match ($data['type']) { 'discounts-per-redemption' => CouponRestrictionDiscountPerRedemption::from($data), 'restrict-to-exclusive-application' => CouponRestrictionExclusiveApplication::from($data), + 'maximum-order-amount' => CouponRestrictionMaximumOrderAmount::from($data), 'minimum-order-amount' => CouponRestrictionMinimumOrderAmount::from($data), 'paid-by-time' => CouponRestrictionPaidByTime::from($data), 'redemptions-per-customer' => CouponRestrictionRedemptionsPerCustomer::from($data), diff --git a/src/Model/CouponRestrictionMaximumOrderAmount.php b/src/Model/CouponRestrictionMaximumOrderAmount.php new file mode 100644 index 000000000..8c8ee3a47 --- /dev/null +++ b/src/Model/CouponRestrictionMaximumOrderAmount.php @@ -0,0 +1,83 @@ +setAmount($data['amount']); + } + if (array_key_exists('currency', $data)) { + $this->setCurrency($data['currency']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getType(): string + { + return 'maximum-order-amount'; + } + + public function getAmount(): float + { + return $this->fields['amount']; + } + + public function setAmount(float|string $amount): static + { + if (is_string($amount)) { + $amount = (float) $amount; + } + + $this->fields['amount'] = $amount; + + return $this; + } + + public function getCurrency(): string + { + return $this->fields['currency']; + } + + public function setCurrency(string $currency): static + { + $this->fields['currency'] = $currency; + + return $this; + } + + public function jsonSerialize(): array + { + $data = [ + 'type' => 'maximum-order-amount', + ]; + if (array_key_exists('amount', $this->fields)) { + $data['amount'] = $this->fields['amount']; + } + if (array_key_exists('currency', $this->fields)) { + $data['currency'] = $this->fields['currency']; + } + + return $data; + } +} diff --git a/src/Model/CreationQuoteOrder.php b/src/Model/CreationQuoteOrder.php index ac071c246..c744d6824 100644 --- a/src/Model/CreationQuoteOrder.php +++ b/src/Model/CreationQuoteOrder.php @@ -14,6 +14,8 @@ namespace Rebilly\Sdk\Model; +use DateTimeImmutable; +use DateTimeInterface; use JsonSerializable; class CreationQuoteOrder implements JsonSerializable @@ -40,6 +42,12 @@ public function __construct(array $data = []) if (array_key_exists('billingAddress', $data)) { $this->setBillingAddress($data['billingAddress']); } + if (array_key_exists('startTime', $data)) { + $this->setStartTime($data['startTime']); + } + if (array_key_exists('isLegacy', $data)) { + $this->setIsLegacy($data['isLegacy']); + } } public static function from(array $data = []): self @@ -135,6 +143,34 @@ public function setBillingAddress(null|ContactObject|array $billingAddress): sta return $this; } + public function getStartTime(): ?DateTimeImmutable + { + return $this->fields['startTime'] ?? null; + } + + public function setStartTime(null|DateTimeImmutable|string $startTime): static + { + if ($startTime !== null && !($startTime instanceof DateTimeImmutable)) { + $startTime = new DateTimeImmutable($startTime); + } + + $this->fields['startTime'] = $startTime; + + return $this; + } + + public function getIsLegacy(): ?bool + { + return $this->fields['isLegacy'] ?? null; + } + + public function setIsLegacy(null|bool $isLegacy): static + { + $this->fields['isLegacy'] = $isLegacy; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -159,6 +195,12 @@ public function jsonSerialize(): array if (array_key_exists('billingAddress', $this->fields)) { $data['billingAddress'] = $this->fields['billingAddress']?->jsonSerialize(); } + if (array_key_exists('startTime', $this->fields)) { + $data['startTime'] = $this->fields['startTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('isLegacy', $this->fields)) { + $data['isLegacy'] = $this->fields['isLegacy']; + } return $data; } diff --git a/src/Model/Customer.php b/src/Model/Customer.php index d07193553..bcc4a30c9 100644 --- a/src/Model/Customer.php +++ b/src/Model/Customer.php @@ -105,6 +105,9 @@ public function __construct(array $data = []) if (array_key_exists('personId', $data)) { $this->setPersonId($data['personId']); } + if (array_key_exists('notificationEmails', $data)) { + $this->setNotificationEmails($data['notificationEmails']); + } if (array_key_exists('_links', $data)) { $this->setLinks($data['_links']); } @@ -389,6 +392,24 @@ public function setPersonId(null|string $personId): static return $this; } + /** + * @return null|string[] + */ + public function getNotificationEmails(): ?array + { + return $this->fields['notificationEmails'] ?? null; + } + + /** + * @param null|string[] $notificationEmails + */ + public function setNotificationEmails(null|array $notificationEmails): static + { + $this->fields['notificationEmails'] = $notificationEmails; + + return $this; + } + /** * @return null|ResourceLink[] */ @@ -507,6 +528,9 @@ public function jsonSerialize(): array if (array_key_exists('personId', $this->fields)) { $data['personId'] = $this->fields['personId']; } + if (array_key_exists('notificationEmails', $this->fields)) { + $data['notificationEmails'] = $this->fields['notificationEmails']; + } if (array_key_exists('_links', $this->fields)) { $data['_links'] = $this->fields['_links'] !== null ? array_map( diff --git a/src/Model/DashboardResponse.php b/src/Model/DashboardResponse.php index 4228f8c3c..81b8ad24e 100644 --- a/src/Model/DashboardResponse.php +++ b/src/Model/DashboardResponse.php @@ -90,6 +90,10 @@ class DashboardResponse implements JsonSerializable public const METRIC_CREDIT_FILE_PROOF_ACCEPTANCE_RATE = 'creditFileProofAcceptanceRate'; + public const METRIC_KYC_ACCEPTANCE_RATE = 'kycAcceptanceRate'; + + public const METRIC_KYC_REVIEW_TIME = 'kycReviewTime'; + public const METRIC_KYC_REJECTION_RATE = 'kycRejectionRate'; public const METRIC_KYC_ACCURACY_RATE = 'kycAccuracyRate'; diff --git a/src/Model/DataExport.php b/src/Model/DataExport.php index df9b7839b..502c009a0 100644 --- a/src/Model/DataExport.php +++ b/src/Model/DataExport.php @@ -82,7 +82,7 @@ public function setDateRange(null|DataExportDateRange|array $dateRange): static; */ public function getLinks(): ?array; - public function getEmbedded(): null|AmlChecksDataExportEmbedded|CustomersDataExportEmbedded|DisputesDataExportEmbedded|InvoiceItemsDataExportEmbedded|InvoicesDataExportEmbedded|JournalRecordsDataExportEmbedded|SubscriptionsDataExportEmbedded|TransactionsDataExportEmbedded; + public function getEmbedded(): null|AmlChecksDataExportEmbedded|CustomersDataExportEmbedded|DisputesDataExportEmbedded|InvoiceItemsDataExportEmbedded|InvoicesDataExportEmbedded|JournalRecordsDataExportEmbedded|PayoutRequestAllocationsDataExportEmbedded|PayoutRequestsDataExportEmbedded|SubscriptionsDataExportEmbedded|TransactionsDataExportEmbedded; public function setEmbedded(null|array $embedded): static; } diff --git a/src/Model/DataExportFactory.php b/src/Model/DataExportFactory.php index 6911d842a..c18ba1097 100644 --- a/src/Model/DataExportFactory.php +++ b/src/Model/DataExportFactory.php @@ -27,6 +27,8 @@ public static function from(array $data = []): DataExport 'invoiceItems' => InvoiceItemsDataExport::from($data), 'invoices' => InvoicesDataExport::from($data), 'journalRecords' => JournalRecordsDataExport::from($data), + 'payoutRequestAllocations' => PayoutRequestAllocationsDataExport::from($data), + 'payoutRequests' => PayoutRequestsDataExport::from($data), 'subscriptions' => SubscriptionsDataExport::from($data), 'transactions' => TransactionsDataExport::from($data), default => throw new UnknownDiscriminatorValueException(), diff --git a/src/Model/FlexiblePlan.php b/src/Model/FlexiblePlan.php index 6e776b9ef..ba4c18f77 100644 --- a/src/Model/FlexiblePlan.php +++ b/src/Model/FlexiblePlan.php @@ -18,7 +18,7 @@ interface FlexiblePlan extends ConfigurablePlan { - public function getId(): ?string; + public function getId(): string; public function getName(): string; diff --git a/src/Model/GetPayoutRequestBatchPreviewResponse.php b/src/Model/GetPayoutRequestBatchPreviewResponse.php new file mode 100644 index 000000000..9b41ec6f9 --- /dev/null +++ b/src/Model/GetPayoutRequestBatchPreviewResponse.php @@ -0,0 +1,74 @@ +setFilter($data['filter']); + } + if (array_key_exists('matchingCount', $data)) { + $this->setMatchingCount($data['matchingCount']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getFilter(): ?string + { + return $this->fields['filter'] ?? null; + } + + public function setFilter(null|string $filter): static + { + $this->fields['filter'] = $filter; + + return $this; + } + + public function getMatchingCount(): ?int + { + return $this->fields['matchingCount'] ?? null; + } + + public function setMatchingCount(null|int $matchingCount): static + { + $this->fields['matchingCount'] = $matchingCount; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('filter', $this->fields)) { + $data['filter'] = $this->fields['filter']; + } + if (array_key_exists('matchingCount', $this->fields)) { + $data['matchingCount'] = $this->fields['matchingCount']; + } + + return $data; + } +} diff --git a/src/Model/GetPayoutRequestV2PaymentInstrumentsResponse.php b/src/Model/GetPayoutRequestV2PaymentInstrumentsResponse.php index c39761661..aae245f73 100644 --- a/src/Model/GetPayoutRequestV2PaymentInstrumentsResponse.php +++ b/src/Model/GetPayoutRequestV2PaymentInstrumentsResponse.php @@ -466,6 +466,14 @@ class GetPayoutRequestV2PaymentInstrumentsResponse implements JsonSerializable public const GATEWAY_NAME_ZOTAPAY = 'Zotapay'; + public const GATEWAY_PAYOUT_INSTRUCTION_ALL = 'all'; + + public const GATEWAY_PAYOUT_INSTRUCTION_COVERED_PAYOUT = 'covered-payout'; + + public const GATEWAY_PAYOUT_INSTRUCTION_APPROVED_PAYMENT = 'approved-payment'; + + public const GATEWAY_PAYOUT_INSTRUCTION_NONE = 'none'; + private array $fields = []; public function __construct(array $data = []) @@ -479,6 +487,9 @@ public function __construct(array $data = []) if (array_key_exists('gatewayAccountId', $data)) { $this->setGatewayAccountId($data['gatewayAccountId']); } + if (array_key_exists('gatewayPayoutInstruction', $data)) { + $this->setGatewayPayoutInstruction($data['gatewayPayoutInstruction']); + } if (array_key_exists('exposureAmount', $data)) { $this->setExposureAmount($data['exposureAmount']); } @@ -534,6 +545,18 @@ public function setGatewayAccountId(null|string $gatewayAccountId): static return $this; } + public function getGatewayPayoutInstruction(): ?string + { + return $this->fields['gatewayPayoutInstruction'] ?? null; + } + + public function setGatewayPayoutInstruction(null|string $gatewayPayoutInstruction): static + { + $this->fields['gatewayPayoutInstruction'] = $gatewayPayoutInstruction; + + return $this; + } + public function getExposureAmount(): ?float { return $this->fields['exposureAmount'] ?? null; @@ -610,6 +633,9 @@ public function jsonSerialize(): array if (array_key_exists('gatewayAccountId', $this->fields)) { $data['gatewayAccountId'] = $this->fields['gatewayAccountId']; } + if (array_key_exists('gatewayPayoutInstruction', $this->fields)) { + $data['gatewayPayoutInstruction'] = $this->fields['gatewayPayoutInstruction']; + } if (array_key_exists('exposureAmount', $this->fields)) { $data['exposureAmount'] = $this->fields['exposureAmount']; } diff --git a/src/Model/GridSegmentData.php b/src/Model/GridSegmentData.php index 7bf7ad474..fa24ef052 100644 --- a/src/Model/GridSegmentData.php +++ b/src/Model/GridSegmentData.php @@ -50,6 +50,10 @@ class GridSegmentData implements JsonSerializable public const TYPE_PAYOUT_REQUESTS = 'payout-requests'; + public const TYPE_PAYOUT_ALLOCATIONS = 'payout-allocations'; + + public const TYPE_PAYOUT_REQUEST_BATCHES = 'payout-request-batches'; + public const TYPE_ORGANIZATIONS = 'organizations'; public const TYPE_QUOTES = 'quotes'; diff --git a/src/Model/KycIdentityMatches.php b/src/Model/KycIdentityMatches.php index fb33a69b9..e53b35f0e 100644 --- a/src/Model/KycIdentityMatches.php +++ b/src/Model/KycIdentityMatches.php @@ -131,6 +131,9 @@ public function __construct(array $data = []) if (array_key_exists('isDigitallyTampered', $data)) { $this->setIsDigitallyTampered($data['isDigitallyTampered']); } + if (array_key_exists('isPhotocopy', $data)) { + $this->setIsPhotocopy($data['isPhotocopy']); + } if (array_key_exists('hasCompletedFaceLiveness', $data)) { $this->setHasCompletedFaceLiveness($data['hasCompletedFaceLiveness']); } @@ -361,6 +364,18 @@ public function setIsDigitallyTampered(null|bool $isDigitallyTampered): static return $this; } + public function getIsPhotocopy(): ?bool + { + return $this->fields['isPhotocopy'] ?? null; + } + + public function setIsPhotocopy(null|bool $isPhotocopy): static + { + $this->fields['isPhotocopy'] = $isPhotocopy; + + return $this; + } + public function getHasCompletedFaceLiveness(): ?bool { return $this->fields['hasCompletedFaceLiveness'] ?? null; @@ -439,6 +454,9 @@ public function jsonSerialize(): array if (array_key_exists('isDigitallyTampered', $this->fields)) { $data['isDigitallyTampered'] = $this->fields['isDigitallyTampered']; } + if (array_key_exists('isPhotocopy', $this->fields)) { + $data['isPhotocopy'] = $this->fields['isPhotocopy']; + } if (array_key_exists('hasCompletedFaceLiveness', $this->fields)) { $data['hasCompletedFaceLiveness'] = $this->fields['hasCompletedFaceLiveness']; } diff --git a/src/Model/KycSettingsIdentityWeights.php b/src/Model/KycSettingsIdentityWeights.php index 94fd8b979..5e9c58885 100644 --- a/src/Model/KycSettingsIdentityWeights.php +++ b/src/Model/KycSettingsIdentityWeights.php @@ -64,6 +64,9 @@ public function __construct(array $data = []) if (array_key_exists('isTampered', $data)) { $this->setIsTampered($data['isTampered']); } + if (array_key_exists('isPhotocopy', $data)) { + $this->setIsPhotocopy($data['isPhotocopy']); + } } public static function from(array $data = []): self @@ -239,6 +242,18 @@ public function setIsTampered(null|int $isTampered): static return $this; } + public function getIsPhotocopy(): ?int + { + return $this->fields['isPhotocopy'] ?? null; + } + + public function setIsPhotocopy(null|int $isPhotocopy): static + { + $this->fields['isPhotocopy'] = $isPhotocopy; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -284,6 +299,9 @@ public function jsonSerialize(): array if (array_key_exists('isTampered', $this->fields)) { $data['isTampered'] = $this->fields['isTampered']; } + if (array_key_exists('isPhotocopy', $this->fields)) { + $data['isPhotocopy'] = $this->fields['isPhotocopy']; + } return $data; } diff --git a/src/Model/NMICredentials.php b/src/Model/NMICredentials.php index c9fbe0de3..2befb579a 100644 --- a/src/Model/NMICredentials.php +++ b/src/Model/NMICredentials.php @@ -28,6 +28,9 @@ public function __construct(array $data = []) if (array_key_exists('password', $data)) { $this->setPassword($data['password']); } + if (array_key_exists('apiKey', $data)) { + $this->setApiKey($data['apiKey']); + } } public static function from(array $data = []): self @@ -59,6 +62,18 @@ public function setPassword(string $password): static return $this; } + public function getApiKey(): ?string + { + return $this->fields['apiKey'] ?? null; + } + + public function setApiKey(null|string $apiKey): static + { + $this->fields['apiKey'] = $apiKey; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -68,6 +83,9 @@ public function jsonSerialize(): array if (array_key_exists('password', $this->fields)) { $data['password'] = $this->fields['password']; } + if (array_key_exists('apiKey', $this->fields)) { + $data['apiKey'] = $this->fields['apiKey']; + } return $data; } diff --git a/src/Model/OneTimeSalePlan.php b/src/Model/OneTimeSalePlan.php index a3f4651d5..62f325663 100644 --- a/src/Model/OneTimeSalePlan.php +++ b/src/Model/OneTimeSalePlan.php @@ -81,9 +81,9 @@ public static function from(array $data = []): self return new self($data); } - public function getId(): ?string + public function getId(): string { - return $this->fields['id'] ?? null; + return $this->fields['id']; } public function getName(): string @@ -316,7 +316,7 @@ public function jsonSerialize(): array return $data; } - private function setId(null|string $id): static + private function setId(string $id): static { $this->fields['id'] = $id; diff --git a/src/Model/OrderItemUpdate.php b/src/Model/OrderItemUpdate.php index 649d8d431..9d28c0192 100644 --- a/src/Model/OrderItemUpdate.php +++ b/src/Model/OrderItemUpdate.php @@ -28,6 +28,9 @@ public function __construct(array $data = []) if (array_key_exists('excludeFromMrr', $data)) { $this->setExcludeFromMrr($data['excludeFromMrr']); } + if (array_key_exists('plan', $data)) { + $this->setPlan($data['plan']); + } } public static function from(array $data = []): self @@ -35,12 +38,12 @@ public static function from(array $data = []): self return new self($data); } - public function getQuantityFilled(): float + public function getQuantityFilled(): ?float { - return $this->fields['quantityFilled']; + return $this->fields['quantityFilled'] ?? null; } - public function setQuantityFilled(float|string $quantityFilled): static + public function setQuantityFilled(null|float|string $quantityFilled): static { if (is_string($quantityFilled)) { $quantityFilled = (float) $quantityFilled; @@ -63,6 +66,22 @@ public function setExcludeFromMrr(null|bool $excludeFromMrr): static return $this; } + public function getPlan(): ?OrderItemUpdatePlan + { + return $this->fields['plan'] ?? null; + } + + public function setPlan(null|OrderItemUpdatePlan|array $plan): static + { + if ($plan !== null && !($plan instanceof OrderItemUpdatePlan)) { + $plan = OrderItemUpdatePlan::from($plan); + } + + $this->fields['plan'] = $plan; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -72,6 +91,9 @@ public function jsonSerialize(): array if (array_key_exists('excludeFromMrr', $this->fields)) { $data['excludeFromMrr'] = $this->fields['excludeFromMrr']; } + if (array_key_exists('plan', $this->fields)) { + $data['plan'] = $this->fields['plan']?->jsonSerialize(); + } return $data; } diff --git a/src/Model/OrderItemUpdatePlan.php b/src/Model/OrderItemUpdatePlan.php new file mode 100644 index 000000000..65f910670 --- /dev/null +++ b/src/Model/OrderItemUpdatePlan.php @@ -0,0 +1,62 @@ +setProductOptions($data['productOptions']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + /** + * @return null|array + */ + public function getProductOptions(): ?array + { + return $this->fields['productOptions'] ?? null; + } + + /** + * @param null|array $productOptions + */ + public function setProductOptions(null|array $productOptions): static + { + $this->fields['productOptions'] = $productOptions; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('productOptions', $this->fields)) { + $data['productOptions'] = $this->fields['productOptions']; + } + + return $data; + } +} diff --git a/src/Model/OrderPreview.php b/src/Model/OrderPreview.php index 0f279aecb..db32129ea 100644 --- a/src/Model/OrderPreview.php +++ b/src/Model/OrderPreview.php @@ -67,6 +67,12 @@ public function __construct(array $data = []) if (array_key_exists('total', $data)) { $this->setTotal($data['total']); } + if (array_key_exists('initialAmounts', $data)) { + $this->setInitialAmounts($data['initialAmounts']); + } + if (array_key_exists('recurringAmounts', $data)) { + $this->setRecurringAmounts($data['recurringAmounts']); + } if (array_key_exists('shipping', $data)) { $this->setShipping($data['shipping']); } @@ -224,6 +230,38 @@ public function getTotal(): ?float return $this->fields['total'] ?? null; } + public function getInitialAmounts(): ?OrderPreviewInitialAmounts + { + return $this->fields['initialAmounts'] ?? null; + } + + public function setInitialAmounts(null|OrderPreviewInitialAmounts|array $initialAmounts): static + { + if ($initialAmounts !== null && !($initialAmounts instanceof OrderPreviewInitialAmounts)) { + $initialAmounts = OrderPreviewInitialAmounts::from($initialAmounts); + } + + $this->fields['initialAmounts'] = $initialAmounts; + + return $this; + } + + public function getRecurringAmounts(): ?OrderPreviewRecurringAmounts + { + return $this->fields['recurringAmounts'] ?? null; + } + + public function setRecurringAmounts(null|OrderPreviewRecurringAmounts|array $recurringAmounts): static + { + if ($recurringAmounts !== null && !($recurringAmounts instanceof OrderPreviewRecurringAmounts)) { + $recurringAmounts = OrderPreviewRecurringAmounts::from($recurringAmounts); + } + + $this->fields['recurringAmounts'] = $recurringAmounts; + + return $this; + } + public function getShipping(): ?Shipping { return $this->fields['shipping'] ?? null; @@ -311,6 +349,12 @@ public function jsonSerialize(): array if (array_key_exists('total', $this->fields)) { $data['total'] = $this->fields['total']; } + if (array_key_exists('initialAmounts', $this->fields)) { + $data['initialAmounts'] = $this->fields['initialAmounts']?->jsonSerialize(); + } + if (array_key_exists('recurringAmounts', $this->fields)) { + $data['recurringAmounts'] = $this->fields['recurringAmounts']?->jsonSerialize(); + } if (array_key_exists('shipping', $this->fields)) { $data['shipping'] = $this->fields['shipping']?->jsonSerialize(); } diff --git a/src/Model/OrderPreviewInitialAmounts.php b/src/Model/OrderPreviewInitialAmounts.php new file mode 100644 index 000000000..67d832566 --- /dev/null +++ b/src/Model/OrderPreviewInitialAmounts.php @@ -0,0 +1,148 @@ +setAmount($data['amount']); + } + if (array_key_exists('subtotalAmount', $data)) { + $this->setSubtotalAmount($data['subtotalAmount']); + } + if (array_key_exists('discountAmount', $data)) { + $this->setDiscountAmount($data['discountAmount']); + } + if (array_key_exists('shippingAmount', $data)) { + $this->setShippingAmount($data['shippingAmount']); + } + if (array_key_exists('taxAmount', $data)) { + $this->setTaxAmount($data['taxAmount']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getAmount(): ?float + { + return $this->fields['amount'] ?? null; + } + + public function setAmount(null|float|string $amount): static + { + if (is_string($amount)) { + $amount = (float) $amount; + } + + $this->fields['amount'] = $amount; + + return $this; + } + + public function getSubtotalAmount(): ?float + { + return $this->fields['subtotalAmount'] ?? null; + } + + public function setSubtotalAmount(null|float|string $subtotalAmount): static + { + if (is_string($subtotalAmount)) { + $subtotalAmount = (float) $subtotalAmount; + } + + $this->fields['subtotalAmount'] = $subtotalAmount; + + return $this; + } + + public function getDiscountAmount(): ?float + { + return $this->fields['discountAmount'] ?? null; + } + + public function setDiscountAmount(null|float|string $discountAmount): static + { + if (is_string($discountAmount)) { + $discountAmount = (float) $discountAmount; + } + + $this->fields['discountAmount'] = $discountAmount; + + return $this; + } + + public function getShippingAmount(): ?float + { + return $this->fields['shippingAmount'] ?? null; + } + + public function setShippingAmount(null|float|string $shippingAmount): static + { + if (is_string($shippingAmount)) { + $shippingAmount = (float) $shippingAmount; + } + + $this->fields['shippingAmount'] = $shippingAmount; + + return $this; + } + + public function getTaxAmount(): ?float + { + return $this->fields['taxAmount'] ?? null; + } + + public function setTaxAmount(null|float|string $taxAmount): static + { + if (is_string($taxAmount)) { + $taxAmount = (float) $taxAmount; + } + + $this->fields['taxAmount'] = $taxAmount; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('amount', $this->fields)) { + $data['amount'] = $this->fields['amount']; + } + if (array_key_exists('subtotalAmount', $this->fields)) { + $data['subtotalAmount'] = $this->fields['subtotalAmount']; + } + if (array_key_exists('discountAmount', $this->fields)) { + $data['discountAmount'] = $this->fields['discountAmount']; + } + if (array_key_exists('shippingAmount', $this->fields)) { + $data['shippingAmount'] = $this->fields['shippingAmount']; + } + if (array_key_exists('taxAmount', $this->fields)) { + $data['taxAmount'] = $this->fields['taxAmount']; + } + + return $data; + } +} diff --git a/src/Model/OrderPreviewRecurringAmounts.php b/src/Model/OrderPreviewRecurringAmounts.php new file mode 100644 index 000000000..3db468b0c --- /dev/null +++ b/src/Model/OrderPreviewRecurringAmounts.php @@ -0,0 +1,148 @@ +setAmount($data['amount']); + } + if (array_key_exists('subtotalAmount', $data)) { + $this->setSubtotalAmount($data['subtotalAmount']); + } + if (array_key_exists('discountAmount', $data)) { + $this->setDiscountAmount($data['discountAmount']); + } + if (array_key_exists('shippingAmount', $data)) { + $this->setShippingAmount($data['shippingAmount']); + } + if (array_key_exists('taxAmount', $data)) { + $this->setTaxAmount($data['taxAmount']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getAmount(): ?float + { + return $this->fields['amount'] ?? null; + } + + public function setAmount(null|float|string $amount): static + { + if (is_string($amount)) { + $amount = (float) $amount; + } + + $this->fields['amount'] = $amount; + + return $this; + } + + public function getSubtotalAmount(): ?float + { + return $this->fields['subtotalAmount'] ?? null; + } + + public function setSubtotalAmount(null|float|string $subtotalAmount): static + { + if (is_string($subtotalAmount)) { + $subtotalAmount = (float) $subtotalAmount; + } + + $this->fields['subtotalAmount'] = $subtotalAmount; + + return $this; + } + + public function getDiscountAmount(): ?float + { + return $this->fields['discountAmount'] ?? null; + } + + public function setDiscountAmount(null|float|string $discountAmount): static + { + if (is_string($discountAmount)) { + $discountAmount = (float) $discountAmount; + } + + $this->fields['discountAmount'] = $discountAmount; + + return $this; + } + + public function getShippingAmount(): ?float + { + return $this->fields['shippingAmount'] ?? null; + } + + public function setShippingAmount(null|float|string $shippingAmount): static + { + if (is_string($shippingAmount)) { + $shippingAmount = (float) $shippingAmount; + } + + $this->fields['shippingAmount'] = $shippingAmount; + + return $this; + } + + public function getTaxAmount(): ?float + { + return $this->fields['taxAmount'] ?? null; + } + + public function setTaxAmount(null|float|string $taxAmount): static + { + if (is_string($taxAmount)) { + $taxAmount = (float) $taxAmount; + } + + $this->fields['taxAmount'] = $taxAmount; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('amount', $this->fields)) { + $data['amount'] = $this->fields['amount']; + } + if (array_key_exists('subtotalAmount', $this->fields)) { + $data['subtotalAmount'] = $this->fields['subtotalAmount']; + } + if (array_key_exists('discountAmount', $this->fields)) { + $data['discountAmount'] = $this->fields['discountAmount']; + } + if (array_key_exists('shippingAmount', $this->fields)) { + $data['shippingAmount'] = $this->fields['shippingAmount']; + } + if (array_key_exists('taxAmount', $this->fields)) { + $data['taxAmount'] = $this->fields['taxAmount']; + } + + return $data; + } +} diff --git a/src/Model/PatchPayoutRequestRequest.php b/src/Model/PatchPayoutRequestRequest.php index 2087e5f9c..0b828f5b6 100644 --- a/src/Model/PatchPayoutRequestRequest.php +++ b/src/Model/PatchPayoutRequestRequest.php @@ -20,7 +20,7 @@ class PatchPayoutRequestRequest implements JsonSerializable { public const STATUS_PENDING = 'pending'; - public const STATUS_FLUSHED = 'flushed'; + public const STATUS_READY = 'ready'; public const STATUS_APPROVED = 'approved'; @@ -45,6 +45,12 @@ public function __construct(array $data = []) if (array_key_exists('blocked', $data)) { $this->setBlocked($data['blocked']); } + if (array_key_exists('blockReason', $data)) { + $this->setBlockReason($data['blockReason']); + } + if (array_key_exists('blockDescription', $data)) { + $this->setBlockDescription($data['blockDescription']); + } } public static function from(array $data = []): self @@ -88,6 +94,34 @@ public function setBlocked(null|bool $blocked): static return $this; } + public function getBlockReason(): ?PayoutRequestBlockReason + { + return $this->fields['blockReason'] ?? null; + } + + public function setBlockReason(null|PayoutRequestBlockReason|array $blockReason): static + { + if ($blockReason !== null && !($blockReason instanceof PayoutRequestBlockReason)) { + $blockReason = PayoutRequestBlockReason::from($blockReason); + } + + $this->fields['blockReason'] = $blockReason; + + return $this; + } + + public function getBlockDescription(): ?string + { + return $this->fields['blockDescription'] ?? null; + } + + public function setBlockDescription(null|string $blockDescription): static + { + $this->fields['blockDescription'] = $blockDescription; + + return $this; + } + public function jsonSerialize(): array { $data = []; @@ -100,6 +134,12 @@ public function jsonSerialize(): array if (array_key_exists('blocked', $this->fields)) { $data['blocked'] = $this->fields['blocked']; } + if (array_key_exists('blockReason', $this->fields)) { + $data['blockReason'] = $this->fields['blockReason']?->jsonSerialize(); + } + if (array_key_exists('blockDescription', $this->fields)) { + $data['blockDescription'] = $this->fields['blockDescription']; + } return $data; } diff --git a/src/Model/PayoutRequest.php b/src/Model/PayoutRequest.php index 1f1fa74b5..60978ddd4 100644 --- a/src/Model/PayoutRequest.php +++ b/src/Model/PayoutRequest.php @@ -61,6 +61,15 @@ public function __construct(array $data = []) if (array_key_exists('status', $data)) { $this->setStatus($data['status']); } + if (array_key_exists('blocked', $data)) { + $this->setBlocked($data['blocked']); + } + if (array_key_exists('blockReason', $data)) { + $this->setBlockReason($data['blockReason']); + } + if (array_key_exists('batchId', $data)) { + $this->setBatchId($data['batchId']); + } if (array_key_exists('selectPaymentInstrumentUrl', $data)) { $this->setSelectPaymentInstrumentUrl($data['selectPaymentInstrumentUrl']); } @@ -180,6 +189,39 @@ public function getStatus(): ?string return $this->fields['status'] ?? null; } + public function getBlocked(): ?bool + { + return $this->fields['blocked'] ?? null; + } + + public function setBlocked(null|bool $blocked): static + { + $this->fields['blocked'] = $blocked; + + return $this; + } + + public function getBlockReason(): ?PayoutRequestBlockReason + { + return $this->fields['blockReason'] ?? null; + } + + public function setBlockReason(null|PayoutRequestBlockReason|array $blockReason): static + { + if ($blockReason !== null && !($blockReason instanceof PayoutRequestBlockReason)) { + $blockReason = PayoutRequestBlockReason::from($blockReason); + } + + $this->fields['blockReason'] = $blockReason; + + return $this; + } + + public function getBatchId(): ?string + { + return $this->fields['batchId'] ?? null; + } + public function getSelectPaymentInstrumentUrl(): ?string { return $this->fields['selectPaymentInstrumentUrl'] ?? null; @@ -269,6 +311,15 @@ public function jsonSerialize(): array if (array_key_exists('status', $this->fields)) { $data['status'] = $this->fields['status']; } + if (array_key_exists('blocked', $this->fields)) { + $data['blocked'] = $this->fields['blocked']; + } + if (array_key_exists('blockReason', $this->fields)) { + $data['blockReason'] = $this->fields['blockReason']?->jsonSerialize(); + } + if (array_key_exists('batchId', $this->fields)) { + $data['batchId'] = $this->fields['batchId']; + } if (array_key_exists('selectPaymentInstrumentUrl', $this->fields)) { $data['selectPaymentInstrumentUrl'] = $this->fields['selectPaymentInstrumentUrl']; } @@ -329,6 +380,13 @@ private function setStatus(null|string $status): static return $this; } + private function setBatchId(null|string $batchId): static + { + $this->fields['batchId'] = $batchId; + + return $this; + } + private function setSelectPaymentInstrumentUrl(null|string $selectPaymentInstrumentUrl): static { $this->fields['selectPaymentInstrumentUrl'] = $selectPaymentInstrumentUrl; diff --git a/src/Model/PayoutRequestAllocation.php b/src/Model/PayoutRequestAllocation.php index b59ac0dd6..b9e5f9162 100644 --- a/src/Model/PayoutRequestAllocation.php +++ b/src/Model/PayoutRequestAllocation.php @@ -22,6 +22,8 @@ class PayoutRequestAllocation implements JsonSerializable { public const STATUS_PENDING = 'pending'; + public const STATUS_QUEUED = 'queued'; + public const STATUS_PROCESSING = 'processing'; public const STATUS_COMPLETED = 'completed'; @@ -30,6 +32,8 @@ class PayoutRequestAllocation implements JsonSerializable public const STATUS_CANCELED = 'canceled'; + public const STATUS_DECLINED = 'declined'; + private array $fields = []; public function __construct(array $data = []) @@ -40,6 +44,9 @@ public function __construct(array $data = []) if (array_key_exists('payoutRequestId', $data)) { $this->setPayoutRequestId($data['payoutRequestId']); } + if (array_key_exists('batchId', $data)) { + $this->setBatchId($data['batchId']); + } if (array_key_exists('paymentInstrumentId', $data)) { $this->setPaymentInstrumentId($data['paymentInstrumentId']); } @@ -87,6 +94,11 @@ public function getPayoutRequestId(): string return $this->fields['payoutRequestId']; } + public function getBatchId(): ?string + { + return $this->fields['batchId'] ?? null; + } + public function getPaymentInstrumentId(): string { return $this->fields['paymentInstrumentId']; @@ -195,6 +207,9 @@ public function jsonSerialize(): array if (array_key_exists('payoutRequestId', $this->fields)) { $data['payoutRequestId'] = $this->fields['payoutRequestId']; } + if (array_key_exists('batchId', $this->fields)) { + $data['batchId'] = $this->fields['batchId']; + } if (array_key_exists('paymentInstrumentId', $this->fields)) { $data['paymentInstrumentId'] = $this->fields['paymentInstrumentId']; } @@ -248,6 +263,13 @@ private function setPayoutRequestId(string $payoutRequestId): static return $this; } + private function setBatchId(null|string $batchId): static + { + $this->fields['batchId'] = $batchId; + + return $this; + } + private function setTransactionId(null|string $transactionId): static { $this->fields['transactionId'] = $transactionId; diff --git a/src/Model/PayoutRequestAllocationsDataExport.php b/src/Model/PayoutRequestAllocationsDataExport.php new file mode 100644 index 000000000..bb1dc067b --- /dev/null +++ b/src/Model/PayoutRequestAllocationsDataExport.php @@ -0,0 +1,424 @@ +setId($data['id']); + } + if (array_key_exists('name', $data)) { + $this->setName($data['name']); + } + if (array_key_exists('format', $data)) { + $this->setFormat($data['format']); + } + if (array_key_exists('arguments', $data)) { + $this->setArguments($data['arguments']); + } + if (array_key_exists('emailNotification', $data)) { + $this->setEmailNotification($data['emailNotification']); + } + if (array_key_exists('fields', $data)) { + $this->setFields($data['fields']); + } + if (array_key_exists('recurring', $data)) { + $this->setRecurring($data['recurring']); + } + if (array_key_exists('userId', $data)) { + $this->setUserId($data['userId']); + } + if (array_key_exists('fileId', $data)) { + $this->setFileId($data['fileId']); + } + if (array_key_exists('recordCount', $data)) { + $this->setRecordCount($data['recordCount']); + } + if (array_key_exists('scheduledTime', $data)) { + $this->setScheduledTime($data['scheduledTime']); + } + if (array_key_exists('createdTime', $data)) { + $this->setCreatedTime($data['createdTime']); + } + if (array_key_exists('updatedTime', $data)) { + $this->setUpdatedTime($data['updatedTime']); + } + if (array_key_exists('status', $data)) { + $this->setStatus($data['status']); + } + if (array_key_exists('dateRange', $data)) { + $this->setDateRange($data['dateRange']); + } + if (array_key_exists('_links', $data)) { + $this->setLinks($data['_links']); + } + if (array_key_exists('_embedded', $data)) { + $this->setEmbedded($data['_embedded']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getResource(): string + { + return 'payoutRequestAllocations'; + } + + public function getId(): ?string + { + return $this->fields['id'] ?? null; + } + + public function getName(): string + { + return $this->fields['name']; + } + + public function setName(string $name): static + { + $this->fields['name'] = $name; + + return $this; + } + + public function getFormat(): string + { + return $this->fields['format']; + } + + public function setFormat(string $format): static + { + $this->fields['format'] = $format; + + return $this; + } + + public function getArguments(): ?DataExportArguments + { + return $this->fields['arguments'] ?? null; + } + + public function setArguments(null|DataExportArguments|array $arguments): static + { + if ($arguments !== null && !($arguments instanceof DataExportArguments)) { + $arguments = DataExportArguments::from($arguments); + } + + $this->fields['arguments'] = $arguments; + + return $this; + } + + /** + * @return null|string[] + */ + public function getEmailNotification(): ?array + { + return $this->fields['emailNotification'] ?? null; + } + + /** + * @param null|string[] $emailNotification + */ + public function setEmailNotification(null|array $emailNotification): static + { + $this->fields['emailNotification'] = $emailNotification; + + return $this; + } + + /** + * @return null|string[] + */ + public function getFields(): ?array + { + return $this->fields['fields'] ?? null; + } + + /** + * @param null|string[] $fields + */ + public function setFields(null|array $fields): static + { + $this->fields['fields'] = $fields; + + return $this; + } + + public function getRecurring(): ?DataExportRecurring + { + return $this->fields['recurring'] ?? null; + } + + public function setRecurring(null|DataExportRecurring|array $recurring): static + { + if ($recurring !== null && !($recurring instanceof DataExportRecurring)) { + $recurring = DataExportRecurring::from($recurring); + } + + $this->fields['recurring'] = $recurring; + + return $this; + } + + public function getUserId(): ?string + { + return $this->fields['userId'] ?? null; + } + + public function getFileId(): ?string + { + return $this->fields['fileId'] ?? null; + } + + public function getRecordCount(): ?int + { + return $this->fields['recordCount'] ?? null; + } + + public function getScheduledTime(): ?DateTimeImmutable + { + return $this->fields['scheduledTime'] ?? null; + } + + public function getCreatedTime(): ?DateTimeImmutable + { + return $this->fields['createdTime'] ?? null; + } + + public function getUpdatedTime(): ?DateTimeImmutable + { + return $this->fields['updatedTime'] ?? null; + } + + public function getStatus(): ?string + { + return $this->fields['status'] ?? null; + } + + public function getDateRange(): ?DataExportDateRange + { + return $this->fields['dateRange'] ?? null; + } + + public function setDateRange(null|DataExportDateRange|array $dateRange): static + { + if ($dateRange !== null && !($dateRange instanceof DataExportDateRange)) { + $dateRange = DataExportDateRange::from($dateRange); + } + + $this->fields['dateRange'] = $dateRange; + + return $this; + } + + /** + * @return null|ResourceLink[] + */ + public function getLinks(): ?array + { + return $this->fields['_links'] ?? null; + } + + public function getEmbedded(): ?PayoutRequestAllocationsDataExportEmbedded + { + return $this->fields['_embedded'] ?? null; + } + + public function setEmbedded(null|PayoutRequestAllocationsDataExportEmbedded|array $embedded): static + { + if ($embedded !== null && !($embedded instanceof PayoutRequestAllocationsDataExportEmbedded)) { + $embedded = PayoutRequestAllocationsDataExportEmbedded::from($embedded); + } + + $this->fields['_embedded'] = $embedded; + + return $this; + } + + public function jsonSerialize(): array + { + $data = [ + 'resource' => 'payoutRequestAllocations', + ]; + if (array_key_exists('id', $this->fields)) { + $data['id'] = $this->fields['id']; + } + if (array_key_exists('name', $this->fields)) { + $data['name'] = $this->fields['name']; + } + if (array_key_exists('format', $this->fields)) { + $data['format'] = $this->fields['format']; + } + if (array_key_exists('arguments', $this->fields)) { + $data['arguments'] = $this->fields['arguments']?->jsonSerialize(); + } + if (array_key_exists('emailNotification', $this->fields)) { + $data['emailNotification'] = $this->fields['emailNotification']; + } + if (array_key_exists('fields', $this->fields)) { + $data['fields'] = $this->fields['fields']; + } + if (array_key_exists('recurring', $this->fields)) { + $data['recurring'] = $this->fields['recurring']?->jsonSerialize(); + } + if (array_key_exists('userId', $this->fields)) { + $data['userId'] = $this->fields['userId']; + } + if (array_key_exists('fileId', $this->fields)) { + $data['fileId'] = $this->fields['fileId']; + } + if (array_key_exists('recordCount', $this->fields)) { + $data['recordCount'] = $this->fields['recordCount']; + } + if (array_key_exists('scheduledTime', $this->fields)) { + $data['scheduledTime'] = $this->fields['scheduledTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('createdTime', $this->fields)) { + $data['createdTime'] = $this->fields['createdTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('updatedTime', $this->fields)) { + $data['updatedTime'] = $this->fields['updatedTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('status', $this->fields)) { + $data['status'] = $this->fields['status']; + } + if (array_key_exists('dateRange', $this->fields)) { + $data['dateRange'] = $this->fields['dateRange']?->jsonSerialize(); + } + if (array_key_exists('_links', $this->fields)) { + $data['_links'] = $this->fields['_links'] !== null + ? array_map( + static fn (ResourceLink $resourceLink) => $resourceLink->jsonSerialize(), + $this->fields['_links'], + ) + : null; + } + if (array_key_exists('_embedded', $this->fields)) { + $data['_embedded'] = $this->fields['_embedded']?->jsonSerialize(); + } + + return $data; + } + + private function setId(null|string $id): static + { + $this->fields['id'] = $id; + + return $this; + } + + private function setUserId(null|string $userId): static + { + $this->fields['userId'] = $userId; + + return $this; + } + + private function setFileId(null|string $fileId): static + { + $this->fields['fileId'] = $fileId; + + return $this; + } + + private function setRecordCount(null|int $recordCount): static + { + $this->fields['recordCount'] = $recordCount; + + return $this; + } + + private function setScheduledTime(null|DateTimeImmutable|string $scheduledTime): static + { + if ($scheduledTime !== null && !($scheduledTime instanceof DateTimeImmutable)) { + $scheduledTime = new DateTimeImmutable($scheduledTime); + } + + $this->fields['scheduledTime'] = $scheduledTime; + + return $this; + } + + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static + { + if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { + $createdTime = new DateTimeImmutable($createdTime); + } + + $this->fields['createdTime'] = $createdTime; + + return $this; + } + + private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): static + { + if ($updatedTime !== null && !($updatedTime instanceof DateTimeImmutable)) { + $updatedTime = new DateTimeImmutable($updatedTime); + } + + $this->fields['updatedTime'] = $updatedTime; + + return $this; + } + + private function setStatus(null|string $status): static + { + $this->fields['status'] = $status; + + 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/PayoutRequestAllocationsDataExportEmbedded.php b/src/Model/PayoutRequestAllocationsDataExportEmbedded.php new file mode 100644 index 000000000..a565debbf --- /dev/null +++ b/src/Model/PayoutRequestAllocationsDataExportEmbedded.php @@ -0,0 +1,82 @@ +setFile($data['file']); + } + if (array_key_exists('user', $data)) { + $this->setUser($data['user']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getFile(): ?File + { + return $this->fields['file'] ?? null; + } + + public function setFile(null|File|array $file): static + { + if ($file !== null && !($file instanceof File)) { + $file = File::from($file); + } + + $this->fields['file'] = $file; + + return $this; + } + + public function getUser(): ?User + { + return $this->fields['user'] ?? null; + } + + public function setUser(null|User|array $user): static + { + if ($user !== null && !($user instanceof User)) { + $user = User::from($user); + } + + $this->fields['user'] = $user; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('file', $this->fields)) { + $data['file'] = $this->fields['file']?->jsonSerialize(); + } + if (array_key_exists('user', $this->fields)) { + $data['user'] = $this->fields['user']?->jsonSerialize(); + } + + return $data; + } +} diff --git a/src/Model/PayoutRequestBatch.php b/src/Model/PayoutRequestBatch.php new file mode 100644 index 000000000..147f572e7 --- /dev/null +++ b/src/Model/PayoutRequestBatch.php @@ -0,0 +1,276 @@ +setId($data['id']); + } + if (array_key_exists('userId', $data)) { + $this->setUserId($data['userId']); + } + if (array_key_exists('status', $data)) { + $this->setStatus($data['status']); + } + if (array_key_exists('totalCount', $data)) { + $this->setTotalCount($data['totalCount']); + } + if (array_key_exists('successCount', $data)) { + $this->setSuccessCount($data['successCount']); + } + if (array_key_exists('failureCount', $data)) { + $this->setFailureCount($data['failureCount']); + } + if (array_key_exists('payoutRequestIds', $data)) { + $this->setPayoutRequestIds($data['payoutRequestIds']); + } + if (array_key_exists('description', $data)) { + $this->setDescription($data['description']); + } + if (array_key_exists('createdTime', $data)) { + $this->setCreatedTime($data['createdTime']); + } + if (array_key_exists('updatedTime', $data)) { + $this->setUpdatedTime($data['updatedTime']); + } + if (array_key_exists('_links', $data)) { + $this->setLinks($data['_links']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getId(): ?string + { + return $this->fields['id'] ?? null; + } + + public function getUserId(): ?string + { + return $this->fields['userId'] ?? null; + } + + public function getStatus(): ?string + { + return $this->fields['status'] ?? null; + } + + public function getTotalCount(): ?int + { + return $this->fields['totalCount'] ?? null; + } + + public function getSuccessCount(): ?int + { + return $this->fields['successCount'] ?? null; + } + + public function getFailureCount(): ?int + { + return $this->fields['failureCount'] ?? null; + } + + /** + * @return null|string[] + */ + public function getPayoutRequestIds(): ?array + { + return $this->fields['payoutRequestIds'] ?? null; + } + + public function getDescription(): ?string + { + return $this->fields['description'] ?? null; + } + + public function setDescription(null|string $description): static + { + $this->fields['description'] = $description; + + return $this; + } + + public function getCreatedTime(): ?DateTimeImmutable + { + return $this->fields['createdTime'] ?? null; + } + + public function getUpdatedTime(): ?DateTimeImmutable + { + return $this->fields['updatedTime'] ?? null; + } + + /** + * @return null|ResourceLink[] + */ + public function getLinks(): ?array + { + return $this->fields['_links'] ?? null; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('id', $this->fields)) { + $data['id'] = $this->fields['id']; + } + if (array_key_exists('userId', $this->fields)) { + $data['userId'] = $this->fields['userId']; + } + if (array_key_exists('status', $this->fields)) { + $data['status'] = $this->fields['status']; + } + if (array_key_exists('totalCount', $this->fields)) { + $data['totalCount'] = $this->fields['totalCount']; + } + if (array_key_exists('successCount', $this->fields)) { + $data['successCount'] = $this->fields['successCount']; + } + if (array_key_exists('failureCount', $this->fields)) { + $data['failureCount'] = $this->fields['failureCount']; + } + if (array_key_exists('payoutRequestIds', $this->fields)) { + $data['payoutRequestIds'] = $this->fields['payoutRequestIds']; + } + if (array_key_exists('description', $this->fields)) { + $data['description'] = $this->fields['description']; + } + if (array_key_exists('createdTime', $this->fields)) { + $data['createdTime'] = $this->fields['createdTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('updatedTime', $this->fields)) { + $data['updatedTime'] = $this->fields['updatedTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('_links', $this->fields)) { + $data['_links'] = $this->fields['_links'] !== null + ? array_map( + static fn (ResourceLink $resourceLink) => $resourceLink->jsonSerialize(), + $this->fields['_links'], + ) + : null; + } + + return $data; + } + + private function setId(null|string $id): static + { + $this->fields['id'] = $id; + + return $this; + } + + private function setUserId(null|string $userId): static + { + $this->fields['userId'] = $userId; + + return $this; + } + + private function setStatus(null|string $status): static + { + $this->fields['status'] = $status; + + return $this; + } + + private function setTotalCount(null|int $totalCount): static + { + $this->fields['totalCount'] = $totalCount; + + return $this; + } + + private function setSuccessCount(null|int $successCount): static + { + $this->fields['successCount'] = $successCount; + + return $this; + } + + private function setFailureCount(null|int $failureCount): static + { + $this->fields['failureCount'] = $failureCount; + + return $this; + } + + /** + * @param null|string[] $payoutRequestIds + */ + private function setPayoutRequestIds(null|array $payoutRequestIds): static + { + $this->fields['payoutRequestIds'] = $payoutRequestIds; + + return $this; + } + + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static + { + if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { + $createdTime = new DateTimeImmutable($createdTime); + } + + $this->fields['createdTime'] = $createdTime; + + return $this; + } + + private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): static + { + if ($updatedTime !== null && !($updatedTime instanceof DateTimeImmutable)) { + $updatedTime = new DateTimeImmutable($updatedTime); + } + + $this->fields['updatedTime'] = $updatedTime; + + return $this; + } + + /** + * @param null|array[]|ResourceLink[] $links + */ + 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/PayoutRequestBlockReason.php b/src/Model/PayoutRequestBlockReason.php new file mode 100644 index 000000000..b5729b6bf --- /dev/null +++ b/src/Model/PayoutRequestBlockReason.php @@ -0,0 +1,36 @@ +setAmounts($data['amounts']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + /** + * @return float[] + */ + public function getAmounts(): array + { + return $this->fields['amounts']; + } + + /** + * @param float[]|string[] $amounts + */ + public function setAmounts(array $amounts): static + { + $amounts = array_map( + fn ($value) => is_string($value) ? (float) $value : $value, + $amounts, + ); + + $this->fields['amounts'] = $amounts; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('amounts', $this->fields)) { + $data['amounts'] = $this->fields['amounts']; + } + + return $data; + } +} diff --git a/src/Model/PayoutRequestTimelineMessage.php b/src/Model/PayoutRequestTimelineMessage.php index 9d372b9ec..fe599b730 100644 --- a/src/Model/PayoutRequestTimelineMessage.php +++ b/src/Model/PayoutRequestTimelineMessage.php @@ -24,9 +24,9 @@ class PayoutRequestTimelineMessage implements JsonSerializable public const TYPE_PAYOUT_REQUEST_CREATED = 'payout-request-created'; - public const TYPE_PAYOUT_REQUEST_FLUSHED = 'payout-request-flushed'; + public const TYPE_PAYOUT_REQUEST_READY = 'payout-request-ready'; - public const TYPE_PAYOUT_REQUEST_FLUSH_UNDONE = 'payout-request-flush-undone'; + public const TYPE_PAYOUT_REQUEST_RETURNED_TO_PENDING = 'payout-request-returned-to-pending'; public const TYPE_PAYOUT_REQUEST_APPROVED = 'payout-request-approved'; diff --git a/src/Model/PayoutRequestV2.php b/src/Model/PayoutRequestV2.php index e74b0eecd..9cc29fcbe 100644 --- a/src/Model/PayoutRequestV2.php +++ b/src/Model/PayoutRequestV2.php @@ -22,7 +22,7 @@ class PayoutRequestV2 implements JsonSerializable { public const STATUS_PENDING = 'pending'; - public const STATUS_FLUSHED = 'flushed'; + public const STATUS_READY = 'ready'; public const STATUS_APPROVED = 'approved'; @@ -42,6 +42,10 @@ class PayoutRequestV2 implements JsonSerializable public const STATUS_ADMIN_REVERSED = 'admin-reversed'; + public const STATUS_SPLIT = 'split'; + + public const STATUS_MERGED = 'merged'; + private array $fields = []; public function __construct(array $data = []) @@ -58,6 +62,12 @@ public function __construct(array $data = []) if (array_key_exists('paymentInstrumentId', $data)) { $this->setPaymentInstrumentId($data['paymentInstrumentId']); } + if (array_key_exists('splitFromPayoutRequestId', $data)) { + $this->setSplitFromPayoutRequestId($data['splitFromPayoutRequestId']); + } + if (array_key_exists('mergedIntoPayoutRequestId', $data)) { + $this->setMergedIntoPayoutRequestId($data['mergedIntoPayoutRequestId']); + } if (array_key_exists('currency', $data)) { $this->setCurrency($data['currency']); } @@ -76,6 +86,12 @@ public function __construct(array $data = []) if (array_key_exists('blocked', $data)) { $this->setBlocked($data['blocked']); } + if (array_key_exists('blockReason', $data)) { + $this->setBlockReason($data['blockReason']); + } + if (array_key_exists('batchId', $data)) { + $this->setBatchId($data['batchId']); + } if (array_key_exists('selectPaymentInstrumentUrl', $data)) { $this->setSelectPaymentInstrumentUrl($data['selectPaymentInstrumentUrl']); } @@ -145,6 +161,16 @@ public function setPaymentInstrumentId(null|string $paymentInstrumentId): static return $this; } + public function getSplitFromPayoutRequestId(): ?string + { + return $this->fields['splitFromPayoutRequestId'] ?? null; + } + + public function getMergedIntoPayoutRequestId(): ?string + { + return $this->fields['mergedIntoPayoutRequestId'] ?? null; + } + public function getCurrency(): string { return $this->fields['currency']; @@ -214,6 +240,27 @@ public function setBlocked(null|bool $blocked): static return $this; } + public function getBlockReason(): ?PayoutRequestBlockReason + { + return $this->fields['blockReason'] ?? null; + } + + public function setBlockReason(null|PayoutRequestBlockReason|array $blockReason): static + { + if ($blockReason !== null && !($blockReason instanceof PayoutRequestBlockReason)) { + $blockReason = PayoutRequestBlockReason::from($blockReason); + } + + $this->fields['blockReason'] = $blockReason; + + return $this; + } + + public function getBatchId(): ?string + { + return $this->fields['batchId'] ?? null; + } + public function getSelectPaymentInstrumentUrl(): ?string { return $this->fields['selectPaymentInstrumentUrl'] ?? null; @@ -288,6 +335,12 @@ public function jsonSerialize(): array if (array_key_exists('paymentInstrumentId', $this->fields)) { $data['paymentInstrumentId'] = $this->fields['paymentInstrumentId']; } + if (array_key_exists('splitFromPayoutRequestId', $this->fields)) { + $data['splitFromPayoutRequestId'] = $this->fields['splitFromPayoutRequestId']; + } + if (array_key_exists('mergedIntoPayoutRequestId', $this->fields)) { + $data['mergedIntoPayoutRequestId'] = $this->fields['mergedIntoPayoutRequestId']; + } if (array_key_exists('currency', $this->fields)) { $data['currency'] = $this->fields['currency']; } @@ -306,6 +359,12 @@ public function jsonSerialize(): array if (array_key_exists('blocked', $this->fields)) { $data['blocked'] = $this->fields['blocked']; } + if (array_key_exists('blockReason', $this->fields)) { + $data['blockReason'] = $this->fields['blockReason']?->jsonSerialize(); + } + if (array_key_exists('batchId', $this->fields)) { + $data['batchId'] = $this->fields['batchId']; + } if (array_key_exists('selectPaymentInstrumentUrl', $this->fields)) { $data['selectPaymentInstrumentUrl'] = $this->fields['selectPaymentInstrumentUrl']; } @@ -348,6 +407,20 @@ private function setId(null|string $id): static return $this; } + private function setSplitFromPayoutRequestId(null|string $splitFromPayoutRequestId): static + { + $this->fields['splitFromPayoutRequestId'] = $splitFromPayoutRequestId; + + return $this; + } + + private function setMergedIntoPayoutRequestId(null|string $mergedIntoPayoutRequestId): static + { + $this->fields['mergedIntoPayoutRequestId'] = $mergedIntoPayoutRequestId; + + return $this; + } + private function setAvailableAmount(null|float|string $availableAmount): static { if (is_string($availableAmount)) { @@ -359,6 +432,13 @@ private function setAvailableAmount(null|float|string $availableAmount): static return $this; } + private function setBatchId(null|string $batchId): static + { + $this->fields['batchId'] = $batchId; + + return $this; + } + private function setSelectPaymentInstrumentUrl(null|string $selectPaymentInstrumentUrl): static { $this->fields['selectPaymentInstrumentUrl'] = $selectPaymentInstrumentUrl; diff --git a/src/Model/PayoutRequestsDataExport.php b/src/Model/PayoutRequestsDataExport.php new file mode 100644 index 000000000..b482088c1 --- /dev/null +++ b/src/Model/PayoutRequestsDataExport.php @@ -0,0 +1,424 @@ +setId($data['id']); + } + if (array_key_exists('name', $data)) { + $this->setName($data['name']); + } + if (array_key_exists('format', $data)) { + $this->setFormat($data['format']); + } + if (array_key_exists('arguments', $data)) { + $this->setArguments($data['arguments']); + } + if (array_key_exists('emailNotification', $data)) { + $this->setEmailNotification($data['emailNotification']); + } + if (array_key_exists('fields', $data)) { + $this->setFields($data['fields']); + } + if (array_key_exists('recurring', $data)) { + $this->setRecurring($data['recurring']); + } + if (array_key_exists('userId', $data)) { + $this->setUserId($data['userId']); + } + if (array_key_exists('fileId', $data)) { + $this->setFileId($data['fileId']); + } + if (array_key_exists('recordCount', $data)) { + $this->setRecordCount($data['recordCount']); + } + if (array_key_exists('scheduledTime', $data)) { + $this->setScheduledTime($data['scheduledTime']); + } + if (array_key_exists('createdTime', $data)) { + $this->setCreatedTime($data['createdTime']); + } + if (array_key_exists('updatedTime', $data)) { + $this->setUpdatedTime($data['updatedTime']); + } + if (array_key_exists('status', $data)) { + $this->setStatus($data['status']); + } + if (array_key_exists('dateRange', $data)) { + $this->setDateRange($data['dateRange']); + } + if (array_key_exists('_links', $data)) { + $this->setLinks($data['_links']); + } + if (array_key_exists('_embedded', $data)) { + $this->setEmbedded($data['_embedded']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getResource(): string + { + return 'payoutRequests'; + } + + public function getId(): ?string + { + return $this->fields['id'] ?? null; + } + + public function getName(): string + { + return $this->fields['name']; + } + + public function setName(string $name): static + { + $this->fields['name'] = $name; + + return $this; + } + + public function getFormat(): string + { + return $this->fields['format']; + } + + public function setFormat(string $format): static + { + $this->fields['format'] = $format; + + return $this; + } + + public function getArguments(): ?DataExportArguments + { + return $this->fields['arguments'] ?? null; + } + + public function setArguments(null|DataExportArguments|array $arguments): static + { + if ($arguments !== null && !($arguments instanceof DataExportArguments)) { + $arguments = DataExportArguments::from($arguments); + } + + $this->fields['arguments'] = $arguments; + + return $this; + } + + /** + * @return null|string[] + */ + public function getEmailNotification(): ?array + { + return $this->fields['emailNotification'] ?? null; + } + + /** + * @param null|string[] $emailNotification + */ + public function setEmailNotification(null|array $emailNotification): static + { + $this->fields['emailNotification'] = $emailNotification; + + return $this; + } + + /** + * @return null|string[] + */ + public function getFields(): ?array + { + return $this->fields['fields'] ?? null; + } + + /** + * @param null|string[] $fields + */ + public function setFields(null|array $fields): static + { + $this->fields['fields'] = $fields; + + return $this; + } + + public function getRecurring(): ?DataExportRecurring + { + return $this->fields['recurring'] ?? null; + } + + public function setRecurring(null|DataExportRecurring|array $recurring): static + { + if ($recurring !== null && !($recurring instanceof DataExportRecurring)) { + $recurring = DataExportRecurring::from($recurring); + } + + $this->fields['recurring'] = $recurring; + + return $this; + } + + public function getUserId(): ?string + { + return $this->fields['userId'] ?? null; + } + + public function getFileId(): ?string + { + return $this->fields['fileId'] ?? null; + } + + public function getRecordCount(): ?int + { + return $this->fields['recordCount'] ?? null; + } + + public function getScheduledTime(): ?DateTimeImmutable + { + return $this->fields['scheduledTime'] ?? null; + } + + public function getCreatedTime(): ?DateTimeImmutable + { + return $this->fields['createdTime'] ?? null; + } + + public function getUpdatedTime(): ?DateTimeImmutable + { + return $this->fields['updatedTime'] ?? null; + } + + public function getStatus(): ?string + { + return $this->fields['status'] ?? null; + } + + public function getDateRange(): ?DataExportDateRange + { + return $this->fields['dateRange'] ?? null; + } + + public function setDateRange(null|DataExportDateRange|array $dateRange): static + { + if ($dateRange !== null && !($dateRange instanceof DataExportDateRange)) { + $dateRange = DataExportDateRange::from($dateRange); + } + + $this->fields['dateRange'] = $dateRange; + + return $this; + } + + /** + * @return null|ResourceLink[] + */ + public function getLinks(): ?array + { + return $this->fields['_links'] ?? null; + } + + public function getEmbedded(): ?PayoutRequestsDataExportEmbedded + { + return $this->fields['_embedded'] ?? null; + } + + public function setEmbedded(null|PayoutRequestsDataExportEmbedded|array $embedded): static + { + if ($embedded !== null && !($embedded instanceof PayoutRequestsDataExportEmbedded)) { + $embedded = PayoutRequestsDataExportEmbedded::from($embedded); + } + + $this->fields['_embedded'] = $embedded; + + return $this; + } + + public function jsonSerialize(): array + { + $data = [ + 'resource' => 'payoutRequests', + ]; + if (array_key_exists('id', $this->fields)) { + $data['id'] = $this->fields['id']; + } + if (array_key_exists('name', $this->fields)) { + $data['name'] = $this->fields['name']; + } + if (array_key_exists('format', $this->fields)) { + $data['format'] = $this->fields['format']; + } + if (array_key_exists('arguments', $this->fields)) { + $data['arguments'] = $this->fields['arguments']?->jsonSerialize(); + } + if (array_key_exists('emailNotification', $this->fields)) { + $data['emailNotification'] = $this->fields['emailNotification']; + } + if (array_key_exists('fields', $this->fields)) { + $data['fields'] = $this->fields['fields']; + } + if (array_key_exists('recurring', $this->fields)) { + $data['recurring'] = $this->fields['recurring']?->jsonSerialize(); + } + if (array_key_exists('userId', $this->fields)) { + $data['userId'] = $this->fields['userId']; + } + if (array_key_exists('fileId', $this->fields)) { + $data['fileId'] = $this->fields['fileId']; + } + if (array_key_exists('recordCount', $this->fields)) { + $data['recordCount'] = $this->fields['recordCount']; + } + if (array_key_exists('scheduledTime', $this->fields)) { + $data['scheduledTime'] = $this->fields['scheduledTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('createdTime', $this->fields)) { + $data['createdTime'] = $this->fields['createdTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('updatedTime', $this->fields)) { + $data['updatedTime'] = $this->fields['updatedTime']?->format(DateTimeInterface::RFC3339); + } + if (array_key_exists('status', $this->fields)) { + $data['status'] = $this->fields['status']; + } + if (array_key_exists('dateRange', $this->fields)) { + $data['dateRange'] = $this->fields['dateRange']?->jsonSerialize(); + } + if (array_key_exists('_links', $this->fields)) { + $data['_links'] = $this->fields['_links'] !== null + ? array_map( + static fn (ResourceLink $resourceLink) => $resourceLink->jsonSerialize(), + $this->fields['_links'], + ) + : null; + } + if (array_key_exists('_embedded', $this->fields)) { + $data['_embedded'] = $this->fields['_embedded']?->jsonSerialize(); + } + + return $data; + } + + private function setId(null|string $id): static + { + $this->fields['id'] = $id; + + return $this; + } + + private function setUserId(null|string $userId): static + { + $this->fields['userId'] = $userId; + + return $this; + } + + private function setFileId(null|string $fileId): static + { + $this->fields['fileId'] = $fileId; + + return $this; + } + + private function setRecordCount(null|int $recordCount): static + { + $this->fields['recordCount'] = $recordCount; + + return $this; + } + + private function setScheduledTime(null|DateTimeImmutable|string $scheduledTime): static + { + if ($scheduledTime !== null && !($scheduledTime instanceof DateTimeImmutable)) { + $scheduledTime = new DateTimeImmutable($scheduledTime); + } + + $this->fields['scheduledTime'] = $scheduledTime; + + return $this; + } + + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static + { + if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { + $createdTime = new DateTimeImmutable($createdTime); + } + + $this->fields['createdTime'] = $createdTime; + + return $this; + } + + private function setUpdatedTime(null|DateTimeImmutable|string $updatedTime): static + { + if ($updatedTime !== null && !($updatedTime instanceof DateTimeImmutable)) { + $updatedTime = new DateTimeImmutable($updatedTime); + } + + $this->fields['updatedTime'] = $updatedTime; + + return $this; + } + + private function setStatus(null|string $status): static + { + $this->fields['status'] = $status; + + 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/PayoutRequestsDataExportEmbedded.php b/src/Model/PayoutRequestsDataExportEmbedded.php new file mode 100644 index 000000000..5f4672b2b --- /dev/null +++ b/src/Model/PayoutRequestsDataExportEmbedded.php @@ -0,0 +1,82 @@ +setFile($data['file']); + } + if (array_key_exists('user', $data)) { + $this->setUser($data['user']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getFile(): ?File + { + return $this->fields['file'] ?? null; + } + + public function setFile(null|File|array $file): static + { + if ($file !== null && !($file instanceof File)) { + $file = File::from($file); + } + + $this->fields['file'] = $file; + + return $this; + } + + public function getUser(): ?User + { + return $this->fields['user'] ?? null; + } + + public function setUser(null|User|array $user): static + { + if ($user !== null && !($user instanceof User)) { + $user = User::from($user); + } + + $this->fields['user'] = $user; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('file', $this->fields)) { + $data['file'] = $this->fields['file']?->jsonSerialize(); + } + if (array_key_exists('user', $this->fields)) { + $data['user'] = $this->fields['user']?->jsonSerialize(); + } + + return $data; + } +} diff --git a/src/Model/Plan.php b/src/Model/Plan.php index 5d7771c12..568b3b1c6 100644 --- a/src/Model/Plan.php +++ b/src/Model/Plan.php @@ -19,7 +19,7 @@ interface Plan extends JsonSerializable { - public function getId(): ?string; + public function getId(): string; public function getName(): string; diff --git a/src/Model/PostDisputeRequest.php b/src/Model/PostDisputeRequest.php index 7c3f66f06..2fa00039d 100644 --- a/src/Model/PostDisputeRequest.php +++ b/src/Model/PostDisputeRequest.php @@ -310,6 +310,36 @@ class PostDisputeRequest implements JsonSerializable public const REASON_CODE_4999 = '4999'; + public const REASON_CODE_4534 = '4534'; + + public const REASON_CODE_4541 = '4541'; + + public const REASON_CODE_4542 = '4542'; + + public const REASON_CODE_4550 = '4550'; + + public const REASON_CODE_4553 = '4553'; + + public const REASON_CODE_4586 = '4586'; + + public const REASON_CODE_4752 = '4752'; + + public const REASON_CODE_4753 = '4753'; + + public const REASON_CODE_4755 = '4755'; + + public const REASON_CODE_4865 = '4865'; + + public const REASON_CODE_4866 = '4866'; + + public const REASON_CODE_4867 = '4867'; + + public const REASON_CODE_7010 = '7010'; + + public const REASON_CODE_7030 = '7030'; + + public const REASON_CODE_8002 = '8002'; + public const REASON_CODE_A = 'A'; public const REASON_CODE_A01 = 'A01'; diff --git a/src/Model/PostPayoutRequestAllocationsProcessRequest.php b/src/Model/PostPayoutRequestAllocationsProcessRequest.php new file mode 100644 index 000000000..19d42a1d9 --- /dev/null +++ b/src/Model/PostPayoutRequestAllocationsProcessRequest.php @@ -0,0 +1,62 @@ +setAllocationIds($data['allocationIds']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + /** + * @return string[] + */ + public function getAllocationIds(): array + { + return $this->fields['allocationIds']; + } + + /** + * @param string[] $allocationIds + */ + public function setAllocationIds(array $allocationIds): static + { + $this->fields['allocationIds'] = $allocationIds; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('allocationIds', $this->fields)) { + $data['allocationIds'] = $this->fields['allocationIds']; + } + + return $data; + } +} diff --git a/src/Model/PostPayoutRequestBatchBlockRequest.php b/src/Model/PostPayoutRequestBatchBlockRequest.php new file mode 100644 index 000000000..0f2f73a4c --- /dev/null +++ b/src/Model/PostPayoutRequestBatchBlockRequest.php @@ -0,0 +1,90 @@ +setReason($data['reason']); + } + if (array_key_exists('description', $data)) { + $this->setDescription($data['description']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getReason(): string + { + return $this->fields['reason']; + } + + public function setReason(string $reason): static + { + $this->fields['reason'] = $reason; + + return $this; + } + + public function getDescription(): ?string + { + return $this->fields['description'] ?? null; + } + + public function setDescription(null|string $description): static + { + $this->fields['description'] = $description; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('reason', $this->fields)) { + $data['reason'] = $this->fields['reason']; + } + if (array_key_exists('description', $this->fields)) { + $data['description'] = $this->fields['description']; + } + + return $data; + } +} diff --git a/src/Model/PostPayoutRequestBatchRequest.php b/src/Model/PostPayoutRequestBatchRequest.php new file mode 100644 index 000000000..2cbca3bff --- /dev/null +++ b/src/Model/PostPayoutRequestBatchRequest.php @@ -0,0 +1,24 @@ +setPayoutRequestIds($data['payoutRequestIds']); + } + if (array_key_exists('description', $data)) { + $this->setDescription($data['description']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + /** + * @return string[] + */ + public function getPayoutRequestIds(): array + { + return $this->fields['payoutRequestIds']; + } + + /** + * @param string[] $payoutRequestIds + */ + public function setPayoutRequestIds(array $payoutRequestIds): static + { + $this->fields['payoutRequestIds'] = $payoutRequestIds; + + return $this; + } + + public function getDescription(): ?string + { + return $this->fields['description'] ?? null; + } + + public function setDescription(null|string $description): static + { + $this->fields['description'] = $description; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('payoutRequestIds', $this->fields)) { + $data['payoutRequestIds'] = $this->fields['payoutRequestIds']; + } + if (array_key_exists('description', $this->fields)) { + $data['description'] = $this->fields['description']; + } + + return $data; + } +} diff --git a/src/Model/PostPayoutRequestBatchRequestFactory.php b/src/Model/PostPayoutRequestBatchRequestFactory.php new file mode 100644 index 000000000..819517597 --- /dev/null +++ b/src/Model/PostPayoutRequestBatchRequestFactory.php @@ -0,0 +1,32 @@ +setFilter($data['filter']); + } + if (array_key_exists('description', $data)) { + $this->setDescription($data['description']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getFilter(): string + { + return $this->fields['filter']; + } + + public function setFilter(string $filter): static + { + $this->fields['filter'] = $filter; + + return $this; + } + + public function getDescription(): ?string + { + return $this->fields['description'] ?? null; + } + + public function setDescription(null|string $description): static + { + $this->fields['description'] = $description; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('filter', $this->fields)) { + $data['filter'] = $this->fields['filter']; + } + if (array_key_exists('description', $this->fields)) { + $data['description'] = $this->fields['description']; + } + + return $data; + } +} diff --git a/src/Model/RecurringOrderItems.php b/src/Model/RecurringOrderItems.php index 7b71b4db0..bb1e0a8bf 100644 --- a/src/Model/RecurringOrderItems.php +++ b/src/Model/RecurringOrderItems.php @@ -37,6 +37,8 @@ public function getQuantity(): ?int; public function setQuantity(null|int $quantity): static; + public function getRevision(): ?int; + public function getCreatedTime(): ?DateTimeImmutable; public function getUpdatedTime(): ?DateTimeImmutable; diff --git a/src/Model/RedemptionRestrictionFactory.php b/src/Model/RedemptionRestrictionFactory.php index 94a9be511..632fa7904 100644 --- a/src/Model/RedemptionRestrictionFactory.php +++ b/src/Model/RedemptionRestrictionFactory.php @@ -22,6 +22,7 @@ public static function from(array $data = []): RedemptionRestriction { return match ($data['type']) { 'discounts-per-redemption' => CouponRestrictionDiscountPerRedemption::from($data), + 'maximum-order-amount' => CouponRestrictionMaximumOrderAmount::from($data), 'minimum-order-amount' => CouponRestrictionMinimumOrderAmount::from($data), 'paid-by-time' => CouponRestrictionPaidByTime::from($data), 'restrict-to-invoices' => CouponRestrictionRestrictToInvoices::from($data), diff --git a/src/Model/ReportAmlChecks.php b/src/Model/ReportAmlChecks.php new file mode 100644 index 000000000..22d302e59 --- /dev/null +++ b/src/Model/ReportAmlChecks.php @@ -0,0 +1,110 @@ +setTotal($data['total']); + } + if (array_key_exists('propagated', $data)) { + $this->setPropagated($data['propagated']); + } + if (array_key_exists('resulted', $data)) { + $this->setResulted($data['resulted']); + } + if (array_key_exists('pending', $data)) { + $this->setPending($data['pending']); + } + } + + public static function from(array $data = []): self + { + return new self($data); + } + + public function getTotal(): ?int + { + return $this->fields['total'] ?? null; + } + + public function setTotal(null|int $total): static + { + $this->fields['total'] = $total; + + return $this; + } + + public function getPropagated(): ?int + { + return $this->fields['propagated'] ?? null; + } + + public function setPropagated(null|int $propagated): static + { + $this->fields['propagated'] = $propagated; + + return $this; + } + + public function getResulted(): ?int + { + return $this->fields['resulted'] ?? null; + } + + public function setResulted(null|int $resulted): static + { + $this->fields['resulted'] = $resulted; + + return $this; + } + + public function getPending(): ?int + { + return $this->fields['pending'] ?? null; + } + + public function setPending(null|int $pending): static + { + $this->fields['pending'] = $pending; + + return $this; + } + + public function jsonSerialize(): array + { + $data = []; + if (array_key_exists('total', $this->fields)) { + $data['total'] = $this->fields['total']; + } + if (array_key_exists('propagated', $this->fields)) { + $data['propagated'] = $this->fields['propagated']; + } + if (array_key_exists('resulted', $this->fields)) { + $data['resulted'] = $this->fields['resulted']; + } + if (array_key_exists('pending', $this->fields)) { + $data['pending'] = $this->fields['pending']; + } + + return $data; + } +} diff --git a/src/Model/RiskScoreBlocklist.php b/src/Model/RiskScoreBlocklist.php index 70c5181ef..1936fc45d 100644 --- a/src/Model/RiskScoreBlocklist.php +++ b/src/Model/RiskScoreBlocklist.php @@ -22,36 +22,6 @@ class RiskScoreBlocklist implements JsonSerializable public function __construct(array $data = []) { - if (array_key_exists('address', $data)) { - $this->setAddress($data['address']); - } - if (array_key_exists('bank-account', $data)) { - $this->setBankAccount($data['bank-account']); - } - if (array_key_exists('bin', $data)) { - $this->setBin($data['bin']); - } - if (array_key_exists('country', $data)) { - $this->setCountry($data['country']); - } - if (array_key_exists('customer-id', $data)) { - $this->setCustomerId($data['customer-id']); - } - if (array_key_exists('email', $data)) { - $this->setEmail($data['email']); - } - if (array_key_exists('email-domain', $data)) { - $this->setEmailDomain($data['email-domain']); - } - if (array_key_exists('fingerprint', $data)) { - $this->setFingerprint($data['fingerprint']); - } - if (array_key_exists('ip-address', $data)) { - $this->setIpAddress($data['ip-address']); - } - if (array_key_exists('payment-card', $data)) { - $this->setPaymentCard($data['payment-card']); - } if (array_key_exists('permanentlyBlockList', $data)) { $this->setPermanentlyBlockList($data['permanentlyBlockList']); } @@ -65,166 +35,6 @@ public static function from(array $data = []): self return new self($data); } - public function getAddress(): ?RiskScoreBlocklistType - { - return $this->fields['address'] ?? null; - } - - public function setAddress(null|RiskScoreBlocklistType|array $address): static - { - if ($address !== null && !($address instanceof RiskScoreBlocklistType)) { - $address = RiskScoreBlocklistType::from($address); - } - - $this->fields['address'] = $address; - - return $this; - } - - public function getBankAccount(): ?RiskScoreBlocklistType - { - return $this->fields['bank-account'] ?? null; - } - - public function setBankAccount(null|RiskScoreBlocklistType|array $bankAccount): static - { - if ($bankAccount !== null && !($bankAccount instanceof RiskScoreBlocklistType)) { - $bankAccount = RiskScoreBlocklistType::from($bankAccount); - } - - $this->fields['bank-account'] = $bankAccount; - - return $this; - } - - public function getBin(): ?RiskScoreBlocklistType - { - return $this->fields['bin'] ?? null; - } - - public function setBin(null|RiskScoreBlocklistType|array $bin): static - { - if ($bin !== null && !($bin instanceof RiskScoreBlocklistType)) { - $bin = RiskScoreBlocklistType::from($bin); - } - - $this->fields['bin'] = $bin; - - return $this; - } - - public function getCountry(): ?RiskScoreBlocklistType - { - return $this->fields['country'] ?? null; - } - - public function setCountry(null|RiskScoreBlocklistType|array $country): static - { - if ($country !== null && !($country instanceof RiskScoreBlocklistType)) { - $country = RiskScoreBlocklistType::from($country); - } - - $this->fields['country'] = $country; - - return $this; - } - - public function getCustomerId(): ?RiskScoreBlocklistType - { - return $this->fields['customer-id'] ?? null; - } - - public function setCustomerId(null|RiskScoreBlocklistType|array $customerId): static - { - if ($customerId !== null && !($customerId instanceof RiskScoreBlocklistType)) { - $customerId = RiskScoreBlocklistType::from($customerId); - } - - $this->fields['customer-id'] = $customerId; - - return $this; - } - - public function getEmail(): ?RiskScoreBlocklistType - { - return $this->fields['email'] ?? null; - } - - public function setEmail(null|RiskScoreBlocklistType|array $email): static - { - if ($email !== null && !($email instanceof RiskScoreBlocklistType)) { - $email = RiskScoreBlocklistType::from($email); - } - - $this->fields['email'] = $email; - - return $this; - } - - public function getEmailDomain(): ?RiskScoreBlocklistType - { - return $this->fields['email-domain'] ?? null; - } - - public function setEmailDomain(null|RiskScoreBlocklistType|array $emailDomain): static - { - if ($emailDomain !== null && !($emailDomain instanceof RiskScoreBlocklistType)) { - $emailDomain = RiskScoreBlocklistType::from($emailDomain); - } - - $this->fields['email-domain'] = $emailDomain; - - return $this; - } - - public function getFingerprint(): ?RiskScoreBlocklistType - { - return $this->fields['fingerprint'] ?? null; - } - - public function setFingerprint(null|RiskScoreBlocklistType|array $fingerprint): static - { - if ($fingerprint !== null && !($fingerprint instanceof RiskScoreBlocklistType)) { - $fingerprint = RiskScoreBlocklistType::from($fingerprint); - } - - $this->fields['fingerprint'] = $fingerprint; - - return $this; - } - - public function getIpAddress(): ?RiskScoreBlocklistType - { - return $this->fields['ip-address'] ?? null; - } - - public function setIpAddress(null|RiskScoreBlocklistType|array $ipAddress): static - { - if ($ipAddress !== null && !($ipAddress instanceof RiskScoreBlocklistType)) { - $ipAddress = RiskScoreBlocklistType::from($ipAddress); - } - - $this->fields['ip-address'] = $ipAddress; - - return $this; - } - - public function getPaymentCard(): ?RiskScoreBlocklistType - { - return $this->fields['payment-card'] ?? null; - } - - public function setPaymentCard(null|RiskScoreBlocklistType|array $paymentCard): static - { - if ($paymentCard !== null && !($paymentCard instanceof RiskScoreBlocklistType)) { - $paymentCard = RiskScoreBlocklistType::from($paymentCard); - } - - $this->fields['payment-card'] = $paymentCard; - - return $this; - } - public function getPermanentlyBlockList(): ?RiskScoreBlocklistPermanentRules { return $this->fields['permanentlyBlockList'] ?? null; @@ -260,36 +70,6 @@ public function setTemporaryBlockList(null|RiskScoreBlocklistTemporaryRules|arra public function jsonSerialize(): array { $data = []; - if (array_key_exists('address', $this->fields)) { - $data['address'] = $this->fields['address']?->jsonSerialize(); - } - if (array_key_exists('bank-account', $this->fields)) { - $data['bank-account'] = $this->fields['bank-account']?->jsonSerialize(); - } - if (array_key_exists('bin', $this->fields)) { - $data['bin'] = $this->fields['bin']?->jsonSerialize(); - } - if (array_key_exists('country', $this->fields)) { - $data['country'] = $this->fields['country']?->jsonSerialize(); - } - if (array_key_exists('customer-id', $this->fields)) { - $data['customer-id'] = $this->fields['customer-id']?->jsonSerialize(); - } - if (array_key_exists('email', $this->fields)) { - $data['email'] = $this->fields['email']?->jsonSerialize(); - } - if (array_key_exists('email-domain', $this->fields)) { - $data['email-domain'] = $this->fields['email-domain']?->jsonSerialize(); - } - if (array_key_exists('fingerprint', $this->fields)) { - $data['fingerprint'] = $this->fields['fingerprint']?->jsonSerialize(); - } - if (array_key_exists('ip-address', $this->fields)) { - $data['ip-address'] = $this->fields['ip-address']?->jsonSerialize(); - } - if (array_key_exists('payment-card', $this->fields)) { - $data['payment-card'] = $this->fields['payment-card']?->jsonSerialize(); - } if (array_key_exists('permanentlyBlockList', $this->fields)) { $data['permanentlyBlockList'] = $this->fields['permanentlyBlockList']?->jsonSerialize(); } diff --git a/src/Model/RiskScoreBlocklistType.php b/src/Model/RiskScoreBlocklistType.php deleted file mode 100644 index c1d6ed5f9..000000000 --- a/src/Model/RiskScoreBlocklistType.php +++ /dev/null @@ -1,74 +0,0 @@ -setRiskScoreThreshold($data['riskScoreThreshold']); - } - if (array_key_exists('ttl', $data)) { - $this->setTtl($data['ttl']); - } - } - - public static function from(array $data = []): self - { - return new self($data); - } - - public function getRiskScoreThreshold(): int - { - return $this->fields['riskScoreThreshold']; - } - - public function setRiskScoreThreshold(int $riskScoreThreshold): static - { - $this->fields['riskScoreThreshold'] = $riskScoreThreshold; - - return $this; - } - - public function getTtl(): int - { - return $this->fields['ttl']; - } - - public function setTtl(int $ttl): static - { - $this->fields['ttl'] = $ttl; - - return $this; - } - - public function jsonSerialize(): array - { - $data = []; - if (array_key_exists('riskScoreThreshold', $this->fields)) { - $data['riskScoreThreshold'] = $this->fields['riskScoreThreshold']; - } - if (array_key_exists('ttl', $this->fields)) { - $data['ttl'] = $this->fields['ttl']; - } - - return $data; - } -} diff --git a/src/Model/SubscriptionItem.php b/src/Model/SubscriptionItem.php index 77a027e2c..4fbb6e330 100644 --- a/src/Model/SubscriptionItem.php +++ b/src/Model/SubscriptionItem.php @@ -62,6 +62,9 @@ public function __construct(array $data = []) if (array_key_exists('usageStatus', $data)) { $this->setUsageStatus($data['usageStatus']); } + if (array_key_exists('revision', $data)) { + $this->setRevision($data['revision']); + } if (array_key_exists('excludeFromMrr', $data)) { $this->setExcludeFromMrr($data['excludeFromMrr']); } @@ -228,6 +231,11 @@ public function setUsageStatus(null|UsageStatus|array $usageStatus): static return $this; } + public function getRevision(): ?int + { + return $this->fields['revision'] ?? null; + } + public function getExcludeFromMrr(): ?bool { return $this->fields['excludeFromMrr'] ?? null; @@ -294,6 +302,9 @@ public function jsonSerialize(): array if (array_key_exists('usageStatus', $this->fields)) { $data['usageStatus'] = $this->fields['usageStatus']?->jsonSerialize(); } + if (array_key_exists('revision', $this->fields)) { + $data['revision'] = $this->fields['revision']; + } if (array_key_exists('excludeFromMrr', $this->fields)) { $data['excludeFromMrr'] = $this->fields['excludeFromMrr']; } @@ -346,6 +357,13 @@ private function setProductId(null|string $productId): static return $this; } + private function setRevision(null|int $revision): static + { + $this->fields['revision'] = $revision; + + return $this; + } + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static { if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { diff --git a/src/Model/SubscriptionPlan.php b/src/Model/SubscriptionPlan.php index f895a163f..4d61d314c 100644 --- a/src/Model/SubscriptionPlan.php +++ b/src/Model/SubscriptionPlan.php @@ -93,9 +93,9 @@ public static function from(array $data = []): self return new self($data); } - public function getId(): ?string + public function getId(): string { - return $this->fields['id'] ?? null; + return $this->fields['id']; } public function getName(): string @@ -300,17 +300,6 @@ public function getInvoiceTimeShift(): ?InvoiceTimeShift return $this->fields['invoiceTimeShift'] ?? null; } - public function setInvoiceTimeShift(null|InvoiceTimeShift|array $invoiceTimeShift): static - { - if ($invoiceTimeShift !== null && !($invoiceTimeShift instanceof InvoiceTimeShift)) { - $invoiceTimeShift = InvoiceTimeShift::from($invoiceTimeShift); - } - - $this->fields['invoiceTimeShift'] = $invoiceTimeShift; - - return $this; - } - public function getCreatedTime(): ?DateTimeImmutable { return $this->fields['createdTime'] ?? null; @@ -404,7 +393,7 @@ public function jsonSerialize(): array return $data; } - private function setId(null|string $id): static + private function setId(string $id): static { $this->fields['id'] = $id; @@ -432,6 +421,17 @@ private function setIsTrialOnly(null|bool $isTrialOnly): static return $this; } + private function setInvoiceTimeShift(null|InvoiceTimeShift|array $invoiceTimeShift): static + { + if ($invoiceTimeShift !== null && !($invoiceTimeShift instanceof InvoiceTimeShift)) { + $invoiceTimeShift = InvoiceTimeShift::from($invoiceTimeShift); + } + + $this->fields['invoiceTimeShift'] = $invoiceTimeShift; + + return $this; + } + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static { if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { diff --git a/src/Model/Transaction.php b/src/Model/Transaction.php index a6bc25b04..f166eb291 100644 --- a/src/Model/Transaction.php +++ b/src/Model/Transaction.php @@ -1543,6 +1543,9 @@ public function __construct(array $data = []) if (array_key_exists('depositRequestId', $data)) { $this->setDepositRequestId($data['depositRequestId']); } + if (array_key_exists('transferId', $data)) { + $this->setTransferId($data['transferId']); + } if (array_key_exists('payoutRequestId', $data)) { $this->setPayoutRequestId($data['payoutRequestId']); } @@ -2060,6 +2063,11 @@ public function getDepositRequestId(): ?string return $this->fields['depositRequestId'] ?? null; } + public function getTransferId(): ?string + { + return $this->fields['transferId'] ?? null; + } + public function getPayoutRequestId(): ?string { return $this->fields['payoutRequestId'] ?? null; @@ -2287,6 +2295,9 @@ public function jsonSerialize(): array if (array_key_exists('depositRequestId', $this->fields)) { $data['depositRequestId'] = $this->fields['depositRequestId']; } + if (array_key_exists('transferId', $this->fields)) { + $data['transferId'] = $this->fields['transferId']; + } if (array_key_exists('payoutRequestId', $this->fields)) { $data['payoutRequestId'] = $this->fields['payoutRequestId']; } @@ -2682,6 +2693,13 @@ private function setDepositRequestId(null|string $depositRequestId): static return $this; } + private function setTransferId(null|string $transferId): static + { + $this->fields['transferId'] = $transferId; + + return $this; + } + private function setPayoutRequestId(null|string $payoutRequestId): static { $this->fields['payoutRequestId'] = $payoutRequestId; diff --git a/src/Model/TransactionDcc.php b/src/Model/TransactionDcc.php index 3d08b44d9..b5116aec9 100644 --- a/src/Model/TransactionDcc.php +++ b/src/Model/TransactionDcc.php @@ -18,12 +18,12 @@ class TransactionDcc implements JsonSerializable { + public const OUTCOME_UNPROCESSED = 'unprocessed'; + public const OUTCOME_REJECTED = 'rejected'; public const OUTCOME_SELECTED = 'selected'; - public const OUTCOME_UNKNOWN = 'unknown'; - private array $fields = []; public function __construct(array $data = []) diff --git a/src/Model/TrialOnlyPlan.php b/src/Model/TrialOnlyPlan.php index 36442a5f3..6e02b4b4f 100644 --- a/src/Model/TrialOnlyPlan.php +++ b/src/Model/TrialOnlyPlan.php @@ -84,9 +84,9 @@ public static function from(array $data = []): self return new self($data); } - public function getId(): ?string + public function getId(): string { - return $this->fields['id'] ?? null; + return $this->fields['id']; } public function getName(): string @@ -243,17 +243,6 @@ public function getInvoiceTimeShift(): ?InvoiceTimeShift return $this->fields['invoiceTimeShift'] ?? null; } - public function setInvoiceTimeShift(null|InvoiceTimeShift|array $invoiceTimeShift): static - { - if ($invoiceTimeShift !== null && !($invoiceTimeShift instanceof InvoiceTimeShift)) { - $invoiceTimeShift = InvoiceTimeShift::from($invoiceTimeShift); - } - - $this->fields['invoiceTimeShift'] = $invoiceTimeShift; - - return $this; - } - public function getCreatedTime(): ?DateTimeImmutable { return $this->fields['createdTime'] ?? null; @@ -338,7 +327,7 @@ public function jsonSerialize(): array return $data; } - private function setId(null|string $id): static + private function setId(string $id): static { $this->fields['id'] = $id; @@ -366,6 +355,17 @@ private function setIsTrialOnly(null|bool $isTrialOnly): static return $this; } + private function setInvoiceTimeShift(null|InvoiceTimeShift|array $invoiceTimeShift): static + { + if ($invoiceTimeShift !== null && !($invoiceTimeShift instanceof InvoiceTimeShift)) { + $invoiceTimeShift = InvoiceTimeShift::from($invoiceTimeShift); + } + + $this->fields['invoiceTimeShift'] = $invoiceTimeShift; + + return $this; + } + private function setCreatedTime(null|DateTimeImmutable|string $createdTime): static { if ($createdTime !== null && !($createdTime instanceof DateTimeImmutable)) { diff --git a/src/Service.php b/src/Service.php index e7d94b438..0f450ebb1 100644 --- a/src/Service.php +++ b/src/Service.php @@ -160,6 +160,8 @@ class Service private Api\PayoutRequestAllocationsApi $payoutRequestAllocations; + private Api\PayoutRequestBatchesApi $payoutRequestBatches; + private Api\ProfileApi $profile; private Api\PreviewsApi $previews; @@ -265,6 +267,7 @@ public function __construct(?Client $client = null, array $config = []) $this->payoutRequests = new Api\PayoutRequestsApi($this->client); $this->payoutRequestsV2 = new Api\PayoutRequestsV2Api($this->client); $this->payoutRequestAllocations = new Api\PayoutRequestAllocationsApi($this->client); + $this->payoutRequestBatches = new Api\PayoutRequestBatchesApi($this->client); $this->profile = new Api\ProfileApi($this->client); $this->previews = new Api\PreviewsApi($this->client); $this->roles = new Api\RolesApi($this->client); @@ -638,6 +641,11 @@ public function payoutRequestAllocations(): Api\PayoutRequestAllocationsApi return $this->payoutRequestAllocations; } + public function payoutRequestBatches(): Api\PayoutRequestBatchesApi + { + return $this->payoutRequestBatches; + } + public function profile(): Api\ProfileApi { return $this->profile;