From d4eadc856afd8e327146c235090156c84f468b8c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:44:30 +0000 Subject: [PATCH 1/8] Update generated code for v2142 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Invoice.java | 25 +++++++++++++++++++ .../com/stripe/model/QuotePreviewInvoice.java | 25 +++++++++++++++++++ 4 files changed, 52 insertions(+), 2 deletions(-) diff --git a/API_VERSION b/API_VERSION index e48768f4a01..ecd5bb94d7c 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -3602014a6583f6c0fbfdde3c575839ac7d0b4e9c \ No newline at end of file +7b4fc6eca8bc61b5a52339eda297e0273fa6042c \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4e4ca8e5b78..c00bf54a10d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2141 \ No newline at end of file +v2142 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index fab1459ab0a..e2a960ab0c9 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -2382,6 +2382,31 @@ public static class ScheduleDetails extends StripeObject { /** The schedule that generated this invoice. */ @SerializedName("schedule") String schedule; + + /** The subscription associated with this schedule. */ + @SerializedName("subscription") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField subscription; + + /** Get ID of expandable {@code subscription} object. */ + public String getSubscription() { + return (this.subscription != null) ? this.subscription.getId() : null; + } + + public void setSubscription(String id) { + this.subscription = ApiResource.setExpandableFieldId(id, this.subscription); + } + + /** Get expanded {@code subscription}. */ + public Subscription getSubscriptionObject() { + return (this.subscription != null) ? this.subscription.getExpanded() : null; + } + + public void setSubscriptionObject(Subscription expandableObject) { + this.subscription = + new ExpandableField(expandableObject.getId(), expandableObject); + } } /** diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index 3089f04e337..b07a4ef3f62 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -1250,6 +1250,31 @@ public static class ScheduleDetails extends StripeObject { /** The schedule that generated this invoice. */ @SerializedName("schedule") String schedule; + + /** The subscription associated with this schedule. */ + @SerializedName("subscription") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField subscription; + + /** Get ID of expandable {@code subscription} object. */ + public String getSubscription() { + return (this.subscription != null) ? this.subscription.getId() : null; + } + + public void setSubscription(String id) { + this.subscription = ApiResource.setExpandableFieldId(id, this.subscription); + } + + /** Get expanded {@code subscription}. */ + public Subscription getSubscriptionObject() { + return (this.subscription != null) ? this.subscription.getExpanded() : null; + } + + public void setSubscriptionObject(Subscription expandableObject) { + this.subscription = + new ExpandableField(expandableObject.getId(), expandableObject); + } } /** From 099ffc35267c804f6cbaaf5c2f603d58d9bd0057 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 12:51:26 -0800 Subject: [PATCH 2/8] Update generated code (#2126) * Update generated code for v2134 and * Update generated code for v2137 and * Update generated code for v2140 and --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/ApiVersion.java | 2 +- src/main/java/com/stripe/model/Account.java | 108 +- .../java/com/stripe/model/AccountLink.java | 2 +- .../java/com/stripe/model/AccountSession.java | 4 +- src/main/java/com/stripe/model/Address.java | 5 +- src/main/java/com/stripe/model/Balance.java | 10 +- .../com/stripe/model/BalanceSettings.java | 2 +- .../com/stripe/model/BalanceTransaction.java | 2 +- .../java/com/stripe/model/BankAccount.java | 52 +- .../java/com/stripe/model/Capability.java | 73 +- src/main/java/com/stripe/model/Card.java | 4 +- .../java/com/stripe/model/CashBalance.java | 6 +- src/main/java/com/stripe/model/Charge.java | 138 +- .../com/stripe/model/ConfirmationToken.java | 54 +- src/main/java/com/stripe/model/Coupon.java | 14 +- .../java/com/stripe/model/CreditNote.java | 11 +- .../com/stripe/model/CreditNoteLineItem.java | 1 + src/main/java/com/stripe/model/Customer.java | 19 +- .../model/CustomerBalanceTransaction.java | 14 +- .../model/CustomerCashBalanceTransaction.java | 25 +- .../com/stripe/model/CustomerSession.java | 4 + src/main/java/com/stripe/model/Discount.java | 12 +- src/main/java/com/stripe/model/Dispute.java | 16 +- .../java/com/stripe/model/ExchangeRate.java | 4 +- src/main/java/com/stripe/model/FeeRefund.java | 4 +- src/main/java/com/stripe/model/File.java | 13 +- src/main/java/com/stripe/model/FileLink.java | 2 +- .../com/stripe/model/FundingInstructions.java | 4 +- src/main/java/com/stripe/model/Invoice.java | 91 +- .../java/com/stripe/model/InvoiceItem.java | 42 +- .../com/stripe/model/InvoiceLineItem.java | 37 +- .../java/com/stripe/model/InvoicePayment.java | 2 +- .../model/InvoiceRenderingTemplate.java | 2 +- src/main/java/com/stripe/model/LineItem.java | 17 +- src/main/java/com/stripe/model/LoginLink.java | 4 +- src/main/java/com/stripe/model/Mandate.java | 69 + .../stripe/model/PaymentAttemptRecord.java | 201 +- .../java/com/stripe/model/PaymentIntent.java | 191 +- .../PaymentIntentAmountDetailsLineItem.java | 6 +- .../java/com/stripe/model/PaymentLink.java | 20 +- .../java/com/stripe/model/PaymentMethod.java | 134 +- .../model/PaymentMethodConfiguration.java | 63 +- .../com/stripe/model/PaymentMethodDomain.java | 2 +- .../java/com/stripe/model/PaymentRecord.java | 209 +- src/main/java/com/stripe/model/Payout.java | 14 +- src/main/java/com/stripe/model/Person.java | 87 +- src/main/java/com/stripe/model/Plan.java | 20 +- src/main/java/com/stripe/model/Price.java | 18 +- src/main/java/com/stripe/model/Product.java | 20 +- .../java/com/stripe/model/PromotionCode.java | 10 +- src/main/java/com/stripe/model/Quote.java | 39 +- src/main/java/com/stripe/model/Refund.java | 6 +- src/main/java/com/stripe/model/Review.java | 2 +- .../java/com/stripe/model/SetupAttempt.java | 40 +- .../java/com/stripe/model/SetupIntent.java | 117 +- .../java/com/stripe/model/ShippingRate.java | 6 +- src/main/java/com/stripe/model/Source.java | 12 +- .../model/SourceMandateNotification.java | 8 +- .../java/com/stripe/model/StripeError.java | 39 +- .../java/com/stripe/model/Subscription.java | 94 +- .../com/stripe/model/SubscriptionItem.java | 36 +- .../stripe/model/SubscriptionSchedule.java | 20 +- src/main/java/com/stripe/model/TaxId.java | 16 +- src/main/java/com/stripe/model/TaxRate.java | 2 +- src/main/java/com/stripe/model/Token.java | 8 +- src/main/java/com/stripe/model/Topup.java | 6 +- src/main/java/com/stripe/model/Transfer.java | 10 +- .../com/stripe/model/TransferReversal.java | 8 +- .../com/stripe/model/WebhookEndpoint.java | 2 +- .../java/com/stripe/model/apps/Secret.java | 2 +- .../java/com/stripe/model/billing/Alert.java | 2 +- .../model/billing/CreditBalanceSummary.java | 4 + .../com/stripe/model/billing/CreditGrant.java | 6 +- .../com/stripe/model/billing/MeterEvent.java | 2 +- .../model/billingportal/Configuration.java | 18 +- .../stripe/model/billingportal/Session.java | 18 +- .../com/stripe/model/checkout/Session.java | 150 +- .../java/com/stripe/model/climate/Order.java | 2 +- .../model/entitlements/ActiveEntitlement.java | 2 +- .../model/financialconnections/Account.java | 11 +- .../model/financialconnections/Session.java | 9 +- .../com/stripe/model/forwarding/Request.java | 2 +- .../model/identity/VerificationReport.java | 18 +- .../model/identity/VerificationSession.java | 26 +- .../stripe/model/issuing/Authorization.java | 44 +- .../java/com/stripe/model/issuing/Card.java | 24 +- .../com/stripe/model/issuing/Cardholder.java | 32 +- .../com/stripe/model/issuing/Dispute.java | 14 +- .../model/issuing/PersonalizationDesign.java | 2 +- .../java/com/stripe/model/issuing/Token.java | 4 +- .../com/stripe/model/issuing/Transaction.java | 24 +- .../stripe/model/radar/EarlyFraudWarning.java | 2 +- .../com/stripe/model/radar/ValueList.java | 4 +- .../com/stripe/model/radar/ValueListItem.java | 2 +- .../com/stripe/model/reporting/ReportRun.java | 6 +- .../stripe/model/reporting/ReportType.java | 6 +- .../stripe/model/sigma/ScheduledQueryRun.java | 2 +- .../com/stripe/model/tax/Association.java | 6 +- .../com/stripe/model/tax/Calculation.java | 27 +- .../stripe/model/tax/CalculationLineItem.java | 14 +- .../com/stripe/model/tax/Registration.java | 6 +- .../java/com/stripe/model/tax/Settings.java | 2 +- .../com/stripe/model/tax/Transaction.java | 18 +- .../stripe/model/tax/TransactionLineItem.java | 10 +- .../model/terminal/ConnectionToken.java | 2 +- .../com/stripe/model/terminal/Location.java | 4 +- .../com/stripe/model/terminal/Reader.java | 26 +- .../stripe/model/treasury/CreditReversal.java | 6 +- .../stripe/model/treasury/DebitReversal.java | 6 +- .../model/treasury/FinancialAccount.java | 2 +- .../model/treasury/InboundTransfer.java | 11 +- .../model/treasury/OutboundPayment.java | 12 +- .../model/treasury/OutboundTransfer.java | 15 +- .../stripe/model/treasury/ReceivedCredit.java | 35 +- .../stripe/model/treasury/ReceivedDebit.java | 14 +- .../stripe/model/treasury/Transaction.java | 40 +- .../model/treasury/TransactionEntry.java | 40 +- .../stripe/model/v2/EventDataClassLookup.java | 6 + .../com/stripe/model/v2/core/Account.java | 5826 +++++ .../com/stripe/model/v2/core/AccountLink.java | 216 + .../stripe/model/v2/core/AccountPerson.java | 733 + .../model/v2/core/AccountPersonToken.java | 55 + .../stripe/model/v2/core/AccountToken.java | 55 + .../java/com/stripe/model/v2/core/Event.java | 5 + .../com/stripe/param/AccountCreateParams.java | 443 +- .../AccountExternalAccountCreateParams.java | 12 +- .../AccountExternalAccountUpdateParams.java | 11 +- .../param/AccountPersonCreateParams.java | 57 +- .../param/AccountPersonUpdateParams.java | 75 +- .../com/stripe/param/AccountUpdateParams.java | 505 +- .../ApplicationFeeRefundCreateParams.java | 2 +- .../ApplicationFeeRefundUpdateParams.java | 6 +- .../stripe/param/CashBalanceUpdateParams.java | 4 +- .../com/stripe/param/ChargeCaptureParams.java | 8 +- .../com/stripe/param/ChargeCreateParams.java | 108 +- .../com/stripe/param/ChargeSearchParams.java | 8 +- .../com/stripe/param/ChargeUpdateParams.java | 27 +- .../param/ConfirmationTokenCreateParams.java | 160 +- .../com/stripe/param/CouponCreateParams.java | 6 +- .../com/stripe/param/CouponUpdateParams.java | 6 +- .../stripe/param/CreditNoteCreateParams.java | 2 +- .../stripe/param/CreditNoteListParams.java | 21 + .../CreditNotePreviewLinesListParams.java | 2 +- .../stripe/param/CreditNotePreviewParams.java | 2 +- .../stripe/param/CreditNoteUpdateParams.java | 2 +- ...anceTransactionCollectionCreateParams.java | 10 +- ...alanceTransactionCollectionListParams.java | 15 + ...ustomerBalanceTransactionCreateParams.java | 10 +- .../CustomerBalanceTransactionListParams.java | 15 + ...ustomerBalanceTransactionUpdateParams.java | 6 +- .../CustomerBalanceTransactionsParams.java | 15 + .../CustomerCashBalanceUpdateParams.java | 4 +- .../stripe/param/CustomerCreateParams.java | 48 +- .../param/CustomerFundCashBalanceParams.java | 8 +- .../CustomerListPaymentMethodsParams.java | 3 + .../CustomerPaymentMethodListParams.java | 3 + .../CustomerPaymentSourceCreateParams.java | 6 +- .../CustomerPaymentSourceUpdateParams.java | 21 +- .../stripe/param/CustomerSearchParams.java | 8 +- .../param/CustomerSessionCreateParams.java | 26 +- .../stripe/param/CustomerUpdateParams.java | 70 +- .../com/stripe/param/DisputeUpdateParams.java | 36 +- ...ExternalAccountCollectionCreateParams.java | 6 +- .../FeeRefundCollectionCreateParams.java | 2 +- .../stripe/param/FeeRefundUpdateParams.java | 6 +- .../com/stripe/param/FileCreateParams.java | 14 +- .../stripe/param/FileLinkCreateParams.java | 6 +- .../stripe/param/FileLinkUpdateParams.java | 6 +- .../stripe/param/InvoiceAddLinesParams.java | 52 +- .../com/stripe/param/InvoiceCreateParams.java | 330 +- .../param/InvoiceCreatePreviewParams.java | 227 +- .../param/InvoiceFinalizeInvoiceParams.java | 4 +- .../stripe/param/InvoiceItemCreateParams.java | 57 +- .../stripe/param/InvoiceItemListParams.java | 29 +- .../stripe/param/InvoiceItemUpdateParams.java | 32 +- .../param/InvoiceLineItemUpdateParams.java | 54 +- .../com/stripe/param/InvoiceListParams.java | 23 +- .../param/InvoiceRemoveLinesParams.java | 6 +- .../com/stripe/param/InvoiceSearchParams.java | 8 +- .../param/InvoiceUpdateLinesParams.java | 64 +- .../com/stripe/param/InvoiceUpdateParams.java | 316 +- ...ymentIntentApplyCustomerBalanceParams.java | 4 +- .../param/PaymentIntentCaptureParams.java | 58 +- .../param/PaymentIntentConfirmParams.java | 834 +- .../param/PaymentIntentCreateParams.java | 1091 +- ...entIntentIncrementAuthorizationParams.java | 50 +- .../stripe/param/PaymentIntentListParams.java | 19 + .../param/PaymentIntentSearchParams.java | 8 +- .../param/PaymentIntentUpdateParams.java | 1089 +- .../stripe/param/PaymentLinkCreateParams.java | 85 +- .../stripe/param/PaymentLinkUpdateParams.java | 65 +- .../param/PaymentMethodAttachParams.java | 25 +- ...aymentMethodConfigurationCreateParams.java | 374 +- ...aymentMethodConfigurationUpdateParams.java | 374 +- .../param/PaymentMethodCreateParams.java | 144 +- .../stripe/param/PaymentMethodListParams.java | 59 + .../param/PaymentMethodUpdateParams.java | 157 +- ...portPaymentAttemptInformationalParams.java | 16 +- ...ymentRecordReportPaymentAttemptParams.java | 26 +- .../PaymentRecordReportPaymentParams.java | 30 +- .../PaymentRecordReportRefundParams.java | 14 +- .../PaymentSourceCollectionCreateParams.java | 6 +- .../com/stripe/param/PayoutCreateParams.java | 2 +- .../com/stripe/param/PayoutReverseParams.java | 2 +- .../com/stripe/param/PayoutUpdateParams.java | 6 +- .../param/PersonCollectionCreateParams.java | 57 +- .../com/stripe/param/PersonUpdateParams.java | 75 +- .../com/stripe/param/PlanCreateParams.java | 16 +- .../com/stripe/param/PlanUpdateParams.java | 10 +- .../com/stripe/param/PriceCreateParams.java | 20 +- .../com/stripe/param/PriceSearchParams.java | 8 +- .../com/stripe/param/PriceUpdateParams.java | 14 +- .../com/stripe/param/ProductCreateParams.java | 22 +- .../param/ProductFeatureCreateParams.java | 4 +- .../com/stripe/param/ProductListParams.java | 4 +- .../com/stripe/param/ProductSearchParams.java | 8 +- .../com/stripe/param/ProductUpdateParams.java | 24 +- .../param/PromotionCodeCreateParams.java | 31 +- .../stripe/param/PromotionCodeListParams.java | 17 + .../param/PromotionCodeUpdateParams.java | 6 +- .../com/stripe/param/QuoteCreateParams.java | 33 +- .../com/stripe/param/QuoteListParams.java | 19 +- .../com/stripe/param/QuoteUpdateParams.java | 42 +- .../com/stripe/param/RefundCreateParams.java | 10 +- .../com/stripe/param/RefundUpdateParams.java | 6 +- .../param/SetupIntentConfirmParams.java | 616 +- .../stripe/param/SetupIntentCreateParams.java | 672 +- .../stripe/param/SetupIntentListParams.java | 15 + .../stripe/param/SetupIntentUpdateParams.java | 692 +- .../param/ShippingRateCreateParams.java | 6 +- .../param/ShippingRateUpdateParams.java | 6 +- .../com/stripe/param/SourceCreateParams.java | 24 +- .../com/stripe/param/SourceUpdateParams.java | 36 +- .../param/SubscriptionCreateParams.java | 383 +- .../param/SubscriptionItemCreateParams.java | 50 +- .../param/SubscriptionItemDeleteParams.java | 8 +- .../param/SubscriptionItemUpdateParams.java | 54 +- .../stripe/param/SubscriptionListParams.java | 23 +- .../param/SubscriptionResumeParams.java | 8 +- .../SubscriptionScheduleCreateParams.java | 99 +- .../param/SubscriptionScheduleListParams.java | 15 + .../SubscriptionScheduleUpdateParams.java | 86 +- .../param/SubscriptionSearchParams.java | 8 +- .../param/SubscriptionUpdateParams.java | 376 +- .../com/stripe/param/TaxIdCreateParams.java | 32 +- .../com/stripe/param/TaxIdListParams.java | 33 +- .../com/stripe/param/TaxRateCreateParams.java | 2 +- .../com/stripe/param/TaxRateUpdateParams.java | 6 +- .../com/stripe/param/TokenCreateParams.java | 175 +- .../com/stripe/param/TopupCreateParams.java | 10 +- .../com/stripe/param/TopupUpdateParams.java | 6 +- .../stripe/param/TransferCreateParams.java | 10 +- ...ransferReversalCollectionCreateParams.java | 6 +- .../param/TransferReversalCreateParams.java | 6 +- .../param/TransferReversalUpdateParams.java | 6 +- .../stripe/param/TransferUpdateParams.java | 6 +- .../param/WebhookEndpointCreateParams.java | 14 +- .../param/WebhookEndpointUpdateParams.java | 6 +- .../CreditBalanceSummaryRetrieveParams.java | 25 +- .../CreditBalanceTransactionListParams.java | 21 +- .../billing/CreditGrantCreateParams.java | 19 +- .../param/billing/CreditGrantListParams.java | 15 + .../param/billing/MeterEventCreateParams.java | 2 +- .../ConfigurationCreateParams.java | 56 +- .../ConfigurationUpdateParams.java | 60 +- .../billingportal/SessionCreateParams.java | 49 +- .../param/checkout/SessionCreateParams.java | 723 +- .../param/checkout/SessionListParams.java | 15 + .../param/checkout/SessionUpdateParams.java | 1137 +- .../param/climate/OrderCreateParams.java | 2 +- .../param/climate/OrderUpdateParams.java | 2 +- .../AccountListParams.java | 27 +- .../SessionCreateParams.java | 43 +- .../param/forwarding/RequestCreateParams.java | 2 +- .../VerificationSessionCreateParams.java | 39 +- .../VerificationSessionListParams.java | 21 +- .../VerificationSessionUpdateParams.java | 24 +- .../issuing/AuthorizationApproveParams.java | 10 +- .../issuing/AuthorizationCaptureParams.java | 4 +- .../issuing/AuthorizationCreateParams.java | 20 +- .../issuing/AuthorizationDeclineParams.java | 6 +- .../AuthorizationFinalizeAmountParams.java | 4 +- .../issuing/AuthorizationIncrementParams.java | 8 +- .../issuing/AuthorizationReverseParams.java | 4 +- .../issuing/AuthorizationUpdateParams.java | 6 +- .../param/issuing/CardCreateParams.java | 26 +- .../param/issuing/CardUpdateParams.java | 31 +- .../param/issuing/CardholderCreateParams.java | 40 +- .../param/issuing/CardholderUpdateParams.java | 47 +- .../param/issuing/DisputeCreateParams.java | 6 +- .../param/issuing/DisputeSubmitParams.java | 6 +- .../param/issuing/DisputeUpdateParams.java | 10 +- .../PersonalizationDesignCreateParams.java | 2 +- .../PersonalizationDesignUpdateParams.java | 2 +- .../TransactionCreateForceCaptureParams.java | 8 +- ...TransactionCreateUnlinkedRefundParams.java | 8 +- .../issuing/TransactionRefundParams.java | 4 +- .../issuing/TransactionUpdateParams.java | 6 +- .../param/radar/ValueListCreateParams.java | 2 +- .../param/radar/ValueListUpdateParams.java | 2 +- .../reporting/ReportRunCreateParams.java | 8 +- .../param/tax/AssociationFindParams.java | 4 +- .../param/tax/CalculationCreateParams.java | 26 +- .../param/tax/SettingsUpdateParams.java | 6 +- ...ransactionCreateFromCalculationParams.java | 2 +- .../tax/TransactionCreateReversalParams.java | 32 +- .../param/terminal/LocationCreateParams.java | 16 +- .../param/terminal/LocationUpdateParams.java | 21 +- .../terminal/ReaderCollectInputsParams.java | 2 +- .../param/terminal/ReaderCreateParams.java | 6 +- .../terminal/ReaderRefundPaymentParams.java | 2 +- .../ReaderSetReaderDisplayParams.java | 12 +- .../param/terminal/ReaderUpdateParams.java | 6 +- .../treasury/CreditReversalCreateParams.java | 2 +- .../treasury/DebitReversalCreateParams.java | 2 +- .../FinancialAccountCreateParams.java | 2 +- .../FinancialAccountUpdateParams.java | 2 +- .../treasury/InboundTransferCreateParams.java | 8 +- .../treasury/OutboundPaymentCreateParams.java | 24 +- .../OutboundTransferCreateParams.java | 12 +- .../treasury/ReceivedCreditCreateParams.java | 4 +- .../treasury/ReceivedDebitCreateParams.java | 4 +- .../param/v2/core/AccountCloseParams.java | 124 + .../param/v2/core/AccountCreateParams.java | 16643 ++++++++++++++ .../v2/core/AccountLinkCreateParams.java | 872 + .../param/v2/core/AccountListParams.java | 158 + .../param/v2/core/AccountRetrieveParams.java | 131 + .../v2/core/AccountTokenCreateParams.java | 8066 +++++++ .../param/v2/core/AccountUpdateParams.java | 18103 ++++++++++++++++ .../v2/core/accounts/PersonCreateParams.java | 3427 +++ .../v2/core/accounts/PersonListParams.java | 78 + .../accounts/PersonTokenCreateParams.java | 3398 +++ .../v2/core/accounts/PersonUpdateParams.java | 3771 ++++ .../stripe/service/InvoiceItemService.java | 14 + .../stripe/service/PaymentMethodService.java | 68 +- .../stripe/service/SubscriptionService.java | 34 + .../CreditBalanceTransactionService.java | 9 + .../service/billingportal/SessionService.java | 8 + .../com/stripe/service/v2/CoreService.java | 12 + .../service/v2/core/AccountLinkService.java | 43 + .../service/v2/core/AccountService.java | 194 + .../service/v2/core/AccountTokenService.java | 56 + .../v2/core/accounts/PersonService.java | 150 + .../v2/core/accounts/PersonTokenService.java | 64 + .../stripe/functional/GeneratedExamples.java | 423 +- 347 files changed, 76601 insertions(+), 3433 deletions(-) create mode 100644 src/main/java/com/stripe/model/v2/core/Account.java create mode 100644 src/main/java/com/stripe/model/v2/core/AccountLink.java create mode 100644 src/main/java/com/stripe/model/v2/core/AccountPerson.java create mode 100644 src/main/java/com/stripe/model/v2/core/AccountPersonToken.java create mode 100644 src/main/java/com/stripe/model/v2/core/AccountToken.java create mode 100644 src/main/java/com/stripe/param/v2/core/AccountCloseParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/AccountCreateParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/AccountLinkCreateParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/AccountListParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/AccountRetrieveParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/accounts/PersonListParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java create mode 100644 src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java create mode 100644 src/main/java/com/stripe/service/v2/core/AccountLinkService.java create mode 100644 src/main/java/com/stripe/service/v2/core/AccountService.java create mode 100644 src/main/java/com/stripe/service/v2/core/AccountTokenService.java create mode 100644 src/main/java/com/stripe/service/v2/core/accounts/PersonService.java create mode 100644 src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java diff --git a/API_VERSION b/API_VERSION index 3304332752d..93be1cef53b 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -e62524b587909bee231a15ce0dc618f1d04f69a4 \ No newline at end of file +88aa59022b32620f4d66d6196e3b42d5a0f86bbb \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ea1ecdee172..16739433ec7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2124 \ No newline at end of file +v2140 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index ce6a6ab331b..73206cf5c9e 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,6 +2,6 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2025-11-17.clover"; + public static final String CURRENT = "2025-12-15.clover"; public static final String CURRENT_MAJOR = "clover"; } diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index af2d74311c5..de1986186f9 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -143,7 +143,7 @@ public class Account extends ApiResource implements MetadataStore, Paym Person individual; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -1243,6 +1243,15 @@ public static class Capabilities extends StripeObject { @SerializedName("paynow_payments") String paynowPayments; + /** + * The status of the PayTo capability of the account, or whether the account can directly + * process PayTo charges. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("payto_payments") + String paytoPayments; + /** * The status of the pix payments capability of the account, or whether the account can directly * process pix charges. @@ -1416,7 +1425,7 @@ public static class Company extends StripeObject { /** * Whether the company's directors have been provided. This Boolean will be {@code true} if * you've manually indicated that all directors are provided via the + * href="https://docs.stripe.com/api/accounts/update#update_account-company-directors_provided">the * {@code directors_provided} parameter. */ @SerializedName("directors_provided") @@ -1432,7 +1441,7 @@ public static class Company extends StripeObject { /** * Whether the company's executives have been provided. This Boolean will be {@code true} if * you've manually indicated that all executives are provided via the + * href="https://docs.stripe.com/api/accounts/update#update_account-company-executives_provided">the * {@code executives_provided} parameter, or if Stripe determined that sufficient executives * were provided. */ @@ -1479,7 +1488,7 @@ public static class Company extends StripeObject { /** * Whether the company's owners have been provided. This Boolean will be {@code true} if you've * manually indicated that all owners are provided via the + * href="https://docs.stripe.com/api/accounts/update#update_account-company-owners_provided">the * {@code owners_provided} parameter, or if Stripe determined that sufficient owners were * provided. Stripe determines ownership requirements using both the number of owners provided * and their total percent ownership (calculated by adding the {@code percent_ownership} of each @@ -1528,7 +1537,7 @@ public static class Company extends StripeObject { * for accounts where controller.requirement_collection * is {@code stripe}. See Business + * href="https://docs.stripe.com/connect/identity-verification#business-structure">Business * structure for more details. * *

One of {@code free_zone_establishment}, {@code free_zone_llc}, {@code @@ -1752,10 +1761,10 @@ public static class Verification extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Document extends StripeObject { /** - * The back of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. Note that {@code additional_verification} files - * are not downloadable. + * The back of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. Note that + * {@code additional_verification} files are not downloadable. */ @SerializedName("back") @Getter(lombok.AccessLevel.NONE) @@ -1779,10 +1788,10 @@ public static class Document extends StripeObject { String detailsCode; /** - * The front of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. Note that {@code additional_verification} files - * are not downloadable. + * The front of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. Note that + * {@code additional_verification} files are not downloadable. */ @SerializedName("front") @Getter(lombok.AccessLevel.NONE) @@ -1842,7 +1851,7 @@ public static class Controller extends StripeObject { /** * {@code true} if the Connect application retrieving the resource controls the account and can * therefore exercise platform + * href="https://docs.stripe.com/connect/platform-controls-for-standard-accounts">platform * controls. Otherwise, this field is null. */ @SerializedName("is_controller") @@ -1937,8 +1946,11 @@ public static class StripeDashboard extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class FutureRequirements extends StripeObject { /** - * Fields that are due and can be satisfied by providing the corresponding alternative fields - * instead. + * Fields that are due and can be resolved by providing the corresponding alternative fields + * instead. Many alternatives can list the same {@code original_fields_due}, and any of these + * alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing + * {@code original_fields_due} also serves as a pathway for attempting to resolve the fields + * again. */ @SerializedName("alternatives") List alternatives; @@ -1953,7 +1965,7 @@ public static class FutureRequirements extends StripeObject { Long currentDeadline; /** - * Fields that need to be collected to keep the account enabled. If not collected by {@code + * Fields that need to be resolved to keep the account enabled. If not resolved by {@code * future_requirements[current_deadline]}, these fields will transition to the main {@code * requirements} hash. */ @@ -1974,8 +1986,8 @@ public static class FutureRequirements extends StripeObject { String disabledReason; /** - * Fields that are {@code currently_due} and need to be collected again because validation or - * verification failed. + * Details about validation and verification failures for {@code due} requirements that must be + * resolved. */ @SerializedName("errors") List errors; @@ -1988,20 +2000,19 @@ public static class FutureRequirements extends StripeObject { List eventuallyDue; /** - * Fields that weren't collected by {@code requirements.current_deadline}. These fields need to - * be collected to enable the capability on the account. New fields will never appear here; - * {@code future_requirements.past_due} will always be a subset of {@code - * requirements.past_due}. + * Fields that haven't been resolved by {@code requirements.current_deadline}. These fields need + * to be resolved to enable the capability on the account. {@code future_requirements.past_due} + * is a subset of {@code requirements.past_due}. */ @SerializedName("past_due") List pastDue; /** - * Fields that might become required depending on the results of verification or review. It's an - * empty array unless an asynchronous verification is pending. If verification fails, these - * fields move to {@code eventually_due} or {@code currently_due}. Fields might appear in {@code - * eventually_due} or {@code currently_due} and in {@code pending_verification} if verification - * fails but another verification is still pending. + * Fields that are being reviewed, or might become required depending on the results of a + * review. If the review fails, these fields can move to {@code eventually_due}, {@code + * currently_due}, {@code past_due} or {@code alternatives}. Fields might appear in {@code + * eventually_due}, {@code currently_due}, {@code past_due} or {@code alternatives} and in + * {@code pending_verification} if one verification fails but another is still pending. */ @SerializedName("pending_verification") List pendingVerification; @@ -2014,12 +2025,12 @@ public static class FutureRequirements extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Alternative extends StripeObject { - /** Fields that can be provided to satisfy all fields in {@code original_fields_due}. */ + /** Fields that can be provided to resolve all fields in {@code original_fields_due}. */ @SerializedName("alternative_fields_due") List alternativeFieldsDue; /** - * Fields that are due and can be satisfied by providing all fields in {@code + * Fields that are due and can be resolved by providing all fields in {@code * alternative_fields_due}. */ @SerializedName("original_fields_due") @@ -2125,7 +2136,7 @@ public static class Errors extends StripeObject { public static class Groups extends StripeObject { /** * The group the account is in to determine their payments pricing, and null if the account is - * on customized pricing. See + * on customized pricing. See * the Platform pricing tool documentation for details. */ @SerializedName("payments_pricing") @@ -2141,8 +2152,11 @@ public static class Groups extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Requirements extends StripeObject { /** - * Fields that are due and can be satisfied by providing the corresponding alternative fields - * instead. + * Fields that are due and can be resolved by providing the corresponding alternative fields + * instead. Many alternatives can list the same {@code original_fields_due}, and any of these + * alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing + * {@code original_fields_due} also serves as a pathway for attempting to resolve the fields + * again. */ @SerializedName("alternatives") List alternatives; @@ -2156,8 +2170,8 @@ public static class Requirements extends StripeObject { Long currentDeadline; /** - * Fields that need to be collected to keep the account enabled. If not collected by {@code - * current_deadline}, these fields appear in {@code past_due} as well, and the account is + * Fields that need to be resolved to keep the account enabled. If not resolved by {@code + * current_deadline}, these fields will appear in {@code past_due} as well, and the account is * disabled. */ @SerializedName("currently_due") @@ -2165,7 +2179,7 @@ public static class Requirements extends StripeObject { /** * If the account is disabled, this enum describes why. Learn more about handling + * href="https://docs.stripe.com/connect/handling-api-verification">Learn more about handling * verification issues. * *

One of {@code action_required.requested_capabilities}, {@code listed}, {@code other}, @@ -2179,8 +2193,8 @@ public static class Requirements extends StripeObject { String disabledReason; /** - * Fields that are {@code currently_due} and need to be collected again because validation or - * verification failed. + * Details about validation and verification failures for {@code due} requirements that must be + * resolved. */ @SerializedName("errors") List errors; @@ -2193,18 +2207,18 @@ public static class Requirements extends StripeObject { List eventuallyDue; /** - * Fields that weren't collected by {@code current_deadline}. These fields need to be collected - * to enable the account. + * Fields that haven't been resolved by {@code current_deadline}. These fields need to be + * resolved to enable the account. */ @SerializedName("past_due") List pastDue; /** - * Fields that might become required depending on the results of verification or review. It's an - * empty array unless an asynchronous verification is pending. If verification fails, these - * fields move to {@code eventually_due}, {@code currently_due}, or {@code past_due}. Fields - * might appear in {@code eventually_due}, {@code currently_due}, or {@code past_due} and in - * {@code pending_verification} if verification fails but another verification is still pending. + * Fields that are being reviewed, or might become required depending on the results of a + * review. If the review fails, these fields can move to {@code eventually_due}, {@code + * currently_due}, {@code past_due} or {@code alternatives}. Fields might appear in {@code + * eventually_due}, {@code currently_due}, {@code past_due} or {@code alternatives} and in + * {@code pending_verification} if one verification fails but another is still pending. */ @SerializedName("pending_verification") List pendingVerification; @@ -2217,12 +2231,12 @@ public static class Requirements extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Alternative extends StripeObject { - /** Fields that can be provided to satisfy all fields in {@code original_fields_due}. */ + /** Fields that can be provided to resolve all fields in {@code original_fields_due}. */ @SerializedName("alternative_fields_due") List alternativeFieldsDue; /** - * Fields that are due and can be satisfied by providing all fields in {@code + * Fields that are due and can be resolved by providing all fields in {@code * alternative_fields_due}. */ @SerializedName("original_fields_due") diff --git a/src/main/java/com/stripe/model/AccountLink.java b/src/main/java/com/stripe/model/AccountLink.java index 086c507a67c..db03062d937 100644 --- a/src/main/java/com/stripe/model/AccountLink.java +++ b/src/main/java/com/stripe/model/AccountLink.java @@ -18,7 +18,7 @@ * Account Links are the means by which a Connect platform grants a connected account permission to * access Stripe-hosted applications, such as Connect Onboarding. * - *

Related guide: Connect + *

Related guide: Connect * Onboarding */ @Getter diff --git a/src/main/java/com/stripe/model/AccountSession.java b/src/main/java/com/stripe/model/AccountSession.java index 51bc8062c4e..dee89664593 100644 --- a/src/main/java/com/stripe/model/AccountSession.java +++ b/src/main/java/com/stripe/model/AccountSession.java @@ -24,7 +24,7 @@ * quickly, and cannot be used more than once. * *

Related guide: Connect embedded + * href="https://docs.stripe.com/connect/get-started-connect-embedded-components">Connect embedded * components */ @Getter @@ -44,7 +44,7 @@ public class AccountSession extends ApiResource { * that you have TLS enabled on any page that includes the client secret. * *

Refer to our docs to setup Connect + * href="https://docs.stripe.com/connect/get-started-connect-embedded-components">setup Connect * embedded components and learn about how {@code client_secret} should be handled. */ @SerializedName("client_secret") diff --git a/src/main/java/com/stripe/model/Address.java b/src/main/java/com/stripe/model/Address.java index f65f0d5f101..fb4a3980f9f 100644 --- a/src/main/java/com/stripe/model/Address.java +++ b/src/main/java/com/stripe/model/Address.java @@ -33,7 +33,10 @@ public class Address extends StripeObject { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; } diff --git a/src/main/java/com/stripe/model/Balance.java b/src/main/java/com/stripe/model/Balance.java index 97b50660c93..0f4a9b3e8b3 100644 --- a/src/main/java/com/stripe/model/Balance.java +++ b/src/main/java/com/stripe/model/Balance.java @@ -23,8 +23,8 @@ *

The top-level {@code available} and {@code pending} comprise your "payments * balance." * - *

Related guide: Balances and settlement - * time, Understanding Connect + *

Related guide: Balances and settlement + * time, Understanding Connect * account balances */ @Getter @@ -33,9 +33,9 @@ public class Balance extends ApiResource { /** * Available funds that you can transfer or pay out automatically by Stripe or explicitly through - * the Transfers API or Payouts API. You can find the available balance - * for each currency and payment type in the {@code source_types} property. + * the Transfers API or Payouts API. You can find the available balance for + * each currency and payment type in the {@code source_types} property. */ @SerializedName("available") List available; diff --git a/src/main/java/com/stripe/model/BalanceSettings.java b/src/main/java/com/stripe/model/BalanceSettings.java index 70c1f411113..2856810b8de 100644 --- a/src/main/java/com/stripe/model/BalanceSettings.java +++ b/src/main/java/com/stripe/model/BalanceSettings.java @@ -173,7 +173,7 @@ public static class Payouts extends StripeObject { /** * Details on when funds from charges are available, and when they are paid out to an external * account. See our Setting Bank and + * href="https://docs.stripe.com/connect/bank-transfers#payout-information">Setting Bank and * Debit Card Payouts documentation for details. */ @SerializedName("schedule") diff --git a/src/main/java/com/stripe/model/BalanceTransaction.java b/src/main/java/com/stripe/model/BalanceTransaction.java index 2c195229c91..85c7383900f 100644 --- a/src/main/java/com/stripe/model/BalanceTransaction.java +++ b/src/main/java/com/stripe/model/BalanceTransaction.java @@ -22,7 +22,7 @@ * Balance transactions represent funds moving through your Stripe account. Stripe creates them for * every type of transaction that enters or leaves your Stripe account balance. * - *

Related guide: Balance + *

Related guide: Balance * transaction types */ @Getter diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index 88c9e47a664..ba3422a4ab9 100644 --- a/src/main/java/com/stripe/model/BankAccount.java +++ b/src/main/java/com/stripe/model/BankAccount.java @@ -110,7 +110,7 @@ public class BankAccount extends ApiResource /** * Information about the upcoming new + * href="https://docs.stripe.com/connect/custom-accounts/future-requirements">upcoming new * requirements for the bank account, including what information needs to be collected, and by * when. */ @@ -127,7 +127,7 @@ public class BankAccount extends ApiResource String last4; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -514,33 +514,33 @@ public BankAccount delete(Map params, RequestOptions options) @EqualsAndHashCode(callSuper = false) public static class FutureRequirements extends StripeObject { /** - * Fields that need to be collected to keep the external account enabled. If not collected by - * {@code current_deadline}, these fields appear in {@code past_due} as well, and the account is - * disabled. + * Fields that need to be resolved to keep the external account enabled. If not resolved by + * {@code current_deadline}, these fields will appear in {@code past_due} as well, and the + * account is disabled. */ @SerializedName("currently_due") List currentlyDue; /** - * Fields that are {@code currently_due} and need to be collected again because validation or - * verification failed. + * Details about validation and verification failures for {@code due} requirements that must be + * resolved. */ @SerializedName("errors") List errors; /** - * Fields that weren't collected by {@code current_deadline}. These fields need to be collected - * to enable the external account. + * Fields that haven't been resolved by {@code current_deadline}. These fields need to be + * resolved to enable the external account. */ @SerializedName("past_due") List pastDue; /** - * Fields that might become required depending on the results of verification or review. It's an - * empty array unless an asynchronous verification is pending. If verification fails, these - * fields move to {@code eventually_due}, {@code currently_due}, or {@code past_due}. Fields - * might appear in {@code eventually_due}, {@code currently_due}, or {@code past_due} and in - * {@code pending_verification} if verification fails but another verification is still pending. + * Fields that are being reviewed, or might become required depending on the results of a + * review. If the review fails, these fields can move to {@code eventually_due}, {@code + * currently_due}, {@code past_due} or {@code alternatives}. Fields might appear in {@code + * eventually_due}, {@code currently_due}, {@code past_due} or {@code alternatives} and in + * {@code pending_verification} if one verification fails but another is still pending. */ @SerializedName("pending_verification") List pendingVerification; @@ -643,33 +643,33 @@ public static class Errors extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Requirements extends StripeObject { /** - * Fields that need to be collected to keep the external account enabled. If not collected by - * {@code current_deadline}, these fields appear in {@code past_due} as well, and the account is - * disabled. + * Fields that need to be resolved to keep the external account enabled. If not resolved by + * {@code current_deadline}, these fields will appear in {@code past_due} as well, and the + * account is disabled. */ @SerializedName("currently_due") List currentlyDue; /** - * Fields that are {@code currently_due} and need to be collected again because validation or - * verification failed. + * Details about validation and verification failures for {@code due} requirements that must be + * resolved. */ @SerializedName("errors") List errors; /** - * Fields that weren't collected by {@code current_deadline}. These fields need to be collected - * to enable the external account. + * Fields that haven't been resolved by {@code current_deadline}. These fields need to be + * resolved to enable the external account. */ @SerializedName("past_due") List pastDue; /** - * Fields that might become required depending on the results of verification or review. It's an - * empty array unless an asynchronous verification is pending. If verification fails, these - * fields move to {@code eventually_due}, {@code currently_due}, or {@code past_due}. Fields - * might appear in {@code eventually_due}, {@code currently_due}, or {@code past_due} and in - * {@code pending_verification} if verification fails but another verification is still pending. + * Fields that are being reviewed, or might become required depending on the results of a + * review. If the review fails, these fields can move to {@code eventually_due}, {@code + * currently_due}, {@code past_due} or {@code alternatives}. Fields might appear in {@code + * eventually_due}, {@code currently_due}, {@code past_due} or {@code alternatives} and in + * {@code pending_verification} if one verification fails but another is still pending. */ @SerializedName("pending_verification") List pendingVerification; diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java index 0b49c7c1f22..670b2703076 100644 --- a/src/main/java/com/stripe/model/Capability.java +++ b/src/main/java/com/stripe/model/Capability.java @@ -19,7 +19,7 @@ /** * This is an object representing a capability for a Stripe account. * - *

Related guide: Account + *

Related guide: Account * capabilities */ @Getter @@ -146,8 +146,11 @@ public Capability update(CapabilityUpdateParams params, RequestOptions options) @EqualsAndHashCode(callSuper = false) public static class FutureRequirements extends StripeObject { /** - * Fields that are due and can be satisfied by providing the corresponding alternative fields - * instead. + * Fields that are due and can be resolved by providing the corresponding alternative fields + * instead. Multiple alternatives can reference the same {@code original_fields_due}. When this + * happens, any of these alternatives can serve as a pathway for attempting to resolve the + * fields. Additionally, providing {@code original_fields_due} again also serves as a pathway + * for attempting to resolve the fields. */ @SerializedName("alternatives") List alternatives; @@ -162,7 +165,7 @@ public static class FutureRequirements extends StripeObject { Long currentDeadline; /** - * Fields that need to be collected to keep the capability enabled. If not collected by {@code + * Fields that need to be resolved to keep the capability enabled. If not resolved by {@code * future_requirements[current_deadline]}, these fields will transition to the main {@code * requirements} hash. */ @@ -183,8 +186,8 @@ public static class FutureRequirements extends StripeObject { String disabledReason; /** - * Fields that are {@code currently_due} and need to be collected again because validation or - * verification failed. + * Details about validation and verification failures for {@code due} requirements that must be + * resolved. */ @SerializedName("errors") List errors; @@ -197,20 +200,19 @@ public static class FutureRequirements extends StripeObject { List eventuallyDue; /** - * Fields that weren't collected by {@code requirements.current_deadline}. These fields need to - * be collected to enable the capability on the account. New fields will never appear here; - * {@code future_requirements.past_due} will always be a subset of {@code - * requirements.past_due}. + * Fields that haven't been resolved by {@code requirements.current_deadline}. These fields need + * to be resolved to enable the capability on the account. {@code future_requirements.past_due} + * is a subset of {@code requirements.past_due}. */ @SerializedName("past_due") List pastDue; /** - * Fields that might become required depending on the results of verification or review. It's an - * empty array unless an asynchronous verification is pending. If verification fails, these - * fields move to {@code eventually_due} or {@code currently_due}. Fields might appear in {@code - * eventually_due} or {@code currently_due} and in {@code pending_verification} if verification - * fails but another verification is still pending. + * Fields that are being reviewed, or might become required depending on the results of a + * review. If the review fails, these fields can move to {@code eventually_due}, {@code + * currently_due}, {@code past_due} or {@code alternatives}. Fields might appear in {@code + * eventually_due}, {@code currently_due}, {@code past_due} or {@code alternatives} and in + * {@code pending_verification} if one verification fails but another is still pending. */ @SerializedName("pending_verification") List pendingVerification; @@ -223,12 +225,12 @@ public static class FutureRequirements extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Alternative extends StripeObject { - /** Fields that can be provided to satisfy all fields in {@code original_fields_due}. */ + /** Fields that can be provided to resolve all fields in {@code original_fields_due}. */ @SerializedName("alternative_fields_due") List alternativeFieldsDue; /** - * Fields that are due and can be satisfied by providing all fields in {@code + * Fields that are due and can be resolved by providing all fields in {@code * alternative_fields_due}. */ @SerializedName("original_fields_due") @@ -333,8 +335,11 @@ public static class Errors extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Requirements extends StripeObject { /** - * Fields that are due and can be satisfied by providing the corresponding alternative fields - * instead. + * Fields that are due and can be resolved by providing the corresponding alternative fields + * instead. Multiple alternatives can reference the same {@code original_fields_due}. When this + * happens, any of these alternatives can serve as a pathway for attempting to resolve the + * fields. Additionally, providing {@code original_fields_due} again also serves as a pathway + * for attempting to resolve the fields. */ @SerializedName("alternatives") List alternatives; @@ -350,16 +355,16 @@ public static class Requirements extends StripeObject { Long currentDeadline; /** - * Fields that need to be collected to keep the capability enabled. If not collected by {@code - * current_deadline}, these fields appear in {@code past_due} as well, and the capability is - * disabled. + * Fields that need to be resolved to keep the capability enabled. If not resolved by {@code + * current_deadline}, these fields will appear in {@code past_due} as well, and the capability + * is disabled. */ @SerializedName("currently_due") List currentlyDue; /** * Description of why the capability is disabled. Learn more about handling + * href="https://docs.stripe.com/connect/handling-api-verification">Learn more about handling * verification issues. * *

One of {@code other}, {@code paused.inactivity}, {@code pending.onboarding}, {@code @@ -371,8 +376,8 @@ public static class Requirements extends StripeObject { String disabledReason; /** - * Fields that are {@code currently_due} and need to be collected again because validation or - * verification failed. + * Details about validation and verification failures for {@code due} requirements that must be + * resolved. */ @SerializedName("errors") List errors; @@ -385,18 +390,18 @@ public static class Requirements extends StripeObject { List eventuallyDue; /** - * Fields that weren't collected by {@code current_deadline}. These fields need to be collected - * to enable the capability on the account. + * Fields that haven't been resolved by {@code current_deadline}. These fields need to be + * resolved to enable the capability on the account. */ @SerializedName("past_due") List pastDue; /** - * Fields that might become required depending on the results of verification or review. It's an - * empty array unless an asynchronous verification is pending. If verification fails, these - * fields move to {@code eventually_due}, {@code currently_due}, or {@code past_due}. Fields - * might appear in {@code eventually_due}, {@code currently_due}, or {@code past_due} and in - * {@code pending_verification} if verification fails but another verification is still pending. + * Fields that are being reviewed, or might become required depending on the results of a + * review. If the review fails, these fields can move to {@code eventually_due}, {@code + * currently_due}, {@code past_due} or {@code alternatives}. Fields might appear in {@code + * eventually_due}, {@code currently_due}, {@code past_due} or {@code alternatives} and in + * {@code pending_verification} if one verification fails but another is still pending. */ @SerializedName("pending_verification") List pendingVerification; @@ -409,12 +414,12 @@ public static class Requirements extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Alternative extends StripeObject { - /** Fields that can be provided to satisfy all fields in {@code original_fields_due}. */ + /** Fields that can be provided to resolve all fields in {@code original_fields_due}. */ @SerializedName("alternative_fields_due") List alternativeFieldsDue; /** - * Fields that are due and can be satisfied by providing all fields in {@code + * Fields that are due and can be resolved by providing all fields in {@code * alternative_fields_due}. */ @SerializedName("original_fields_due") diff --git a/src/main/java/com/stripe/model/Card.java b/src/main/java/com/stripe/model/Card.java index bd10533c495..dbc1cec6554 100644 --- a/src/main/java/com/stripe/model/Card.java +++ b/src/main/java/com/stripe/model/Card.java @@ -21,7 +21,7 @@ * You can store multiple cards on a customer in order to charge the customer later. You can also * store multiple debit cards on a recipient in order to transfer to those cards later. * - *

Related guide: Card payments with Sources + *

Related guide: Card payments with Sources */ @Getter @Setter @@ -211,7 +211,7 @@ public class Card extends ApiResource String last4; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/CashBalance.java b/src/main/java/com/stripe/model/CashBalance.java index bffa58ecf4a..1421ac2af88 100644 --- a/src/main/java/com/stripe/model/CashBalance.java +++ b/src/main/java/com/stripe/model/CashBalance.java @@ -28,7 +28,7 @@ public class CashBalance extends ApiResource { /** * A hash of all cash balances available to this customer. You cannot delete a customer with any * cash balances, even if the balance is 0. Amounts are represented in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("available") Map available; @@ -37,6 +37,10 @@ public class CashBalance extends ApiResource { @SerializedName("customer") String customer; + /** The ID of an Account representing a customer whose cash balance this object represents. */ + @SerializedName("customer_account") + String customerAccount; + /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 61efdda9ce5..629e5bb1834 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -24,7 +24,7 @@ /** * The {@code Charge} object represents a single attempt to move money into your Stripe account. * PaymentIntent confirmation is the most common way to create Charges, but Account Debits may also create Charges. + * href="https://docs.stripe.com/connect/account-debits">Account Debits may also create Charges. * Some legacy payment flows create Charges directly, which is not recommended for new integrations. */ @Getter @@ -33,10 +33,10 @@ public class Charge extends ApiResource implements MetadataStore, BalanceTransactionSource { /** * Amount intended to be collected by this payment. A positive integer representing how much to - * charge in the smallest currency + * charge in the smallest currency * unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The * minimum amount is $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @@ -65,7 +65,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc /** * The application fee (if any) for the charge. See the Connect + * href="https://docs.stripe.com/connect/direct-charges#collect-fees">See the Connect * documentation for details. */ @SerializedName("application_fee") @@ -75,7 +75,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc /** * The amount of the application fee (if any) requested for the charge. See the Connect + * href="https://docs.stripe.com/connect/direct-charges#collect-fees">See the Connect * documentation for details. */ @SerializedName("application_fee_amount") @@ -149,7 +149,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc /** * Error code explaining reason for charge failure if available (see the errors section for a list of codes). + * href="https://docs.stripe.com/error-codes">the errors section for a list of codes). */ @SerializedName("failure_code") String failureCode; @@ -178,7 +178,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -196,7 +196,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc /** * The account (if any) the charge was made on behalf of without triggering an automatic transfer. - * See the Connect + * See the Connect * documentation for details. */ @SerializedName("on_behalf_of") @@ -206,7 +206,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc /** * Details about whether the payment was accepted, and why. See understanding declines for details. + * href="https://docs.stripe.com/declines">understanding declines for details. */ @SerializedName("outcome") Outcome outcome; @@ -233,7 +233,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc PresentmentDetails presentmentDetails; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -339,7 +339,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc /** * An optional dictionary including the account to automatically transfer to as part of a - * destination charge. See the + * destination charge. See the * Connect documentation for details. */ @SerializedName("transfer_data") @@ -347,7 +347,7 @@ public class Charge extends ApiResource implements MetadataStore, Balanc /** * A string that identifies this transaction as part of a group. See the Connect + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Connect * documentation for details. */ @SerializedName("transfer_group") @@ -1016,7 +1016,7 @@ public static class LineItem extends StripeObject { public static class Outcome extends StripeObject { /** * An enumerated value providing a more detailed explanation on how to proceed with an + * href="https://docs.stripe.com/declines#retrying-issuer-declines">how to proceed with an * error. * *

One of {@code confirm_card_data}, {@code do_not_try_again}, or {@code try_again_later}. @@ -1042,7 +1042,7 @@ public static class Outcome extends StripeObject { * Possible values are {@code approved_by_network}, {@code declined_by_network}, {@code * not_sent_to_network}, and {@code reversed_after_approval}. The value {@code * reversed_after_approval} indicates the payment was blocked by Stripe after bank + * href="https://docs.stripe.com/declines#blocked-payments">blocked by Stripe after bank * authorization, and may temporarily appear as "pending" on a cardholder's statement. */ @SerializedName("network_status") @@ -1055,7 +1055,7 @@ public static class Outcome extends StripeObject { * elevated_risk_level}. Charges blocked because the payment is unlikely to be authorized have * the value {@code low_probability_of_authorization}. Charges authorized, blocked, or placed in * review by custom rules have the value {@code rule}. See understanding declines for more details. + * href="https://docs.stripe.com/declines">understanding declines for more details. */ @SerializedName("reason") String reason; @@ -1095,8 +1095,8 @@ public static class Outcome extends StripeObject { /** * Possible values are {@code authorized}, {@code manual_review}, {@code issuer_declined}, * {@code blocked}, and {@code invalid}. See understanding declines and Radar reviews for details. + * href="https://docs.stripe.com/declines">understanding declines and Radar reviews for details. */ @SerializedName("type") String type; @@ -1273,6 +1273,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -1308,7 +1311,7 @@ public static class PaymentMethodDetails extends StripeObject { /** * The type of transaction-specific details of the payment method used in the payment. See PaymentMethod.type + * href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-type">PaymentMethod.type * for the full list of possible types. An additional hash is included on {@code * payment_method_details} with a name matching this value. It contains information specific to * the payment method. @@ -1406,6 +1409,12 @@ public static class AcssDebit extends StripeObject { @SerializedName("bank_name") String bankName; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -1439,14 +1448,14 @@ public static class AcssDebit extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Affirm extends StripeObject { /** - * ID of the location that this + * ID of the location that this * transaction's reader is assigned to. */ @SerializedName("location") String location; /** - * ID of the reader this + * ID of the reader this * transaction was made on. */ @SerializedName("reader") @@ -1621,6 +1630,12 @@ public static class AuBecsDebit extends StripeObject { @SerializedName("bsb_number") String bsbNumber; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -1645,6 +1660,12 @@ public static class AuBecsDebit extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BacsDebit extends StripeObject { + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -1894,7 +1915,7 @@ public static class Card extends StripeObject { * Installment details for this payment. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ @SerializedName("installments") Installments installments; @@ -2476,9 +2497,9 @@ public static class CardPresent extends StripeObject { String iin; /** - * Whether this PaymentIntent is + * Whether this PaymentIntent is * eligible for incremental authorizations. Request support using request_incremental_authorization_support. + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support">request_incremental_authorization_support. */ @SerializedName("incremental_authorization_supported") Boolean incrementalAuthorizationSupported; @@ -2831,9 +2852,10 @@ public static class Grabpay extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, - * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code - * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, + * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code + * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code + * yoursafe}. */ @SerializedName("bank") String bank; @@ -2843,8 +2865,9 @@ public static class Ideal extends StripeObject { * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code - * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code + * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or + * {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -3397,6 +3420,12 @@ public static class NzBankAccount extends StripeObject { @SerializedName("branch_code") String branchCode; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** Last four digits of the bank account number. */ @SerializedName("last4") String last4; @@ -3488,14 +3517,14 @@ public static class Payco extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Paynow extends StripeObject { /** - * ID of the location that this + * ID of the location that this * transaction's reader is assigned to. */ @SerializedName("location") String location; /** - * ID of the reader this + * ID of the reader this * transaction was made on. */ @SerializedName("reader") @@ -3573,6 +3602,31 @@ public static class SellerProtection extends StripeObject { } } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + } + /** * For more details about Pix, please refer to the API * Reference. @@ -3749,6 +3803,12 @@ public static class SepaDebit extends StripeObject { @SerializedName("country") String country; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -3762,9 +3822,9 @@ public static class SepaDebit extends StripeObject { /** * Find the ID of the mandate used for this payment under the payment_method_details.sepa_debit.mandate + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate">payment_method_details.sepa_debit.mandate * property on the Charge. Use this mandate ID to retrieve the Mandate. + * href="https://docs.stripe.com/api/mandates/retrieve">retrieve the Mandate. */ @SerializedName("mandate") String mandate; @@ -3939,6 +3999,12 @@ public static class UsBankAccount extends StripeObject { @SerializedName("bank_name") String bankName; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -4008,14 +4074,14 @@ public static class WechatPay extends StripeObject { String fingerprint; /** - * ID of the location that this + * ID of the location that this * transaction's reader is assigned to. */ @SerializedName("location") String location; /** - * ID of the reader this + * ID of the reader this * transaction was made on. */ @SerializedName("reader") @@ -4056,7 +4122,7 @@ public static class PresentmentDetails extends StripeObject { } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @Getter @@ -4064,7 +4130,7 @@ public static class PresentmentDetails extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class RadarOptions extends StripeObject { /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 584558a4af0..ed10fcc1f40 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -23,8 +23,8 @@ * the ConfirmationToken are written onto the Intent. * *

To learn more about how to use ConfirmationToken, visit the related guides: - Finalize payments on the - * server - Build + * href="https://docs.stripe.com/payments/finalize-payments-on-the-server">Finalize payments on the + * server - Build * two-step confirmation. */ @Getter @@ -92,7 +92,7 @@ public class ConfirmationToken extends ApiResource implements HasId { * Indicates that you intend to make future payments with this ConfirmationToken's payment method. * *

The presence of this property will attach the payment method to + * href="https://docs.stripe.com/payments/save-during-payment">attach the payment method to * the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required * actions from the user are complete. * @@ -338,6 +338,9 @@ public static class PaymentMethodPreview extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + @SerializedName("customer_account") + String customerAccount; + @SerializedName("customer_balance") CustomerBalance customerBalance; @@ -407,6 +410,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -447,9 +453,9 @@ public static class PaymentMethodPreview extends StripeObject { * interac_present}, {@code kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code * link}, {@code mb_way}, {@code mobilepay}, {@code multibanco}, {@code naver_pay}, {@code * nz_bank_account}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code payco}, {@code - * paynow}, {@code paypal}, {@code pix}, {@code promptpay}, {@code revolut_pay}, {@code - * samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code sofort}, {@code swish}, {@code - * twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}. + * paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code revolut_pay}, + * {@code samsung_pay}, {@code satispay}, {@code sepa_debit}, {@code sofort}, {@code swish}, + * {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}. */ @SerializedName("type") String type; @@ -987,9 +993,9 @@ public static class CardPresent extends StripeObject { String iin; /** - * Whether this PaymentIntent + * Whether this PaymentIntent * is eligible for incremental authorizations. Request support using request_incremental_authorization_support. + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support">request_incremental_authorization_support. */ @SerializedName("incremental_authorization_supported") Boolean incrementalAuthorizationSupported; @@ -1666,9 +1672,9 @@ public static class Ideal extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, - * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code - * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code - * yoursafe}. + * {@code mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code + * regiobank}, {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, + * or {@code yoursafe}. */ @SerializedName("bank") String bank; @@ -1678,8 +1684,9 @@ public static class Ideal extends StripeObject { * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code - * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code + * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or + * {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2077,6 +2084,27 @@ public static class Paypal extends StripeObject { String payerId; } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + } + /** * For more details about Pix, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/Coupon.java b/src/main/java/com/stripe/model/Coupon.java index 318b919327d..af4892d5f42 100644 --- a/src/main/java/com/stripe/model/Coupon.java +++ b/src/main/java/com/stripe/model/Coupon.java @@ -23,12 +23,12 @@ /** * A coupon contains information about a percent-off or amount-off discount you might want to apply * to a customer. Coupons may be applied to subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with - * conventional one-off charges or payment intents. + * href="https://api.stripe.com#subscriptions">subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with conventional + * one-off charges or payment intents. */ @Getter @Setter @@ -102,7 +102,7 @@ public class Coupon extends ApiResource implements HasId, MetadataStore Long maxRedemptions; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/CreditNote.java b/src/main/java/com/stripe/model/CreditNote.java index b64f4a8674e..a1394ad15cd 100644 --- a/src/main/java/com/stripe/model/CreditNote.java +++ b/src/main/java/com/stripe/model/CreditNote.java @@ -25,7 +25,7 @@ /** * Issue a credit note to adjust an invoice's amount after the invoice is finalized. * - *

Related guide: Credit + *

Related guide: Credit * notes */ @Getter @@ -60,6 +60,10 @@ public class CreditNote extends ApiResource implements HasId, MetadataStore customer; + /** ID of the account representing the customer. */ + @SerializedName("customer_account") + String customerAccount; + /** Customer balance transaction related to this credit note. */ @SerializedName("customer_balance_transaction") @Getter(lombok.AccessLevel.NONE) @@ -112,7 +116,7 @@ public class CreditNote extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -178,7 +182,7 @@ public class CreditNote extends ApiResource implements HasId, MetadataStorevoiding credit notes. + * href="https://docs.stripe.com/billing/invoices/credit-notes#voiding">voiding credit notes. */ @SerializedName("status") String status; @@ -943,6 +947,7 @@ public static class TotalTax extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class TaxRateDetails extends StripeObject { + /** ID of the tax rate. */ @SerializedName("tax_rate") String taxRate; } diff --git a/src/main/java/com/stripe/model/CreditNoteLineItem.java b/src/main/java/com/stripe/model/CreditNoteLineItem.java index 3ec630ac681..93de4a1f149 100644 --- a/src/main/java/com/stripe/model/CreditNoteLineItem.java +++ b/src/main/java/com/stripe/model/CreditNoteLineItem.java @@ -265,6 +265,7 @@ public static class Tax extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class TaxRateDetails extends StripeObject { + /** ID of the tax rate. */ @SerializedName("tax_rate") String taxRate; } diff --git a/src/main/java/com/stripe/model/Customer.java b/src/main/java/com/stripe/model/Customer.java index 2683a73c42b..efdf01ffd71 100644 --- a/src/main/java/com/stripe/model/Customer.java +++ b/src/main/java/com/stripe/model/Customer.java @@ -29,8 +29,8 @@ /** * This object represents a customer of your business. Use it to create recurring charges, save payment and contact + * href="https://docs.stripe.com/invoicing/customer">create recurring charges, save payment and contact * information, and track payments that belong to the same customer. */ @Getter @@ -47,7 +47,7 @@ public class Customer extends ApiResource implements HasId, MetadataStoreinvoice_credit_balance. + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance">invoice_credit_balance. */ @SerializedName("balance") Long balance; @@ -76,11 +76,18 @@ public class Customer extends ApiResource implements HasId, MetadataStoreIf you use payment methods created through the PaymentMethods API, see the invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * field instead. */ @SerializedName("default_source") @@ -98,7 +105,7 @@ public class Customer extends ApiResource implements HasId, MetadataStoreIf an invoice becomes uncollectible by dunning, {@code delinquent} + * href="https://docs.stripe.com/billing/automatic-collection">dunning, {@code delinquent} * doesn't reset to {@code false}. * *

If you care whether the customer has paid their most recent subscription invoice, use {@code @@ -157,7 +164,7 @@ public class Customer extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/CustomerBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerBalanceTransaction.java index d59c9139b78..27854402469 100644 --- a/src/main/java/com/stripe/model/CustomerBalanceTransaction.java +++ b/src/main/java/com/stripe/model/CustomerBalanceTransaction.java @@ -18,14 +18,14 @@ /** * Each customer has a Balance value, + * href="https://docs.stripe.com/api/customers/object#customer_object-balance">Balance value, * which denotes a debit or credit that's automatically applied to their next invoice upon * finalization. You may modify the value directly by using the update customer API, or by creating a + * href="https://docs.stripe.com/api/customers/update">update customer API, or by creating a * Customer Balance Transaction, which increments or decrements the customer's {@code balance} by * the specified {@code amount}. * - *

Related guide: Customer balance + *

Related guide: Customer balance */ @Getter @Setter @@ -68,6 +68,10 @@ public class CustomerBalanceTransaction extends ApiResource @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** The ID of an Account representing a customer that the transaction belongs to. */ + @SerializedName("customer_account") + String customerAccount; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ @SerializedName("description") String description; @@ -99,7 +103,7 @@ public class CustomerBalanceTransaction extends ApiResource Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -121,7 +125,7 @@ public class CustomerBalanceTransaction extends ApiResource * {@code unspent_receiver_credit}, {@code unapplied_from_invoice}, {@code * checkout_session_subscription_payment}, or {@code * checkout_session_subscription_payment_canceled}. See the Customer Balance page to + * href="https://docs.stripe.com/billing/customer/balance#types">Customer Balance page to * learn more about transaction types. * *

One of {@code adjustment}, {@code applied_to_invoice}, {@code diff --git a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java index 064e64c6577..e2f606bfa66 100644 --- a/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java +++ b/src/main/java/com/stripe/model/CustomerCashBalanceTransaction.java @@ -41,9 +41,16 @@ public class CustomerCashBalanceTransaction extends StripeObject @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** + * The ID of an Account representing a customer whose available cash balance changed as a result + * of this transaction. + */ + @SerializedName("customer_account") + String customerAccount; + /** * The total available cash balance for the specified currency after this transaction was applied. - * Represented in the smallest currency + * Represented in the smallest currency * unit. */ @SerializedName("ending_balance") @@ -66,7 +73,7 @@ public class CustomerCashBalanceTransaction extends StripeObject /** * The amount by which the cash balance changed, represented in the smallest currency unit. A positive + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. A positive * value represents funds being added to the cash balance, a negative value represents funds being * removed from the cash balance. */ @@ -89,7 +96,7 @@ public class CustomerCashBalanceTransaction extends StripeObject /** * The type of the cash balance transaction. New types may be added in future. See Customer Balance to learn + * href="https://docs.stripe.com/payments/customer-balance#types">Customer Balance to learn * more about these types. * *

One of {@code adjusted_for_overdraft}, {@code applied_to_payment}, {@code funded}, {@code @@ -129,7 +136,7 @@ public void setCustomerObject(Customer expandableObject) { @EqualsAndHashCode(callSuper = false) public static class AdjustedForOverdraft extends StripeObject { /** - * The Balance Transaction + * The Balance Transaction * that corresponds to funds taken out of your Stripe balance. */ @SerializedName("balance_transaction") @@ -138,7 +145,7 @@ public static class AdjustedForOverdraft extends StripeObject { ExpandableField balanceTransaction; /** - * The Cash Balance + * The Cash Balance * Transaction that brought the customer balance negative, triggering the clawback of funds. */ @SerializedName("linked_transaction") @@ -195,7 +202,7 @@ public void setLinkedTransactionObject(CustomerCashBalanceTransaction expandable @EqualsAndHashCode(callSuper = false) public static class AppliedToPayment extends StripeObject { /** - * The Payment Intent that + * The Payment Intent that * funds were applied to. */ @SerializedName("payment_intent") @@ -364,7 +371,7 @@ public static class UsBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class RefundedFromPayment extends StripeObject { /** - * The Refund that moved these funds + * The Refund that moved these funds * into the customer's cash balance. */ @SerializedName("refund") @@ -400,7 +407,7 @@ public void setRefundObject(Refund expandableObject) { @EqualsAndHashCode(callSuper = false) public static class TransferredToBalance extends StripeObject { /** - * The Balance Transaction + * The Balance Transaction * that corresponds to funds transferred to your Stripe balance. */ @SerializedName("balance_transaction") @@ -437,7 +444,7 @@ public void setBalanceTransactionObject(BalanceTransaction expandableObject) { @EqualsAndHashCode(callSuper = false) public static class UnappliedFromPayment extends StripeObject { /** - * The Payment Intent that + * The Payment Intent that * funds were unapplied from. */ @SerializedName("payment_intent") diff --git a/src/main/java/com/stripe/model/CustomerSession.java b/src/main/java/com/stripe/model/CustomerSession.java index 031e0b4c448..a69b1af5b58 100644 --- a/src/main/java/com/stripe/model/CustomerSession.java +++ b/src/main/java/com/stripe/model/CustomerSession.java @@ -57,6 +57,10 @@ public class CustomerSession extends ApiResource { @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** The Account that the Customer Session was created for. */ + @SerializedName("customer_account") + String customerAccount; + /** The timestamp at which this Customer Session will expire. */ @SerializedName("expires_at") Long expiresAt; diff --git a/src/main/java/com/stripe/model/Discount.java b/src/main/java/com/stripe/model/Discount.java index c71c3d6c83d..28b7bc3da00 100644 --- a/src/main/java/com/stripe/model/Discount.java +++ b/src/main/java/com/stripe/model/Discount.java @@ -9,11 +9,11 @@ /** * A discount represents the actual application of a coupon or promotion code. It contains information - * about when the discount began, when it will end, and what it is applied to. + * href="https://api.stripe.com#coupons">coupon or promotion code. It contains information about + * when the discount began, when it will end, and what it is applied to. * - *

Related guide: Applying + *

Related guide: Applying * discounts to subscriptions */ @Getter @@ -33,6 +33,10 @@ public class Discount extends StripeObject implements HasId { @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** The ID of the account representing the customer associated with this discount. */ + @SerializedName("customer_account") + String customerAccount; + /** Always true for a deleted object. */ @SerializedName("deleted") Boolean deleted; diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java index b5fdfa0277a..0a7eb6eb085 100644 --- a/src/main/java/com/stripe/model/Dispute.java +++ b/src/main/java/com/stripe/model/Dispute.java @@ -24,7 +24,7 @@ * you have the opportunity to respond to the dispute with evidence that shows that the charge is * legitimate. * - *

Related guide: Disputes and fraud + *

Related guide: Disputes and fraud */ @Getter @Setter @@ -92,7 +92,7 @@ public class Dispute extends ApiResource Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -127,7 +127,7 @@ public class Dispute extends ApiResource * debit_not_authorized}, {@code duplicate}, {@code fraudulent}, {@code general}, {@code * incorrect_account_details}, {@code insufficient_funds}, {@code noncompliant}, {@code * product_not_received}, {@code product_unacceptable}, {@code subscription_canceled}, or {@code - * unrecognized}. Learn more about dispute + * unrecognized}. Learn more about dispute * reasons. */ @SerializedName("reason") @@ -890,7 +890,10 @@ public static class ShippingAddress extends StripeObject { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; } @@ -978,7 +981,10 @@ public static class ShippingAddress extends StripeObject { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; } diff --git a/src/main/java/com/stripe/model/ExchangeRate.java b/src/main/java/com/stripe/model/ExchangeRate.java index 6c82ffc2ec4..0a6056e8da6 100644 --- a/src/main/java/com/stripe/model/ExchangeRate.java +++ b/src/main/java/com/stripe/model/ExchangeRate.java @@ -26,14 +26,14 @@ * are various reasons why you might want to know the current rate (for example, to dynamically * price an item for a user with a default payment in a foreign currency). * - *

Please refer to our Exchange Rates API guide + *

Please refer to our Exchange Rates API guide * for more details. * *

[Note: this integration path is supported but no longer recommended] Additionally, * you can guarantee that a charge is made with an exchange rate that you expect is current. To do * so, you must pass in the exchange_rate to charges endpoints. If the value is no longer up to * date, the charge won't go through. Please refer to our Using with charges guide for more details. + * href="https://docs.stripe.com/exchange-rates">Using with charges guide for more details. * *

----- * diff --git a/src/main/java/com/stripe/model/FeeRefund.java b/src/main/java/com/stripe/model/FeeRefund.java index fc8202ffe14..d219f35b9d5 100644 --- a/src/main/java/com/stripe/model/FeeRefund.java +++ b/src/main/java/com/stripe/model/FeeRefund.java @@ -21,7 +21,7 @@ * fee was originally collected. * *

Related guide: Refunding + * href="https://docs.stripe.com/connect/destination-charges#refunding-app-fee">Refunding * application fees */ @Getter @@ -62,7 +62,7 @@ public class FeeRefund extends ApiResource String id; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/File.java b/src/main/java/com/stripe/model/File.java index f11567995b5..4565a6885c2 100644 --- a/src/main/java/com/stripe/model/File.java +++ b/src/main/java/com/stripe/model/File.java @@ -19,11 +19,11 @@ /** * This object represents files hosted on Stripe's servers. You can upload files with the create file request (for example, when - * uploading dispute evidence). Stripe also creates files independently (for example, the results of - * a Sigma scheduled query). + * href="https://api.stripe.com#create_file">create file request (for example, when uploading + * dispute evidence). Stripe also creates files independently (for example, the results of a Sigma scheduled query). * - *

Related guide: File upload guide + *

Related guide: File upload guide */ @Getter @Setter @@ -47,8 +47,7 @@ public class File extends ApiResource implements HasId { String id; /** - * A list of file links that point at this - * file. + * A list of file links that point at this file. */ @SerializedName("links") FileLinkCollection links; @@ -62,7 +61,7 @@ public class File extends ApiResource implements HasId { String object; /** - * The purpose of the uploaded + * The purpose of the uploaded * file. * *

One of {@code account_requirement}, {@code additional_verification}, {@code business_icon}, diff --git a/src/main/java/com/stripe/model/FileLink.java b/src/main/java/com/stripe/model/FileLink.java index 33101ab8462..91bb8e94440 100644 --- a/src/main/java/com/stripe/model/FileLink.java +++ b/src/main/java/com/stripe/model/FileLink.java @@ -58,7 +58,7 @@ public class FileLink extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/FundingInstructions.java b/src/main/java/com/stripe/model/FundingInstructions.java index 64d9d2573d5..b9064c39f6b 100644 --- a/src/main/java/com/stripe/model/FundingInstructions.java +++ b/src/main/java/com/stripe/model/FundingInstructions.java @@ -9,11 +9,11 @@ /** * Each customer has a {@code balance} + * href="https://docs.stripe.com/api/customers/object#customer_object-balance">{@code balance} * that is automatically applied to future invoices and payments using the {@code customer_balance} * payment method. Customers can fund this balance by initiating a bank transfer to any account in * the {@code financial_addresses} field. Related guide: Customer balance + * href="https://docs.stripe.com/payments/customer-balance/funding-instructions">Customer balance * funding instructions */ @Getter diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 4ab0327967b..6fecb44be1f 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -37,12 +37,12 @@ * Invoices are statements of amounts owed by a customer, and are either generated one-off, or * generated periodically from a subscription. * - *

They contain invoice items, and - * proration adjustments that may be caused by subscription upgrades/downgrades (if necessary). + *

They contain invoice items, and proration + * adjustments that may be caused by subscription upgrades/downgrades (if necessary). * *

If your invoice is configured to be billed through automatic charges, Stripe automatically * finalizes your invoice and attempts payment. Note that finalizing the invoice, when + * href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">when * automatic, does not happen immediately as the invoice is created. Stripe waits until one hour * after the last webhook was successfully sent (or the last webhook timed out after failing). If * you (and the platforms you may have connected to) have no webhooks configured, Stripe waits one @@ -61,9 +61,9 @@ * the customer's credit balance which is applied to the next invoice. * *

More details on the customer's credit balance are here. + * href="https://docs.stripe.com/billing/customer/balance">here. * - *

Related guide: Send invoices to + *

Related guide: Send invoices to * customers */ @Getter @@ -146,7 +146,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreautomatic + * href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">automatic * collection of the invoice. If {@code false}, the invoice's state doesn't automatically * advance without an explicit action. */ @@ -216,12 +216,16 @@ public class Invoice extends ApiResource implements HasId, MetadataStore customFields; - /** The ID of the customer who will be billed. */ + /** The ID of the customer to bill. */ @SerializedName("customer") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** The ID of the account representing the customer to bill. */ + @SerializedName("customer_account") + String customerAccount; + /** * The customer's address. Until the invoice is finalized, this field will equal {@code * customer.address}. Once the invoice is finalized, this field will no longer be updated. @@ -345,7 +349,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStorerevision documentation for more + * href="https://docs.stripe.com/invoicing/invoice-revisions">revision documentation for more * details. */ @SerializedName("from_invoice") @@ -407,7 +411,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -440,7 +444,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreInvoices with Connect + * See the Invoices with Connect * documentation for details. */ @SerializedName("on_behalf_of") @@ -522,7 +526,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreLearn more + * href="https://docs.stripe.com/billing/invoices/workflow#workflow-overview">Learn more */ @SerializedName("status") String status; @@ -582,7 +586,7 @@ public class Invoice extends ApiResource implements HasId, MetadataStorebeen exhausted. This field + * href="https://docs.stripe.com/billing/webhooks#understand">been exhausted. This field * tracks the time when webhooks for this invoice were successfully delivered. If the invoice had * no webhooks to deliver, this will be set while the invoice is being created. */ @@ -1981,7 +1985,7 @@ public static class AutomaticTax extends StripeObject { /** * Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice * items (invoice items with manually specified tax rates, negative amounts, or {@code + * href="https://docs.stripe.com/api/tax_rates">tax rates, negative amounts, or {@code * tax_behavior=unspecified}) cannot be added to automatic tax invoices. */ @SerializedName("enabled") @@ -2249,7 +2253,7 @@ public static class QuoteDetails extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class SubscriptionDetails extends StripeObject { /** - * Set of key-value pairs defined as + * Set of key-value pairs defined as * subscription metadata when an invoice is created. Becomes an immutable snapshot of the * subscription metadata at the time of invoice finalization. Note: This attribute is * populated only for invoices created on or after June 29, 2023. @@ -2363,6 +2367,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("konbini") Konbini konbini; + /** + * If paying by {@code payto}, this sub-hash contains details about the PayTo payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("payto") + Payto payto; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -2446,10 +2457,10 @@ public static class Card extends StripeObject { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. * @@ -2540,6 +2551,53 @@ public static class EuBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Konbini extends StripeObject {} + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + @SerializedName("amount") + Long amount; + + /** + * Only {@code maximum} is supported. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + * + *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code + * mortgage}, {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code + * salary}, {@code tax}, or {@code utility}. + */ + @SerializedName("purpose") + String purpose; + } + } + /** * For more details about SepaDebit, please refer to the API Reference. @@ -2975,6 +3033,7 @@ public static class TotalTax extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class TaxRateDetails extends StripeObject { + /** ID of the tax rate. */ @SerializedName("tax_rate") String taxRate; } diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java index 3d0f57f2715..bbeaf8177ea 100644 --- a/src/main/java/com/stripe/model/InvoiceItem.java +++ b/src/main/java/com/stripe/model/InvoiceItem.java @@ -24,21 +24,21 @@ /** * Invoice Items represent the component lines of an invoice. When you create an invoice item with an + * href="https://docs.stripe.com/api/invoices">invoice. When you create an invoice item with an * {@code invoice} field, it is attached to the specified invoice and included as an invoice line item within invoice.lines. + * href="https://docs.stripe.com/api/invoices/line_item">an invoice line item within invoice.lines. * *

Invoice Items can be created before you are ready to actually send the invoice. This can be * particularly useful when combined with a subscription. Sometimes you want to add a + * href="https://docs.stripe.com/api/subscriptions">subscription. Sometimes you want to add a * charge or credit to a customer, but actually charge or credit the customer's card only at the end * of a regular billing cycle. This is useful for combining several charges (to minimize * per-transaction fees), or for having Stripe tabulate your usage-based billing totals. * - *

Related guides: Integrate with the + *

Related guides: Integrate with the * Invoicing API, Subscription + * href="https://docs.stripe.com/billing/invoices/subscription#adding-upcoming-invoice-items">Subscription * Invoices. */ @Getter @@ -59,12 +59,16 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore customer; + /** The ID of the account to bill for this invoice item. */ + @SerializedName("customer_account") + String customerAccount; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @SerializedName("date") Long date; @@ -107,7 +111,7 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -573,11 +577,31 @@ public static class Pricing extends StripeObject { public static class PriceDetails extends StripeObject { /** The ID of the price this item is associated with. */ @SerializedName("price") - String price; + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField price; /** The ID of the product this item is associated with. */ @SerializedName("product") String product; + + /** Get ID of expandable {@code price} object. */ + public String getPrice() { + return (this.price != null) ? this.price.getId() : null; + } + + public void setPrice(String id) { + this.price = ApiResource.setExpandableFieldId(id, this.price); + } + + /** Get expanded {@code price}. */ + public Price getPriceObject() { + return (this.price != null) ? this.price.getExpanded() : null; + } + + public void setPriceObject(Price expandableObject) { + this.price = new ExpandableField(expandableObject.getId(), expandableObject); + } } } diff --git a/src/main/java/com/stripe/model/InvoiceLineItem.java b/src/main/java/com/stripe/model/InvoiceLineItem.java index 1f93e151dea..8e52008c211 100644 --- a/src/main/java/com/stripe/model/InvoiceLineItem.java +++ b/src/main/java/com/stripe/model/InvoiceLineItem.java @@ -21,12 +21,12 @@ /** * Invoice Line Items represent the individual lines within an invoice and only exist within the context of an + * href="https://docs.stripe.com/api/invoices">invoice and only exist within the context of an * invoice. * *

Each line item is backed by either an invoice item or a subscription item. + * href="https://docs.stripe.com/api/invoiceitems">invoice item or a subscription item. */ @Getter @Setter @@ -79,7 +79,7 @@ public class InvoiceLineItem extends ApiResource implements HasId, MetadataStore Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Note that for line items with {@code type=subscription}, {@code metadata} * reflects the current metadata from the subscription associated with the line item, unless the @@ -123,6 +123,12 @@ public class InvoiceLineItem extends ApiResource implements HasId, MetadataStore @Setter(lombok.AccessLevel.NONE) ExpandableField subscription; + /** + * The subtotal of the line item, in cents (or local equivalent), before any discounts or taxes. + */ + @SerializedName("subtotal") + Long subtotal; + /** The tax information of the line item. */ @SerializedName("taxes") List taxes; @@ -564,11 +570,31 @@ public static class Pricing extends StripeObject { public static class PriceDetails extends StripeObject { /** The ID of the price this item is associated with. */ @SerializedName("price") - String price; + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField price; /** The ID of the product this item is associated with. */ @SerializedName("product") String product; + + /** Get ID of expandable {@code price} object. */ + public String getPrice() { + return (this.price != null) ? this.price.getId() : null; + } + + public void setPrice(String id) { + this.price = ApiResource.setExpandableFieldId(id, this.price); + } + + /** Get expanded {@code price}. */ + public Price getPriceObject() { + return (this.price != null) ? this.price.getExpanded() : null; + } + + public void setPriceObject(Price expandableObject) { + this.price = new ExpandableField(expandableObject.getId(), expandableObject); + } } } @@ -633,6 +659,7 @@ public static class Tax extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class TaxRateDetails extends StripeObject { + /** ID of the tax rate. */ @SerializedName("tax_rate") String taxRate; } diff --git a/src/main/java/com/stripe/model/InvoicePayment.java b/src/main/java/com/stripe/model/InvoicePayment.java index 46165f99bc2..bdf9d3d56f6 100644 --- a/src/main/java/com/stripe/model/InvoicePayment.java +++ b/src/main/java/com/stripe/model/InvoicePayment.java @@ -19,7 +19,7 @@ /** * Invoice Payments represent payments made against invoices. Invoice Payments can be accessed in * two ways: 1. By expanding the {@code payments} field on the Invoice resource. 2. By using the Invoice Payment + * href="https://api.stripe.com#invoice">Invoice resource. 2. By using the Invoice Payment * retrieve and list endpoints. * *

Invoice Payments include the mapping between payment objects, such as Payment Intent, and diff --git a/src/main/java/com/stripe/model/InvoiceRenderingTemplate.java b/src/main/java/com/stripe/model/InvoiceRenderingTemplate.java index 86b262bd825..b3fd34a7b67 100644 --- a/src/main/java/com/stripe/model/InvoiceRenderingTemplate.java +++ b/src/main/java/com/stripe/model/InvoiceRenderingTemplate.java @@ -43,7 +43,7 @@ public class InvoiceRenderingTemplate extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/LineItem.java b/src/main/java/com/stripe/model/LineItem.java index 101b583063b..a56bae6c7f5 100644 --- a/src/main/java/com/stripe/model/LineItem.java +++ b/src/main/java/com/stripe/model/LineItem.java @@ -3,6 +3,7 @@ import com.google.gson.annotations.SerializedName; import java.util.List; +import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -51,6 +52,14 @@ public class LineItem extends StripeObject implements HasId { @SerializedName("id") String id; + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. + */ + @SerializedName("metadata") + Map metadata; + /** * String representing the object's type. Objects of the same type share the same value. * @@ -85,11 +94,11 @@ public static class Discount extends StripeObject { /** * A discount represents the actual application of a coupon or promotion code. It contains - * information about when the discount began, when it will end, and what it is applied to. + * href="https://api.stripe.com#coupons">coupon or promotion code. It contains information + * about when the discount began, when it will end, and what it is applied to. * - *

Related guide: Applying + *

Related guide: Applying * discounts to subscriptions */ @SerializedName("discount") diff --git a/src/main/java/com/stripe/model/LoginLink.java b/src/main/java/com/stripe/model/LoginLink.java index 59ff1e1170f..09c1ece4f4d 100644 --- a/src/main/java/com/stripe/model/LoginLink.java +++ b/src/main/java/com/stripe/model/LoginLink.java @@ -17,9 +17,9 @@ /** * Login Links are single-use URLs that takes an Express account to the login page for their Stripe * dashboard. A Login Link differs from an Account Link in that it takes the user + * href="https://docs.stripe.com/api/account_links">Account Link in that it takes the user * directly to their Express + * href="https://docs.stripe.com/connect/integrate-express-dashboard#create-login-link">Express * dashboard for the specified account */ @Getter diff --git a/src/main/java/com/stripe/model/Mandate.java b/src/main/java/com/stripe/model/Mandate.java index b857d7608a2..020e29c8dd3 100644 --- a/src/main/java/com/stripe/model/Mandate.java +++ b/src/main/java/com/stripe/model/Mandate.java @@ -245,6 +245,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("revolut_pay") RevolutPay revolutPay; @@ -449,6 +452,72 @@ public static class Paypal extends StripeObject { String payerId; } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Long amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end + * date. + */ + @SerializedName("end_date") + String endDate; + + /** + * The periodicity at which payments will be collected. Defaults to {@code adhoc}. + * + *

One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code + * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except for + * when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no limit. + */ + @SerializedName("payments_per_period") + Long paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + * + *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage}, + * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code + * tax}, or {@code utility}. + */ + @SerializedName("purpose") + String purpose; + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation + * time. + */ + @SerializedName("start_date") + String startDate; + } + /** * For more details about RevolutPay, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index 6150fb3c665..41267ddb2c8 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -92,7 +92,7 @@ public class PaymentAttemptRecord extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -218,7 +218,7 @@ public static class Amount extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -240,7 +240,7 @@ public static class AmountAuthorized extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -262,7 +262,7 @@ public static class AmountCanceled extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -284,7 +284,7 @@ public static class AmountFailed extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -306,7 +306,7 @@ public static class AmountGuaranteed extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -328,7 +328,7 @@ public static class AmountRefunded extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -350,7 +350,7 @@ public static class AmountRequested extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -524,6 +524,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -559,7 +562,7 @@ public static class PaymentMethodDetails extends StripeObject { /** * The type of transaction-specific details of the payment method used in the payment. See PaymentMethod.type + * href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-type">PaymentMethod.type * for the full list of possible types. An additional hash is included on {@code * payment_method_details} with a name matching this value. It contains information specific to * the payment method. @@ -657,6 +660,12 @@ public static class AcssDebit extends StripeObject { @SerializedName("bank_name") String bankName; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -690,14 +699,14 @@ public static class AcssDebit extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Affirm extends StripeObject { /** - * ID of the location that this + * ID of the location that this * transaction's reader is assigned to. */ @SerializedName("location") String location; /** - * ID of the reader this + * ID of the reader this * transaction was made on. */ @SerializedName("reader") @@ -872,6 +881,12 @@ public static class AuBecsDebit extends StripeObject { @SerializedName("bsb_number") String bsbNumber; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -896,6 +911,12 @@ public static class AuBecsDebit extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BacsDebit extends StripeObject { + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -1072,7 +1093,10 @@ public static class Address extends StripeObject { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; } @@ -1112,6 +1136,10 @@ public static class Boleto extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Card extends StripeObject { + /** The authorization code of the payment. */ + @SerializedName("authorization_code") + String authorizationCode; + /** * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@code mastercard}, {@code @@ -1138,6 +1166,10 @@ public static class Card extends StripeObject { @SerializedName("country") String country; + /** A high-level description of the type of cards issued in this range. */ + @SerializedName("description") + String description; + /** Two-digit number representing the card's expiration month. */ @SerializedName("exp_month") Long expMonth; @@ -1165,6 +1197,18 @@ public static class Card extends StripeObject { @SerializedName("funding") String funding; + /** Issuer identification number of the card. */ + @SerializedName("iin") + String iin; + + /** Installment details for this payment. */ + @SerializedName("installments") + Installments installments; + + /** The name of the card's issuing bank. */ + @SerializedName("issuer") + String issuer; + /** The last four digits of the card. */ @SerializedName("last4") String last4; @@ -1182,6 +1226,14 @@ public static class Card extends StripeObject { @SerializedName("network") String network; + /** Advice code from the card network for the failed payment. */ + @SerializedName("network_advice_code") + String networkAdviceCode; + + /** Decline code from the card network for the failed payment. */ + @SerializedName("network_decline_code") + String networkDeclineCode; + /** * If this card has network token credentials, this contains the details of the network token * credentials. @@ -1198,6 +1250,13 @@ public static class Card extends StripeObject { @SerializedName("network_transaction_id") String networkTransactionId; + /** + * The transaction type that was passed for an off-session, Merchant-Initiated transaction, + * one of {@code recurring} or {@code unscheduled}. + */ + @SerializedName("stored_credential_usage") + String storedCredentialUsage; + /** Populated if this transaction used 3D Secure authentication. */ @SerializedName("three_d_secure") ThreeDSecure threeDSecure; @@ -1224,6 +1283,48 @@ public static class Checks extends StripeObject { String cvcCheck; } + /** + * For more details about Installments, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Installments extends StripeObject { + @SerializedName("plan") + Plan plan; + + /** + * For more details about Plan, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Plan extends StripeObject { + /** + * For {@code fixed_count} installment plans, this is the number of installment payments + * your customer will make to their credit card. + */ + @SerializedName("count") + Long count; + + /** + * For {@code fixed_count} installment plans, this is the interval between installment + * payments your customer will make to their credit card. One of {@code month}. + */ + @SerializedName("interval") + String interval; + + /** + * Type of installment plan, one of {@code fixed_count}, {@code revolving}, or {@code + * bonus}. + */ + @SerializedName("type") + String type; + } + } + /** * For more details about NetworkToken, please refer to the API Reference. @@ -1419,9 +1520,9 @@ public static class CardPresent extends StripeObject { String iin; /** - * Whether this PaymentIntent is + * Whether this PaymentIntent is * eligible for incremental authorizations. Request support using request_incremental_authorization_support. + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support">request_incremental_authorization_support. */ @SerializedName("incremental_authorization_supported") Boolean incrementalAuthorizationSupported; @@ -1794,9 +1895,10 @@ public static class Grabpay extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, - * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code - * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, + * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code + * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code + * yoursafe}. */ @SerializedName("bank") String bank; @@ -1806,8 +1908,9 @@ public static class Ideal extends StripeObject { * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code - * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code + * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or + * {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2360,6 +2463,12 @@ public static class NzBankAccount extends StripeObject { @SerializedName("branch_code") String branchCode; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** Last four digits of the bank account number. */ @SerializedName("last4") String last4; @@ -2451,14 +2560,14 @@ public static class Payco extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Paynow extends StripeObject { /** - * ID of the location that this + * ID of the location that this * transaction's reader is assigned to. */ @SerializedName("location") String location; /** - * ID of the reader this + * ID of the reader this * transaction was made on. */ @SerializedName("reader") @@ -2536,6 +2645,31 @@ public static class SellerProtection extends StripeObject { } } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + } + /** * For more details about Pix, please refer to the API * Reference. @@ -2712,6 +2846,12 @@ public static class SepaDebit extends StripeObject { @SerializedName("country") String country; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -2725,9 +2865,9 @@ public static class SepaDebit extends StripeObject { /** * Find the ID of the mandate used for this payment under the payment_method_details.sepa_debit.mandate + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate">payment_method_details.sepa_debit.mandate * property on the Charge. Use this mandate ID to retrieve the Mandate. + * href="https://docs.stripe.com/api/mandates/retrieve">retrieve the Mandate. */ @SerializedName("mandate") String mandate; @@ -2902,6 +3042,12 @@ public static class UsBankAccount extends StripeObject { @SerializedName("bank_name") String bankName; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -2971,14 +3117,14 @@ public static class WechatPay extends StripeObject { String fingerprint; /** - * ID of the location that this + * ID of the location that this * transaction's reader is assigned to. */ @SerializedName("location") String location; /** - * ID of the reader this + * ID of the reader this * transaction was made on. */ @SerializedName("reader") @@ -3081,7 +3227,10 @@ public static class Address extends StripeObject { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; } diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 2c30a34f217..8f41afcbe09 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -33,11 +33,11 @@ * particular session. * *

A PaymentIntent transitions through multiple statuses throughout - * its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately - * creates at most one successful charge. + * href="https://stripe.com/payments/paymentintents/lifecycle">multiple statuses throughout its + * lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately creates + * at most one successful charge. * - *

Related guide: Payment Intents + *

Related guide: Payment Intents * API */ @Getter @@ -46,10 +46,10 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore { /** * Amount intended to be collected by this PaymentIntent. A positive integer representing how much - * to charge in the smallest currency + * to charge in the smallest currency * unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The * minimum amount is $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @@ -77,7 +77,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

use case for + * PaymentIntents use case for * connected accounts. */ @SerializedName("application_fee_amount") @@ -126,7 +126,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

Refer to our docs to accept a payment and + * href="https://docs.stripe.com/payments/accept-a-payment?ui=elements">accept a payment and * learn about how {@code client_secret} should be handled. */ @SerializedName("client_secret") @@ -158,7 +158,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

Payment methods attached to other Customers cannot be used with this PaymentIntent. * *

If setup_future_usage + * href="https://api.stripe.com#payment_intent_object-setup_future_usage">setup_future_usage * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment * method attaches to the Customer after the PaymentIntent has been confirmed and any required * actions from the user are complete. If the payment method is {@code card_present} and isn't a @@ -171,6 +171,23 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

customer; + /** + * ID of the Account representing the customer that this PaymentIntent belongs to, if one exists. + * + *

Payment methods attached to other Accounts cannot be used with this PaymentIntent. + * + *

If setup_future_usage + * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment + * method attaches to the Account after the PaymentIntent has been confirmed and any required + * actions from the user are complete. If the payment method is {@code card_present} and isn't a + * digital wallet, then a generated_card + * payment method representing the card is created and attached to the Account instead. + */ + @SerializedName("customer_account") + String customerAccount; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ @SerializedName("description") String description; @@ -195,7 +212,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

Charge object created by + * ID of the latest Charge object created by * this PaymentIntent. This property is {@code null} until PaymentIntent confirmation is * attempted. */ @@ -212,10 +229,10 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Learn more about storing + * href="https://docs.stripe.com/payments/payment-intents/creating-payment-intents#storing-information-in-metadata">storing * information in metadata. */ @Getter(onMethod_ = {@Override}) @@ -238,9 +255,10 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

use case for - * connected accounts for details. + * You can specify the settlement merchant as the connected account using the {@code on_behalf_of} + * attribute on the charge. See the PaymentIntents use case for connected accounts for + * details. */ @SerializedName("on_behalf_of") @Getter(lombok.AccessLevel.NONE) @@ -258,7 +276,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

payment method + * href="https://docs.stripe.com/api/payment_method_configurations">payment method * configuration used for this PaymentIntent. */ @SerializedName("payment_method_configuration_details") @@ -361,14 +379,14 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

status. + * href="https://docs.stripe.com/payments/intents#intent-statuses">status. */ @SerializedName("status") String status; /** * The data that automatically creates a Transfer after the payment finalizes. Learn more about - * the use case for connected + * the use case for connected * accounts. */ @SerializedName("transfer_data") @@ -376,7 +394,7 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

use case for connected + * href="https://docs.stripe.com/connect/separate-charges-and-transfers">use case for connected * accounts. */ @SerializedName("transfer_group") @@ -1524,7 +1542,7 @@ public PaymentIntent verifyMicrodeposits( public static class AmountDetails extends StripeObject { /** * The total discount applied on the transaction represented in the smallest currency unit. An integer + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An integer * greater than 0. * *

This field is mutually exclusive with the {@code @@ -1535,7 +1553,7 @@ public static class AmountDetails extends StripeObject { /** * A list of line items, each containing information about a product in the PaymentIntent. There - * is a maximum of 100 line items. + * is a maximum of 200 line items. */ @SerializedName("line_items") PaymentIntentAmountDetailsLineItemCollection lineItems; @@ -1559,7 +1577,7 @@ public static class AmountDetails extends StripeObject { public static class Shipping extends StripeObject { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ @SerializedName("amount") @@ -1590,7 +1608,7 @@ public static class Shipping extends StripeObject { public static class Tax extends StripeObject { /** * The total amount of tax on the transaction represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1627,7 +1645,7 @@ public static class AutomaticPaymentMethods extends StripeObject { * *

Redirect-based payment methods may require your customer to be redirected to a payment * method's app or site for authentication or additional steps. To confirm this PaymentIntent, + * href="https://docs.stripe.com/api/payment_intents/confirm">confirm this PaymentIntent, * you may be required to provide a {@code return_url} to redirect customers back to your site * after they authenticate or complete the payment. * @@ -1671,7 +1689,7 @@ public static class Inputs extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Tax extends StripeObject { - /** The TaxCalculation id */ + /** The TaxCalculation id */ @SerializedName("calculation") String calculation; } @@ -2791,6 +2809,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -3354,7 +3375,7 @@ public static class Card extends StripeObject { * Installment details for this payment. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ @SerializedName("installments") Installments installments; @@ -3372,7 +3393,7 @@ public static class Card extends StripeObject { /** * Request ability to capture beyond the standard + * href="https://docs.stripe.com/payments/extended-authorization">capture beyond the standard * authorization validity window for this PaymentIntent. * *

One of {@code if_available}, or {@code never}. @@ -3382,7 +3403,7 @@ public static class Card extends StripeObject { /** * Request ability to increment the + * href="https://docs.stripe.com/payments/incremental-authorization">increment the * authorization for this PaymentIntent. * *

One of {@code if_available}, or {@code never}. @@ -3391,7 +3412,7 @@ public static class Card extends StripeObject { String requestIncrementalAuthorization; /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. * *

One of {@code if_available}, or {@code never}. @@ -3400,7 +3421,7 @@ public static class Card extends StripeObject { String requestMulticapture; /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. * *

One of {@code if_available}, or {@code never}. @@ -3411,11 +3432,11 @@ public static class Card extends StripeObject { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. * @@ -3641,7 +3662,7 @@ public static class CardPresent extends StripeObject { /** * Request ability to capture this payment beyond the standard authorization + * href="https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity">authorization * validity window. */ @SerializedName("request_extended_authorization") @@ -3649,10 +3670,10 @@ public static class CardPresent extends StripeObject { /** * Request ability to increment + * href="https://docs.stripe.com/terminal/features/incremental-authorizations">increment * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported + * in the Confirm response * to verify support. */ @SerializedName("request_incremental_authorization_support") @@ -4634,6 +4655,102 @@ public static class Paypal extends StripeObject { String setupFutureUsage; } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

One of {@code none}, or {@code off_session}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Long amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + String endDate; + + /** + * The periodicity at which payments will be collected. Defaults to {@code adhoc}. + * + *

One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code + * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Long paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + * + *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage}, + * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code + * tax}, or {@code utility}. + */ + @SerializedName("purpose") + String purpose; + } + } + /** * For more details about Pix, please refer to the API * Reference. @@ -5252,7 +5369,7 @@ public static class TransferData extends StripeObject { * The amount transferred to the destination account. This transfer will occur automatically * after the payment succeeds. If no amount is specified, by default the entire payment amount * is transferred to the destination account. The amount must be less than or equal to the amount, + * href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-amount">amount, * and must be a positive integer representing how much to transfer in the smallest currency * unit (e.g., 100 cents to charge $1.00). */ diff --git a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java index 5b326a19054..0437e6385c0 100644 --- a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java +++ b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java @@ -21,7 +21,7 @@ public class PaymentIntentAmountDetailsLineItem extends ApiResource implements HasId { /** * The discount applied on this line item represented in the smallest currency unit. An integer + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An integer * greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. @@ -72,7 +72,7 @@ public class PaymentIntentAmountDetailsLineItem extends ApiResource implements H /** * The unit cost of the line item represented in the smallest currency unit. Required for + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required for * L3 rates. An integer greater than or equal to 0. */ @SerializedName("unit_cost") @@ -234,7 +234,7 @@ public static class Paypal extends StripeObject { public static class Tax extends StripeObject { /** * The total amount of tax on the transaction represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java index dcd309e9b9b..55261a8c76f 100644 --- a/src/main/java/com/stripe/model/PaymentLink.java +++ b/src/main/java/com/stripe/model/PaymentLink.java @@ -27,12 +27,12 @@ * payment link can be shared and used multiple times. * *

When a customer opens a payment link it will open a new checkout session to render the payment + * href="https://docs.stripe.com/api/checkout/sessions">checkout session to render the payment * page. You can use checkout + * href="https://docs.stripe.com/api/events/types#event_types-checkout.session.completed">checkout * session events to track payments through payment links. * - *

Related guide: Payment Links API + *

Related guide: Payment Links API */ @Getter @Setter @@ -137,7 +137,7 @@ public class PaymentLink extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -909,7 +909,7 @@ public static class InvoiceData extends StripeObject { Issuer issuer; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. */ @@ -1165,8 +1165,8 @@ public static class PaymentIntentData extends StripeObject { String description; /** - * Set of key-value pairs that will set - * metadata on Payment Intents + * Set of key-value pairs that will set + * metadata on Payment Intents * generated from this payment link. */ @SerializedName("metadata") @@ -1198,7 +1198,7 @@ public static class PaymentIntentData extends StripeObject { /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected + * href="https://docs.stripe.com/connect/separate-charges-and-transfers">use case for connected * accounts for details. */ @SerializedName("transfer_group") @@ -1328,8 +1328,8 @@ public static class SubscriptionData extends StripeObject { InvoiceSettings invoiceSettings; /** - * Set of key-value pairs that will set - * metadata on Subscriptions generated + * Set of key-value pairs that will set + * metadata on Subscriptions generated * from this payment link. */ @SerializedName("metadata") diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 99162d462a9..76646c88811 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -23,11 +23,11 @@ /** * PaymentMethod objects represent your customer's payment instruments. You can use them with PaymentIntents to collect payments or + * href="https://docs.stripe.com/payments/payment-intents">PaymentIntents to collect payments or * save them to Customer objects to store instrument details for future payments. * - *

Related guides: Payment Methods - * and More Payment Scenarios. + *

Related guides: Payment Methods + * and More Payment Scenarios. */ @Getter @Setter @@ -111,6 +111,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

customer; + @SerializedName("customer_account") + String customerAccount; + @SerializedName("customer_balance") CustomerBalance customerBalance; @@ -163,7 +166,7 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -209,6 +212,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -254,10 +260,10 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

(expandableObject.getId(), expandableObject); } + /** + * Attaches a PaymentMethod object to a Customer. + * + *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage. + * These approaches will perform any necessary steps to set up the PaymentMethod for future + * payments. Using the {@code /v1/payment_methods/:id/attach} endpoint without first using a + * SetupIntent or PaymentIntent with {@code setup_future_usage} does not optimize the + * PaymentMethod for future use, which makes later declines and payment friction more likely. See + * Optimizing cards for + * future payments for more information about setting up future payments. + * + *

To use this PaymentMethod as the default for invoice or subscription payments, set {@code + * invoice_settings.default_payment_method}, on the Customer to the PaymentMethod’s ID. + */ + public PaymentMethod attach() throws StripeException { + return attach((Map) null, (RequestOptions) null); + } + + /** + * Attaches a PaymentMethod object to a Customer. + * + *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage. + * These approaches will perform any necessary steps to set up the PaymentMethod for future + * payments. Using the {@code /v1/payment_methods/:id/attach} endpoint without first using a + * SetupIntent or PaymentIntent with {@code setup_future_usage} does not optimize the + * PaymentMethod for future use, which makes later declines and payment friction more likely. See + * Optimizing cards for + * future payments for more information about setting up future payments. + * + *

To use this PaymentMethod as the default for invoice or subscription payments, set {@code + * invoice_settings.default_payment_method}, on the Customer to the PaymentMethod’s ID. + */ + public PaymentMethod attach(RequestOptions options) throws StripeException { + return attach((Map) null, options); + } + /** * Attaches a PaymentMethod object to a Customer. * @@ -527,22 +575,12 @@ public PaymentMethod detach(PaymentMethodDetachParams params, RequestOptions opt return getResponseGetter().request(request, PaymentMethod.class); } - /** - * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods - * attached to a Customer for payments, you should use the List a Customer’s - * PaymentMethods API instead. - */ + /** Returns a list of all PaymentMethods. */ public static PaymentMethodCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } - /** - * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods - * attached to a Customer for payments, you should use the List a Customer’s - * PaymentMethods API instead. - */ + /** Returns a list of all PaymentMethods. */ public static PaymentMethodCollection list(Map params, RequestOptions options) throws StripeException { String path = "/v1/payment_methods"; @@ -551,23 +589,13 @@ public static PaymentMethodCollection list(Map params, RequestOp return getGlobalResponseGetter().request(request, PaymentMethodCollection.class); } - /** - * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods - * attached to a Customer for payments, you should use the List a Customer’s - * PaymentMethods API instead. - */ + /** Returns a list of all PaymentMethods. */ public static PaymentMethodCollection list(PaymentMethodListParams params) throws StripeException { return list(params, (RequestOptions) null); } - /** - * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods - * attached to a Customer for payments, you should use the List a Customer’s - * PaymentMethods API instead. - */ + /** Returns a list of all PaymentMethods. */ public static PaymentMethodCollection list(PaymentMethodListParams params, RequestOptions options) throws StripeException { String path = "/v1/payment_methods"; @@ -1187,9 +1215,9 @@ public static class CardPresent extends StripeObject { String iin; /** - * Whether this PaymentIntent is + * Whether this PaymentIntent is * eligible for incremental authorizations. Request support using request_incremental_authorization_support. + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support">request_incremental_authorization_support. */ @SerializedName("incremental_authorization_supported") Boolean incrementalAuthorizationSupported; @@ -1898,8 +1926,9 @@ public static class Ideal extends StripeObject { /** * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code asn_bank}, {@code * bunq}, {@code buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code - * moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, - * {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * mollie}, {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, + * {@code revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code + * yoursafe}. */ @SerializedName("bank") String bank; @@ -1909,8 +1938,9 @@ public static class Ideal extends StripeObject { * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code - * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code + * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code + * TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2306,6 +2336,27 @@ public static class Paypal extends StripeObject { String payerId; } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + } + /** * For more details about Pix, please refer to the API * Reference. @@ -2325,7 +2376,7 @@ public static class Pix extends StripeObject {} public static class Promptpay extends StripeObject {} /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @Getter @@ -2333,7 +2384,7 @@ public static class Promptpay extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class RadarOptions extends StripeObject { /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -2670,6 +2721,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(payco, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); + trySetResponseGetter(payto, responseGetter); trySetResponseGetter(pix, responseGetter); trySetResponseGetter(promptpay, responseGetter); trySetResponseGetter(radarOptions, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java index 833a54b6497..4a75410a343 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -24,7 +24,7 @@ * different sets of payment methods for different scenarios. * *

There are two types of PaymentMethodConfigurations. Which is used depends on the charge type: + * href="https://docs.stripe.com/connect/charges">charge type: * *

Direct configurations apply to payments created on your account, including * Connect destination charges, Connect separate charges and transfers, and payments not involving @@ -41,11 +41,11 @@ * dashboard and are not available in this API. * *

Related guides: - Payment Method + * href="https://docs.stripe.com/connect/payment-method-configurations">Payment Method * Configurations API - Multiple configurations + * href="https://docs.stripe.com/payments/multiple-payment-method-configs">Multiple configurations * on dynamic payment methods - Multiple + * href="https://docs.stripe.com/connect/multiple-payment-method-configurations">Multiple * configurations for your Connect accounts */ @Getter @@ -215,6 +215,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -2496,6 +2499,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + /** + * Whether this payment method may be offered at checkout. True if {@code display_preference} is + * {@code on} and the payment method's capability is active. + */ + @SerializedName("available") + Boolean available; + + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * For more details about DisplayPreference, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference extends StripeObject { + /** + * For child configs, whether or not the account's preference will be observed. If {@code + * false}, the parent configuration's default is used. + */ + @SerializedName("overridable") + Boolean overridable; + + /** + * The account's display preference. + * + *

One of {@code none}, {@code off}, or {@code on}. + */ + @SerializedName("preference") + String preference; + + /** + * The effective display preference value. + * + *

One of {@code off}, or {@code on}. + */ + @SerializedName("value") + String value; + } + } + /** * For more details about Pix, please refer to the API * Reference. @@ -3152,6 +3206,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(payco, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); + trySetResponseGetter(payto, responseGetter); trySetResponseGetter(pix, responseGetter); trySetResponseGetter(promptpay, responseGetter); trySetResponseGetter(revolutPay, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethodDomain.java b/src/main/java/com/stripe/model/PaymentMethodDomain.java index 41099bd2bdb..9343eb0023a 100644 --- a/src/main/java/com/stripe/model/PaymentMethodDomain.java +++ b/src/main/java/com/stripe/model/PaymentMethodDomain.java @@ -25,7 +25,7 @@ * shown. * *

Related guide: Payment method + * href="https://docs.stripe.com/payments/payment-methods/pmd-registration">Payment method * domains. */ @Getter diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index b8e6ec3a2a9..15980fac033 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -103,7 +103,7 @@ public class PaymentRecord extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -126,6 +126,14 @@ public class PaymentRecord extends ApiResource implements HasId { @SerializedName("processor_details") ProcessorDetails processorDetails; + /** + * Indicates who reported the payment. + * + *

One of {@code self}, or {@code stripe}. + */ + @SerializedName("reported_by") + String reportedBy; + /** Shipping information for this payment. */ @SerializedName("shipping_details") ShippingDetails shippingDetails; @@ -512,7 +520,7 @@ public static class Amount extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -534,7 +542,7 @@ public static class AmountAuthorized extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -556,7 +564,7 @@ public static class AmountCanceled extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -578,7 +586,7 @@ public static class AmountFailed extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -600,7 +608,7 @@ public static class AmountGuaranteed extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -622,7 +630,7 @@ public static class AmountRefunded extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -644,7 +652,7 @@ public static class AmountRequested extends StripeObject { /** * A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -818,6 +826,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -853,7 +864,7 @@ public static class PaymentMethodDetails extends StripeObject { /** * The type of transaction-specific details of the payment method used in the payment. See PaymentMethod.type + * href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-type">PaymentMethod.type * for the full list of possible types. An additional hash is included on {@code * payment_method_details} with a name matching this value. It contains information specific to * the payment method. @@ -951,6 +962,12 @@ public static class AcssDebit extends StripeObject { @SerializedName("bank_name") String bankName; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -984,14 +1001,14 @@ public static class AcssDebit extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Affirm extends StripeObject { /** - * ID of the location that this + * ID of the location that this * transaction's reader is assigned to. */ @SerializedName("location") String location; /** - * ID of the reader this + * ID of the reader this * transaction was made on. */ @SerializedName("reader") @@ -1166,6 +1183,12 @@ public static class AuBecsDebit extends StripeObject { @SerializedName("bsb_number") String bsbNumber; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -1190,6 +1213,12 @@ public static class AuBecsDebit extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BacsDebit extends StripeObject { + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -1366,7 +1395,10 @@ public static class Address extends StripeObject { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; } @@ -1406,6 +1438,10 @@ public static class Boleto extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Card extends StripeObject { + /** The authorization code of the payment. */ + @SerializedName("authorization_code") + String authorizationCode; + /** * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@code mastercard}, {@code @@ -1432,6 +1468,10 @@ public static class Card extends StripeObject { @SerializedName("country") String country; + /** A high-level description of the type of cards issued in this range. */ + @SerializedName("description") + String description; + /** Two-digit number representing the card's expiration month. */ @SerializedName("exp_month") Long expMonth; @@ -1459,6 +1499,18 @@ public static class Card extends StripeObject { @SerializedName("funding") String funding; + /** Issuer identification number of the card. */ + @SerializedName("iin") + String iin; + + /** Installment details for this payment. */ + @SerializedName("installments") + Installments installments; + + /** The name of the card's issuing bank. */ + @SerializedName("issuer") + String issuer; + /** The last four digits of the card. */ @SerializedName("last4") String last4; @@ -1476,6 +1528,14 @@ public static class Card extends StripeObject { @SerializedName("network") String network; + /** Advice code from the card network for the failed payment. */ + @SerializedName("network_advice_code") + String networkAdviceCode; + + /** Decline code from the card network for the failed payment. */ + @SerializedName("network_decline_code") + String networkDeclineCode; + /** * If this card has network token credentials, this contains the details of the network token * credentials. @@ -1492,6 +1552,13 @@ public static class Card extends StripeObject { @SerializedName("network_transaction_id") String networkTransactionId; + /** + * The transaction type that was passed for an off-session, Merchant-Initiated transaction, + * one of {@code recurring} or {@code unscheduled}. + */ + @SerializedName("stored_credential_usage") + String storedCredentialUsage; + /** Populated if this transaction used 3D Secure authentication. */ @SerializedName("three_d_secure") ThreeDSecure threeDSecure; @@ -1518,6 +1585,48 @@ public static class Checks extends StripeObject { String cvcCheck; } + /** + * For more details about Installments, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Installments extends StripeObject { + @SerializedName("plan") + Plan plan; + + /** + * For more details about Plan, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Plan extends StripeObject { + /** + * For {@code fixed_count} installment plans, this is the number of installment payments + * your customer will make to their credit card. + */ + @SerializedName("count") + Long count; + + /** + * For {@code fixed_count} installment plans, this is the interval between installment + * payments your customer will make to their credit card. One of {@code month}. + */ + @SerializedName("interval") + String interval; + + /** + * Type of installment plan, one of {@code fixed_count}, {@code revolving}, or {@code + * bonus}. + */ + @SerializedName("type") + String type; + } + } + /** * For more details about NetworkToken, please refer to the API Reference. @@ -1713,9 +1822,9 @@ public static class CardPresent extends StripeObject { String iin; /** - * Whether this PaymentIntent is + * Whether this PaymentIntent is * eligible for incremental authorizations. Request support using request_incremental_authorization_support. + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support">request_incremental_authorization_support. */ @SerializedName("incremental_authorization_supported") Boolean incrementalAuthorizationSupported; @@ -2088,9 +2197,10 @@ public static class Grabpay extends StripeObject { public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, - * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code - * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, + * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code + * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code + * yoursafe}. */ @SerializedName("bank") String bank; @@ -2100,8 +2210,9 @@ public static class Ideal extends StripeObject { * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code - * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code + * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or + * {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -2654,6 +2765,12 @@ public static class NzBankAccount extends StripeObject { @SerializedName("branch_code") String branchCode; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** Last four digits of the bank account number. */ @SerializedName("last4") String last4; @@ -2745,14 +2862,14 @@ public static class Payco extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Paynow extends StripeObject { /** - * ID of the location that this + * ID of the location that this * transaction's reader is assigned to. */ @SerializedName("location") String location; /** - * ID of the reader this + * ID of the reader this * transaction was made on. */ @SerializedName("reader") @@ -2830,6 +2947,31 @@ public static class SellerProtection extends StripeObject { } } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + String mandate; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + } + /** * For more details about Pix, please refer to the API * Reference. @@ -3006,6 +3148,12 @@ public static class SepaDebit extends StripeObject { @SerializedName("country") String country; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -3019,9 +3167,9 @@ public static class SepaDebit extends StripeObject { /** * Find the ID of the mandate used for this payment under the payment_method_details.sepa_debit.mandate + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate">payment_method_details.sepa_debit.mandate * property on the Charge. Use this mandate ID to retrieve the Mandate. + * href="https://docs.stripe.com/api/mandates/retrieve">retrieve the Mandate. */ @SerializedName("mandate") String mandate; @@ -3196,6 +3344,12 @@ public static class UsBankAccount extends StripeObject { @SerializedName("bank_name") String bankName; + /** + * Estimated date to debit the customer's bank account. A date string in YYYY-MM-DD format. + */ + @SerializedName("expected_debit_date") + String expectedDebitDate; + /** * Uniquely identifies this particular bank account. You can use this attribute to check * whether two bank accounts are the same. @@ -3265,14 +3419,14 @@ public static class WechatPay extends StripeObject { String fingerprint; /** - * ID of the location that this + * ID of the location that this * transaction's reader is assigned to. */ @SerializedName("location") String location; /** - * ID of the reader this + * ID of the reader this * transaction was made on. */ @SerializedName("reader") @@ -3375,7 +3529,10 @@ public static class Address extends StripeObject { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; } diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java index 05b7d4ec829..a7015e9eefc 100644 --- a/src/main/java/com/stripe/model/Payout.java +++ b/src/main/java/com/stripe/model/Payout.java @@ -28,7 +28,7 @@ * href="https://stripe.com/docs/connect/manage-payout-schedule">varying schedules, depending on * your country and industry. * - *

Related guide: Receiving payouts + *

Related guide: Receiving payouts */ @Getter @Setter @@ -42,7 +42,7 @@ public class Payout extends ApiResource implements MetadataStore, Balanc /** * The application fee (if any) for the payout. See the Connect + * href="https://docs.stripe.com/connect/instant-payouts#monetization-and-fees">See the Connect * documentation for details. */ @SerializedName("application_fee") @@ -52,7 +52,7 @@ public class Payout extends ApiResource implements MetadataStore, Balanc /** * The amount of the application fee (if any) requested for the payout. See the Connect + * href="https://docs.stripe.com/connect/instant-payouts#monetization-and-fees">See the Connect * documentation for details. */ @SerializedName("application_fee_amount") @@ -67,7 +67,7 @@ public class Payout extends ApiResource implements MetadataStore, Balanc /** * Returns {@code true} if the payout is created by an automated payout schedule and {@code + * href="https://docs.stripe.com/payouts#payout-schedule">automated payout schedule and {@code * false} if it's requested manually. */ @SerializedName("automatic") @@ -113,7 +113,7 @@ public class Payout extends ApiResource implements MetadataStore, Balanc /** * Error code that provides a reason for a payout failure, if available. View our list of failure codes. + * href="https://docs.stripe.com/api#payout_failures">list of failure codes. */ @SerializedName("failure_code") String failureCode; @@ -135,7 +135,7 @@ public class Payout extends ApiResource implements MetadataStore, Balanc Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -172,7 +172,7 @@ public class Payout extends ApiResource implements MetadataStore, Balanc /** * If {@code completed}, you can use the Balance + * href="https://docs.stripe.com/api/balance_transactions/list#balance_transaction_list-payout">Balance * Transactions API to list all balance transactions that are paid out in this payout. * *

One of {@code completed}, {@code in_progress}, or {@code not_applicable}. diff --git a/src/main/java/com/stripe/model/Person.java b/src/main/java/com/stripe/model/Person.java index 3ddbfc54c9e..b1863ca2e8a 100644 --- a/src/main/java/com/stripe/model/Person.java +++ b/src/main/java/com/stripe/model/Person.java @@ -109,7 +109,7 @@ public class Person extends ApiResource implements HasId, MetadataStore /** * Information about the upcoming new + * href="https://docs.stripe.com/connect/custom-accounts/future-requirements">upcoming new * requirements for this person, including what information needs to be collected, and by * when. */ @@ -167,7 +167,7 @@ public class Person extends ApiResource implements HasId, MetadataStore String maidenName; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -460,25 +460,28 @@ public static class Dob extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class FutureRequirements extends StripeObject { /** - * Fields that are due and can be satisfied by providing the corresponding alternative fields - * instead. + * Fields that are due and can be resolved by providing the corresponding alternative fields + * instead. Many alternatives can list the same {@code original_fields_due}, and any of these + * alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing + * {@code original_fields_due} also serves as a pathway for attempting to resolve the fields + * again. */ @SerializedName("alternatives") List alternatives; /** - * Fields that need to be collected to keep the person's account enabled. If not collected by - * the account's {@code future_requirements[current_deadline]}, these fields will transition to - * the main {@code requirements} hash, and may immediately become {@code past_due}, but the - * account may also be given a grace period depending on the account's enablement state prior to + * Fields that need to be resolved to keep the person's account enabled. If not resolved by the + * account's {@code future_requirements[current_deadline]}, these fields will transition to the + * main {@code requirements} hash, and may immediately become {@code past_due}, but the account + * may also be given a grace period depending on the account's enablement state prior to * transition. */ @SerializedName("currently_due") List currentlyDue; /** - * Fields that are {@code currently_due} and need to be collected again because validation or - * verification failed. + * Details about validation and verification failures for {@code due} requirements that must be + * resolved. */ @SerializedName("errors") List errors; @@ -492,20 +495,19 @@ public static class FutureRequirements extends StripeObject { List eventuallyDue; /** - * Fields that weren't collected by the account's {@code requirements.current_deadline}. These - * fields need to be collected to enable the person's account. New fields will never appear - * here; {@code future_requirements.past_due} will always be a subset of {@code - * requirements.past_due}. + * Fields that haven't been resolved by the account's {@code requirements.current_deadline}. + * These fields need to be resolved to enable the person's account. {@code + * future_requirements.past_due} is a subset of {@code requirements.past_due}. */ @SerializedName("past_due") List pastDue; /** - * Fields that might become required depending on the results of verification or review. It's an - * empty array unless an asynchronous verification is pending. If verification fails, these - * fields move to {@code eventually_due} or {@code currently_due}. Fields might appear in {@code - * eventually_due} or {@code currently_due} and in {@code pending_verification} if verification - * fails but another verification is still pending. + * Fields that are being reviewed, or might become required depending on the results of a + * review. If the review fails, these fields can move to {@code eventually_due}, {@code + * currently_due}, {@code past_due} or {@code alternatives}. Fields might appear in {@code + * eventually_due}, {@code currently_due}, {@code past_due} or {@code alternatives} and in + * {@code pending_verification} if one verification fails but another is still pending. */ @SerializedName("pending_verification") List pendingVerification; @@ -518,12 +520,12 @@ public static class FutureRequirements extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Alternative extends StripeObject { - /** Fields that can be provided to satisfy all fields in {@code original_fields_due}. */ + /** Fields that can be provided to resolve all fields in {@code original_fields_due}. */ @SerializedName("alternative_fields_due") List alternativeFieldsDue; /** - * Fields that are due and can be satisfied by providing all fields in {@code + * Fields that are due and can be resolved by providing all fields in {@code * alternative_fields_due}. */ @SerializedName("original_fields_due") @@ -682,23 +684,26 @@ public static class Relationship extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Requirements extends StripeObject { /** - * Fields that are due and can be satisfied by providing the corresponding alternative fields - * instead. + * Fields that are due and can be resolved by providing the corresponding alternative fields + * instead. Many alternatives can list the same {@code original_fields_due}, and any of these + * alternatives can serve as a pathway for attempting to resolve the fields again. Re-providing + * {@code original_fields_due} also serves as a pathway for attempting to resolve the fields + * again. */ @SerializedName("alternatives") List alternatives; /** - * Fields that need to be collected to keep the person's account enabled. If not collected by - * the account's {@code current_deadline}, these fields appear in {@code past_due} as well, and + * Fields that need to be resolved to keep the person's account enabled. If not resolved by the + * account's {@code current_deadline}, these fields will appear in {@code past_due} as well, and * the account is disabled. */ @SerializedName("currently_due") List currentlyDue; /** - * Fields that are {@code currently_due} and need to be collected again because validation or - * verification failed. + * Details about validation and verification failures for {@code due} requirements that must be + * resolved. */ @SerializedName("errors") List errors; @@ -711,18 +716,18 @@ public static class Requirements extends StripeObject { List eventuallyDue; /** - * Fields that weren't collected by the account's {@code current_deadline}. These fields need to - * be collected to enable the person's account. + * Fields that haven't been resolved by {@code current_deadline}. These fields need to be + * resolved to enable the person's account. */ @SerializedName("past_due") List pastDue; /** - * Fields that might become required depending on the results of verification or review. It's an - * empty array unless an asynchronous verification is pending. If verification fails, these - * fields move to {@code eventually_due}, {@code currently_due}, or {@code past_due}. Fields - * might appear in {@code eventually_due}, {@code currently_due}, or {@code past_due} and in - * {@code pending_verification} if verification fails but another verification is still pending. + * Fields that are being reviewed, or might become required depending on the results of a + * review. If the review fails, these fields can move to {@code eventually_due}, {@code + * currently_due}, {@code past_due} or {@code alternatives}. Fields might appear in {@code + * eventually_due}, {@code currently_due}, {@code past_due} or {@code alternatives} and in + * {@code pending_verification} if one verification fails but another is still pending. */ @SerializedName("pending_verification") List pendingVerification; @@ -735,12 +740,12 @@ public static class Requirements extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Alternative extends StripeObject { - /** Fields that can be provided to satisfy all fields in {@code original_fields_due}. */ + /** Fields that can be provided to resolve all fields in {@code original_fields_due}. */ @SerializedName("alternative_fields_due") List alternativeFieldsDue; /** - * Fields that are due and can be satisfied by providing all fields in {@code + * Fields that are due and can be resolved by providing all fields in {@code * alternative_fields_due}. */ @SerializedName("original_fields_due") @@ -929,7 +934,7 @@ public static class Verification extends StripeObject { /** * The state of verification for the person. Possible values are {@code unverified}, {@code * pending}, or {@code verified}. Please refer guide to handle + * href="https://docs.stripe.com/connect/handling-api-verification">guide to handle * verification updates. */ @SerializedName("status") @@ -944,7 +949,7 @@ public static class Verification extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class AdditionalDocument extends StripeObject { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("back") @@ -974,7 +979,7 @@ public static class AdditionalDocument extends StripeObject { String detailsCode; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("front") @@ -1028,7 +1033,7 @@ public void setFrontObject(File expandableObject) { @EqualsAndHashCode(callSuper = false) public static class Document extends StripeObject { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("back") @@ -1058,7 +1063,7 @@ public static class Document extends StripeObject { String detailsCode; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("front") diff --git a/src/main/java/com/stripe/model/Plan.java b/src/main/java/com/stripe/model/Plan.java index b6e8398d43e..99a23a59c21 100644 --- a/src/main/java/com/stripe/model/Plan.java +++ b/src/main/java/com/stripe/model/Plan.java @@ -22,22 +22,22 @@ /** * You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is - * backwards compatible to simplify your migration. + * href="https://api.stripe.com#prices">Prices API. It replaces the Plans API and is backwards + * compatible to simplify your migration. * *

Plans define the base price, currency, and billing cycle for recurring purchases of products. - * Products help you track inventory or - * provisioning, and plans help you track pricing. Different physical goods or levels of service - * should be represented by products, and pricing options should be represented by plans. This - * approach lets you change prices without having to change your provisioning scheme. + * Products help you track inventory or provisioning, + * and plans help you track pricing. Different physical goods or levels of service should be + * represented by products, and pricing options should be represented by plans. This approach lets + * you change prices without having to change your provisioning scheme. * *

For example, you might have a single "gold" product that has plans for $10/month, * $100/year, €9/month, and €90/year. * *

Related guides: Set up a + * href="https://docs.stripe.com/billing/subscriptions/set-up-subscription">Set up a * subscription and more about products and prices. + * href="https://docs.stripe.com/products-prices/overview">products and prices. */ @Getter @Setter @@ -117,7 +117,7 @@ public class Plan extends ApiResource implements HasId, MetadataStore { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -173,7 +173,7 @@ public class Plan extends ApiResource implements HasId, MetadataStore { /** * Default number of trial days when subscribing a customer to this plan using {@code + * href="https://docs.stripe.com/api#create_subscription-trial_from_plan">{@code * trial_from_plan=true}. */ @SerializedName("trial_period_days") diff --git a/src/main/java/com/stripe/model/Price.java b/src/main/java/com/stripe/model/Price.java index d0917a4f4c5..ebfc1851480 100644 --- a/src/main/java/com/stripe/model/Price.java +++ b/src/main/java/com/stripe/model/Price.java @@ -23,8 +23,8 @@ /** * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and - * one-time purchases of products. Products help - * you track inventory or provisioning, and prices help you track payment terms. Different physical + * one-time purchases of products. Products help you + * track inventory or provisioning, and prices help you track payment terms. Different physical * goods or levels of service should be represented by products, and pricing options should be * represented by prices. This approach lets you change prices without having to change your * provisioning scheme. @@ -33,9 +33,9 @@ * $100/year, and €9 once. * *

Related guides: Set up a - * subscription, create an - * invoice, and more about products + * href="https://docs.stripe.com/billing/subscriptions/set-up-subscription">Set up a + * subscription, create an + * invoice, and more about products * and prices. */ @Getter @@ -109,7 +109,7 @@ public class Price extends ApiResource implements HasId, MetadataStore { String lookupKey; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -141,7 +141,7 @@ public class Price extends ApiResource implements HasId, MetadataStore { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -472,7 +472,7 @@ public static class CurrencyOption extends StripeObject { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -613,7 +613,7 @@ public static class Recurring extends StripeObject { /** * Default number of trial days when subscribing a customer to this price using {@code + * href="https://docs.stripe.com/api#create_subscription-trial_from_plan">{@code * trial_from_plan=true}. */ @SerializedName("trial_period_days") diff --git a/src/main/java/com/stripe/model/Product.java b/src/main/java/com/stripe/model/Product.java index b79fc69a748..62d297b6471 100644 --- a/src/main/java/com/stripe/model/Product.java +++ b/src/main/java/com/stripe/model/Product.java @@ -25,15 +25,15 @@ * Products describe the specific goods or services you offer to your customers. For example, you * might offer a Standard and Premium version of your goods or service; each version would be a * separate Product. They can be used in conjunction with Prices to configure pricing in Payment Links, - * Checkout, and Subscriptions. + * href="https://api.stripe.com#prices">Prices to configure pricing in Payment Links, Checkout, + * and Subscriptions. * *

Related guides: Set up a - * subscription, share a Payment Link, accept + * href="https://docs.stripe.com/billing/subscriptions/set-up-subscription">Set up a + * subscription, share a Payment Link, accept * payments with Checkout, and more about Products and Prices + * href="https://docs.stripe.com/products-prices/overview">Products and Prices */ @Getter @Setter @@ -48,7 +48,7 @@ public class Product extends ApiResource implements HasId, MetadataStorePrice object that is the default + * The ID of the Price object that is the default * price for this product. */ @SerializedName("default_price") @@ -86,13 +86,13 @@ public class Product extends ApiResource implements HasId, MetadataStorepricing tables. + * href="https://docs.stripe.com/payments/checkout/pricing-table">pricing tables. */ @SerializedName("marketing_features") List marketingFeatures; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -128,7 +128,7 @@ public class Product extends ApiResource implements HasId, MetadataStoretax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/PromotionCode.java b/src/main/java/com/stripe/model/PromotionCode.java index 3930ee8a431..5761b50a8b5 100644 --- a/src/main/java/com/stripe/model/PromotionCode.java +++ b/src/main/java/com/stripe/model/PromotionCode.java @@ -23,7 +23,7 @@ * create multiple codes for a single promotion. * *

If you enable promotion codes in your customer portal + * href="https://docs.stripe.com/customer-management/configure-portal">customer portal * configuration, then customers can redeem a code themselves when updating a subscription in * the portal. Customers can also view the currently active promotion codes and coupons on each of * their subscriptions in the portal. @@ -51,12 +51,16 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore

customer; + /** The account representing the customer who can use this promotion code. */ + @SerializedName("customer_account") + String customerAccount; + /** Date at which the promotion code can no longer be redeemed. */ @SerializedName("expires_at") Long expiresAt; @@ -78,7 +82,7 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore

key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index 0bfb66484e6..b0d7dbd40a7 100644 --- a/src/main/java/com/stripe/model/Quote.java +++ b/src/main/java/com/stripe/model/Quote.java @@ -98,14 +98,21 @@ public class Quote extends ApiResource implements HasId, MetadataStore { String currency; /** - * The customer which this quote belongs to. A customer is required before finalizing the quote. - * Once specified, it cannot be changed. + * The customer who received this quote. A customer is required to finalize the quote. Once + * specified, you can't change it. */ @SerializedName("customer") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** + * The account representing the customer who received this quote. A customer or account is + * required to finalize the quote. Once specified, you can't change it. + */ + @SerializedName("customer_account") + String customerAccount; + /** The tax rates applied to this quote. */ @SerializedName("default_tax_rates") List> defaultTaxRates; @@ -131,7 +138,7 @@ public class Quote extends ApiResource implements HasId, MetadataStore { /** * Details of the quote that was cloned. See the cloning documentation for more details. + * href="https://docs.stripe.com/quotes/clone">cloning documentation for more details. */ @SerializedName("from_quote") FromQuote fromQuote; @@ -166,7 +173,7 @@ public class Quote extends ApiResource implements HasId, MetadataStore { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -176,7 +183,7 @@ public class Quote extends ApiResource implements HasId, MetadataStore { /** * A unique number that identifies this particular quote. This number is assigned once the quote - * is finalized. + * is finalized. */ @SerializedName("number") String number; @@ -1097,13 +1104,13 @@ public static class Discount extends StripeObject { /** * A discount represents the actual application of a coupon or promotion code. It contains + * href="https://api.stripe.com#coupons">coupon or promotion code. It contains * information about when the discount began, when it will end, and what it is applied * to. * *

Related guide: Applying discounts to + * href="https://docs.stripe.com/billing/subscriptions/discounts">Applying discounts to * subscriptions */ @SerializedName("discount") @@ -1236,13 +1243,13 @@ public static class Discount extends StripeObject { /** * A discount represents the actual application of a coupon or promotion code. It contains + * href="https://api.stripe.com#coupons">coupon or promotion code. It contains * information about when the discount began, when it will end, and what it is applied * to. * *

Related guide: Applying discounts to + * href="https://docs.stripe.com/billing/subscriptions/discounts">Applying discounts to * subscriptions */ @SerializedName("discount") @@ -1443,7 +1450,7 @@ public static class SubscriptionData extends StripeObject { Long effectiveDate; /** - * Set of key-value pairs that will set + * Set of key-value pairs that will set * metadata on the subscription or subscription schedule when the quote is accepted. If a * recurring price is included in {@code line_items}, this field will be passed to the resulting * subscription's {@code metadata} field. If {@code subscription_data.effective_date} is used, @@ -1549,12 +1556,12 @@ public static class Discount extends StripeObject { /** * A discount represents the actual application of a coupon or promotion code. It contains - * information about when the discount began, when it will end, and what it is applied to. + * href="https://api.stripe.com#coupons">coupon or promotion code. It contains information + * about when the discount began, when it will end, and what it is applied to. * *

Related guide: Applying discounts to + * href="https://docs.stripe.com/billing/subscriptions/discounts">Applying discounts to * subscriptions */ @SerializedName("discount") diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index c1791e6fae1..7b3d6f1d8b3 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -24,7 +24,7 @@ * Refund objects allow you to refund a previously created charge that isn't refunded yet. Funds are * refunded to the credit or debit card that's initially charged. * - *

Related guide: Refunds + *

Related guide: Refunds */ @Getter @Setter @@ -97,7 +97,7 @@ public class Refund extends ApiResource implements MetadataStore, Balanc String instructionsEmail; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -161,7 +161,7 @@ public class Refund extends ApiResource implements MetadataStore, Balanc /** * Status of the refund. This can be {@code pending}, {@code requires_action}, {@code succeeded}, * {@code failed}, or {@code canceled}. Learn more about failed refunds. + * href="https://docs.stripe.com/refunds#failed-refunds">failed refunds. */ @SerializedName("status") String status; diff --git a/src/main/java/com/stripe/model/Review.java b/src/main/java/com/stripe/model/Review.java index 63ccdff6082..c3487280d94 100644 --- a/src/main/java/com/stripe/model/Review.java +++ b/src/main/java/com/stripe/model/Review.java @@ -22,7 +22,7 @@ * Reviews can be used to supplement automated fraud detection with human expertise. * *

Learn more about Radar and reviewing payments here. + * href="https://docs.stripe.com/radar/reviews">here. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/SetupAttempt.java b/src/main/java/com/stripe/model/SetupAttempt.java index 74986d7968c..668b27f97c8 100644 --- a/src/main/java/com/stripe/model/SetupAttempt.java +++ b/src/main/java/com/stripe/model/SetupAttempt.java @@ -27,7 +27,7 @@ public class SetupAttempt extends ApiResource implements HasId { /** * The value of application + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-application">application * on the SetupIntent at the time of this confirmation. */ @SerializedName("application") @@ -51,7 +51,7 @@ public class SetupAttempt extends ApiResource implements HasId { /** * The value of customer + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-customer">customer * on the SetupIntent at the time of this confirmation. */ @SerializedName("customer") @@ -59,6 +59,14 @@ public class SetupAttempt extends ApiResource implements HasId { @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** + * The value of customer_account + * on the SetupIntent at the time of this confirmation. + */ + @SerializedName("customer_account") + String customerAccount; + /** * Indicates the directions of money movement for which this payment method is intended to be * used. @@ -92,7 +100,7 @@ public class SetupAttempt extends ApiResource implements HasId { /** * The value of on_behalf_of + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-on_behalf_of">on_behalf_of * on the SetupIntent at the time of this confirmation. */ @SerializedName("on_behalf_of") @@ -128,7 +136,7 @@ public class SetupAttempt extends ApiResource implements HasId { /** * The value of usage on + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage">usage on * the SetupIntent at the time of this confirmation, one of {@code off_session} or {@code * on_session}. */ @@ -319,6 +327,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("revolut_pay") RevolutPay revolutPay; @@ -788,9 +799,10 @@ public static class Cashapp extends StripeObject {} public static class Ideal extends StripeObject { /** * The customer's bank. Can be one of {@code abn_amro}, {@code asn_bank}, {@code bunq}, {@code - * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code moneyou}, - * {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code revolut}, {@code - * sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code yoursafe}. + * buut}, {@code finom}, {@code handelsbanken}, {@code ing}, {@code knab}, {@code mollie}, + * {@code moneyou}, {@code n26}, {@code nn}, {@code rabobank}, {@code regiobank}, {@code + * revolut}, {@code sns_bank}, {@code triodos_bank}, {@code van_lanschot}, or {@code + * yoursafe}. */ @SerializedName("bank") String bank; @@ -800,8 +812,9 @@ public static class Ideal extends StripeObject { * *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code * BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code INGBNL2A}, {@code - * KNABNL2H}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code RABONL2U}, {@code - * RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or {@code TRIONL2U}. + * KNABNL2H}, {@code MLLENL2A}, {@code MOYONL21}, {@code NNBANL2G}, {@code NTSBDEB1}, {@code + * RABONL2U}, {@code RBRBNL21}, {@code REVOIE23}, {@code REVOLT21}, {@code SNSBNL2A}, or + * {@code TRIONL2U}. */ @SerializedName("bic") String bic; @@ -946,6 +959,15 @@ public static class NzBankAccount extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Paypal extends StripeObject {} + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject {} + /** * For more details about RevolutPay, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java index 1c077101075..fad324c5a15 100644 --- a/src/main/java/com/stripe/model/SetupIntent.java +++ b/src/main/java/com/stripe/model/SetupIntent.java @@ -26,7 +26,7 @@ * A SetupIntent guides you through the process of setting up and saving a customer's payment * credentials for future payments. For example, you can use a SetupIntent to set up and save your * customer's card without immediately collecting a payment. Later, you can use PaymentIntents to drive the payment flow. + * href="https://api.stripe.com#payment_intents">PaymentIntents to drive the payment flow. * *

Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't * maintain long-lived, unconfirmed SetupIntents because they might not be valid. The SetupIntent @@ -40,13 +40,11 @@ * be run through Strong Customer * Authentication during payment method collection to streamline later off-session payments. If you use the - * SetupIntent with a Customer, it automatically - * attaches the resulting payment method to that Customer after successful setup. We recommend using - * SetupIntents or setup_future_usage - * on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment - * methods. + * SetupIntent with a Customer, it + * automatically attaches the resulting payment method to that Customer after successful setup. We + * recommend using SetupIntents or setup_future_usage on + * PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. * *

By using SetupIntents, you can reduce friction for your customers, even as regulations change * over time. @@ -109,6 +107,15 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStore customer; + /** + * ID of the Account this SetupIntent belongs to, if one exists. + * + *

If present, the SetupIntent's payment method will be attached to the Account on successful + * setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + */ + @SerializedName("customer_account") + String customerAccount; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ @SerializedName("description") String description; @@ -157,7 +164,7 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStore mandate; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -199,7 +206,7 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStorepayment method + * href="https://docs.stripe.com/api/payment_method_configurations">payment method * configuration used for this Setup Intent. */ @SerializedName("payment_method_configuration_details") @@ -224,7 +231,7 @@ public class SetupIntent extends ApiResource implements HasId, MetadataStore singleUseMandate; /** - * Status of this + * Status of this * SetupIntent, one of {@code requires_payment_method}, {@code requires_confirmation}, {@code * requires_action}, {@code processing}, {@code canceled}, or {@code succeeded}. */ @@ -843,7 +850,7 @@ public static class AutomaticPaymentMethods extends StripeObject { * *

Redirect-based payment methods may require your customer to be redirected to a payment * method's app or site for authentication or additional steps. To confirm this SetupIntent, you + * href="https://docs.stripe.com/api/setup_intents/confirm">confirm this SetupIntent, you * may be required to provide a {@code return_url} to redirect customers back to your site after * they authenticate or complete the setup. * @@ -1035,6 +1042,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -1169,11 +1179,11 @@ public static class Card extends StripeObject { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. * @@ -1313,6 +1323,85 @@ public static class Paypal extends StripeObject { String billingAgreementId; } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Long amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + String endDate; + + /** + * The periodicity at which payments will be collected. Defaults to {@code adhoc}. + * + *

One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code + * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Long paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + * + *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage}, + * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code + * tax}, or {@code utility}. + */ + @SerializedName("purpose") + String purpose; + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + @SerializedName("start_date") + String startDate; + } + } + /** * For more details about SepaDebit, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/ShippingRate.java b/src/main/java/com/stripe/model/ShippingRate.java index 109b4ddb9e3..4615d03b48a 100644 --- a/src/main/java/com/stripe/model/ShippingRate.java +++ b/src/main/java/com/stripe/model/ShippingRate.java @@ -21,7 +21,7 @@ /** * Shipping rates describe the price of shipping presented to your customers and applied to a * purchase. For more information, see Charge for shipping. + * href="https://docs.stripe.com/payments/during-payment/charge-shipping">Charge for shipping. */ @Getter @Setter @@ -65,7 +65,7 @@ public class ShippingRate extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -89,7 +89,7 @@ public class ShippingRate extends ApiResource implements HasId, MetadataStoretax code ID. The Shipping tax code + * A tax code ID. The Shipping tax code * is {@code txcd_92010001}. */ @SerializedName("tax_code") diff --git a/src/main/java/com/stripe/model/Source.java b/src/main/java/com/stripe/model/Source.java index 9c38e470312..b8b7ca72baa 100644 --- a/src/main/java/com/stripe/model/Source.java +++ b/src/main/java/com/stripe/model/Source.java @@ -27,12 +27,12 @@ * object: once chargeable, they can be charged, or can be attached to customers. * *

Stripe doesn't recommend using the deprecated Sources API. We recommend that you adopt the PaymentMethods API. This newer API + * href="https://docs.stripe.com/api/sources">Sources API. We recommend that you adopt the PaymentMethods API. This newer API * provides access to our latest features and payment method types. * - *

Related guides: Sources API and Sources & Customers. + *

Related guides: Sources API and Sources & Customers. */ @Getter @Setter @@ -140,7 +140,7 @@ public class Source extends ApiResource implements MetadataStore, Paymen Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -211,7 +211,7 @@ public class Source extends ApiResource implements MetadataStore, Paymen * klarna}, {@code p24}, {@code sepa_debit}, {@code sofort}, {@code three_d_secure}, or {@code * wechat}. An additional hash is included on the source with a name matching this value. It * contains additional information specific to the payment method used. + * href="https://docs.stripe.com/sources">payment method used. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/SourceMandateNotification.java b/src/main/java/com/stripe/model/SourceMandateNotification.java index 92eda62925a..6a1c794cbb3 100644 --- a/src/main/java/com/stripe/model/SourceMandateNotification.java +++ b/src/main/java/com/stripe/model/SourceMandateNotification.java @@ -69,12 +69,12 @@ public class SourceMandateNotification extends StripeObject implements HasId { * object: once chargeable, they can be charged, or can be attached to customers. * *

Stripe doesn't recommend using the deprecated Sources API. We recommend that you adopt the PaymentMethods API. This newer API + * href="https://docs.stripe.com/api/sources">Sources API. We recommend that you adopt the PaymentMethods API. This newer API * provides access to our latest features and payment method types. * - *

Related guides: Sources API and Sources & Customers. + *

Related guides: Sources API and Sources & Customers. */ @SerializedName("source") Source source; diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index 1232c78dc62..fe99381b2d3 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -12,7 +12,7 @@ public class StripeError extends StripeObject { /** * For card errors resulting from a card issuer decline, a short string indicating how to proceed with an + * href="https://docs.stripe.com/declines#retrying-issuer-declines">how to proceed with an * error if they provide one. */ @SerializedName("advice_code") @@ -24,12 +24,13 @@ public class StripeError extends StripeObject { /** * For some errors that could be handled programmatically, a short string indicating the error code reported. + * href="https://docs.stripe.com/error-codes">error code reported. * *

One of {@code account_closed}, {@code account_country_invalid_address}, {@code * account_error_country_change_requires_additional_steps}, {@code account_information_mismatch}, - * {@code account_invalid}, {@code account_number_invalid}, {@code acss_debit_session_incomplete}, - * {@code alipay_upgrade_required}, {@code amount_too_large}, {@code amount_too_small}, {@code + * {@code account_invalid}, {@code account_number_invalid}, {@code + * account_token_required_for_v2_account}, {@code acss_debit_session_incomplete}, {@code + * alipay_upgrade_required}, {@code amount_too_large}, {@code amount_too_small}, {@code * api_key_expired}, {@code application_fees_not_allowed}, {@code authentication_required}, {@code * balance_insufficient}, {@code balance_invalid_parameter}, {@code * bank_account_bad_routing_numbers}, {@code bank_account_declined}, {@code bank_account_exists}, @@ -113,14 +114,14 @@ public class StripeError extends StripeObject { /** * For card errors resulting from a card issuer decline, a short string indicating the card issuer's reason for the + * href="https://docs.stripe.com/declines#issuer-declines">card issuer's reason for the * decline if they provide one. */ @SerializedName("decline_code") String declineCode; /** - * A URL to more information about the error + * A URL to more information about the error * code reported. */ @SerializedName("doc_url") @@ -161,11 +162,11 @@ public class StripeError extends StripeObject { * particular session. * *

A PaymentIntent transitions through multiple statuses - * throughout its lifetime as it interfaces with Stripe.js to perform authentication flows and - * ultimately creates at most one successful charge. + * href="https://stripe.com/payments/paymentintents/lifecycle">multiple statuses throughout + * its lifetime as it interfaces with Stripe.js to perform authentication flows and ultimately + * creates at most one successful charge. * - *

Related guide: Payment Intents + *

Related guide: Payment Intents * API */ @SerializedName("payment_intent") @@ -173,11 +174,11 @@ public class StripeError extends StripeObject { /** * PaymentMethod objects represent your customer's payment instruments. You can use them with PaymentIntents to collect payments + * href="https://docs.stripe.com/payments/payment-intents">PaymentIntents to collect payments * or save them to Customer objects to store instrument details for future payments. * - *

Related guides: Payment - * Methods and More Payment + *

Related guides: Payment + * Methods and More Payment * Scenarios. */ @SerializedName("payment_method") @@ -198,8 +199,7 @@ public class StripeError extends StripeObject { * A SetupIntent guides you through the process of setting up and saving a customer's payment * credentials for future payments. For example, you can use a SetupIntent to set up and save your * customer's card without immediately collecting a payment. Later, you can use PaymentIntents to drive the payment - * flow. + * href="https://api.stripe.com#payment_intents">PaymentIntents to drive the payment flow. * *

Create a SetupIntent when you're ready to collect your customer's payment credentials. Don't * maintain long-lived, unconfirmed SetupIntents because they might not be valid. The SetupIntent @@ -213,11 +213,10 @@ public class StripeError extends StripeObject { * to be run through Strong * Customer Authentication during payment method collection to streamline later off-session payments. If you use the - * SetupIntent with a Customer, it automatically - * attaches the resulting payment method to that Customer after successful setup. We recommend - * using SetupIntents or setup_future_usage + * SetupIntent with a Customer, + * it automatically attaches the resulting payment method to that Customer after successful setup. + * We recommend using SetupIntents or setup_future_usage * on PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment * methods. * diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index b3954dfac7b..0c11ec277b2 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -29,7 +29,7 @@ /** * Subscriptions allow you to charge a customer on a recurring basis. * - *

Related guide: Creating + *

Related guide: Creating * subscriptions */ @Getter @@ -55,7 +55,7 @@ public class Subscription extends ApiResource implements HasId, MetadataStorebilling cycle dates. It sets the + * href="https://docs.stripe.com/subscriptions/billing-cycle">billing cycle dates. It sets the * day of week for {@code week} intervals, the day of month for {@code month} and {@code year} * intervals, and the month of year for {@code year} intervals. The timestamp is in UTC format. */ @@ -129,6 +129,10 @@ public class Subscription extends ApiResource implements HasId, MetadataStore customer; + /** ID of the account representing the customer who owns the subscription. */ + @SerializedName("customer_account") + String customerAccount; + /** * Number of days a customer has to pay invoices generated by this subscription. This value will * be {@code null} for subscriptions where {@code collection_method=charge_automatically}. @@ -140,9 +144,9 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreinvoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ @SerializedName("default_payment_method") @Getter(lombok.AccessLevel.NONE) @@ -154,9 +158,9 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreinvoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ @SerializedName("default_source") @Getter(lombok.AccessLevel.NONE) @@ -216,7 +220,7 @@ public class Subscription extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -242,7 +246,7 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreConnect documentation for + * href="https://docs.stripe.com/connect/subscriptions#on-behalf-of">Connect documentation for * details. */ @SerializedName("on_behalf_of") @@ -253,7 +257,7 @@ public class Subscription extends ApiResource implements HasId, MetadataStorepausing + * about pausing * collection. */ @SerializedName("pause_collection") @@ -265,18 +269,18 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreCreate an invoice for the + * calling Create an invoice for the * given subscription at the specified interval. */ @SerializedName("pending_invoice_item_interval") PendingInvoiceItemInterval pendingInvoiceItemInterval; /** - * You can use this SetupIntent to collect + * You can use this SetupIntent to collect * user authentication when creating a subscription without immediate payment or updating a * subscription's payment method, allowing you to optimize for off-session payments. Learn more in * the SCA + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication#scenario-2">SCA * Migration Guide. */ @SerializedName("pending_setup_intent") @@ -285,7 +289,7 @@ public class Subscription extends ApiResource implements HasId, MetadataStore pendingSetupIntent; /** - * If specified, pending + * If specified, pending * updates that will be applied to the subscription once the {@code latest_invoice} has been * paid. */ @@ -320,11 +324,11 @@ public class Subscription extends ApiResource implements HasId, MetadataStoreA subscription can only enter a {@code paused} status when + * href="https://docs.stripe.com/billing/subscriptions/trials#create-free-trials-without-payment">when * a trial ends without a payment method. A {@code paused} subscription doesn't generate * invoices and can be resumed after your customer adds their payment method. The {@code paused} * status is different from pausing collection, + * href="https://docs.stripe.com/billing/subscriptions/pause-payment">pausing collection, * which still generates invoices and leaves the subscription's status unchanged. * *

If subscription {@code collection_method=charge_automatically}, it becomes {@code past_due} @@ -1691,6 +1695,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("konbini") Konbini konbini; + /** + * This sub-hash contains details about the PayTo payment method options to pass to invoices + * created by the subscription. + */ + @SerializedName("payto") + Payto payto; + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to invoices created by the subscription. @@ -1781,10 +1792,10 @@ public static class Card extends StripeObject { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. * @@ -1890,6 +1901,53 @@ public static class EuBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Konbini extends StripeObject {} + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + @SerializedName("amount") + Long amount; + + /** + * Only {@code maximum} is supported. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + * + *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code + * mortgage}, {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code + * salary}, {@code tax}, or {@code utility}. + */ + @SerializedName("purpose") + String purpose; + } + } + /** * For more details about SepaDebit, please refer to the API Reference. @@ -2027,7 +2085,7 @@ public static class PendingUpdate extends StripeObject { * Indicates if a plan's {@code trial_period_days} should be applied to the subscription. * Setting {@code trial_end} per subscription is preferred, and this defaults to {@code false}. * Setting this flag to {@code true} together with {@code trial_end} is not allowed. See Using trial periods on + * href="https://docs.stripe.com/billing/subscriptions/trials">Using trial periods on * subscriptions to learn more. */ @SerializedName("trial_from_plan") diff --git a/src/main/java/com/stripe/model/SubscriptionItem.java b/src/main/java/com/stripe/model/SubscriptionItem.java index 0314d07543a..a47c3eb42ca 100644 --- a/src/main/java/com/stripe/model/SubscriptionItem.java +++ b/src/main/java/com/stripe/model/SubscriptionItem.java @@ -66,7 +66,7 @@ public class SubscriptionItem extends ApiResource String id; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -84,48 +84,48 @@ public class SubscriptionItem extends ApiResource /** * You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is - * backwards compatible to simplify your migration. + * href="https://api.stripe.com#prices">Prices API. It replaces the Plans API and is backwards + * compatible to simplify your migration. * *

Plans define the base price, currency, and billing cycle for recurring purchases of - * products. Products help you track inventory - * or provisioning, and plans help you track pricing. Different physical goods or levels of - * service should be represented by products, and pricing options should be represented by plans. - * This approach lets you change prices without having to change your provisioning scheme. + * products. Products help you track inventory or + * provisioning, and plans help you track pricing. Different physical goods or levels of service + * should be represented by products, and pricing options should be represented by plans. This + * approach lets you change prices without having to change your provisioning scheme. * *

For example, you might have a single "gold" product that has plans for $10/month, * $100/year, €9/month, and €90/year. * *

Related guides: Set up a + * href="https://docs.stripe.com/billing/subscriptions/set-up-subscription">Set up a * subscription and more about products and prices. + * href="https://docs.stripe.com/products-prices/overview">products and prices. */ @SerializedName("plan") Plan plan; /** * Prices define the unit cost, currency, and (optional) billing cycle for both recurring and - * one-time purchases of products. Products - * help you track inventory or provisioning, and prices help you track payment terms. Different - * physical goods or levels of service should be represented by products, and pricing options - * should be represented by prices. This approach lets you change prices without having to change - * your provisioning scheme. + * one-time purchases of products. Products help you + * track inventory or provisioning, and prices help you track payment terms. Different physical + * goods or levels of service should be represented by products, and pricing options should be + * represented by prices. This approach lets you change prices without having to change your + * provisioning scheme. * *

For example, you might have a single "gold" product that has prices for $10/month, * $100/year, and €9 once. * *

Related guides: Set up a - * subscription, create an - * invoice, and more about products + * href="https://docs.stripe.com/billing/subscriptions/set-up-subscription">Set up a + * subscription, create an + * invoice, and more about products * and prices. */ @SerializedName("price") Price price; /** - * The quantity of the plan to + * The quantity of the plan to * which the customer should be subscribed. */ @SerializedName("quantity") diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java index 38dda20bb73..1c2d16086cb 100644 --- a/src/main/java/com/stripe/model/SubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java @@ -29,7 +29,7 @@ * predefining expected changes. * *

Related guide: Subscription + * href="https://docs.stripe.com/billing/subscriptions/subscription-schedules">Subscription * schedules */ @Getter @@ -77,6 +77,10 @@ public class SubscriptionSchedule extends ApiResource @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** ID of the account who owns the subscription schedule. */ + @SerializedName("customer_account") + String customerAccount; + @SerializedName("default_settings") DefaultSettings defaultSettings; @@ -104,7 +108,7 @@ public class SubscriptionSchedule extends ApiResource Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -138,7 +142,7 @@ public class SubscriptionSchedule extends ApiResource * The present status of the subscription schedule. Possible values are {@code not_started}, * {@code active}, {@code completed}, {@code released}, and {@code canceled}. You can read more * about the different states in our behavior guide. + * href="https://docs.stripe.com/billing/subscriptions/subscription-schedules">behavior guide. * *

One of {@code active}, {@code canceled}, {@code completed}, {@code not_started}, or {@code * released}. @@ -639,7 +643,7 @@ public static class DefaultSettings extends StripeObject { * billing cycle anchor of the subscription is set to the start of the phase when entering the * phase. If {@code automatic} then the billing cycle anchor is automatically modified as needed * when entering the phase. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. * *

One of {@code automatic}, or {@code phase_start}. */ @@ -1016,7 +1020,7 @@ public static class Phase extends StripeObject { * billing cycle anchor of the subscription is set to the start of the phase when entering the * phase. If {@code automatic} then the billing cycle anchor is automatically modified as needed * when entering the phase. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. * *

One of {@code automatic}, or {@code phase_start}. */ @@ -1097,7 +1101,7 @@ public static class Phase extends StripeObject { List items; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to a phase. Metadata on a schedule's phase will update the underlying subscription's {@code * metadata} when the phase is entered. Updating the underlying subscription's {@code metadata} * directly will not affect the current phase's {@code metadata}. @@ -1189,7 +1193,7 @@ public static class AddInvoiceItem extends StripeObject { List discounts; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. */ @@ -1695,7 +1699,7 @@ public static class Item extends StripeObject { List discounts; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an item. Metadata on this item will update the underlying subscription item's * {@code metadata} when the phase is entered. */ diff --git a/src/main/java/com/stripe/model/TaxId.java b/src/main/java/com/stripe/model/TaxId.java index 86649c7514e..ad63f053471 100644 --- a/src/main/java/com/stripe/model/TaxId.java +++ b/src/main/java/com/stripe/model/TaxId.java @@ -19,12 +19,12 @@ /** * You can add one or multiple tax IDs to a customer or account. Customer and account tax + * href="https://docs.stripe.com/api/customers">customer or account. Customer and account tax * IDs get displayed on related invoices and credit notes. * - *

Related guides: Customer tax + *

Related guides: Customer tax * identification numbers, Account tax IDs + * href="https://docs.stripe.com/invoicing/connect#account-tax-ids">Account tax IDs */ @Getter @Setter @@ -44,6 +44,10 @@ public class TaxId extends ApiResource implements HasId { @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** ID of the Account representing the customer. */ + @SerializedName("customer_account") + String customerAccount; + /** Always true for a deleted object. */ @SerializedName("deleted") Boolean deleted; @@ -305,6 +309,12 @@ public static class Owner extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** + * The Account representing the customer being referenced when {@code type} is {@code customer}. + */ + @SerializedName("customer_account") + String customerAccount; + /** * Type of owner referenced. * diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java index 88e2a3cde12..af094958079 100644 --- a/src/main/java/com/stripe/model/TaxRate.java +++ b/src/main/java/com/stripe/model/TaxRate.java @@ -115,7 +115,7 @@ public class TaxRate extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/Token.java b/src/main/java/com/stripe/model/Token.java index c1814270bcd..d603a09e5da 100644 --- a/src/main/java/com/stripe/model/Token.java +++ b/src/main/java/com/stripe/model/Token.java @@ -20,7 +20,7 @@ * Tokenization is the process Stripe uses to collect sensitive card or bank account details, or * personally identifiable information (PII), directly from your customers in a secure manner. A * token representing this information is returned to your server to use. Use our recommended payments integrations to perform this + * href="https://docs.stripe.com/payments">recommended payments integrations to perform this * process on the client-side. This guarantees that no sensitive card data touches your server, and * allows your integration to operate in a PCI-compliant way. * @@ -31,9 +31,9 @@ * Stripe, so we can't determine how it's handled or stored. * *

You can't store or use tokens more than once. To store card or bank account information for - * later use, create Customer objects or Customer objects or External accounts. Radar, our integrated solution for automatic fraud + * href="https://docs.stripe.com/radar">Radar, our integrated solution for automatic fraud * protection, performs best with integrations that use client-side tokenization. */ @Getter @@ -57,7 +57,7 @@ public class Token extends ApiResource implements HasId { * You can store multiple cards on a customer in order to charge the customer later. You can also * store multiple debit cards on a recipient in order to transfer to those cards later. * - *

Related guide: Card payments with + *

Related guide: Card payments with * Sources */ @SerializedName("card") diff --git a/src/main/java/com/stripe/model/Topup.java b/src/main/java/com/stripe/model/Topup.java index f2abec9ee08..8565206b87c 100644 --- a/src/main/java/com/stripe/model/Topup.java +++ b/src/main/java/com/stripe/model/Topup.java @@ -23,7 +23,7 @@ * To top up your Stripe balance, you create a top-up object. You can retrieve individual top-ups, * as well as list all top-ups. Top-ups are identified by a unique, random ID. * - *

Related guide: Topping up your platform + *

Related guide: Topping up your platform * account */ @Getter @@ -67,7 +67,7 @@ public class Topup extends ApiResource implements MetadataStore, BalanceT /** * Error code explaining reason for top-up failure if available (see the errors section for a list of codes). + * href="https://docs.stripe.com/api#errors">the errors section for a list of codes). */ @SerializedName("failure_code") String failureCode; @@ -89,7 +89,7 @@ public class Topup extends ApiResource implements MetadataStore, BalanceT Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/Transfer.java b/src/main/java/com/stripe/model/Transfer.java index 54707cfcd82..af66f5c27e9 100644 --- a/src/main/java/com/stripe/model/Transfer.java +++ b/src/main/java/com/stripe/model/Transfer.java @@ -24,12 +24,12 @@ * *

Before April 6, 2017, transfers also represented movement of funds from a Stripe account to a * card or bank account. This behavior has since been split out into a Payout object, with corresponding payout + * href="https://api.stripe.com#payout_object">Payout object, with corresponding payout * endpoints. For more information, read about the transfer/payout split. + * href="https://docs.stripe.com/transfer-payout-split">transfer/payout split. * *

Related guide: Creating separate charges + * href="https://docs.stripe.com/connect/separate-charges-and-transfers">Creating separate charges * and transfers */ @Getter @@ -97,7 +97,7 @@ public class Transfer extends ApiResource Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -142,7 +142,7 @@ public class Transfer extends ApiResource /** * A string that identifies this transaction as part of a group. See the Connect + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Connect * documentation for details. */ @SerializedName("transfer_group") diff --git a/src/main/java/com/stripe/model/TransferReversal.java b/src/main/java/com/stripe/model/TransferReversal.java index 4a1f80d230e..3bf0b89d5d4 100644 --- a/src/main/java/com/stripe/model/TransferReversal.java +++ b/src/main/java/com/stripe/model/TransferReversal.java @@ -16,7 +16,7 @@ import lombok.Setter; /** - * Stripe Connect platforms can reverse transfers made + * Stripe Connect platforms can reverse transfers made * to a connected account, either entirely or partially, and can also specify whether to refund any * related application fees. Transfer reversals add to the platform's balance and subtract from the * destination account's balance. @@ -24,11 +24,11 @@ *

Reversing a transfer that was made for a destination charge is allowed only * up to the amount of the charge. It is possible to reverse a transfer_group + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">transfer_group * transfer only if the destination account has enough balance to cover the reversal. * *

Related guide: Reverse + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#reverse-transfers">Reverse * transfers */ @Getter @@ -69,7 +69,7 @@ public class TransferReversal extends ApiResource String id; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/WebhookEndpoint.java b/src/main/java/com/stripe/model/WebhookEndpoint.java index 78e5535b174..71157bb11f3 100644 --- a/src/main/java/com/stripe/model/WebhookEndpoint.java +++ b/src/main/java/com/stripe/model/WebhookEndpoint.java @@ -72,7 +72,7 @@ public class WebhookEndpoint extends ApiResource implements HasId, MetadataStore Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/apps/Secret.java b/src/main/java/com/stripe/model/apps/Secret.java index b2c6d4619c8..66e91925646 100644 --- a/src/main/java/com/stripe/model/apps/Secret.java +++ b/src/main/java/com/stripe/model/apps/Secret.java @@ -35,7 +35,7 @@ * might have different permissions. * *

Related guide: Store data between page + * href="https://docs.stripe.com/stripe-apps/store-auth-data-custom-objects">Store data between page * reloads */ @Getter diff --git a/src/main/java/com/stripe/model/billing/Alert.java b/src/main/java/com/stripe/model/billing/Alert.java index ca48a95d463..437bee7c5a4 100644 --- a/src/main/java/com/stripe/model/billing/Alert.java +++ b/src/main/java/com/stripe/model/billing/Alert.java @@ -76,7 +76,7 @@ public class Alert extends ApiResource implements HasId { /** * Encapsulates configuration of the alert to monitor usage on a specific Billing Meter. + * href="https://docs.stripe.com/api/billing/meter">Billing Meter. */ @SerializedName("usage_threshold") UsageThreshold usageThreshold; diff --git a/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java b/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java index 304f355cb15..3a6ba11a814 100644 --- a/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java +++ b/src/main/java/com/stripe/model/billing/CreditBalanceSummary.java @@ -37,6 +37,10 @@ public class CreditBalanceSummary extends ApiResource { @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + /** The account the balance is for. */ + @SerializedName("customer_account") + String customerAccount; + /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. diff --git a/src/main/java/com/stripe/model/billing/CreditGrant.java b/src/main/java/com/stripe/model/billing/CreditGrant.java index 061b7e31d77..f7475e96231 100644 --- a/src/main/java/com/stripe/model/billing/CreditGrant.java +++ b/src/main/java/com/stripe/model/billing/CreditGrant.java @@ -64,6 +64,10 @@ public class CreditGrant extends ApiResource implements HasId, MetadataStore customer; + /** ID of the account representing the customer receiving the billing credits. */ + @SerializedName("customer_account") + String customerAccount; + /** The time when the billing credits become effective-when they're eligible for use. */ @SerializedName("effective_at") Long effectiveAt; @@ -85,7 +89,7 @@ public class CreditGrant extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/billing/MeterEvent.java b/src/main/java/com/stripe/model/billing/MeterEvent.java index bd6e5919402..548211f561f 100644 --- a/src/main/java/com/stripe/model/billing/MeterEvent.java +++ b/src/main/java/com/stripe/model/billing/MeterEvent.java @@ -54,7 +54,7 @@ public class MeterEvent extends ApiResource { * The payload of the event. This contains the fields corresponding to a meter's {@code * customer_mapping.event_payload_key} (default is {@code stripe_customer_id}) and {@code * value_settings.event_payload_key} (default is {@code value}). Read more about the payload. + * href="https://docs.stripe.com/billing/subscriptions/usage-based/meters/configure#meter-configuration-attributes">payload. */ @SerializedName("payload") Map payload; diff --git a/src/main/java/com/stripe/model/billingportal/Configuration.java b/src/main/java/com/stripe/model/billingportal/Configuration.java index 0b40cf7943f..39265c25e8a 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -53,7 +53,7 @@ public class Configuration extends ApiResource implements HasId, MetadataStoreoverriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden * when creating the session. */ @SerializedName("default_return_url") @@ -86,7 +86,7 @@ public class Configuration extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -434,6 +434,18 @@ public static class CancellationReason extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SubscriptionUpdate extends StripeObject { + /** + * Determines the value to use for the billing cycle anchor on subscription updates. Valid + * values are {@code now} or {@code unchanged}, and the default value is {@code unchanged}. + * Setting the value to {@code now} resets the subscription's billing cycle anchor to the + * current time (in UTC). For more information, see the billing cycle documentation. + * + *

One of {@code now}, or {@code unchanged}. + */ + @SerializedName("billing_cycle_anchor") + String billingCycleAnchor; + /** * The types of subscription updates that are supported for items listed in the {@code * products} attribute. When empty, subscriptions are not updateable. @@ -567,7 +579,7 @@ public static class LoginPage extends StripeObject { /** * A shareable URL to the hosted portal login page. Your customers will be able to log in with - * their email + * their email * and receive a link to their customer portal. */ @SerializedName("url") diff --git a/src/main/java/com/stripe/model/billingportal/Session.java b/src/main/java/com/stripe/model/billingportal/Session.java index 6b31d8e042e..3a9810f7b2e 100644 --- a/src/main/java/com/stripe/model/billingportal/Session.java +++ b/src/main/java/com/stripe/model/billingportal/Session.java @@ -51,9 +51,13 @@ public class Session extends ApiResource implements HasId { @SerializedName("customer") String customer; + /** The ID of the account for this session. */ + @SerializedName("customer_account") + String customerAccount; + /** * Information about a specific flow for the customer to go through. See the docs to learn more + * href="https://docs.stripe.com/customer-management/portal-deep-links">docs to learn more * about using customer portal deep links and flows. */ @SerializedName("flow") @@ -98,9 +102,9 @@ public class Session extends ApiResource implements HasId { * The account for which the session was created on behalf of. When specified, only subscriptions * and invoices with this {@code on_behalf_of} account appear in the portal. For more information, * see the docs. + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#settlement-merchant">docs. * Use the Accounts + * href="https://docs.stripe.com/api/accounts/object#account_object-settings-branding">Accounts * API to modify the {@code on_behalf_of} account's branding settings, which the portal * displays. */ @@ -331,7 +335,7 @@ public static class SubscriptionUpdateConfirm extends StripeObject { List discounts; /** - * The subscription item to be + * The subscription item to be * updated through this flow. Currently, only up to one may be specified and subscriptions * with multiple items are not updatable. */ @@ -369,7 +373,7 @@ public static class Discount extends StripeObject { public static class Item extends StripeObject implements HasId { /** * The ID of the subscription + * href="https://docs.stripe.com/api/subscriptions/object#subscription_object-items-data-id">subscription * item to be updated. */ @Getter(onMethod_ = {@Override}) @@ -379,14 +383,14 @@ public static class Item extends StripeObject implements HasId { /** * The price the customer should subscribe to through this flow. The price must also be * included in the configuration's {@code + * href="https://docs.stripe.com/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products">{@code * features.subscription_update.products}. */ @SerializedName("price") String price; /** - * Quantity for this item + * Quantity for this item * that the customer should subscribe to through this flow. */ @SerializedName("quantity") diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index 764aa836ffb..33e01ec581b 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -42,18 +42,18 @@ /** * A Checkout Session represents your customer's session as they pay for one-time purchases or - * subscriptions through Checkout or Payment Links. We recommend creating a + * subscriptions through Checkout or Payment Links. We recommend creating a * new Session each time your customer attempts to pay. * *

Once payment is successful, the Checkout Session will contain a reference to the Customer, and either the successful PaymentIntent or an active Subscription. + * href="https://docs.stripe.com/api/customers">Customer, and either the successful PaymentIntent or an active Subscription. * *

You can create a Checkout Session on your server and redirect to its URL to begin Checkout. * - *

Related guide: Checkout quickstart + *

Related guide: Checkout quickstart */ @Getter @Setter @@ -115,7 +115,7 @@ public class Session extends ApiResource implements HasId, MetadataStoreinitCheckout on your + * secret with initCheckout on your * front end. */ @SerializedName("client_secret") @@ -176,6 +176,10 @@ public class Session extends ApiResource implements HasId, MetadataStore customer; + /** The ID of the account for this Session. */ + @SerializedName("customer_account") + String customerAccount; + /** * Configure whether a Checkout Session creates a Customer when the Checkout Session completes. * @@ -258,7 +262,7 @@ public class Session extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -300,7 +304,7 @@ public class Session extends ApiResource implements HasId, MetadataStoreexpire the Checkout Session + * href="https://docs.stripe.com/api/checkout/sessions/expire">expire the Checkout Session * instead. */ @SerializedName("payment_intent") @@ -372,7 +376,7 @@ public class Session extends ApiResource implements HasId, MetadataStoreredirect + * href="https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form">redirect * behavior of embedded sessions. Defaults to {@code always}. * *

One of {@code always}, {@code if_required}, or {@code never}. @@ -398,7 +402,7 @@ public class Session extends ApiResource implements HasId, MetadataStoreexpire the Checkout Session + * href="https://docs.stripe.com/api/checkout/sessions/expire">expire the Checkout Session * instead. */ @SerializedName("setup_intent") @@ -437,7 +441,7 @@ public class Session extends ApiResource implements HasId, MetadataStoreSubscription for Checkout + * The ID of the Subscription for Checkout * Sessions in {@code subscription} mode. */ @SerializedName("subscription") @@ -470,7 +474,7 @@ public class Session extends ApiResource implements HasId, MetadataStoreCustom Domains, the URL + * href="https://docs.stripe.com/payments/checkout/custom-domains">Custom Domains, the URL * will use your subdomain. Otherwise, it’ll use {@code checkout.stripe.com.} This value is only * present when the session is active. */ @@ -1702,7 +1706,7 @@ public static class InvoiceData extends StripeObject { Issuer issuer; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. */ @@ -2060,6 +2064,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -2615,11 +2622,11 @@ public static class Card extends StripeObject { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. * @@ -3505,6 +3512,109 @@ public static class Paypal extends StripeObject { String setupFutureUsage; } + /** + * For more details about Payto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payto extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

One of {@code none}, or {@code off_session}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Long amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + * + *

One of {@code fixed}, or {@code maximum}. + */ + @SerializedName("amount_type") + String amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + String endDate; + + /** + * The periodicity at which payments will be collected. Defaults to {@code adhoc}. + * + *

One of {@code adhoc}, {@code annual}, {@code daily}, {@code fortnightly}, {@code + * monthly}, {@code quarterly}, {@code semi_annual}, or {@code weekly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Long paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + * + *

One of {@code dependant_support}, {@code government}, {@code loan}, {@code mortgage}, + * {@code other}, {@code pension}, {@code personal}, {@code retail}, {@code salary}, {@code + * tax}, or {@code utility}. + */ + @SerializedName("purpose") + String purpose; + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + @SerializedName("start_date") + String startDate; + } + } + /** * For more details about Pix, please refer to the API * Reference. @@ -4180,12 +4290,12 @@ public static class Discount extends StripeObject { /** * A discount represents the actual application of a coupon or promotion code. It contains - * information about when the discount began, when it will end, and what it is applied to. + * href="https://api.stripe.com#coupons">coupon or promotion code. It contains information + * about when the discount began, when it will end, and what it is applied to. * *

Related guide: Applying discounts to + * href="https://docs.stripe.com/billing/subscriptions/discounts">Applying discounts to * subscriptions */ @SerializedName("discount") diff --git a/src/main/java/com/stripe/model/climate/Order.java b/src/main/java/com/stripe/model/climate/Order.java index 0810b2d9b01..b96e8a38621 100644 --- a/src/main/java/com/stripe/model/climate/Order.java +++ b/src/main/java/com/stripe/model/climate/Order.java @@ -114,7 +114,7 @@ public class Order extends ApiResource implements HasId, MetadataStore { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java b/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java index cb052c1f088..c8a5182648e 100644 --- a/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java +++ b/src/main/java/com/stripe/model/entitlements/ActiveEntitlement.java @@ -24,7 +24,7 @@ @EqualsAndHashCode(callSuper = false) public class ActiveEntitlement extends ApiResource implements HasId { /** - * The Feature that the customer is + * The Feature that the customer is * entitled to. */ @SerializedName("feature") diff --git a/src/main/java/com/stripe/model/financialconnections/Account.java b/src/main/java/com/stripe/model/financialconnections/Account.java index 2dc8a84c762..a12b1e9c935 100644 --- a/src/main/java/com/stripe/model/financialconnections/Account.java +++ b/src/main/java/com/stripe/model/financialconnections/Account.java @@ -139,7 +139,7 @@ public class Account extends ApiResource implements HasId { /** * The PaymentMethod + * href="https://docs.stripe.com/api/payment_methods/object#payment_method_object-type">PaymentMethod * type(s) that can be created from this account. */ @SerializedName("supported_payment_method_types") @@ -516,7 +516,7 @@ public com.stripe.model.financialconnections.Account unsubscribe( @EqualsAndHashCode(callSuper = false) public static class AccountHolder extends StripeObject { /** - * The ID of the Stripe account this account belongs to. Should only be present if {@code + * The ID of the Stripe account that this account belongs to. Only available when {@code * account_holder.type} is {@code account}. */ @SerializedName("account") @@ -525,14 +525,17 @@ public static class AccountHolder extends StripeObject { ExpandableField account; /** - * ID of the Stripe customer this account belongs to. Present if and only if {@code - * account_holder.type} is {@code customer}. + * The ID for an Account representing a customer that this account belongs to. Only available + * when {@code account_holder.type} is {@code customer}. */ @SerializedName("customer") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + @SerializedName("customer_account") + String customerAccount; + /** * Type of account holder that this account belongs to. * diff --git a/src/main/java/com/stripe/model/financialconnections/Session.java b/src/main/java/com/stripe/model/financialconnections/Session.java index 70a4d58357d..b4499f42118 100644 --- a/src/main/java/com/stripe/model/financialconnections/Session.java +++ b/src/main/java/com/stripe/model/financialconnections/Session.java @@ -171,7 +171,7 @@ public static Session retrieve( @EqualsAndHashCode(callSuper = false) public static class AccountHolder extends StripeObject { /** - * The ID of the Stripe account this account belongs to. Should only be present if {@code + * The ID of the Stripe account that this account belongs to. Only available when {@code * account_holder.type} is {@code account}. */ @SerializedName("account") @@ -180,14 +180,17 @@ public static class AccountHolder extends StripeObject { ExpandableField account; /** - * ID of the Stripe customer this account belongs to. Present if and only if {@code - * account_holder.type} is {@code customer}. + * The ID for an Account representing a customer that this account belongs to. Only available + * when {@code account_holder.type} is {@code customer}. */ @SerializedName("customer") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField customer; + @SerializedName("customer_account") + String customerAccount; + /** * Type of account holder that this account belongs to. * diff --git a/src/main/java/com/stripe/model/forwarding/Request.java b/src/main/java/com/stripe/model/forwarding/Request.java index da156f4c7e6..383e5b894b3 100644 --- a/src/main/java/com/stripe/model/forwarding/Request.java +++ b/src/main/java/com/stripe/model/forwarding/Request.java @@ -60,7 +60,7 @@ public class Request extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/identity/VerificationReport.java b/src/main/java/com/stripe/model/identity/VerificationReport.java index e67fdcb1618..229981621fb 100644 --- a/src/main/java/com/stripe/model/identity/VerificationReport.java +++ b/src/main/java/com/stripe/model/identity/VerificationReport.java @@ -28,12 +28,12 @@ * *

Each VerificationReport contains a copy of any data collected by the user as well as reference * IDs which can be used to access collected images through the FileUpload API. To configure and create + * href="https://docs.stripe.com/api/files">FileUpload API. To configure and create * VerificationReports, use the VerificationSession API. + * href="https://docs.stripe.com/api/identity/verification_sessions">VerificationSession API. * *

Related guide: Accessing verification + * href="https://docs.stripe.com/identity/verification-sessions#results">Accessing verification * results. */ @Getter @@ -206,7 +206,7 @@ public static class Document extends StripeObject { ExpirationDate expirationDate; /** - * Array of File ids containing images for this + * Array of File ids containing images for this * document. */ @SerializedName("files") @@ -509,7 +509,7 @@ public static class Document extends StripeObject { /** * Collect an ID number and perform an ID number + * href="https://docs.stripe.com/identity/verification-checks?type=id-number">ID number * check with the document’s extracted name and date of birth. */ @SerializedName("require_id_number") @@ -524,9 +524,9 @@ public static class Document extends StripeObject { /** * Capture a face image and perform a selfie check + * href="https://docs.stripe.com/identity/verification-checks?type=selfie">selfie check * comparing a photo ID and a picture of your user’s face. Learn more. + * href="https://docs.stripe.com/identity/selfie">Learn more. */ @SerializedName("require_matching_selfie") Boolean requireMatchingSelfie; @@ -594,7 +594,7 @@ public static class Errors extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Selfie extends StripeObject { /** - * ID of the File holding the image of the + * ID of the File holding the image of the * identity document used in this check. */ @SerializedName("document") @@ -605,7 +605,7 @@ public static class Selfie extends StripeObject { Errors error; /** - * ID of the File holding the image of the + * ID of the File holding the image of the * selfie used in this check. */ @SerializedName("selfie") diff --git a/src/main/java/com/stripe/model/identity/VerificationSession.java b/src/main/java/com/stripe/model/identity/VerificationSession.java index fee00409fb5..c685348a47c 100644 --- a/src/main/java/com/stripe/model/identity/VerificationSession.java +++ b/src/main/java/com/stripe/model/identity/VerificationSession.java @@ -37,7 +37,7 @@ * lifetime as it progresses through the verification flow. The VerificationSession contains the * user's verified data after verification checks are complete. * - *

Related guide: The + *

Related guide: The * Verification Sessions API */ @Getter @@ -54,11 +54,11 @@ public class VerificationSession extends ApiResource /** * The short-lived client secret used by Stripe.js to show a verification modal inside your app. + * href="https://docs.stripe.com/js/identity/modal">show a verification modal inside your app. * This client secret expires after 24 hours and can only be used once. Don’t store it, log it, * embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS * enabled on any page that includes the client secret. Refer to our docs on passing the client + * href="https://docs.stripe.com/identity/verification-sessions#client-secret">passing the client * secret to the frontend to learn more. */ @SerializedName("client_secret") @@ -82,7 +82,7 @@ public class VerificationSession extends ApiResource /** * ID of the most recent VerificationReport. Learn more about + * href="https://docs.stripe.com/identity/verification-sessions#results">Learn more about * accessing detailed verification results. */ @SerializedName("last_verification_report") @@ -98,7 +98,7 @@ public class VerificationSession extends ApiResource Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -133,12 +133,16 @@ public class VerificationSession extends ApiResource @SerializedName("related_customer") String relatedCustomer; + /** The ID of the Account representing a customer. */ + @SerializedName("related_customer_account") + String relatedCustomerAccount; + @SerializedName("related_person") RelatedPerson relatedPerson; /** * Status of this VerificationSession. Learn more about the lifecycle of + * href="https://docs.stripe.com/identity/how-sessions-work">Learn more about the lifecycle of * sessions. * *

One of {@code canceled}, {@code processing}, {@code requires_input}, or {@code verified}. @@ -147,7 +151,7 @@ public class VerificationSession extends ApiResource String status; /** - * The type of verification + * The type of verification * check to be performed. * *

One of {@code document}, {@code id_number}, or {@code verification_flow}. @@ -159,7 +163,7 @@ public class VerificationSession extends ApiResource * The short-lived URL that you use to redirect a user to Stripe to submit their identity * information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, * send it in emails or expose it to anyone other than the user. Refer to our docs on verifying + * href="https://docs.stripe.com/identity/verify-identity-documents?platform=web&type=redirect">verifying * identity documents to learn how to redirect users to Stripe. */ @SerializedName("url") @@ -744,7 +748,7 @@ public static class Document extends StripeObject { /** * Collect an ID number and perform an ID number + * href="https://docs.stripe.com/identity/verification-checks?type=id-number">ID number * check with the document’s extracted name and date of birth. */ @SerializedName("require_id_number") @@ -759,9 +763,9 @@ public static class Document extends StripeObject { /** * Capture a face image and perform a selfie check + * href="https://docs.stripe.com/identity/verification-checks?type=selfie">selfie check * comparing a photo ID and a picture of your user’s face. Learn more. + * href="https://docs.stripe.com/identity/selfie">Learn more. */ @SerializedName("require_matching_selfie") Boolean requireMatchingSelfie; diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index d0caa8ab788..80c1efef7f7 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -34,12 +34,12 @@ import lombok.Setter; /** - * When an issued card is used to make a purchase, an + * When an issued card is used to make a purchase, an * Issuing {@code Authorization} object is created. Authorizations must be + * href="https://docs.stripe.com/issuing/purchases/authorizations">Authorizations must be * approved for the purchase to be completed successfully. * - *

Related guide: Issued card + *

Related guide: Issued card * authorizations */ @Getter @@ -58,7 +58,7 @@ public class Authorization extends ApiResource /** * Detailed breakdown of amount components. These amounts are denominated in {@code currency} and - * in the smallest currency unit. + * in the smallest currency unit. */ @SerializedName("amount_details") AmountDetails amountDetails; @@ -81,7 +81,7 @@ public class Authorization extends ApiResource List balanceTransactions; /** - * You can create physical or virtual cards that are + * You can create physical or virtual cards that are * issued to cardholders. */ @SerializedName("card") @@ -160,7 +160,7 @@ public class Authorization extends ApiResource MerchantData merchantData; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -206,7 +206,7 @@ public class Authorization extends ApiResource String status; /** - * Token object used for this + * Token object used for this * authorization. If a network token was not used for this authorization, this field will be null. */ @SerializedName("token") @@ -215,16 +215,16 @@ public class Authorization extends ApiResource ExpandableField token; /** - * List of transactions associated + * List of transactions associated * with this authorization. */ @SerializedName("transactions") List transactions; /** - * Treasury details related to this + * Treasury details related to this * authorization if it was created on a FinancialAccount. + * href="https://docs.stripe.com/api/treasury/financial_accounts">FinancialAccount. */ @SerializedName("treasury") Treasury treasury; @@ -877,7 +877,7 @@ public static class Fuel extends StripeObject { public static class MerchantData extends StripeObject { /** * A categorization of the seller's type of business. See our merchant categories guide for + * href="https://docs.stripe.com/issuing/merchant-categories">merchant categories guide for * a list of possible values. */ @SerializedName("category") @@ -967,8 +967,8 @@ public static class NetworkData extends StripeObject { public static class PendingRequest extends StripeObject { /** * The additional amount Stripe will hold if the authorization is approved, in the card's currency - * and in the smallest currency + * href="https://docs.stripe.com/api#issuing_authorization_object-pending-request-currency">currency + * and in the smallest currency * unit. */ @SerializedName("amount") @@ -976,7 +976,7 @@ public static class PendingRequest extends StripeObject { /** * Detailed breakdown of amount components. These amounts are denominated in {@code currency} - * and in the smallest currency + * and in the smallest currency * unit. */ @SerializedName("amount_details") @@ -992,7 +992,7 @@ public static class PendingRequest extends StripeObject { /** * If set {@code true}, you may provide amount + * href="https://docs.stripe.com/api/issuing/authorizations/approve#approve_issuing_authorization-amount">amount * to control how much to hold for the authorization. */ @SerializedName("is_amount_controllable") @@ -1000,7 +1000,7 @@ public static class PendingRequest extends StripeObject { /** * The amount the merchant is requesting to be authorized in the {@code merchant_currency}. The - * amount is in the smallest currency + * amount is in the smallest currency * unit. */ @SerializedName("merchant_amount") @@ -1045,7 +1045,7 @@ public static class AmountDetails extends StripeObject { public static class RequestHistory extends StripeObject { /** * The {@code pending_request.amount} at the time of the request, presented in your card's - * currency and in the smallest + * currency and in the smallest * currency unit. Stripe held this amount from your account to fund the authorization if the * request was approved. */ @@ -1054,7 +1054,7 @@ public static class RequestHistory extends StripeObject { /** * Detailed breakdown of amount components. These amounts are denominated in {@code currency} - * and in the smallest currency + * and in the smallest currency * unit. */ @SerializedName("amount_details") @@ -1089,7 +1089,7 @@ public static class RequestHistory extends StripeObject { /** * The {@code pending_request.merchant_amount} at the time of the request, presented in the * {@code merchant_currency} and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("merchant_amount") Long merchantAmount; @@ -1168,7 +1168,7 @@ public static class AmountDetails extends StripeObject { public static class Treasury extends StripeObject { /** * The array of ReceivedCredits associated + * href="https://docs.stripe.com/api/treasury/received_credits">ReceivedCredits associated * with this authorization */ @SerializedName("received_credits") @@ -1176,14 +1176,14 @@ public static class Treasury extends StripeObject { /** * The array of ReceivedDebits associated + * href="https://docs.stripe.com/api/treasury/received_debits">ReceivedDebits associated * with this authorization */ @SerializedName("received_debits") List receivedDebits; /** - * The Treasury Transaction + * The Treasury Transaction * associated with this authorization */ @SerializedName("transaction") diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index 2c21195a2df..0b4eca67064 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -30,7 +30,7 @@ import lombok.Setter; /** - * You can create physical or virtual cards that are + * You can create physical or virtual cards that are * issued to cardholders. */ @Getter @@ -51,10 +51,10 @@ public class Card extends ApiResource implements HasId, MetadataStore { /** * An Issuing {@code Cardholder} object represents an individual or business entity who is issued cards. + * href="https://docs.stripe.com/issuing">issued cards. * *

Related guide: How to + * href="https://docs.stripe.com/issuing/cards/virtual/issue-cards#create-cardholder">How to * create a cardholder */ @SerializedName("cardholder") @@ -75,9 +75,9 @@ public class Card extends ApiResource implements HasId, MetadataStore { /** * The card's CVC. For security reasons, this is only available for virtual cards, and will be * omitted unless you explicitly request it with the {@code expand} parameter. + * href="https://docs.stripe.com/api/expanding_objects">the {@code expand} parameter. * Additionally, it's only available via the "Retrieve a card" + * href="https://docs.stripe.com/api/issuing/cards/retrieve">"Retrieve a card" * endpoint, not via "List all cards" or any other endpoint. */ @SerializedName("cvc") @@ -119,7 +119,7 @@ public class Card extends ApiResource implements HasId, MetadataStore { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -130,9 +130,9 @@ public class Card extends ApiResource implements HasId, MetadataStore { /** * The full unredacted card number. For security reasons, this is only available for virtual * cards, and will be omitted unless you explicitly request it with the {@code expand} parameter. + * href="https://docs.stripe.com/api/expanding_objects">the {@code expand} parameter. * Additionally, it's only available via the "Retrieve a card" + * href="https://docs.stripe.com/api/issuing/cards/retrieve">"Retrieve a card" * endpoint, not via "List all cards" or any other endpoint. */ @SerializedName("number") @@ -591,7 +591,7 @@ public static class Customs extends StripeObject { public static class SpendingControls extends StripeObject { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to allow. All other categories will be blocked. Cannot be set with {@code * blocked_categories}. */ @@ -609,7 +609,7 @@ public static class SpendingControls extends StripeObject { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to decline. All other categories will be allowed. Cannot be set with {@code * allowed_categories}. */ @@ -649,14 +649,14 @@ public static class SpendingControls extends StripeObject { public static class SpendingLimit extends StripeObject { /** * Maximum amount allowed to spend per interval. This amount is in the card's currency and in - * the smallest currency unit. + * the smallest currency unit. */ @SerializedName("amount") Long amount; /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * this limit applies to. Omitting this field will apply the limit to all categories. */ @SerializedName("categories") diff --git a/src/main/java/com/stripe/model/issuing/Cardholder.java b/src/main/java/com/stripe/model/issuing/Cardholder.java index 3e0b8556aab..6c0c016ee23 100644 --- a/src/main/java/com/stripe/model/issuing/Cardholder.java +++ b/src/main/java/com/stripe/model/issuing/Cardholder.java @@ -27,10 +27,10 @@ /** * An Issuing {@code Cardholder} object represents an individual or business entity who is issued cards. + * href="https://docs.stripe.com/issuing">issued cards. * *

Related guide: How to create + * href="https://docs.stripe.com/issuing/cards/virtual/issue-cards#create-cardholder">How to create * a cardholder */ @Getter @@ -69,7 +69,7 @@ public class Cardholder extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -91,7 +91,7 @@ public class Cardholder extends ApiResource implements HasId, MetadataStore3D + * cards. See the 3D * Secure documentation for more details. */ @SerializedName("phone_number") @@ -100,7 +100,7 @@ public class Cardholder extends ApiResource implements HasId, MetadataStore3D Secure flow and one-time password + * href="https://docs.stripe.com/issuing/3d-secure">3D Secure flow and one-time password * messages sent to the cardholder. */ @SerializedName("preferred_locales") @@ -111,7 +111,7 @@ public class Cardholder extends ApiResource implements HasId, MetadataStoredocumentation for more + * href="https://docs.stripe.com/issuing/controls/spending-controls">documentation for more * details. */ @SerializedName("spending_controls") @@ -127,7 +127,7 @@ public class Cardholder extends ApiResource implements HasId, MetadataStoreChoose a cardholder type for + * href="https://docs.stripe.com/issuing/other/choose-cardholder">Choose a cardholder type for * more details. */ @SerializedName("type") @@ -444,9 +444,8 @@ public static class Verification extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Document extends StripeObject { /** - * The back of a document returned by a file upload with a {@code purpose} - * value of {@code identity_document}. + * The back of a document returned by a file + * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("back") @Getter(lombok.AccessLevel.NONE) @@ -454,9 +453,8 @@ public static class Document extends StripeObject { ExpandableField back; /** - * The front of a document returned by a file upload with a {@code purpose} - * value of {@code identity_document}. + * The front of a document returned by a file + * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("front") @Getter(lombok.AccessLevel.NONE) @@ -537,7 +535,7 @@ public static class Requirements extends StripeObject { public static class SpendingControls extends StripeObject { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to allow. All other categories will be blocked. Cannot be set with {@code * blocked_categories}. */ @@ -555,7 +553,7 @@ public static class SpendingControls extends StripeObject { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to decline. All other categories will be allowed. Cannot be set with {@code * allowed_categories}. */ @@ -588,14 +586,14 @@ public static class SpendingControls extends StripeObject { public static class SpendingLimit extends StripeObject { /** * Maximum amount allowed to spend per interval. This amount is in the card's currency and in - * the smallest currency unit. + * the smallest currency unit. */ @SerializedName("amount") Long amount; /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * this limit applies to. Omitting this field will apply the limit to all categories. */ @SerializedName("categories") diff --git a/src/main/java/com/stripe/model/issuing/Dispute.java b/src/main/java/com/stripe/model/issuing/Dispute.java index 6abb4b736cd..bc636afb9f9 100644 --- a/src/main/java/com/stripe/model/issuing/Dispute.java +++ b/src/main/java/com/stripe/model/issuing/Dispute.java @@ -27,10 +27,10 @@ import lombok.Setter; /** - * As a card issuer, you can dispute transactions that + * As a card issuer, you can dispute transactions that * the cardholder does not recognize, suspects to be fraudulent, or has other issues with. * - *

Related guide: Issuing + *

Related guide: Issuing * disputes */ @Getter @@ -40,7 +40,7 @@ public class Dispute extends ApiResource implements MetadataStore, BalanceTransactionSource { /** * Disputed amount in the card's currency and in the smallest currency unit. Usually the + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Usually the * amount of the {@code transaction}, but can differ (usually because of currency fluctuation). */ @SerializedName("amount") @@ -92,7 +92,7 @@ public class Dispute extends ApiResource String lossReason; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -124,7 +124,7 @@ public class Dispute extends ApiResource ExpandableField transaction; /** - * Treasury details related to this dispute if + * Treasury details related to this dispute if * it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ @SerializedName("treasury") @@ -1002,14 +1002,14 @@ public void setAdditionalDocumentationObject(File expandableObject) { @EqualsAndHashCode(callSuper = false) public static class Treasury extends StripeObject { /** - * The Treasury DebitReversal + * The Treasury DebitReversal * representing this Issuing dispute */ @SerializedName("debit_reversal") String debitReversal; /** - * The Treasury ReceivedDebit + * The Treasury ReceivedDebit * that is being disputed. */ @SerializedName("received_debit") diff --git a/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java b/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java index 4fcb050f743..ae1297192a1 100644 --- a/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java +++ b/src/main/java/com/stripe/model/issuing/PersonalizationDesign.java @@ -73,7 +73,7 @@ public class PersonalizationDesign extends ApiResource String lookupKey; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/issuing/Token.java b/src/main/java/com/stripe/model/issuing/Token.java index 4d9f4578230..6dee449d600 100644 --- a/src/main/java/com/stripe/model/issuing/Token.java +++ b/src/main/java/com/stripe/model/issuing/Token.java @@ -23,8 +23,8 @@ /** * An issuing token object is created when an issued card is added to a digital wallet. As a card issuer, you can view and manage these tokens + * href="https://docs.stripe.com/issuing">card issuer, you can view and manage these tokens * through Stripe. */ @Getter diff --git a/src/main/java/com/stripe/model/issuing/Transaction.java b/src/main/java/com/stripe/model/issuing/Transaction.java index ec801d27b9b..ea6cb2baff4 100644 --- a/src/main/java/com/stripe/model/issuing/Transaction.java +++ b/src/main/java/com/stripe/model/issuing/Transaction.java @@ -28,11 +28,11 @@ import lombok.Setter; /** - * Any use of an issued card that results in funds + * Any use of an issued card that results in funds * entering or leaving your Stripe account, such as a completed purchase or refund, is represented * by an Issuing {@code Transaction} object. * - *

Related guide: Issued card + *

Related guide: Issued card * transactions */ @Getter @@ -42,7 +42,7 @@ public class Transaction extends ApiResource implements MetadataStore, BalanceTransactionSource { /** * The transaction amount, which will be reflected in your balance. This amount is in your - * currency and in the smallest currency + * currency and in the smallest currency * unit. */ @SerializedName("amount") @@ -50,7 +50,7 @@ public class Transaction extends ApiResource /** * Detailed breakdown of amount components. These amounts are denominated in {@code currency} and - * in the smallest currency unit. + * in the smallest currency unit. */ @SerializedName("amount_details") AmountDetails amountDetails; @@ -62,7 +62,7 @@ public class Transaction extends ApiResource ExpandableField authorization; /** - * ID of the balance transaction + * ID of the balance transaction * associated with this transaction. */ @SerializedName("balance_transaction") @@ -113,7 +113,7 @@ public class Transaction extends ApiResource /** * The amount that the merchant will receive, denominated in {@code merchant_currency} and in the - * smallest currency unit. It will + * smallest currency unit. It will * be different from {@code amount} if the merchant is taking payment in a different currency. */ @SerializedName("merchant_amount") @@ -127,7 +127,7 @@ public class Transaction extends ApiResource MerchantData merchantData; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -152,7 +152,7 @@ public class Transaction extends ApiResource PurchaseDetails purchaseDetails; /** - * Token object used for this + * Token object used for this * transaction. If a network token was not used for this transaction, this field will be null. */ @SerializedName("token") @@ -161,7 +161,7 @@ public class Transaction extends ApiResource ExpandableField token; /** - * Treasury details related to this transaction + * Treasury details related to this transaction * if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ @SerializedName("treasury") @@ -454,7 +454,7 @@ public static class AmountDetails extends StripeObject { public static class MerchantData extends StripeObject { /** * A categorization of the seller's type of business. See our merchant categories guide for + * href="https://docs.stripe.com/issuing/merchant-categories">merchant categories guide for * a list of possible values. */ @SerializedName("category") @@ -872,14 +872,14 @@ public static class Receipt extends StripeObject { public static class Treasury extends StripeObject { /** * The Treasury ReceivedCredit representing + * href="https://docs.stripe.com/api/treasury/received_credits">ReceivedCredit representing * this Issuing transaction if it is a refund */ @SerializedName("received_credit") String receivedCredit; /** - * The Treasury ReceivedDebit + * The Treasury ReceivedDebit * representing this Issuing transaction if it is a capture */ @SerializedName("received_debit") diff --git a/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java b/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java index e86ccf34326..1ab2f5c3742 100644 --- a/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java +++ b/src/main/java/com/stripe/model/radar/EarlyFraudWarning.java @@ -24,7 +24,7 @@ * An early fraud warning indicates that the card issuer has notified us that a charge may be * fraudulent. * - *

Related guide: Early + *

Related guide: Early * fraud warnings */ @Getter diff --git a/src/main/java/com/stripe/model/radar/ValueList.java b/src/main/java/com/stripe/model/radar/ValueList.java index 88a9eb36714..cc1ad900b1c 100644 --- a/src/main/java/com/stripe/model/radar/ValueList.java +++ b/src/main/java/com/stripe/model/radar/ValueList.java @@ -23,7 +23,7 @@ /** * Value lists allow you to group values together which can then be referenced in rules. * - *

Related guide: Default + *

Related guide: Default * Stripe lists */ @Getter @@ -71,7 +71,7 @@ public class ValueList extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/radar/ValueListItem.java b/src/main/java/com/stripe/model/radar/ValueListItem.java index ed9809d4710..e86648905cd 100644 --- a/src/main/java/com/stripe/model/radar/ValueListItem.java +++ b/src/main/java/com/stripe/model/radar/ValueListItem.java @@ -21,7 +21,7 @@ * Value list items allow you to add specific values to a given Radar value list, which can then be * used in rules. * - *

Related guide: Managing list + *

Related guide: Managing list * items */ @Getter diff --git a/src/main/java/com/stripe/model/reporting/ReportRun.java b/src/main/java/com/stripe/model/reporting/ReportRun.java index 171e05aed23..685b732a084 100644 --- a/src/main/java/com/stripe/model/reporting/ReportRun.java +++ b/src/main/java/com/stripe/model/reporting/ReportRun.java @@ -25,12 +25,12 @@ * The Report Run object represents an instance of a report type generated with specific run * parameters. Once the object is created, Stripe begins processing the report. When the report has * finished running, it will give you a reference to a file where you can retrieve your results. For - * an overview, see API Access to + * an overview, see API Access to * Reports. * *

Note that certain report types can only be run based on your live-mode data (not test-mode * data), and will error when queried without a live-mode API key. + * href="https://docs.stripe.com/keys#test-live-modes">live-mode API key. */ @Getter @Setter @@ -71,7 +71,7 @@ public class ReportRun extends ApiResource implements HasId { Parameters parameters; /** - * The ID of the report type to run, + * The ID of the report type to run, * such as {@code "balance.summary.1"}. */ @SerializedName("report_type") diff --git a/src/main/java/com/stripe/model/reporting/ReportType.java b/src/main/java/com/stripe/model/reporting/ReportType.java index 7990371fc98..37cc6dabf2b 100644 --- a/src/main/java/com/stripe/model/reporting/ReportType.java +++ b/src/main/java/com/stripe/model/reporting/ReportType.java @@ -21,12 +21,12 @@ * The Report Type resource corresponds to a particular type of report, such as the "Activity * summary" or "Itemized payouts" reports. These objects are identified by an ID * belonging to a set of enumerated values. See API Access to Reports documentation + * href="https://docs.stripe.com/reporting/statements/api">API Access to Reports documentation * for those Report Type IDs, along with required and optional parameters. * *

Note that certain report types can only be run based on your live-mode data (not test-mode * data), and will error when queried without a live-mode API key. + * href="https://docs.stripe.com/keys#test-live-modes">live-mode API key. */ @Getter @Setter @@ -54,7 +54,7 @@ public class ReportType extends ApiResource implements HasId { List defaultColumns; /** - * The ID of the + * The ID of the * Report Type, such as {@code balance.summary.1}. */ @Getter(onMethod_ = {@Override}) diff --git a/src/main/java/com/stripe/model/sigma/ScheduledQueryRun.java b/src/main/java/com/stripe/model/sigma/ScheduledQueryRun.java index a1ca52cdbd0..8267280140f 100644 --- a/src/main/java/com/stripe/model/sigma/ScheduledQueryRun.java +++ b/src/main/java/com/stripe/model/sigma/ScheduledQueryRun.java @@ -20,7 +20,7 @@ import lombok.Setter; /** - * If you have scheduled a Sigma + * If you have scheduled a Sigma * query, you'll receive a {@code sigma.scheduled_query_run.created} webhook each time the query * runs. The webhook contains a {@code ScheduledQueryRun} object, which you can use to retrieve the * query results. diff --git a/src/main/java/com/stripe/model/tax/Association.java b/src/main/java/com/stripe/model/tax/Association.java index ec28d2b0d1b..09d9454ff42 100644 --- a/src/main/java/com/stripe/model/tax/Association.java +++ b/src/main/java/com/stripe/model/tax/Association.java @@ -26,7 +26,7 @@ @EqualsAndHashCode(callSuper = false) public class Association extends ApiResource implements HasId { /** - * The Tax Calculation that was + * The Tax Calculation that was * included in PaymentIntent. */ @SerializedName("calculation") @@ -46,7 +46,7 @@ public class Association extends ApiResource implements HasId { String object; /** - * The PaymentIntent that this + * The PaymentIntent that this * Tax Association is tracking. */ @SerializedName("payment_intent") @@ -120,7 +120,7 @@ public static class TaxTransactionAttempt extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Committed extends StripeObject { - /** The Tax Transaction. */ + /** The Tax Transaction. */ @SerializedName("transaction") String transaction; } diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 239ee21ba6d..4f2a4219eb2 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -23,7 +23,7 @@ /** * A Tax Calculation allows you to calculate the tax to collect from your customer. * - *

Related guide: Calculate tax in your custom + *

Related guide: Calculate tax in your custom * payment flow */ @Getter @@ -32,7 +32,7 @@ public class Calculation extends ApiResource implements HasId { /** * Total amount after taxes in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount_total") Long amountTotal; @@ -45,7 +45,7 @@ public class Calculation extends ApiResource implements HasId { String currency; /** - * The ID of an existing Customer used + * The ID of an existing Customer used * for the resource. */ @SerializedName("customer") @@ -410,7 +410,7 @@ public static class Address extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class ShippingCost extends StripeObject { /** - * The shipping amount in the smallest + * The shipping amount in the smallest * currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes. * Otherwise, taxes were calculated on top of this amount. */ @@ -419,14 +419,14 @@ public static class ShippingCost extends StripeObject { /** * The amount of tax calculated for shipping, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount_tax") Long amountTax; /** * The ID of an existing ShippingRate. + * href="https://docs.stripe.com/api/shipping_rates/object">ShippingRate. */ @SerializedName("shipping_rate") String shippingRate; @@ -445,7 +445,7 @@ public static class ShippingCost extends StripeObject { List taxBreakdown; /** - * The tax code ID used for shipping. + * The tax code ID used for shipping. */ @SerializedName("tax_code") String taxCode; @@ -460,7 +460,7 @@ public static class ShippingCost extends StripeObject { public static class TaxBreakdown extends StripeObject { /** * The amount of tax, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount") Long amount; @@ -499,7 +499,7 @@ public static class TaxBreakdown extends StripeObject { /** * The amount on which tax is calculated, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("taxable_amount") Long taxableAmount; @@ -585,7 +585,7 @@ public static class TaxRateDetails extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class TaxBreakdown extends StripeObject { /** - * The amount of tax, in the smallest + * The amount of tax, in the smallest * currency unit. */ @SerializedName("amount") @@ -613,7 +613,7 @@ public static class TaxBreakdown extends StripeObject { /** * The amount on which tax is calculated, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("taxable_amount") Long taxableAmount; @@ -656,7 +656,10 @@ public static class TaxRateDetails extends StripeObject { @SerializedName("rate_type") String rateType; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; diff --git a/src/main/java/com/stripe/model/tax/CalculationLineItem.java b/src/main/java/com/stripe/model/tax/CalculationLineItem.java index 157223e51d5..fc64b94fa46 100644 --- a/src/main/java/com/stripe/model/tax/CalculationLineItem.java +++ b/src/main/java/com/stripe/model/tax/CalculationLineItem.java @@ -15,7 +15,7 @@ @EqualsAndHashCode(callSuper = false) public class CalculationLineItem extends StripeObject implements HasId { /** - * The line item amount in the smallest + * The line item amount in the smallest * currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes. * Otherwise, taxes were calculated on top of this amount. */ @@ -24,7 +24,7 @@ public class CalculationLineItem extends StripeObject implements HasId { /** * The amount of tax calculated for this line item, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount_tax") Long amountTax; @@ -42,7 +42,7 @@ public class CalculationLineItem extends StripeObject implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -57,7 +57,7 @@ public class CalculationLineItem extends StripeObject implements HasId { @SerializedName("object") String object; - /** The ID of an existing Product. */ + /** The ID of an existing Product. */ @SerializedName("product") String product; @@ -85,7 +85,7 @@ public class CalculationLineItem extends StripeObject implements HasId { List taxBreakdown; /** - * The tax code ID used for this + * The tax code ID used for this * resource. */ @SerializedName("tax_code") @@ -100,7 +100,7 @@ public class CalculationLineItem extends StripeObject implements HasId { @EqualsAndHashCode(callSuper = false) public static class TaxBreakdown extends StripeObject { /** - * The amount of tax, in the smallest + * The amount of tax, in the smallest * currency unit. */ @SerializedName("amount") @@ -140,7 +140,7 @@ public static class TaxBreakdown extends StripeObject { /** * The amount on which tax is calculated, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("taxable_amount") Long taxableAmount; diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java index 0e5aa4d4ea7..79c3c4fcfd2 100644 --- a/src/main/java/com/stripe/model/tax/Registration.java +++ b/src/main/java/com/stripe/model/tax/Registration.java @@ -23,14 +23,14 @@ /** * A Tax {@code Registration} lets us know that your business is registered to collect tax on - * payments within a region, enabling you to automatically + * payments within a region, enabling you to automatically * collect tax. * *

Stripe doesn't register on your behalf with the relevant authorities when you create a Tax * {@code Registration} object. For more information on how to register to collect tax, see our guide. + * href="https://docs.stripe.com/tax/registering">our guide. * - *

Related guide: Using the Registrations + *

Related guide: Using the Registrations * API */ @Getter diff --git a/src/main/java/com/stripe/model/tax/Settings.java b/src/main/java/com/stripe/model/tax/Settings.java index d26e2cb6c60..49b8a683e4d 100644 --- a/src/main/java/com/stripe/model/tax/Settings.java +++ b/src/main/java/com/stripe/model/tax/Settings.java @@ -22,7 +22,7 @@ /** * You can use Tax {@code Settings} to manage configurations used by Stripe Tax calculations. * - *

Related guide: Using the Settings API + *

Related guide: Using the Settings API */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index f67b062766f..adb88509e17 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -24,7 +24,7 @@ /** * A Tax Transaction records the tax collected from or refunded to your customer. * - *

Related guide: Calculate tax in + *

Related guide: Calculate tax in * your custom payment flow */ @Getter @@ -43,7 +43,7 @@ public class Transaction extends ApiResource implements HasId { String currency; /** - * The ID of an existing Customer used + * The ID of an existing Customer used * for the resource. */ @SerializedName("customer") @@ -69,7 +69,7 @@ public class Transaction extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -468,7 +468,7 @@ public static class Address extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class ShippingCost extends StripeObject { /** - * The shipping amount in the smallest + * The shipping amount in the smallest * currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes. * Otherwise, taxes were calculated on top of this amount. */ @@ -477,14 +477,14 @@ public static class ShippingCost extends StripeObject { /** * The amount of tax calculated for shipping, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount_tax") Long amountTax; /** * The ID of an existing ShippingRate. + * href="https://docs.stripe.com/api/shipping_rates/object">ShippingRate. */ @SerializedName("shipping_rate") String shippingRate; @@ -506,7 +506,7 @@ public static class ShippingCost extends StripeObject { List taxBreakdown; /** - * The tax code ID used for shipping. + * The tax code ID used for shipping. */ @SerializedName("tax_code") String taxCode; @@ -521,7 +521,7 @@ public static class ShippingCost extends StripeObject { public static class TaxBreakdown extends StripeObject { /** * The amount of tax, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount") Long amount; @@ -560,7 +560,7 @@ public static class TaxBreakdown extends StripeObject { /** * The amount on which tax is calculated, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("taxable_amount") Long taxableAmount; diff --git a/src/main/java/com/stripe/model/tax/TransactionLineItem.java b/src/main/java/com/stripe/model/tax/TransactionLineItem.java index a3f2fd08600..a6fb325ff88 100644 --- a/src/main/java/com/stripe/model/tax/TransactionLineItem.java +++ b/src/main/java/com/stripe/model/tax/TransactionLineItem.java @@ -14,7 +14,7 @@ @EqualsAndHashCode(callSuper = false) public class TransactionLineItem extends StripeObject implements HasId { /** - * The line item amount in the smallest + * The line item amount in the smallest * currency unit. If {@code tax_behavior=inclusive}, then this amount includes taxes. * Otherwise, taxes were calculated on top of this amount. */ @@ -23,7 +23,7 @@ public class TransactionLineItem extends StripeObject implements HasId { /** * The amount of tax calculated for this line item, in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount_tax") Long amountTax; @@ -41,7 +41,7 @@ public class TransactionLineItem extends StripeObject implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -56,7 +56,7 @@ public class TransactionLineItem extends StripeObject implements HasId { @SerializedName("object") String object; - /** The ID of an existing Product. */ + /** The ID of an existing Product. */ @SerializedName("product") String product; @@ -84,7 +84,7 @@ public class TransactionLineItem extends StripeObject implements HasId { String taxBehavior; /** - * The tax code ID used for this + * The tax code ID used for this * resource. */ @SerializedName("tax_code") diff --git a/src/main/java/com/stripe/model/terminal/ConnectionToken.java b/src/main/java/com/stripe/model/terminal/ConnectionToken.java index 9b913e8c018..456aacda17d 100644 --- a/src/main/java/com/stripe/model/terminal/ConnectionToken.java +++ b/src/main/java/com/stripe/model/terminal/ConnectionToken.java @@ -17,7 +17,7 @@ /** * A Connection Token is used by the Stripe Terminal SDK to connect to a reader. * - *

Related guide: Fleet management + *

Related guide: Fleet management */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/terminal/Location.java b/src/main/java/com/stripe/model/terminal/Location.java index 95871681b0e..d8e2ec39dd6 100644 --- a/src/main/java/com/stripe/model/terminal/Location.java +++ b/src/main/java/com/stripe/model/terminal/Location.java @@ -25,7 +25,7 @@ /** * A Location represents a grouping of readers. * - *

Related guide: Fleet management + *

Related guide: Fleet management */ @Getter @Setter @@ -73,7 +73,7 @@ public class Location extends ApiResource implements HasId, MetadataStorekey-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java index 0d68b8073b6..cbde67396b5 100644 --- a/src/main/java/com/stripe/model/terminal/Reader.java +++ b/src/main/java/com/stripe/model/terminal/Reader.java @@ -42,7 +42,7 @@ /** * A Reader represents a physical device for accepting payment details. * - *

Related guide: Connecting + *

Related guide: Connecting * to a reader */ @Getter @@ -84,7 +84,11 @@ public class Reader extends ApiResource implements HasId, MetadataStore @SerializedName("label") String label; - /** The last time this reader reported to Stripe backend. */ + /** + * The last time this reader reported to Stripe backend. Timestamp is measured in milliseconds + * since the Unix epoch. Unlike most other Stripe timestamp fields which use seconds, this field + * uses milliseconds. + */ @SerializedName("last_seen_at") Long lastSeenAt; @@ -102,7 +106,7 @@ public class Reader extends ApiResource implements HasId, MetadataStore ExpandableField location; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -866,7 +870,7 @@ public static class CollectInputs extends StripeObject { List inputs; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. */ @@ -1078,11 +1082,11 @@ public static class CollectPaymentMethod extends StripeObject { /** * PaymentMethod objects represent your customer's payment instruments. You can use them with - * PaymentIntents to collect + * PaymentIntents to collect * payments or save them to Customer objects to store instrument details for future payments. * - *

Related guides: Payment - * Methods and More + *

Related guides: Payment + * Methods and More * Payment Scenarios. */ @SerializedName("payment_method") @@ -1331,7 +1335,7 @@ public static class RefundPayment extends StripeObject { ExpandableField charge; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. */ @@ -1484,14 +1488,14 @@ public static class Cart extends StripeObject { /** * Tax amount for the entire cart. A positive integer in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("tax") Long tax; /** * Total amount for the entire cart, including tax. A positive integer in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("total") Long total; @@ -1503,7 +1507,7 @@ public static class Cart extends StripeObject { public static class LineItem extends StripeObject { /** * The amount of the line item. A positive integer in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount") Long amount; diff --git a/src/main/java/com/stripe/model/treasury/CreditReversal.java b/src/main/java/com/stripe/model/treasury/CreditReversal.java index 7b56f72ce96..2ce933d3fc0 100644 --- a/src/main/java/com/stripe/model/treasury/CreditReversal.java +++ b/src/main/java/com/stripe/model/treasury/CreditReversal.java @@ -21,7 +21,7 @@ import lombok.Setter; /** - * You can reverse some ReceivedCredits + * You can reverse some ReceivedCredits * depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a * new object known as a CreditReversal. */ @@ -49,7 +49,7 @@ public class CreditReversal extends ApiResource implements HasId { String financialAccount; /** - * A hosted + * A hosted * transaction receipt URL that is provided when money movement is considered regulated under * Stripe's money transmission licenses. */ @@ -69,7 +69,7 @@ public class CreditReversal extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/treasury/DebitReversal.java b/src/main/java/com/stripe/model/treasury/DebitReversal.java index 0a819f8bed5..f8792d561d6 100644 --- a/src/main/java/com/stripe/model/treasury/DebitReversal.java +++ b/src/main/java/com/stripe/model/treasury/DebitReversal.java @@ -21,7 +21,7 @@ import lombok.Setter; /** - * You can reverse some ReceivedDebits + * You can reverse some ReceivedDebits * depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a * new object known as a DebitReversal. */ @@ -49,7 +49,7 @@ public class DebitReversal extends ApiResource implements HasId { String financialAccount; /** - * A hosted + * A hosted * transaction receipt URL that is provided when money movement is considered regulated under * Stripe's money transmission licenses. */ @@ -73,7 +73,7 @@ public class DebitReversal extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/treasury/FinancialAccount.java b/src/main/java/com/stripe/model/treasury/FinancialAccount.java index f7ef3f9d489..b807084b69b 100644 --- a/src/main/java/com/stripe/model/treasury/FinancialAccount.java +++ b/src/main/java/com/stripe/model/treasury/FinancialAccount.java @@ -82,7 +82,7 @@ public class FinancialAccount extends ApiResource Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ diff --git a/src/main/java/com/stripe/model/treasury/InboundTransfer.java b/src/main/java/com/stripe/model/treasury/InboundTransfer.java index 21a29cb2470..12823ff7cf0 100644 --- a/src/main/java/com/stripe/model/treasury/InboundTransfer.java +++ b/src/main/java/com/stripe/model/treasury/InboundTransfer.java @@ -29,9 +29,8 @@ /** * Use InboundTransfers - * to add funds to your FinancialAccount via a PaymentMethod - * that is owned by you. The funds will be transferred via an ACH debit. + * to add funds to your FinancialAccount via + * a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. * *

Related guide: Moving @@ -73,7 +72,7 @@ public class InboundTransfer extends ApiResource implements HasId { String financialAccount; /** - * A hosted + * A hosted * transaction receipt URL that is provided when money movement is considered regulated under * Stripe's money transmission licenses. */ @@ -96,7 +95,7 @@ public class InboundTransfer extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -449,7 +448,7 @@ public static class UsBankAccount extends StripeObject { /** * The network rails used. See the docs to learn more + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more * about money movement timelines for each network type. * *

Equal to {@code ach}. diff --git a/src/main/java/com/stripe/model/treasury/OutboundPayment.java b/src/main/java/com/stripe/model/treasury/OutboundPayment.java index 1200a735a4a..f70ee34eda2 100644 --- a/src/main/java/com/stripe/model/treasury/OutboundPayment.java +++ b/src/main/java/com/stripe/model/treasury/OutboundPayment.java @@ -31,9 +31,9 @@ * Use OutboundPayments * to send funds to another party's external bank account or FinancialAccount. To send money to an + * href="https://api.stripe.com#financial_accounts">FinancialAccount. To send money to an * account belonging to the same user, use an OutboundTransfer. + * href="https://api.stripe.com#outbound_transfers">OutboundTransfer. * *

Simulate OutboundPayment state changes with the {@code * /v1/test_helpers/treasury/outbound_payments} endpoints. These methods can only be called on test @@ -67,7 +67,7 @@ public class OutboundPayment extends ApiResource implements HasId { String currency; /** - * ID of the customer to whom an + * ID of the customer to whom an * OutboundPayment is sent. */ @SerializedName("customer") @@ -101,7 +101,7 @@ public class OutboundPayment extends ApiResource implements HasId { String financialAccount; /** - * A hosted + * A hosted * transaction receipt URL that is provided when money movement is considered regulated under * Stripe's money transmission licenses. */ @@ -121,7 +121,7 @@ public class OutboundPayment extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -470,7 +470,7 @@ public static class UsBankAccount extends StripeObject { /** * The network rails used. See the docs to learn more + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more * about money movement timelines for each network type. * *

One of {@code ach}, or {@code us_domestic_wire}. diff --git a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java index a40719ffb18..5f6ba73877b 100644 --- a/src/main/java/com/stripe/model/treasury/OutboundTransfer.java +++ b/src/main/java/com/stripe/model/treasury/OutboundTransfer.java @@ -30,11 +30,10 @@ /** * Use OutboundTransfers - * to transfer funds from a FinancialAccount to a PaymentMethod - * belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can send - * funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * to transfer funds from a FinancialAccount + * to a PaymentMethod belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can send funds + * over ACH rails or through a domestic wire transfer to a user's own external bank account. * *

Simulate OutboundTransfer state changes with the {@code * /v1/test_helpers/treasury/outbound_transfers} endpoints. These methods can only be called on test @@ -87,7 +86,7 @@ public class OutboundTransfer extends ApiResource implements HasId { String financialAccount; /** - * A hosted + * A hosted * transaction receipt URL that is provided when money movement is considered regulated under * Stripe's money transmission licenses. */ @@ -107,7 +106,7 @@ public class OutboundTransfer extends ApiResource implements HasId { Boolean livemode; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -460,7 +459,7 @@ public static class UsBankAccount extends StripeObject { /** * The network rails used. See the docs to learn more + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more * about money movement timelines for each network type. * *

One of {@code ach}, or {@code us_domestic_wire}. diff --git a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java index b924b699d35..d7b6134a579 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedCredit.java @@ -24,8 +24,8 @@ /** * ReceivedCredits represent funds sent to a FinancialAccount (for example, via ACH - * or wire). These money movements are not initiated from the FinancialAccount. + * href="https://api.stripe.com#financial_accounts">FinancialAccount (for example, via ACH or + * wire). These money movements are not initiated from the FinancialAccount. */ @Getter @Setter @@ -65,7 +65,7 @@ public class ReceivedCredit extends ApiResource implements HasId { String financialAccount; /** - * A hosted + * A hosted * transaction receipt URL that is provided when money movement is considered regulated under * Stripe's money transmission licenses. */ @@ -250,7 +250,7 @@ public static class InitiatingPaymentMethodDetails extends StripeObject { /** * Set when {@code type} is {@code issuing_card}. This is an Issuing Card ID. + * href="https://api.stripe.com#issuing_cards">Issuing Card ID. */ @SerializedName("issuing_card") String issuingCard; @@ -347,14 +347,14 @@ public static class LinkedFlows extends StripeObject { /** * Set if the ReceivedCredit was created due to an Issuing Authorization object. + * href="https://api.stripe.com#issuing_authorizations">Issuing Authorization object. */ @SerializedName("issuing_authorization") String issuingAuthorization; /** * Set if the ReceivedCredit is also viewable as an Issuing transaction object. + * href="https://api.stripe.com#issuing_transactions">Issuing transaction object. */ @SerializedName("issuing_transaction") String issuingTransaction; @@ -386,10 +386,9 @@ public static class LinkedFlows extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class SourceFlowDetails extends StripeObject { /** - * You can reverse some ReceivedCredits depending on their - * network and source flow. Reversing a ReceivedCredit leads to the creation of a new object - * known as a CreditReversal. + * You can reverse some ReceivedCredits + * depending on their network and source flow. Reversing a ReceivedCredit leads to the + * creation of a new object known as a CreditReversal. */ @SerializedName("credit_reversal") CreditReversal creditReversal; @@ -398,9 +397,9 @@ public static class SourceFlowDetails extends StripeObject { * Use OutboundPayments * to send funds to another party's external bank account or FinancialAccount. To send money - * to an account belonging to the same user, use an OutboundTransfer. + * href="https://api.stripe.com#financial_accounts">FinancialAccount. To send money to an + * account belonging to the same user, use an OutboundTransfer. * *

Simulate OutboundPayment state changes with the {@code * /v1/test_helpers/treasury/outbound_payments} endpoints. These methods can only be called on @@ -417,10 +416,10 @@ public static class SourceFlowDetails extends StripeObject { * Use OutboundTransfers * to transfer funds from a FinancialAccount to a - * PaymentMethod belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can - * send funds over ACH rails or through a domestic wire transfer to a user's own external bank + * href="https://api.stripe.com#financial_accounts">FinancialAccount to a PaymentMethod + * belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can send + * funds over ACH rails or through a domestic wire transfer to a user's own external bank * account. * *

Simulate OutboundTransfer state changes with the {@code @@ -442,7 +441,7 @@ public static class SourceFlowDetails extends StripeObject { * varying schedules, * depending on your country and industry. * - *

Related guide: Receiving payouts + *

Related guide: Receiving payouts */ @SerializedName("payout") Payout payout; diff --git a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java index d5a96019359..3fc38259a95 100644 --- a/src/main/java/com/stripe/model/treasury/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/treasury/ReceivedDebit.java @@ -23,8 +23,8 @@ /** * ReceivedDebits represent funds pulled from a FinancialAccount. These are not - * initiated from the FinancialAccount. + * href="https://api.stripe.com#financial_accounts">FinancialAccount. These are not initiated + * from the FinancialAccount. */ @Getter @Setter @@ -64,7 +64,7 @@ public class ReceivedDebit extends ApiResource implements HasId { String financialAccount; /** - * A hosted + * A hosted * transaction receipt URL that is provided when money movement is considered regulated under * Stripe's money transmission licenses. */ @@ -249,7 +249,7 @@ public static class InitiatingPaymentMethodDetails extends StripeObject { /** * Set when {@code type} is {@code issuing_card}. This is an Issuing Card ID. + * href="https://api.stripe.com#issuing_cards">Issuing Card ID. */ @SerializedName("issuing_card") String issuingCard; @@ -350,21 +350,21 @@ public static class LinkedFlows extends StripeObject { /** * Set if the ReceivedDebit was created due to an Issuing Authorization object. + * href="https://api.stripe.com#issuing_authorizations">Issuing Authorization object. */ @SerializedName("issuing_authorization") String issuingAuthorization; /** * Set if the ReceivedDebit is also viewable as an Issuing Dispute object. + * href="https://api.stripe.com#issuing_disputes">Issuing Dispute object. */ @SerializedName("issuing_transaction") String issuingTransaction; /** * Set if the ReceivedDebit was created due to a Payout object. + * href="https://api.stripe.com#payouts">Payout object. */ @SerializedName("payout") String payout; diff --git a/src/main/java/com/stripe/model/treasury/Transaction.java b/src/main/java/com/stripe/model/treasury/Transaction.java index 77ee23e8a5b..155204693f2 100644 --- a/src/main/java/com/stripe/model/treasury/Transaction.java +++ b/src/main/java/com/stripe/model/treasury/Transaction.java @@ -21,7 +21,7 @@ /** * Transactions represent changes to a FinancialAccount's balance. + * href="https://api.stripe.com#financial_accounts">FinancialAccount's balance. */ @Getter @Setter @@ -211,16 +211,15 @@ public static class BalanceImpact extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class FlowDetails extends StripeObject { /** - * You can reverse some ReceivedCredits depending on their - * network and source flow. Reversing a ReceivedCredit leads to the creation of a new object - * known as a CreditReversal. + * You can reverse some ReceivedCredits + * depending on their network and source flow. Reversing a ReceivedCredit leads to the creation + * of a new object known as a CreditReversal. */ @SerializedName("credit_reversal") CreditReversal creditReversal; /** - * You can reverse some ReceivedDebits + * You can reverse some ReceivedDebits * depending on their network and source flow. Reversing a ReceivedDebit leads to the creation * of a new object known as a DebitReversal. */ @@ -230,9 +229,8 @@ public static class FlowDetails extends StripeObject { /** * Use InboundTransfers - * to add funds to your FinancialAccount via a - * PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + * to add funds to your FinancialAccount + * via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. * *

Related guide: Moving @@ -242,12 +240,12 @@ public static class FlowDetails extends StripeObject { InboundTransfer inboundTransfer; /** - * When an issued card is used to make a purchase, + * When an issued card is used to make a purchase, * an Issuing {@code Authorization} object is created. Authorizations must be + * href="https://docs.stripe.com/issuing/purchases/authorizations">Authorizations must be * approved for the purchase to be completed successfully. * - *

Related guide: Issued + *

Related guide: Issued * card authorizations */ @SerializedName("issuing_authorization") @@ -257,9 +255,9 @@ public static class FlowDetails extends StripeObject { * Use OutboundPayments * to send funds to another party's external bank account or FinancialAccount. To send money to - * an account belonging to the same user, use an OutboundTransfer. + * href="https://api.stripe.com#financial_accounts">FinancialAccount. To send money to an + * account belonging to the same user, use an OutboundTransfer. * *

Simulate OutboundPayment state changes with the {@code * /v1/test_helpers/treasury/outbound_payments} endpoints. These methods can only be called on @@ -276,10 +274,10 @@ public static class FlowDetails extends StripeObject { * Use OutboundTransfers * to transfer funds from a FinancialAccount to a PaymentMethod + * href="https://api.stripe.com#financial_accounts">FinancialAccount to a PaymentMethod * belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can - * send funds over ACH rails or through a domestic wire transfer to a user's own external bank + * href="https://api.stripe.com#outbound_payments">OutboundPayments instead. You can send + * funds over ACH rails or through a domestic wire transfer to a user's own external bank * account. * *

Simulate OutboundTransfer state changes with the {@code @@ -295,15 +293,15 @@ public static class FlowDetails extends StripeObject { /** * ReceivedCredits represent funds sent to a FinancialAccount (for example, via - * ACH or wire). These money movements are not initiated from the FinancialAccount. + * href="https://api.stripe.com#financial_accounts">FinancialAccount (for example, via ACH + * or wire). These money movements are not initiated from the FinancialAccount. */ @SerializedName("received_credit") ReceivedCredit receivedCredit; /** * ReceivedDebits represent funds pulled from a FinancialAccount. These are not + * href="https://api.stripe.com#financial_accounts">FinancialAccount. These are not * initiated from the FinancialAccount. */ @SerializedName("received_debit") diff --git a/src/main/java/com/stripe/model/treasury/TransactionEntry.java b/src/main/java/com/stripe/model/treasury/TransactionEntry.java index f490062112b..aa06ab900fc 100644 --- a/src/main/java/com/stripe/model/treasury/TransactionEntry.java +++ b/src/main/java/com/stripe/model/treasury/TransactionEntry.java @@ -22,7 +22,7 @@ /** * TransactionEntries represent individual units of money movements within a single Transaction. + * href="https://api.stripe.com#transactions">Transaction. */ @Getter @Setter @@ -232,16 +232,15 @@ public static class BalanceImpact extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class FlowDetails extends StripeObject { /** - * You can reverse some ReceivedCredits depending on their - * network and source flow. Reversing a ReceivedCredit leads to the creation of a new object - * known as a CreditReversal. + * You can reverse some ReceivedCredits + * depending on their network and source flow. Reversing a ReceivedCredit leads to the creation + * of a new object known as a CreditReversal. */ @SerializedName("credit_reversal") CreditReversal creditReversal; /** - * You can reverse some ReceivedDebits + * You can reverse some ReceivedDebits * depending on their network and source flow. Reversing a ReceivedDebit leads to the creation * of a new object known as a DebitReversal. */ @@ -251,9 +250,8 @@ public static class FlowDetails extends StripeObject { /** * Use InboundTransfers - * to add funds to your FinancialAccount via a - * PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + * to add funds to your FinancialAccount + * via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. * *

Related guide: Moving @@ -263,12 +261,12 @@ public static class FlowDetails extends StripeObject { InboundTransfer inboundTransfer; /** - * When an issued card is used to make a purchase, + * When an issued card is used to make a purchase, * an Issuing {@code Authorization} object is created. Authorizations must be + * href="https://docs.stripe.com/issuing/purchases/authorizations">Authorizations must be * approved for the purchase to be completed successfully. * - *

Related guide: Issued + *

Related guide: Issued * card authorizations */ @SerializedName("issuing_authorization") @@ -278,9 +276,9 @@ public static class FlowDetails extends StripeObject { * Use OutboundPayments * to send funds to another party's external bank account or FinancialAccount. To send money to - * an account belonging to the same user, use an OutboundTransfer. + * href="https://api.stripe.com#financial_accounts">FinancialAccount. To send money to an + * account belonging to the same user, use an OutboundTransfer. * *

Simulate OutboundPayment state changes with the {@code * /v1/test_helpers/treasury/outbound_payments} endpoints. These methods can only be called on @@ -297,10 +295,10 @@ public static class FlowDetails extends StripeObject { * Use OutboundTransfers * to transfer funds from a FinancialAccount to a PaymentMethod + * href="https://api.stripe.com#financial_accounts">FinancialAccount to a PaymentMethod * belonging to the same entity. To send funds to a different party, use OutboundPayments instead. You can - * send funds over ACH rails or through a domestic wire transfer to a user's own external bank + * href="https://api.stripe.com#outbound_payments">OutboundPayments instead. You can send + * funds over ACH rails or through a domestic wire transfer to a user's own external bank * account. * *

Simulate OutboundTransfer state changes with the {@code @@ -316,15 +314,15 @@ public static class FlowDetails extends StripeObject { /** * ReceivedCredits represent funds sent to a FinancialAccount (for example, via - * ACH or wire). These money movements are not initiated from the FinancialAccount. + * href="https://api.stripe.com#financial_accounts">FinancialAccount (for example, via ACH + * or wire). These money movements are not initiated from the FinancialAccount. */ @SerializedName("received_credit") ReceivedCredit receivedCredit; /** * ReceivedDebits represent funds pulled from a FinancialAccount. These are not + * href="https://api.stripe.com#financial_accounts">FinancialAccount. These are not * initiated from the FinancialAccount. */ @SerializedName("received_debit") diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index f4dfc2dacaa..87f63158a96 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -26,6 +26,12 @@ public final class EventDataClassLookup { classLookup.put( "v2.billing.meter_event_session", com.stripe.model.v2.billing.MeterEventSession.class); + classLookup.put("v2.core.account", com.stripe.model.v2.core.Account.class); + classLookup.put("v2.core.account_link", com.stripe.model.v2.core.AccountLink.class); + classLookup.put("v2.core.account_person", com.stripe.model.v2.core.AccountPerson.class); + classLookup.put( + "v2.core.account_person_token", com.stripe.model.v2.core.AccountPersonToken.class); + classLookup.put("v2.core.account_token", com.stripe.model.v2.core.AccountToken.class); classLookup.put("v2.core.event", com.stripe.model.v2.core.Event.class); classLookup.put("v2.core.event_destination", com.stripe.model.v2.core.EventDestination.class); diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java new file mode 100644 index 00000000000..6feae8b1b22 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -0,0 +1,5826 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A V2 Account is a representation of a company or individual that a Stripe user does business + * with. Accounts contain the contact details, Legal Entity information, and configuration required + * to enable the Account for use across Stripe products. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Account extends StripeObject implements HasId { + /** The configurations that have been applied to this account. */ + @SerializedName("applied_configurations") + List appliedConfigurations; + + /** Indicates whether the account has been closed. */ + @SerializedName("closed") + Boolean closed; + + /** + * An Account represents a company, individual, or other entity that a user interacts with. + * Accounts store identity information and one or more configurations that enable product-specific + * capabilities. You can assign configurations at creation or add them later. + */ + @SerializedName("configuration") + Configuration configuration; + + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + @SerializedName("contact_email") + String contactEmail; + + /** + * Time at which the object was created. Represented as a RFC 3339 date & time UTC value in + * millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** + * A value indicating the Stripe dashboard this Account has access to. This will depend on which + * configurations are enabled for this account. + * + *

One of {@code express}, {@code full}, or {@code none}. + */ + @SerializedName("dashboard") + String dashboard; + + /** Default values for settings shared across Account configurations. */ + @SerializedName("defaults") + Defaults defaults; + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + @SerializedName("display_name") + String displayName; + + /** + * Information about the future requirements for the Account that will eventually come into + * effect, including what information needs to be collected, and by when. + */ + @SerializedName("future_requirements") + FutureRequirements futureRequirements; + + /** Unique identifier for the Account. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** Information about the company, individual, and business represented by the Account. */ + @SerializedName("identity") + Identity identity; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.account}. + */ + @SerializedName("object") + String object; + + /** + * Information about the active requirements for the Account, including what information needs to + * be collected, and by when. + */ + @SerializedName("requirements") + Requirements requirements; + + /** + * An Account represents a company, individual, or other entity that a user interacts with. + * Accounts store identity information and one or more configurations that enable product-specific + * capabilities. You can assign configurations at creation or add them later. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Configuration extends StripeObject { + /** The Customer Configuration allows the Account to be used in inbound payment flows. */ + @SerializedName("customer") + Customer customer; + + /** + * Enables the Account to act as a connected account and collect payments facilitated by a + * Connect platform. You must onboard your platform to Connect before you can add this + * configuration to your connected accounts. Utilize this configuration when the Account will be + * the Merchant of Record, like with Direct charges or Destination Charges with on_behalf_of + * set. + */ + @SerializedName("merchant") + Merchant merchant; + + /** + * The Recipient Configuration allows the Account to receive funds. Utilize this configuration + * if the Account will not be the Merchant of Record, like with Separate Charges & + * Transfers, or Destination Charges without on_behalf_of set. + */ + @SerializedName("recipient") + Recipient recipient; + + /** The Customer Configuration allows the Account to be used in inbound payment flows. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Customer extends StripeObject { + /** + * Indicates whether the customer configuration is active. You can deactivate or reactivate + * the customer configuration by updating this property. Deactivating the configuration by + * setting this value to false will unrequest all capabilities within the configuration. It + * will not delete any of the configuration's other properties. + */ + @SerializedName("applied") + Boolean applied; + + /** + * Settings for automatic indirect tax calculation on the customer's invoices, subscriptions, + * Checkout Sessions, and Payment Links. Available when automatic tax calculation is available + * for the customer account's location. + */ + @SerializedName("automatic_indirect_tax") + AutomaticIndirectTax automaticIndirectTax; + + /** Default Billing settings for the customer account, used in Invoices and Subscriptions. */ + @SerializedName("billing") + Billing billing; + + /** Capabilities that have been requested on the Customer Configuration. */ + @SerializedName("capabilities") + Capabilities capabilities; + + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + @SerializedName("shipping") + Shipping shipping; + + /** + * ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and + * when the Customer Configuration is first set on an Account. + */ + @SerializedName("test_clock") + String testClock; + + /** + * Settings for automatic indirect tax calculation on the customer's invoices, subscriptions, + * Checkout Sessions, and Payment Links. Available when automatic tax calculation is available + * for the customer account's location. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AutomaticIndirectTax extends StripeObject { + /** + * The customer account's tax exemption status: {@code none}, {@code exempt}, or {@code + * reverse}. When {@code reverse}, invoice and receipt PDFs include "Reverse + * charge". + * + *

One of {@code exempt}, {@code none}, or {@code reverse}. + */ + @SerializedName("exempt") + String exempt; + + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ + @SerializedName("ip_address") + String ipAddress; + + /** + * The customer account's identified tax location, derived from {@code location_source}. + * Only rendered if the {@code automatic_indirect_tax} feature is requested and {@code + * active}. + */ + @SerializedName("location") + Location location; + + /** + * Data source used to identify the customer account's tax location. Defaults to {@code + * identity_address}. Used for automatic indirect tax calculation. + * + *

One of {@code identity_address}, {@code ip_address}, {@code payment_method}, or {@code + * shipping_address}. + */ + @SerializedName("location_source") + String locationSource; + + /** + * The customer account's identified tax location, derived from {@code location_source}. + * Only rendered if the {@code automatic_indirect_tax} feature is requested and {@code + * active}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Location extends StripeObject { + /** The identified tax country of the customer. */ + @SerializedName("country") + String country; + + /** The identified tax state, county, province, or region of the customer. */ + @SerializedName("state") + String state; + } + } + + /** Default Billing settings for the customer account, used in Invoices and Subscriptions. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Billing extends StripeObject { + /** + * ID of a PaymentMethod attached to the customer account to use as the default for invoices + * and subscriptions. + */ + @SerializedName("default_payment_method") + String defaultPaymentMethod; + + /** Default invoice settings for the customer account. */ + @SerializedName("invoice") + Invoice invoice; + + /** Default invoice settings for the customer account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Invoice extends StripeObject { + /** + * The list of up to 4 default custom fields to be displayed on invoices for this + * customer. When updating, pass an empty string to remove previously-defined fields. + */ + @SerializedName("custom_fields") + List customFields; + + /** Default invoice footer. */ + @SerializedName("footer") + String footer; + + /** Sequence number to use on the customer account's next invoice. Defaults to 1. */ + @SerializedName("next_sequence") + Long nextSequence; + + /** + * Prefix used to generate unique invoice numbers. Must be 3-12 uppercase letters or + * numbers. + */ + @SerializedName("prefix") + String prefix; + + /** Default invoice PDF rendering options. */ + @SerializedName("rendering") + Rendering rendering; + + /** + * For more details about CustomField, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomField extends StripeObject { + /** The name of the custom field. This may be up to 40 characters. */ + @SerializedName("name") + String name; + + /** + * The value of the custom field. This may be up to 140 characters. When updating, pass + * an empty string to remove previously-defined values. + */ + @SerializedName("value") + String value; + } + + /** Default invoice PDF rendering options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rendering extends StripeObject { + /** + * Indicates whether displayed line item prices and amounts on invoice PDFs include + * inclusive tax amounts. Must be either {@code include_inclusive_tax} or {@code + * exclude_tax}. + * + *

One of {@code exclude_tax}, or {@code include_inclusive_tax}. + */ + @SerializedName("amount_tax_display") + String amountTaxDisplay; + + /** ID of the invoice rendering template to use for future invoices. */ + @SerializedName("template") + String template; + } + } + } + + /** Capabilities that have been requested on the Customer Configuration. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Capabilities extends StripeObject { + /** + * Generates requirements for enabling automatic indirect tax calculation on this customer's + * invoices or subscriptions. Recommended to request this capability if planning to enable + * automatic tax calculation on this customer's invoices or subscriptions. + */ + @SerializedName("automatic_indirect_tax") + AutomaticIndirectTax automaticIndirectTax; + + /** + * Generates requirements for enabling automatic indirect tax calculation on this customer's + * invoices or subscriptions. Recommended to request this capability if planning to enable + * automatic tax calculation on this customer's invoices or subscriptions. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AutomaticIndirectTax extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + } + + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Shipping extends StripeObject { + /** Customer shipping address. */ + @SerializedName("address") + Address address; + + /** Customer name. */ + @SerializedName("name") + String name; + + /** Customer phone (including extension). */ + @SerializedName("phone") + String phone; + + /** Customer shipping address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + } + } + } + + /** + * Enables the Account to act as a connected account and collect payments facilitated by a + * Connect platform. You must onboard your platform to Connect before you can add this + * configuration to your connected accounts. Utilize this configuration when the Account will be + * the Merchant of Record, like with Direct charges or Destination Charges with on_behalf_of + * set. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Merchant extends StripeObject { + /** + * Indicates whether the merchant configuration is active. You can deactivate or reactivate + * the merchant configuration by updating this property. Deactivating the configuration by + * setting this value to false doesn't delete the configuration's properties. + */ + @SerializedName("applied") + Boolean applied; + + /** Settings for Bacs Direct Debit payments. */ + @SerializedName("bacs_debit_payments") + BacsDebitPayments bacsDebitPayments; + + /** + * Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and + * other products. + */ + @SerializedName("branding") + Branding branding; + + /** Capabilities that have been requested on the Merchant Configuration. */ + @SerializedName("capabilities") + Capabilities capabilities; + + /** Card payments settings. */ + @SerializedName("card_payments") + CardPayments cardPayments; + + /** Settings specific to Konbini payments on the account. */ + @SerializedName("konbini_payments") + KonbiniPayments konbiniPayments; + + /** + * The Merchant Category Code (MCC) for the merchant. MCCs classify businesses based on the + * goods or services they provide. + */ + @SerializedName("mcc") + String mcc; + + /** Settings for the default text that appears on statements for language variations. */ + @SerializedName("script_statement_descriptor") + ScriptStatementDescriptor scriptStatementDescriptor; + + /** Settings for SEPA Direct Debit payments. */ + @SerializedName("sepa_debit_payments") + SepaDebitPayments sepaDebitPayments; + + /** Statement descriptor. */ + @SerializedName("statement_descriptor") + StatementDescriptor statementDescriptor; + + /** Publicly available contact information for sending support issues to. */ + @SerializedName("support") + Support support; + + /** Settings for Bacs Direct Debit payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebitPayments extends StripeObject { + /** Display name for Bacs Direct Debit payments. */ + @SerializedName("display_name") + String displayName; + + /** Service User Number (SUN) for Bacs Direct Debit payments. */ + @SerializedName("service_user_number") + String serviceUserNumber; + } + + /** + * Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and + * other products. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Branding extends StripeObject { + /** + * ID of a file upload: + * An icon for the merchant. Must be square and at least 128px x 128px. + */ + @SerializedName("icon") + String icon; + + /** + * ID of a file upload: + * A logo for the merchant that will be used in Checkout instead of the icon and without the + * merchant's name next to it if provided. Must be at least 128px x 128px. + */ + @SerializedName("logo") + String logo; + + /** A CSS hex color value representing the primary branding color for the merchant. */ + @SerializedName("primary_color") + String primaryColor; + + /** A CSS hex color value representing the secondary branding color for the merchant. */ + @SerializedName("secondary_color") + String secondaryColor; + } + + /** Capabilities that have been requested on the Merchant Configuration. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Capabilities extends StripeObject { + /** Allow the merchant to process ACH debit payments. */ + @SerializedName("ach_debit_payments") + AchDebitPayments achDebitPayments; + + /** Allow the merchant to process ACSS debit payments. */ + @SerializedName("acss_debit_payments") + AcssDebitPayments acssDebitPayments; + + /** Allow the merchant to process Affirm payments. */ + @SerializedName("affirm_payments") + AffirmPayments affirmPayments; + + /** Allow the merchant to process Afterpay/Clearpay payments. */ + @SerializedName("afterpay_clearpay_payments") + AfterpayClearpayPayments afterpayClearpayPayments; + + /** Allow the merchant to process Alma payments. */ + @SerializedName("alma_payments") + AlmaPayments almaPayments; + + /** Allow the merchant to process Amazon Pay payments. */ + @SerializedName("amazon_pay_payments") + AmazonPayPayments amazonPayPayments; + + /** Allow the merchant to process Australian BECS Direct Debit payments. */ + @SerializedName("au_becs_debit_payments") + AuBecsDebitPayments auBecsDebitPayments; + + /** Allow the merchant to process BACS Direct Debit payments. */ + @SerializedName("bacs_debit_payments") + BacsDebitPayments bacsDebitPayments; + + /** Allow the merchant to process Bancontact payments. */ + @SerializedName("bancontact_payments") + BancontactPayments bancontactPayments; + + /** Allow the merchant to process BLIK payments. */ + @SerializedName("blik_payments") + BlikPayments blikPayments; + + /** Allow the merchant to process Boleto payments. */ + @SerializedName("boleto_payments") + BoletoPayments boletoPayments; + + /** Allow the merchant to collect card payments. */ + @SerializedName("card_payments") + CardPayments cardPayments; + + /** Allow the merchant to process Cartes Bancaires payments. */ + @SerializedName("cartes_bancaires_payments") + CartesBancairesPayments cartesBancairesPayments; + + /** Allow the merchant to process Cash App payments. */ + @SerializedName("cashapp_payments") + CashappPayments cashappPayments; + + /** Allow the merchant to process EPS payments. */ + @SerializedName("eps_payments") + EpsPayments epsPayments; + + /** Allow the merchant to process FPX payments. */ + @SerializedName("fpx_payments") + FpxPayments fpxPayments; + + /** Allow the merchant to process UK bank transfer payments. */ + @SerializedName("gb_bank_transfer_payments") + GbBankTransferPayments gbBankTransferPayments; + + /** Allow the merchant to process GrabPay payments. */ + @SerializedName("grabpay_payments") + GrabpayPayments grabpayPayments; + + /** Allow the merchant to process iDEAL payments. */ + @SerializedName("ideal_payments") + IdealPayments idealPayments; + + /** Allow the merchant to process JCB card payments. */ + @SerializedName("jcb_payments") + JcbPayments jcbPayments; + + /** Allow the merchant to process Japanese bank transfer payments. */ + @SerializedName("jp_bank_transfer_payments") + JpBankTransferPayments jpBankTransferPayments; + + /** Allow the merchant to process Kakao Pay payments. */ + @SerializedName("kakao_pay_payments") + KakaoPayPayments kakaoPayPayments; + + /** Allow the merchant to process Klarna payments. */ + @SerializedName("klarna_payments") + KlarnaPayments klarnaPayments; + + /** Allow the merchant to process Konbini convenience store payments. */ + @SerializedName("konbini_payments") + KonbiniPayments konbiniPayments; + + /** Allow the merchant to process Korean card payments. */ + @SerializedName("kr_card_payments") + KrCardPayments krCardPayments; + + /** Allow the merchant to process Link payments. */ + @SerializedName("link_payments") + LinkPayments linkPayments; + + /** Allow the merchant to process MobilePay payments. */ + @SerializedName("mobilepay_payments") + MobilepayPayments mobilepayPayments; + + /** Allow the merchant to process Multibanco payments. */ + @SerializedName("multibanco_payments") + MultibancoPayments multibancoPayments; + + /** Allow the merchant to process Mexican bank transfer payments. */ + @SerializedName("mx_bank_transfer_payments") + MxBankTransferPayments mxBankTransferPayments; + + /** Allow the merchant to process Naver Pay payments. */ + @SerializedName("naver_pay_payments") + NaverPayPayments naverPayPayments; + + /** Allow the merchant to process OXXO payments. */ + @SerializedName("oxxo_payments") + OxxoPayments oxxoPayments; + + /** Allow the merchant to process Przelewy24 (P24) payments. */ + @SerializedName("p24_payments") + P24Payments p24Payments; + + /** Allow the merchant to process Pay by Bank payments. */ + @SerializedName("pay_by_bank_payments") + PayByBankPayments payByBankPayments; + + /** Allow the merchant to process PAYCO payments. */ + @SerializedName("payco_payments") + PaycoPayments paycoPayments; + + /** Allow the merchant to process PayNow payments. */ + @SerializedName("paynow_payments") + PaynowPayments paynowPayments; + + /** Allow the merchant to process PromptPay payments. */ + @SerializedName("promptpay_payments") + PromptpayPayments promptpayPayments; + + /** Allow the merchant to process Revolut Pay payments. */ + @SerializedName("revolut_pay_payments") + RevolutPayPayments revolutPayPayments; + + /** Allow the merchant to process Samsung Pay payments. */ + @SerializedName("samsung_pay_payments") + SamsungPayPayments samsungPayPayments; + + /** Allow the merchant to process SEPA bank transfer payments. */ + @SerializedName("sepa_bank_transfer_payments") + SepaBankTransferPayments sepaBankTransferPayments; + + /** Allow the merchant to process SEPA Direct Debit payments. */ + @SerializedName("sepa_debit_payments") + SepaDebitPayments sepaDebitPayments; + + /** Capabilities that enable the merchant to manage their Stripe Balance (/v1/balance). */ + @SerializedName("stripe_balance") + StripeBalance stripeBalance; + + /** Allow the merchant to process Swish payments. */ + @SerializedName("swish_payments") + SwishPayments swishPayments; + + /** Allow the merchant to process TWINT payments. */ + @SerializedName("twint_payments") + TwintPayments twintPayments; + + /** Allow the merchant to process US bank transfer payments. */ + @SerializedName("us_bank_transfer_payments") + UsBankTransferPayments usBankTransferPayments; + + /** Allow the merchant to process Zip payments. */ + @SerializedName("zip_payments") + ZipPayments zipPayments; + + /** Allow the merchant to process ACH debit payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AchDebitPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process ACSS debit payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebitPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Affirm payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AffirmPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Afterpay/Clearpay payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpayPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Alma payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AlmaPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Amazon Pay payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPayPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Australian BECS Direct Debit payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebitPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process BACS Direct Debit payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebitPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Bancontact payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BancontactPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process BLIK payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BlikPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Boleto payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BoletoPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to collect card payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CardPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Cartes Bancaires payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CartesBancairesPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Cash App payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CashappPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process EPS payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EpsPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process FPX payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FpxPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process UK bank transfer payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GbBankTransferPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process GrabPay payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GrabpayPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process iDEAL payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdealPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process JCB card payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class JcbPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Japanese bank transfer payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class JpBankTransferPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Kakao Pay payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPayPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Klarna payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KlarnaPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Konbini convenience store payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KonbiniPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Korean card payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KrCardPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Link payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LinkPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process MobilePay payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MobilepayPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Multibanco payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MultibancoPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Mexican bank transfer payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MxBankTransferPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Naver Pay payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NaverPayPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process OXXO payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class OxxoPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Przelewy24 (P24) payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class P24Payments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Pay by Bank payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBankPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process PAYCO payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaycoPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process PayNow payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaynowPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process PromptPay payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PromptpayPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Revolut Pay payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPayPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Samsung Pay payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPayPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process SEPA bank transfer payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaBankTransferPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process SEPA Direct Debit payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebitPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Capabilities that enable the merchant to manage their Stripe Balance (/v1/balance). */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StripeBalance extends StripeObject { + /** Enables this Account to complete payouts from their Stripe Balance (/v1/balance). */ + @SerializedName("payouts") + Payouts payouts; + + /** Enables this Account to complete payouts from their Stripe Balance (/v1/balance). */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payouts extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code + * unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + } + + /** Allow the merchant to process Swish payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SwishPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process TWINT payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TwintPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process US bank transfer payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UsBankTransferPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** Allow the merchant to process Zip payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ZipPayments extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + } + + /** Card payments settings. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CardPayments extends StripeObject { + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + @SerializedName("decline_on") + DeclineOn declineOn; + + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DeclineOn extends StripeObject { + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. + * This setting only applies when a ZIP or postal code is provided and they fail bank + * verification. + */ + @SerializedName("avs_failure") + Boolean avsFailure; + + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting only + * applies when a CVC is provided and it fails bank verification. + */ + @SerializedName("cvc_failure") + Boolean cvcFailure; + } + } + + /** Settings specific to Konbini payments on the account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KonbiniPayments extends StripeObject { + /** Support for Konbini payments. */ + @SerializedName("support") + Support support; + + /** Support for Konbini payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Support extends StripeObject { + /** Support email address for Konbini payments. */ + @SerializedName("email") + String email; + + /** Support hours for Konbini payments. */ + @SerializedName("hours") + Hours hours; + + /** Support phone number for Konbini payments. */ + @SerializedName("phone") + String phone; + + /** Support hours for Konbini payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Hours extends StripeObject { + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("end_time") + String endTime; + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("start_time") + String startTime; + } + } + } + + /** Settings for the default text that appears on statements for language variations. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ScriptStatementDescriptor extends StripeObject { + /** + * The Kana variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kana") + Kana kana; + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kanji") + Kanji kanji; + + /** + * The Kana variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kana extends StripeObject { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + } + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kanji extends StripeObject { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + } + } + + /** Settings for SEPA Direct Debit payments. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebitPayments extends StripeObject { + /** Creditor ID for SEPA Direct Debit payments. */ + @SerializedName("creditor_id") + String creditorId; + } + + /** Statement descriptor. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatementDescriptor extends StripeObject { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement descriptor + * suffix causes the combined statement descriptor to exceed 22 characters, we truncate the + * statement_descriptor text to limit the full descriptor to 22 characters. For more + * information about statement descriptors and their requirements, see the Merchant + * Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing any + * dynamic statement_descriptor_suffix specified on the charge. To maximize space for the + * dynamic part of the descriptor, keep this text short. If you don’t specify this value, + * statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + } + + /** Publicly available contact information for sending support issues to. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Support extends StripeObject { + /** A publicly available mailing address for sending support issues to. */ + @SerializedName("address") + Address address; + + /** A publicly available email address for sending support issues to. */ + @SerializedName("email") + String email; + + /** A publicly available phone number to call with support issues. */ + @SerializedName("phone") + String phone; + + /** A publicly available website for handling support issues. */ + @SerializedName("url") + String url; + + /** A publicly available mailing address for sending support issues to. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + } + } + + /** + * The Recipient Configuration allows the Account to receive funds. Utilize this configuration + * if the Account will not be the Merchant of Record, like with Separate Charges & + * Transfers, or Destination Charges without on_behalf_of set. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Recipient extends StripeObject { + /** + * Indicates whether the recipient configuration is active. You can deactivate or reactivate + * the recipient configuration by updating this property. Deactivating the configuration by + * setting this value to false unrequest all capabilities within the configuration. It will + * not delete any of the configuration's other properties. + */ + @SerializedName("applied") + Boolean applied; + + /** Capabilities that have been requested on the Recipient Configuration. */ + @SerializedName("capabilities") + Capabilities capabilities; + + /** Capabilities that have been requested on the Recipient Configuration. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Capabilities extends StripeObject { + /** Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). */ + @SerializedName("stripe_balance") + StripeBalance stripeBalance; + + /** Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StripeBalance extends StripeObject { + /** Enables this Account to complete payouts from their Stripe Balance (/v1/balance). */ + @SerializedName("payouts") + Payouts payouts; + + /** + * Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + */ + @SerializedName("stripe_transfers") + StripeTransfers stripeTransfers; + + /** Enables this Account to complete payouts from their Stripe Balance (/v1/balance). */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payouts extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code + * unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + + /** + * Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StripeTransfers extends StripeObject { + /** + * The status of the Capability. + * + *

One of {@code active}, {@code pending}, {@code restricted}, or {@code + * unsupported}. + */ + @SerializedName("status") + String status; + + /** + * Additional details about the capability's status. This value is empty when {@code + * status} is {@code active}. + */ + @SerializedName("status_details") + List< + Account.Configuration.Recipient.Capabilities.StripeBalance.StripeTransfers + .StatusDetail> + statusDetails; + + /** + * For more details about StatusDetail, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetail extends StripeObject { + /** + * Machine-readable code explaining the reason for the Capability to be in its current + * status. + * + *

One of {@code determining_status}, {@code requirements_past_due}, {@code + * requirements_pending_verification}, {@code restricted_other}, {@code + * unsupported_business}, {@code unsupported_country}, or {@code + * unsupported_entity_type}. + */ + @SerializedName("code") + String code; + + /** + * Machine-readable code explaining how to make the Capability active. + * + *

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + } + } + } + } + + /** Default values for settings shared across Account configurations. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Defaults extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** The Account's preferred locales (languages), ordered by preference. */ + @SerializedName("locales") + List locales; + + /** Account profile information. */ + @SerializedName("profile") + Profile profile; + + /** Default responsibilities held by either Stripe or the platform. */ + @SerializedName("responsibilities") + Responsibilities responsibilities; + + /** Account profile information. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Profile extends StripeObject { + /** The business's publicly-available website. */ + @SerializedName("business_url") + String businessUrl; + + /** The customer-facing business name. */ + @SerializedName("doing_business_as") + String doingBusinessAs; + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + @SerializedName("product_description") + String productDescription; + } + + /** Default responsibilities held by either Stripe or the platform. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Responsibilities extends StripeObject { + /** + * Indicates whether the platform or connected account is responsible for paying Stripe fees + * for pricing-control-eligible products. + * + *

One of {@code application}, {@code application_custom}, {@code application_express}, or + * {@code stripe}. + */ + @SerializedName("fees_collector") + String feesCollector; + + /** + * A value indicating responsibility for collecting requirements on this account. + * + *

One of {@code application}, or {@code stripe}. + */ + @SerializedName("losses_collector") + String lossesCollector; + + /** + * A value indicating responsibility for collecting requirements on this account. + * + *

One of {@code application}, or {@code stripe}. + */ + @SerializedName("requirements_collector") + String requirementsCollector; + } + } + + /** + * Information about the future requirements for the Account that will eventually come into + * effect, including what information needs to be collected, and by when. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FutureRequirements extends StripeObject { + /** A list of requirements for the Account. */ + @SerializedName("entries") + List entries; + + /** The time at which the future requirements become effective. */ + @SerializedName("minimum_transition_date") + Instant minimumTransitionDate; + + /** An object containing an overview of requirements for the Account. */ + @SerializedName("summary") + Summary summary; + + /** + * For more details about Entry, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Entry extends StripeObject { + /** + * Indicates whether the platform or Stripe is currently responsible for taking action on the + * requirement. Value can be {@code user} or {@code stripe}. + * + *

One of {@code stripe}, or {@code user}. + */ + @SerializedName("awaiting_action_from") + String awaitingActionFrom; + + /** Machine-readable string describing the requirement. */ + @SerializedName("description") + String description; + + /** + * Descriptions of why the requirement must be collected, or why the collected information + * isn't satisfactory to Stripe. + */ + @SerializedName("errors") + List errors; + + /** + * A hash describing the impact of not collecting the requirement, or Stripe not being able to + * verify the collected information. + */ + @SerializedName("impact") + Impact impact; + + /** The soonest point when the account will be impacted by not providing the requirement. */ + @SerializedName("minimum_deadline") + MinimumDeadline minimumDeadline; + + /** A reference to the location of the requirement. */ + @SerializedName("reference") + Reference reference; + + /** A list of reasons why Stripe is collecting the requirement. */ + @SerializedName("requested_reasons") + List requestedReasons; + + /** + * For more details about Errors, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errors extends StripeObject { + /** + * Machine-readable code describing the error. + * + *

One of {@code invalid_address_city_state_postal_code}, {@code + * invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, {@code + * invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, {@code + * invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code + * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code + * invalid_product_description_length}, {@code invalid_product_description_url_match}, + * {@code invalid_representative_country}, {@code + * invalid_statement_descriptor_business_mismatch}, {@code + * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, + * {@code invalid_statement_descriptor_prefix_denylisted}, {@code + * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code + * invalid_tax_id}, {@code invalid_tax_id_format}, {@code invalid_tos_acceptance}, {@code + * invalid_url_denylisted}, {@code invalid_url_format}, {@code + * invalid_url_website_business_information_mismatch}, {@code invalid_url_website_empty}, + * {@code invalid_url_website_inaccessible}, {@code + * invalid_url_website_inaccessible_geoblocked}, {@code + * invalid_url_website_inaccessible_password_protected}, {@code + * invalid_url_website_incomplete}, {@code + * invalid_url_website_incomplete_cancellation_policy}, {@code + * invalid_url_website_incomplete_customer_service_details}, {@code + * invalid_url_website_incomplete_legal_restrictions}, {@code + * invalid_url_website_incomplete_refund_policy}, {@code + * invalid_url_website_incomplete_return_policy}, {@code + * invalid_url_website_incomplete_terms_and_conditions}, {@code + * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, + * {@code invalid_url_web_presence_detected}, {@code invalid_value_other}, {@code + * unresolvable_ip_address}, {@code unresolvable_postal_code}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, + * {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, + * {@code verification_document_failed_test_mode}, {@code verification_document_fraudulent}, + * {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, + * {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code + * verification_document_type_not_supported}, {@code verification_extraneous_directors}, + * {@code verification_failed_address_match}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, + * {@code verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, + * {@code verification_missing_executives}, {@code verification_missing_owners}, {@code + * verification_requires_additional_memorandum_of_associations}, {@code + * verification_requires_additional_proof_of_registration}, {@code + * verification_selfie_document_missing_photo}, {@code verification_selfie_face_mismatch}, + * {@code verification_selfie_manipulated}, {@code verification_selfie_unverified_other}, + * {@code verification_supportability}, or {@code verification_token_stale}. + */ + @SerializedName("code") + String code; + + /** Human-readable description of the error. */ + @SerializedName("description") + String description; + } + + /** + * A hash describing the impact of not collecting the requirement, or Stripe not being able to + * verify the collected information. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Impact extends StripeObject { + /** + * The Capabilities that will be restricted if the requirement is not collected and + * satisfactory to Stripe. + */ + @SerializedName("restricts_capabilities") + List restrictsCapabilities; + + /** + * For more details about RestrictsCapability, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RestrictsCapability extends StripeObject { + /** + * The name of the Capability which will be restricted. + * + *

One of {@code ach_debit_payments}, {@code acss_debit_payments}, {@code + * affirm_payments}, {@code afterpay_clearpay_payments}, {@code alma_payments}, {@code + * amazon_pay_payments}, {@code automatic_indirect_tax}, {@code au_becs_debit_payments}, + * {@code bacs_debit_payments}, {@code bancontact_payments}, {@code bank_accounts.local}, + * {@code bank_accounts.wire}, {@code blik_payments}, {@code boleto_payments}, {@code + * cards}, {@code card_payments}, {@code cartes_bancaires_payments}, {@code + * cashapp_payments}, {@code eps_payments}, {@code fpx_payments}, {@code + * gb_bank_transfer_payments}, {@code grabpay_payments}, {@code ideal_payments}, {@code + * jcb_payments}, {@code jp_bank_transfer_payments}, {@code kakao_pay_payments}, {@code + * klarna_payments}, {@code konbini_payments}, {@code kr_card_payments}, {@code + * link_payments}, {@code mobilepay_payments}, {@code multibanco_payments}, {@code + * mx_bank_transfer_payments}, {@code naver_pay_payments}, {@code oxxo_payments}, {@code + * p24_payments}, {@code payco_payments}, {@code paynow_payments}, {@code + * pay_by_bank_payments}, {@code promptpay_payments}, {@code revolut_pay_payments}, {@code + * samsung_pay_payments}, {@code sepa_bank_transfer_payments}, {@code + * sepa_debit_payments}, {@code stripe_balance.payouts}, {@code + * stripe_balance.stripe_transfers}, {@code swish_payments}, {@code twint_payments}, + * {@code us_bank_transfer_payments}, or {@code zip_payments}. + */ + @SerializedName("capability") + String capability; + + /** + * The configuration which specifies the Capability which will be restricted. + * + *

One of {@code customer}, {@code merchant}, or {@code recipient}. + */ + @SerializedName("configuration") + String configuration; + + /** + * Details about when in the account lifecycle the requirement must be collected by the + * avoid the Capability restriction. + */ + @SerializedName("deadline") + Deadline deadline; + + /** + * Details about when in the account lifecycle the requirement must be collected by the + * avoid the Capability restriction. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Deadline extends StripeObject { + /** + * The current status of the requirement's impact. + * + *

One of {@code currently_due}, {@code eventually_due}, or {@code past_due}. + */ + @SerializedName("status") + String status; + } + } + } + + /** The soonest point when the account will be impacted by not providing the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MinimumDeadline extends StripeObject { + /** + * The current status of the requirement's impact. + * + *

One of {@code currently_due}, {@code eventually_due}, or {@code past_due}. + */ + @SerializedName("status") + String status; + } + + /** A reference to the location of the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Reference extends StripeObject { + /** If {@code inquiry} is the type, the inquiry token. */ + @SerializedName("inquiry") + String inquiry; + + /** If {@code resource} is the type, the resource token. */ + @SerializedName("resource") + String resource; + + /** + * The type of the reference. If the type is "inquiry", the inquiry token can be + * found in the "inquiry" field. Otherwise the type is an API resource, the token + * for which can be found in the "resource" field. + * + *

One of {@code inquiry}, {@code payment_method}, or {@code person}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about RequestedReason, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RequestedReason extends StripeObject { + /** + * Machine-readable description of Stripe's reason for collecting the requirement. + * + *

One of {@code routine_onboarding}, or {@code routine_verification}. + */ + @SerializedName("code") + String code; + } + } + + /** An object containing an overview of requirements for the Account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Summary extends StripeObject { + /** + * The soonest date and time a requirement on the Account will become {@code past due}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * {@code 2022-09-18T13:22:18.123Z}. + */ + @SerializedName("minimum_deadline") + MinimumDeadline minimumDeadline; + + /** + * The soonest date and time a requirement on the Account will become {@code past due}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * {@code 2022-09-18T13:22:18.123Z}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MinimumDeadline extends StripeObject { + /** + * The current strictest status of all requirements on the Account. + * + *

One of {@code currently_due}, {@code eventually_due}, or {@code past_due}. + */ + @SerializedName("status") + String status; + + /** The soonest RFC3339 date & time UTC value a requirement can impact the Account. */ + @SerializedName("time") + Instant time; + } + } + } + + /** Information about the company, individual, and business represented by the Account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Identity extends StripeObject { + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + @SerializedName("attestations") + Attestations attestations; + + /** Information about the company or business. */ + @SerializedName("business_details") + BusinessDetails businessDetails; + + /** + * The country in which the account holder resides, or in which the business is legally + * established. This should be an ISO + * 3166-1 alpha-2 country code. + */ + @SerializedName("country") + String country; + + /** + * The entity type. + * + *

One of {@code company}, {@code government_entity}, {@code individual}, or {@code + * non_profit}. + */ + @SerializedName("entity_type") + String entityType; + + /** + * Information about the individual represented by the Account. This property is {@code null} + * unless {@code entity_type} is set to {@code individual}. + */ + @SerializedName("individual") + Individual individual; + + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Attestations extends StripeObject { + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct. + */ + @SerializedName("ownership_declaration") + OwnershipDeclaration ownershipDeclaration; + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + @SerializedName("persons_provided") + PersonsProvided personsProvided; + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + @SerializedName("representative_declaration") + RepresentativeDeclaration representativeDeclaration; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("terms_of_service") + TermsOfService termsOfService; + + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DirectorshipDeclaration extends StripeObject { + /** + * The time marking when the director attestation was made. Represented as a RFC 3339 date + * & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** The IP address from which the director attestation was made. */ + @SerializedName("ip") + String ip; + + /** The user agent of the browser from which the director attestation was made. */ + @SerializedName("user_agent") + String userAgent; + } + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class OwnershipDeclaration extends StripeObject { + /** + * The time marking when the beneficial owner attestation was made. Represented as a RFC + * 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** The IP address from which the beneficial owner attestation was made. */ + @SerializedName("ip") + String ip; + + /** The user agent of the browser from which the beneficial owner attestation was made. */ + @SerializedName("user_agent") + String userAgent; + } + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PersonsProvided extends StripeObject { + /** + * Whether the company’s directors have been provided. Set this Boolean to true after + * creating all the company’s directors with the Persons API. + */ + @SerializedName("directors") + Boolean directors; + + /** + * Whether the company’s executives have been provided. Set this Boolean to true after + * creating all the company’s executives with the Persons API. + */ + @SerializedName("executives") + Boolean executives; + + /** + * Whether the company’s owners have been provided. Set this Boolean to true after creating + * all the company’s owners with the Persons API. + */ + @SerializedName("owners") + Boolean owners; + + /** + * Reason for why the company is exempt from providing ownership information. + * + *

One of {@code qualified_entity_exceeds_ownership_threshold}, or {@code + * qualifies_as_financial_institution}. + */ + @SerializedName("ownership_exemption_reason") + String ownershipExemptionReason; + } + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration extends StripeObject { + /** + * The time marking when the representative attestation was made. Represented as a RFC 3339 + * date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** The IP address from which the representative attestation was made. */ + @SerializedName("ip") + String ip; + + /** The user agent of the browser from which the representative attestation was made. */ + @SerializedName("user_agent") + String userAgent; + } + + /** Attestations of accepted terms of service agreements. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TermsOfService extends StripeObject { + /** + * Details on the Account's acceptance of the Stripe Services + * Agreement. + */ + @SerializedName("account") + InnerAccount account; + + /** + * Details on the Account's acceptance of the Stripe Services + * Agreement. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InnerAccount extends StripeObject { + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + String userAgent; + } + } + } + + /** Information about the company or business. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BusinessDetails extends StripeObject { + /** The company’s primary address. */ + @SerializedName("address") + Address address; + + /** The business gross annual revenue for its preceding fiscal year. */ + @SerializedName("annual_revenue") + AnnualRevenue annualRevenue; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** + * Estimated maximum number of workers currently engaged by the business (including employees, + * contractors, and vendors). + */ + @SerializedName("estimated_worker_count") + Long estimatedWorkerCount; + + /** The provided ID numbers of a business entity. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil + * and India. + */ + @SerializedName("monthly_estimated_revenue") + MonthlyEstimatedRevenue monthlyEstimatedRevenue; + + /** The company’s phone number (used for verification). */ + @SerializedName("phone") + String phone; + + /** The business legal name. */ + @SerializedName("registered_name") + String registeredName; + + /** The business registration address of the business entity in non latin script. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The business legal name in non latin script. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** + * The category identifying the legal structure of the business. + * + *

One of {@code cooperative}, {@code free_zone_establishment}, {@code free_zone_llc}, + * {@code governmental_unit}, {@code government_instrumentality}, {@code + * incorporated_association}, {@code incorporated_non_profit}, {@code + * incorporated_partnership}, {@code limited_liability_partnership}, {@code llc}, {@code + * multi_member_llc}, {@code private_company}, {@code private_corporation}, {@code + * private_partnership}, {@code public_company}, {@code public_corporation}, {@code + * public_listed_corporation}, {@code public_partnership}, {@code registered_charity}, {@code + * single_member_llc}, {@code sole_establishment}, {@code sole_proprietorship}, {@code + * tax_exempt_government_instrumentality}, {@code trust}, {@code unincorporated_association}, + * {@code unincorporated_non_profit}, or {@code unincorporated_partnership}. + */ + @SerializedName("structure") + String structure; + + /** The company’s primary address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + + /** The business gross annual revenue for its preceding fiscal year. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AnnualRevenue extends StripeObject { + /** Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). */ + @SerializedName("amount") + Amount amount; + + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + @SerializedName("fiscal_year_end") + String fiscalYearEnd; + + /** Annual revenue amount in minor currency units (for example, '123' for 1.23 USD). */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + } + + /** Documents that may be submitted to satisfy various informational requests. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Documents extends StripeObject { + /** + * One or more documents that support the Bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + @SerializedName("bank_account_ownership_verification") + BankAccountOwnershipVerification bankAccountOwnershipVerification; + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + @SerializedName("company_license") + CompanyLicense companyLicense; + + /** One or more documents showing the company’s Memorandum of Association. */ + @SerializedName("company_memorandum_of_association") + CompanyMemorandumOfAssociation companyMemorandumOfAssociation; + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + @SerializedName("company_ministerial_decree") + CompanyMinisterialDecree companyMinisterialDecree; + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + @SerializedName("company_registration_verification") + CompanyRegistrationVerification companyRegistrationVerification; + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + @SerializedName("company_tax_id_verification") + CompanyTaxIdVerification companyTaxIdVerification; + + /** A document verifying the business. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + @SerializedName("proof_of_registration") + ProofOfRegistration proofOfRegistration; + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @SerializedName("proof_of_ultimate_beneficial_ownership") + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + + /** + * One or more documents that support the Bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankAccountOwnershipVerification extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CompanyLicense extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** One or more documents showing the company’s Memorandum of Association. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMemorandumOfAssociation extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMinisterialDecree extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CompanyRegistrationVerification extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CompanyTaxIdVerification extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** A document verifying the business. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification extends StripeObject { + /** + * The file upload + * tokens for the front and back of the verification document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * The format of the verification document. Currently supports {@code front_back} only. + * + *

Equal to {@code front_back}. + */ + @SerializedName("type") + String type; + + /** + * The file upload + * tokens for the front and back of the verification document. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack extends StripeObject { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + String front; + } + } + + /** One or more documents that demonstrate proof of address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfRegistration extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfUltimateBeneficialOwnership extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + } + + /** + * For more details about IdNumber, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber extends StripeObject { + /** The registrar of the ID number (Only valid for DE ID number types). */ + @SerializedName("registrar") + String registrar; + + /** + * Open Enum. The ID number type of a business entity. + * + *

One of {@code ae_crn}, {@code ae_vat}, {@code ao_nif}, {@code ar_cuit}, {@code at_fn}, + * {@code at_stn}, {@code at_vat}, {@code au_abn}, {@code au_acn}, {@code au_in}, {@code + * az_tin}, {@code bd_etin}, {@code be_cbe}, {@code be_vat}, {@code bg_uic}, {@code bg_vat}, + * {@code br_cnpj}, {@code ca_cn}, {@code ca_crarr}, {@code ca_gst_hst}, {@code ca_neq}, + * {@code ca_rid}, {@code ch_chid}, {@code ch_uid}, {@code cr_cpj}, {@code cr_nite}, {@code + * cy_he}, {@code cy_tic}, {@code cy_vat}, {@code cz_ico}, {@code cz_vat}, {@code de_hrn}, + * {@code de_stn}, {@code de_vat}, {@code dk_cvr}, {@code dk_vat}, {@code do_rcn}, {@code + * ee_rk}, {@code ee_vat}, {@code es_cif}, {@code es_vat}, {@code fi_vat}, {@code fi_yt}, + * {@code fr_rna}, {@code fr_siren}, {@code fr_vat}, {@code gb_crn}, {@code gi_crn}, {@code + * gr_afm}, {@code gr_gemi}, {@code gr_vat}, {@code gt_nit}, {@code hk_br}, {@code hk_cr}, + * {@code hr_mbs}, {@code hr_oib}, {@code hr_vat}, {@code hu_cjs}, {@code hu_tin}, {@code + * hu_vat}, {@code ie_crn}, {@code ie_trn}, {@code ie_vat}, {@code it_rea}, {@code it_vat}, + * {@code jp_cn}, {@code kz_bin}, {@code li_uid}, {@code lt_ccrn}, {@code lt_vat}, {@code + * lu_nif}, {@code lu_rcs}, {@code lu_vat}, {@code lv_urn}, {@code lv_vat}, {@code mt_crn}, + * {@code mt_tin}, {@code mt_vat}, {@code mx_rfc}, {@code my_brn}, {@code my_coid}, {@code + * my_itn}, {@code my_sst}, {@code mz_nuit}, {@code nl_kvk}, {@code nl_rsin}, {@code + * nl_vat}, {@code no_orgnr}, {@code nz_bn}, {@code nz_ird}, {@code pe_ruc}, {@code pk_ntn}, + * {@code pl_nip}, {@code pl_regon}, {@code pl_vat}, {@code pt_vat}, {@code ro_cui}, {@code + * ro_orc}, {@code ro_vat}, {@code sa_crn}, {@code sa_tin}, {@code se_orgnr}, {@code + * se_vat}, {@code sg_uen}, {@code si_msp}, {@code si_tin}, {@code si_vat}, {@code sk_dic}, + * {@code sk_ico}, {@code sk_vat}, {@code th_crn}, {@code th_prn}, {@code th_tin}, or {@code + * us_ein}. + */ + @SerializedName("type") + String type; + } + + /** + * An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil + * and India. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MonthlyEstimatedRevenue extends StripeObject { + /** + * Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 + * USD). + */ + @SerializedName("amount") + Amount amount; + + /** + * Estimated monthly revenue amount in minor currency units (for example, '123' for 1.23 + * USD). + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Amount extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + } + } + + /** The business registration address of the business entity in non latin script. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses extends StripeObject { + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + /** Kana Address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kana extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + + /** Kanji Address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kanji extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + } + + /** The business legal name in non latin script. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames extends StripeObject { + /** Kana name. */ + @SerializedName("kana") + Kana kana; + + /** Kanji name. */ + @SerializedName("kanji") + Kanji kanji; + + /** Kana name. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kana extends StripeObject { + /** Registered name of the business. */ + @SerializedName("registered_name") + String registeredName; + } + + /** Kanji name. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kanji extends StripeObject { + /** Registered name of the business. */ + @SerializedName("registered_name") + String registeredName; + } + } + } + + /** + * Information about the individual represented by the Account. This property is {@code null} + * unless {@code entity_type} is set to {@code individual}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Individual extends StripeObject implements HasId { + /** The account ID which the individual belongs to. */ + @SerializedName("account") + String account; + + /** Additional addresses associated with the individual. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the individual. */ + @SerializedName("additional_names") + List additionalNames; + + /** Terms of service acceptances. */ + @SerializedName("additional_terms_of_service") + AdditionalTermsOfService additionalTermsOfService; + + /** The individual's residential address. */ + @SerializedName("address") + Address address; + + /** + * Time at which the object was created. Represented as a RFC 3339 date & time UTC value + * in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** The individual's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** The individual's email address. */ + @SerializedName("email") + String email; + + /** The individual's first name. */ + @SerializedName("given_name") + String givenName; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** The identification numbers (e.g., SSN) associated with the individual. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The individual's gender (International regulations require either "male” or + * "female"). + * + *

One of {@code female}, or {@code male}. + */ + @SerializedName("legal_gender") + String legalGender; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * The countries where the individual is a national. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("nationalities") + List nationalities; + + /** String representing the object's type. Objects of the same type share the same value. */ + @SerializedName("object") + String object; + + /** The individual's phone number. */ + @SerializedName("phone") + String phone; + + /** + * Indicates if the individual or any of their representatives, family members, or other + * closely related persons, declares that they hold or have held an important public job or + * function, in any jurisdiction. + * + *

One of {@code existing}, or {@code none}. + */ + @SerializedName("political_exposure") + String politicalExposure; + + /** The relationship that this individual has with the Account's identity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The script names (e.g. non-Latin characters) associated with the individual. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The individual's last name. */ + @SerializedName("surname") + String surname; + + /** Time at which the object was last updated. */ + @SerializedName("updated") + Instant updated; + + /** + * For more details about AdditionalAddress, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * Purpose of additional address. + * + *

Equal to {@code registered}. + */ + @SerializedName("purpose") + String purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + + /** + * For more details about AdditionalName, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName extends StripeObject { + /** The individual's full name. */ + @SerializedName("full_name") + String fullName; + + /** The individual's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** + * The purpose or type of the additional name. + * + *

One of {@code alias}, or {@code maiden}. + */ + @SerializedName("purpose") + String purpose; + + /** The individual's last or family name. */ + @SerializedName("surname") + String surname; + } + + /** Terms of service acceptances. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalTermsOfService extends StripeObject { + /** Stripe terms of service agreement. */ + @SerializedName("account") + InnerAccount account; + + /** Stripe terms of service agreement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InnerAccount extends StripeObject { + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + String userAgent; + } + } + + /** The individual's residential address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + + /** The individual's date of birth. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth extends StripeObject { + /** The day of birth, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** The month of birth, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** The four-digit year of birth. */ + @SerializedName("year") + Long year; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Documents extends StripeObject { + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + @SerializedName("passport") + Passport passport; + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + @SerializedName("visa") + Visa visa; + + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Passport extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification extends StripeObject { + /** + * The file upload + * tokens for the front and back of the verification document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * The format of the verification document. Currently supports {@code front_back} only. + * + *

Equal to {@code front_back}. + */ + @SerializedName("type") + String type; + + /** + * The file upload + * tokens for the front and back of the verification document. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack extends StripeObject { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + String front; + } + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification extends StripeObject { + /** + * The file upload + * tokens for the front and back of the verification document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * The format of the verification document. Currently supports {@code front_back} only. + * + *

Equal to {@code front_back}. + */ + @SerializedName("type") + String type; + + /** + * The file upload + * tokens for the front and back of the verification document. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack extends StripeObject { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + String front; + } + } + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Visa extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + } + + /** + * For more details about IdNumber, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber extends StripeObject { + /** + * The ID number type of an individual. + * + *

One of {@code ae_eid}, {@code ao_nif}, {@code ar_cuil}, {@code ar_dni}, {@code + * at_stn}, {@code az_tin}, {@code bd_brc}, {@code bd_etin}, {@code bd_nid}, {@code be_nrn}, + * {@code bg_ucn}, {@code bn_nric}, {@code br_cpf}, {@code ca_sin}, {@code ch_oasi}, {@code + * cl_rut}, {@code cn_pp}, {@code co_nuip}, {@code cr_ci}, {@code cr_cpf}, {@code cr_dimex}, + * {@code cr_nite}, {@code cy_tic}, {@code cz_rc}, {@code de_stn}, {@code dk_cpr}, {@code + * do_cie}, {@code do_rcn}, {@code ec_ci}, {@code ee_ik}, {@code es_nif}, {@code fi_hetu}, + * {@code fr_nir}, {@code gb_nino}, {@code gr_afm}, {@code gt_nit}, {@code hk_id}, {@code + * hr_oib}, {@code hu_ad}, {@code id_nik}, {@code ie_ppsn}, {@code is_kt}, {@code it_cf}, + * {@code jp_inc}, {@code ke_pin}, {@code kz_iin}, {@code li_peid}, {@code lt_ak}, {@code + * lu_nif}, {@code lv_pk}, {@code mx_rfc}, {@code my_nric}, {@code mz_nuit}, {@code ng_nin}, + * {@code nl_bsn}, {@code no_nin}, {@code nz_ird}, {@code pe_dni}, {@code pk_cnic}, {@code + * pk_snic}, {@code pl_pesel}, {@code pt_nif}, {@code ro_cnp}, {@code sa_tin}, {@code + * se_pin}, {@code sg_fin}, {@code sg_nric}, {@code sk_dic}, {@code th_lc}, {@code th_pin}, + * {@code tr_tin}, {@code us_itin}, {@code us_itin_last_4}, {@code us_ssn}, {@code + * us_ssn_last_4}, {@code uy_dni}, or {@code za_id}. + */ + @SerializedName("type") + String type; + } + + /** The relationship that this individual has with the Account's identity. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Relationship extends StripeObject { + /** Whether the individual is an authorizer of the Account's identity. */ + @SerializedName("authorizer") + Boolean authorizer; + + /** + * Whether the individual is a director of the Account's identity. Directors are typically + * members of the governing board of the company or are responsible for making sure that the + * company meets its regulatory obligations. + */ + @SerializedName("director") + Boolean director; + + /** + * Whether the individual has significant responsibility to control, manage, or direct the + * organization. + */ + @SerializedName("executive") + Boolean executive; + + /** Whether the individual is the legal guardian of the Account's representative. */ + @SerializedName("legal_guardian") + Boolean legalGuardian; + + /** Whether the individual is an owner of the Account's identity. */ + @SerializedName("owner") + Boolean owner; + + /** The percentage of the Account's identity that the individual owns. */ + @SerializedName("percent_ownership") + String percentOwnership; + + /** + * Whether the individual is authorized as the primary representative of the Account. This + * is the person nominated by the business to provide information about themselves, and + * general information about the account. There can only be one representative at any given + * time. At the time the account is created, this person should be set to the person + * responsible for opening the account. + */ + @SerializedName("representative") + Boolean representative; + + /** The individual's title (e.g., CEO, Support Engineer). */ + @SerializedName("title") + String title; + } + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses extends StripeObject { + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + /** Kana Address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kana extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + + /** Kanji Address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kanji extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + } + + /** The script names (e.g. non-Latin characters) associated with the individual. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames extends StripeObject { + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + /** Persons name in kana script. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kana extends StripeObject { + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + } + + /** Persons name in kanji script. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kanji extends StripeObject { + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + } + } + } + } + + /** + * Information about the active requirements for the Account, including what information needs to + * be collected, and by when. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Requirements extends StripeObject { + /** A list of requirements for the Account. */ + @SerializedName("entries") + List entries; + + /** An object containing an overview of requirements for the Account. */ + @SerializedName("summary") + Summary summary; + + /** + * For more details about Entry, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Entry extends StripeObject { + /** + * Indicates whether the platform or Stripe is currently responsible for taking action on the + * requirement. Value can be {@code user} or {@code stripe}. + * + *

One of {@code stripe}, or {@code user}. + */ + @SerializedName("awaiting_action_from") + String awaitingActionFrom; + + /** Machine-readable string describing the requirement. */ + @SerializedName("description") + String description; + + /** + * Descriptions of why the requirement must be collected, or why the collected information + * isn't satisfactory to Stripe. + */ + @SerializedName("errors") + List errors; + + /** + * A hash describing the impact of not collecting the requirement, or Stripe not being able to + * verify the collected information. + */ + @SerializedName("impact") + Impact impact; + + /** The soonest point when the account will be impacted by not providing the requirement. */ + @SerializedName("minimum_deadline") + MinimumDeadline minimumDeadline; + + /** A reference to the location of the requirement. */ + @SerializedName("reference") + Reference reference; + + /** A list of reasons why Stripe is collecting the requirement. */ + @SerializedName("requested_reasons") + List requestedReasons; + + /** + * For more details about Errors, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errors extends StripeObject { + /** + * Machine-readable code describing the error. + * + *

One of {@code invalid_address_city_state_postal_code}, {@code + * invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, {@code + * invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, {@code + * invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code + * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code + * invalid_product_description_length}, {@code invalid_product_description_url_match}, + * {@code invalid_representative_country}, {@code + * invalid_statement_descriptor_business_mismatch}, {@code + * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, + * {@code invalid_statement_descriptor_prefix_denylisted}, {@code + * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code + * invalid_tax_id}, {@code invalid_tax_id_format}, {@code invalid_tos_acceptance}, {@code + * invalid_url_denylisted}, {@code invalid_url_format}, {@code + * invalid_url_website_business_information_mismatch}, {@code invalid_url_website_empty}, + * {@code invalid_url_website_inaccessible}, {@code + * invalid_url_website_inaccessible_geoblocked}, {@code + * invalid_url_website_inaccessible_password_protected}, {@code + * invalid_url_website_incomplete}, {@code + * invalid_url_website_incomplete_cancellation_policy}, {@code + * invalid_url_website_incomplete_customer_service_details}, {@code + * invalid_url_website_incomplete_legal_restrictions}, {@code + * invalid_url_website_incomplete_refund_policy}, {@code + * invalid_url_website_incomplete_return_policy}, {@code + * invalid_url_website_incomplete_terms_and_conditions}, {@code + * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, + * {@code invalid_url_web_presence_detected}, {@code invalid_value_other}, {@code + * unresolvable_ip_address}, {@code unresolvable_postal_code}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, + * {@code verification_document_failed_copy}, {@code + * verification_document_failed_greyscale}, {@code verification_document_failed_other}, + * {@code verification_document_failed_test_mode}, {@code verification_document_fraudulent}, + * {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, + * {@code verification_document_invalid}, {@code + * verification_document_issue_or_expiry_date_missing}, {@code + * verification_document_manipulated}, {@code verification_document_missing_back}, {@code + * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code + * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, + * {@code verification_document_not_readable}, {@code verification_document_not_signed}, + * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, + * {@code verification_document_too_large}, {@code + * verification_document_type_not_supported}, {@code verification_extraneous_directors}, + * {@code verification_failed_address_match}, {@code + * verification_failed_business_iec_number}, {@code verification_failed_document_match}, + * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, + * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code + * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, + * {@code verification_failed_tax_id_not_issued}, {@code verification_missing_directors}, + * {@code verification_missing_executives}, {@code verification_missing_owners}, {@code + * verification_requires_additional_memorandum_of_associations}, {@code + * verification_requires_additional_proof_of_registration}, {@code + * verification_selfie_document_missing_photo}, {@code verification_selfie_face_mismatch}, + * {@code verification_selfie_manipulated}, {@code verification_selfie_unverified_other}, + * {@code verification_supportability}, or {@code verification_token_stale}. + */ + @SerializedName("code") + String code; + + /** Human-readable description of the error. */ + @SerializedName("description") + String description; + } + + /** + * A hash describing the impact of not collecting the requirement, or Stripe not being able to + * verify the collected information. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Impact extends StripeObject { + /** + * The Capabilities that will be restricted if the requirement is not collected and + * satisfactory to Stripe. + */ + @SerializedName("restricts_capabilities") + List restrictsCapabilities; + + /** + * For more details about RestrictsCapability, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RestrictsCapability extends StripeObject { + /** + * The name of the Capability which will be restricted. + * + *

One of {@code ach_debit_payments}, {@code acss_debit_payments}, {@code + * affirm_payments}, {@code afterpay_clearpay_payments}, {@code alma_payments}, {@code + * amazon_pay_payments}, {@code automatic_indirect_tax}, {@code au_becs_debit_payments}, + * {@code bacs_debit_payments}, {@code bancontact_payments}, {@code bank_accounts.local}, + * {@code bank_accounts.wire}, {@code blik_payments}, {@code boleto_payments}, {@code + * cards}, {@code card_payments}, {@code cartes_bancaires_payments}, {@code + * cashapp_payments}, {@code eps_payments}, {@code fpx_payments}, {@code + * gb_bank_transfer_payments}, {@code grabpay_payments}, {@code ideal_payments}, {@code + * jcb_payments}, {@code jp_bank_transfer_payments}, {@code kakao_pay_payments}, {@code + * klarna_payments}, {@code konbini_payments}, {@code kr_card_payments}, {@code + * link_payments}, {@code mobilepay_payments}, {@code multibanco_payments}, {@code + * mx_bank_transfer_payments}, {@code naver_pay_payments}, {@code oxxo_payments}, {@code + * p24_payments}, {@code payco_payments}, {@code paynow_payments}, {@code + * pay_by_bank_payments}, {@code promptpay_payments}, {@code revolut_pay_payments}, {@code + * samsung_pay_payments}, {@code sepa_bank_transfer_payments}, {@code + * sepa_debit_payments}, {@code stripe_balance.payouts}, {@code + * stripe_balance.stripe_transfers}, {@code swish_payments}, {@code twint_payments}, + * {@code us_bank_transfer_payments}, or {@code zip_payments}. + */ + @SerializedName("capability") + String capability; + + /** + * The configuration which specifies the Capability which will be restricted. + * + *

One of {@code customer}, {@code merchant}, or {@code recipient}. + */ + @SerializedName("configuration") + String configuration; + + /** + * Details about when in the account lifecycle the requirement must be collected by the + * avoid the Capability restriction. + */ + @SerializedName("deadline") + Deadline deadline; + + /** + * Details about when in the account lifecycle the requirement must be collected by the + * avoid the Capability restriction. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Deadline extends StripeObject { + /** + * The current status of the requirement's impact. + * + *

One of {@code currently_due}, {@code eventually_due}, or {@code past_due}. + */ + @SerializedName("status") + String status; + } + } + } + + /** The soonest point when the account will be impacted by not providing the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MinimumDeadline extends StripeObject { + /** + * The current status of the requirement's impact. + * + *

One of {@code currently_due}, {@code eventually_due}, or {@code past_due}. + */ + @SerializedName("status") + String status; + } + + /** A reference to the location of the requirement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Reference extends StripeObject { + /** If {@code inquiry} is the type, the inquiry token. */ + @SerializedName("inquiry") + String inquiry; + + /** If {@code resource} is the type, the resource token. */ + @SerializedName("resource") + String resource; + + /** + * The type of the reference. If the type is "inquiry", the inquiry token can be + * found in the "inquiry" field. Otherwise the type is an API resource, the token + * for which can be found in the "resource" field. + * + *

One of {@code inquiry}, {@code payment_method}, or {@code person}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about RequestedReason, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RequestedReason extends StripeObject { + /** + * Machine-readable description of Stripe's reason for collecting the requirement. + * + *

One of {@code routine_onboarding}, or {@code routine_verification}. + */ + @SerializedName("code") + String code; + } + } + + /** An object containing an overview of requirements for the Account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Summary extends StripeObject { + /** + * The soonest date and time a requirement on the Account will become {@code past due}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * {@code 2022-09-18T13:22:18.123Z}. + */ + @SerializedName("minimum_deadline") + MinimumDeadline minimumDeadline; + + /** + * The soonest date and time a requirement on the Account will become {@code past due}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * {@code 2022-09-18T13:22:18.123Z}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MinimumDeadline extends StripeObject { + /** + * The current strictest status of all requirements on the Account. + * + *

One of {@code currently_due}, {@code eventually_due}, or {@code past_due}. + */ + @SerializedName("status") + String status; + + /** The soonest RFC3339 date & time UTC value a requirement can impact the Account. */ + @SerializedName("time") + Instant time; + } + } + } +} diff --git a/src/main/java/com/stripe/model/v2/core/AccountLink.java b/src/main/java/com/stripe/model/v2/core/AccountLink.java new file mode 100644 index 00000000000..a3d98189ee1 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/AccountLink.java @@ -0,0 +1,216 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Account Links let a platform create a temporary, single-use URL that an account can use to access + * a Stripe-hosted flow for collecting or updating required information. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class AccountLink extends StripeObject { + /** The ID of the connected account this Account Link applies to. */ + @SerializedName("account") + String account; + + /** The timestamp at which this Account Link was created. */ + @SerializedName("created") + Instant created; + + /** The timestamp at which this Account Link will expire. */ + @SerializedName("expires_at") + Instant expiresAt; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.account_link}. + */ + @SerializedName("object") + String object; + + /** The URL at which the account can access the Stripe-hosted flow. */ + @SerializedName("url") + String url; + + /** Hash containing usage options. */ + @SerializedName("use_case") + UseCase useCase; + + /** Hash containing usage options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UseCase extends StripeObject { + /** + * Hash containing configuration options for an Account Link object that onboards a new account. + */ + @SerializedName("account_onboarding") + AccountOnboarding accountOnboarding; + + /** + * Hash containing configuration options for an Account Link that updates an existing account. + */ + @SerializedName("account_update") + AccountUpdate accountUpdate; + + /** + * Open Enum. The type of Account Link the user is requesting. + * + *

One of {@code account_onboarding}, or {@code account_update}. + */ + @SerializedName("type") + String type; + + /** + * Hash containing configuration options for an Account Link object that onboards a new account. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountOnboarding extends StripeObject { + /** + * Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding + * flow. + */ + @SerializedName("collection_options") + CollectionOptions collectionOptions; + + /** + * Open Enum. A v2/core/account can be configured to enable certain functionality. The + * configuration param targets the v2/core/account_link to collect information for the + * specified v2/core/account configuration/s. + */ + @SerializedName("configurations") + List configurations; + + /** + * The URL the user will be redirected to if the AccountLink is expired, has been used, or is + * otherwise invalid. The URL you specify should attempt to generate a new AccountLink with + * the same parameters used to create the original AccountLink, then redirect the user to the + * new AccountLink’s URL so they can continue the flow. If a new AccountLink cannot be + * generated or the redirect fails you should display a useful error to the user. Please make + * sure to implement authentication before redirecting the user in case this URL is leaked to + * a third party. + */ + @SerializedName("refresh_url") + String refreshUrl; + + /** The URL that the user will be redirected to upon completing the linked flow. */ + @SerializedName("return_url") + String returnUrl; + + /** + * Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding + * flow. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CollectionOptions extends StripeObject { + /** + * Specifies whether the platform collects only currently_due requirements ({@code + * currently_due}) or both currently_due and eventually_due requirements ({@code + * eventually_due}). If you don’t specify collection_options, the default value is + * currently_due. + * + *

One of {@code currently_due}, or {@code eventually_due}. + */ + @SerializedName("fields") + String fields; + + /** + * Specifies whether the platform collects future_requirements in addition to requirements + * in Connect Onboarding. The default value is {@code omit}. + * + *

One of {@code include}, or {@code omit}. + */ + @SerializedName("future_requirements") + String futureRequirements; + } + } + + /** + * Hash containing configuration options for an Account Link that updates an existing account. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountUpdate extends StripeObject { + /** + * Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding + * flow. + */ + @SerializedName("collection_options") + CollectionOptions collectionOptions; + + /** + * Open Enum. A v2/account can be configured to enable certain functionality. The + * configuration param targets the v2/account_link to collect information for the specified + * v2/account configuration/s. + */ + @SerializedName("configurations") + List configurations; + + /** + * The URL the user will be redirected to if the Account Link is expired, has been used, or is + * otherwise invalid. The URL you specify should attempt to generate a new Account Link with + * the same parameters used to create the original Account Link, then redirect the user to the + * new Account Link URL so they can continue the flow. Make sure to authenticate the user + * before redirecting to the new Account Link, in case the URL leaks to a third party. If a + * new Account Link can't be generated, or if the redirect fails, you should display a useful + * error to the user. + */ + @SerializedName("refresh_url") + String refreshUrl; + + /** The URL that the user will be redirected to upon completing the linked flow. */ + @SerializedName("return_url") + String returnUrl; + + /** + * Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding + * flow. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CollectionOptions extends StripeObject { + /** + * Specifies whether the platform collects only currently_due requirements ({@code + * currently_due}) or both currently_due and eventually_due requirements ({@code + * eventually_due}). The default value is {@code currently_due}. + * + *

One of {@code currently_due}, or {@code eventually_due}. + */ + @SerializedName("fields") + String fields; + + /** + * Specifies whether the platform collects future_requirements in addition to requirements + * in Connect Onboarding. The default value is {@code omit}. + * + *

One of {@code include}, or {@code omit}. + */ + @SerializedName("future_requirements") + String futureRequirements; + } + } + } +} diff --git a/src/main/java/com/stripe/model/v2/core/AccountPerson.java b/src/main/java/com/stripe/model/v2/core/AccountPerson.java new file mode 100644 index 00000000000..f3ce221205d --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/AccountPerson.java @@ -0,0 +1,733 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A Person represents an individual associated with an Account's identity (for example, an owner, + * director, executive, or representative). Use Persons to provide and update identity information + * for verification and compliance. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class AccountPerson extends StripeObject implements HasId { + /** The account ID which the individual belongs to. */ + @SerializedName("account") + String account; + + /** Additional addresses associated with the person. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the person. */ + @SerializedName("additional_names") + List additionalNames; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("additional_terms_of_service") + AdditionalTermsOfService additionalTermsOfService; + + /** The person's residential address. */ + @SerializedName("address") + Address address; + + /** + * Time at which the object was created. Represented as a RFC 3339 date & time UTC value in + * millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** The person's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** The person's email address. */ + @SerializedName("email") + String email; + + /** The person's first name. */ + @SerializedName("given_name") + String givenName; + + /** Unique identifier for the Person. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** The identification numbers (e.g., SSN) associated with the person. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The person's gender (International regulations require either "male" or + * "female"). + * + *

One of {@code female}, or {@code male}. + */ + @SerializedName("legal_gender") + String legalGender; + + /** + * Has the value {@code true} if the object exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * The countries where the person is a national. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("nationalities") + List nationalities; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.account_person}. + */ + @SerializedName("object") + String object; + + /** The person's phone number. */ + @SerializedName("phone") + String phone; + + /** + * The person's political exposure. + * + *

One of {@code existing}, or {@code none}. + */ + @SerializedName("political_exposure") + String politicalExposure; + + /** The relationship that this person has with the Account's business or legal entity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The script names (e.g. non-Latin characters) associated with the person. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The person's last name. */ + @SerializedName("surname") + String surname; + + /** + * Time at which the object was last updated. Represented as a RFC 3339 date & time UTC value + * in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("updated") + Instant updated; + + /** + * For more details about AdditionalAddress, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * Purpose of additional address. + * + *

Equal to {@code registered}. + */ + @SerializedName("purpose") + String purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + + /** + * For more details about AdditionalName, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName extends StripeObject { + /** The individual's full name. */ + @SerializedName("full_name") + String fullName; + + /** The individual's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** + * The purpose or type of the additional name. + * + *

One of {@code alias}, or {@code maiden}. + */ + @SerializedName("purpose") + String purpose; + + /** The individual's last or family name. */ + @SerializedName("surname") + String surname; + } + + /** Attestations of accepted terms of service agreements. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalTermsOfService extends StripeObject { + /** Stripe terms of service agreement. */ + @SerializedName("account") + Account account; + + /** Stripe terms of service agreement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Account extends StripeObject { + /** + * The time when the Account's representative accepted the terms of service. Represented as a + * RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** The IP address from which the Account's representative accepted the terms of service. */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the Account's representative accepted the terms of + * service. + */ + @SerializedName("user_agent") + String userAgent; + } + } + + /** The person's residential address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + + /** The person's date of birth. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth extends StripeObject { + /** The day of birth, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** The month of birth, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** The four-digit year of birth. */ + @SerializedName("year") + Long year; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Documents extends StripeObject { + /** + * One or more documents that demonstrate proof that this person is authorized to represent the + * company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** One or more documents showing the person’s passport page with photo and personal data. */ + @SerializedName("passport") + Passport passport; + + /** An identifying document showing the person's name, either a passport or local ID card. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where they + * are residing. + */ + @SerializedName("visa") + Visa visa; + + /** + * One or more documents that demonstrate proof that this person is authorized to represent the + * company. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** One or more documents showing the person’s passport page with photo and personal data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Passport extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + + /** An identifying document showing the person's name, either a passport or local ID card. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification extends StripeObject { + /** + * The file upload tokens + * for the front and back of the verification document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * The format of the verification document. Currently supports {@code front_back} only. + * + *

Equal to {@code front_back}. + */ + @SerializedName("type") + String type; + + /** + * The file upload tokens + * for the front and back of the verification document. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack extends StripeObject { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + String back; + + /** + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + } + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification extends StripeObject { + /** + * The file upload tokens + * for the front and back of the verification document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * The format of the verification document. Currently supports {@code front_back} only. + * + *

Equal to {@code front_back}. + */ + @SerializedName("type") + String type; + + /** + * The file upload tokens + * for the front and back of the verification document. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack extends StripeObject { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + String back; + + /** + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + } + } + + /** + * One or more documents showing the person’s visa required for living in the country where they + * are residing. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Visa extends StripeObject { + /** + * One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * The format of the document. Currently supports {@code files} only. + * + *

Equal to {@code files}. + */ + @SerializedName("type") + String type; + } + } + + /** + * For more details about IdNumber, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber extends StripeObject { + /** + * The ID number type of an individual. + * + *

One of {@code ae_eid}, {@code ao_nif}, {@code ar_cuil}, {@code ar_dni}, {@code at_stn}, + * {@code az_tin}, {@code bd_brc}, {@code bd_etin}, {@code bd_nid}, {@code be_nrn}, {@code + * bg_ucn}, {@code bn_nric}, {@code br_cpf}, {@code ca_sin}, {@code ch_oasi}, {@code cl_rut}, + * {@code cn_pp}, {@code co_nuip}, {@code cr_ci}, {@code cr_cpf}, {@code cr_dimex}, {@code + * cr_nite}, {@code cy_tic}, {@code cz_rc}, {@code de_stn}, {@code dk_cpr}, {@code do_cie}, + * {@code do_rcn}, {@code ec_ci}, {@code ee_ik}, {@code es_nif}, {@code fi_hetu}, {@code + * fr_nir}, {@code gb_nino}, {@code gr_afm}, {@code gt_nit}, {@code hk_id}, {@code hr_oib}, + * {@code hu_ad}, {@code id_nik}, {@code ie_ppsn}, {@code is_kt}, {@code it_cf}, {@code jp_inc}, + * {@code ke_pin}, {@code kz_iin}, {@code li_peid}, {@code lt_ak}, {@code lu_nif}, {@code + * lv_pk}, {@code mx_rfc}, {@code my_nric}, {@code mz_nuit}, {@code ng_nin}, {@code nl_bsn}, + * {@code no_nin}, {@code nz_ird}, {@code pe_dni}, {@code pk_cnic}, {@code pk_snic}, {@code + * pl_pesel}, {@code pt_nif}, {@code ro_cnp}, {@code sa_tin}, {@code se_pin}, {@code sg_fin}, + * {@code sg_nric}, {@code sk_dic}, {@code th_lc}, {@code th_pin}, {@code tr_tin}, {@code + * us_itin}, {@code us_itin_last_4}, {@code us_ssn}, {@code us_ssn_last_4}, {@code uy_dni}, or + * {@code za_id}. + */ + @SerializedName("type") + String type; + } + + /** The relationship that this person has with the Account's business or legal entity. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Relationship extends StripeObject { + /** Whether the individual is an authorizer of the Account's identity. */ + @SerializedName("authorizer") + Boolean authorizer; + + /** + * Whether the individual is a director of the Account's identity. Directors are typically + * members of the governing board of the company or are responsible for making sure that the + * company meets its regulatory obligations. + */ + @SerializedName("director") + Boolean director; + + /** + * Whether the individual has significant responsibility to control, manage, or direct the + * organization. + */ + @SerializedName("executive") + Boolean executive; + + /** Whether the individual is the legal guardian of the Account's representative. */ + @SerializedName("legal_guardian") + Boolean legalGuardian; + + /** Whether the individual is an owner of the Account's identity. */ + @SerializedName("owner") + Boolean owner; + + /** The percentage of the Account's identity that the individual owns. */ + @SerializedName("percent_ownership") + String percentOwnership; + + /** + * Whether the individual is authorized as the primary representative of the Account. This is + * the person nominated by the business to provide information about themselves, and general + * information about the account. There can only be one representative at any given time. At the + * time the account is created, this person should be set to the person responsible for opening + * the account. + */ + @SerializedName("representative") + Boolean representative; + + /** The individual's title (e.g., CEO, Support Engineer). */ + @SerializedName("title") + String title; + } + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses extends StripeObject { + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + /** Kana Address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kana extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + + /** Kanji Address. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kanji extends StripeObject { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + } + + /** The script names (e.g. non-Latin characters) associated with the person. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames extends StripeObject { + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + /** Persons name in kana script. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kana extends StripeObject { + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + } + + /** Persons name in kanji script. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Kanji extends StripeObject { + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + } + } +} diff --git a/src/main/java/com/stripe/model/v2/core/AccountPersonToken.java b/src/main/java/com/stripe/model/v2/core/AccountPersonToken.java new file mode 100644 index 00000000000..4ef1f13f9cb --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/AccountPersonToken.java @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Person Tokens are single-use tokens which tokenize person information, and are used for creating + * or updating a Person. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class AccountPersonToken extends StripeObject implements HasId { + /** + * Time at which the token was created. Represented as a RFC 3339 date & time UTC value in + * millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** Time at which the token will expire. */ + @SerializedName("expires_at") + Instant expiresAt; + + /** Unique identifier for the token. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the token exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.account_person_token}. + */ + @SerializedName("object") + String object; + + /** Determines if the token has already been used (tokens can only be used once). */ + @SerializedName("used") + Boolean used; +} diff --git a/src/main/java/com/stripe/model/v2/core/AccountToken.java b/src/main/java/com/stripe/model/v2/core/AccountToken.java new file mode 100644 index 00000000000..6bf4bb5c879 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/AccountToken.java @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.time.Instant; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Account tokens are single-use tokens which tokenize company/individual/business information, and + * are used for creating or updating an Account. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class AccountToken extends StripeObject implements HasId { + /** + * Time at which the token was created. Represented as a RFC 3339 date & time UTC value in + * millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** Time at which the token will expire. */ + @SerializedName("expires_at") + Instant expiresAt; + + /** Unique identifier for the token. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * Has the value {@code true} if the token exists in live mode or the value {@code false} if the + * object exists in test mode. + */ + @SerializedName("livemode") + Boolean livemode; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.core.account_token}. + */ + @SerializedName("object") + String object; + + /** Determines if the token has already been used (tokens can only be used once). */ + @SerializedName("used") + Boolean used; +} diff --git a/src/main/java/com/stripe/model/v2/core/Event.java b/src/main/java/com/stripe/model/v2/core/Event.java index 0d0963ecdfc..1c9b0fed797 100644 --- a/src/main/java/com/stripe/model/v2/core/Event.java +++ b/src/main/java/com/stripe/model/v2/core/Event.java @@ -14,6 +14,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import java.time.Instant; +import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -34,6 +35,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Event extends StripeObject implements HasId, StripeActiveObject { + /** Before and after changes for the primary related object. */ + @SerializedName("changes") + Map changes; + /** Authentication context needed to fetch the event or related object. */ @SerializedName("context") String context; diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 73fde2ee8c1..fa772ebc1e9 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -16,8 +16,8 @@ @EqualsAndHashCode(callSuper = false) public class AccountCreateParams extends ApiRequestParams { /** - * An account token, used to - * securely provide details to the account. + * An account token, used to securely + * provide details to the account. */ @SerializedName("account_token") String accountToken; @@ -153,7 +153,7 @@ public class AccountCreateParams extends ApiRequestParams { Individual individual; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -292,8 +292,8 @@ public AccountCreateParams build() { } /** - * An account token, used to - * securely provide details to the account. + * An account token, used to securely + * provide details to the account. */ public Builder setAccountToken(String accountToken) { this.accountToken = accountToken; @@ -523,7 +523,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -534,7 +534,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1126,7 +1126,10 @@ public static class SupportAddress { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -1239,7 +1242,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1456,6 +1462,10 @@ public static class Capabilities { @SerializedName("paynow_payments") PaynowPayments paynowPayments; + /** The payto_payments capability. */ + @SerializedName("payto_payments") + PaytoPayments paytoPayments; + /** The pix_payments capability. */ @SerializedName("pix_payments") PixPayments pixPayments; @@ -1569,6 +1579,7 @@ private Capabilities( PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, + PaytoPayments paytoPayments, PixPayments pixPayments, PromptpayPayments promptpayPayments, RevolutPayPayments revolutPayPayments, @@ -1630,6 +1641,7 @@ private Capabilities( this.payByBankPayments = payByBankPayments; this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; + this.paytoPayments = paytoPayments; this.pixPayments = pixPayments; this.promptpayPayments = promptpayPayments; this.revolutPayPayments = revolutPayPayments; @@ -1742,6 +1754,8 @@ public static class Builder { private PaynowPayments paynowPayments; + private PaytoPayments paytoPayments; + private PixPayments pixPayments; private PromptpayPayments promptpayPayments; @@ -1823,6 +1837,7 @@ public AccountCreateParams.Capabilities build() { this.payByBankPayments, this.paycoPayments, this.paynowPayments, + this.paytoPayments, this.pixPayments, this.promptpayPayments, this.revolutPayPayments, @@ -2160,6 +2175,13 @@ public Builder setPaynowPayments( return this; } + /** The payto_payments capability. */ + public Builder setPaytoPayments( + AccountCreateParams.Capabilities.PaytoPayments paytoPayments) { + this.paytoPayments = paytoPayments; + return this; + } + /** The pix_payments capability. */ public Builder setPixPayments(AccountCreateParams.Capabilities.PixPayments pixPayments) { this.pixPayments = pixPayments; @@ -5713,6 +5735,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaytoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private PaytoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Capabilities.PaytoPayments build() { + return new AccountCreateParams.Capabilities.PaytoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.PaytoPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.PaytoPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PixPayments { @@ -7637,7 +7739,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -7750,7 +7855,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -8580,11 +8688,10 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The back of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The uploaded + * file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF + * format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -8600,11 +8707,10 @@ public static class Document { Map extraParams; /** - * The front of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The front of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The uploaded + * file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF + * format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -8633,11 +8739,10 @@ public AccountCreateParams.Company.Verification.Document build() { } /** - * The back of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The back of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The + * uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, + * or PDF format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -8673,11 +8778,10 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The front of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The + * uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, + * or PDF format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -9461,9 +9565,8 @@ public static class BankAccountOwnershipVerification { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9562,9 +9665,8 @@ public static class CompanyLicense { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9657,9 +9759,8 @@ public static class CompanyMemorandumOfAssociation { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9755,9 +9856,8 @@ public static class CompanyMinisterialDecree { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9853,9 +9953,8 @@ public static class CompanyRegistrationVerification { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9953,9 +10052,8 @@ public static class CompanyTaxIdVerification { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -10051,9 +10149,8 @@ public static class ProofOfAddress { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -10146,16 +10243,21 @@ public static class ProofOfRegistration { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; - private ProofOfRegistration(Map extraParams, List files) { + /** Information regarding the person signing the document if applicable. */ + @SerializedName("signer") + Signer signer; + + private ProofOfRegistration( + Map extraParams, List files, Signer signer) { this.extraParams = extraParams; this.files = files; + this.signer = signer; } public static Builder builder() { @@ -10167,10 +10269,12 @@ public static class Builder { private List files; + private Signer signer; + /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Documents.ProofOfRegistration build() { return new AccountCreateParams.Documents.ProofOfRegistration( - this.extraParams, this.files); + this.extraParams, this.files, this.signer); } /** @@ -10226,6 +10330,85 @@ public Builder addAllFile(List elements) { this.files.addAll(elements); return this; } + + /** Information regarding the person signing the document if applicable. */ + public Builder setSigner(AccountCreateParams.Documents.ProofOfRegistration.Signer signer) { + this.signer = signer; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Signer { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The token of the person signing the document, if applicable. */ + @SerializedName("person") + String person; + + private Signer(Map extraParams, String person) { + this.extraParams = extraParams; + this.person = person; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String person; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Documents.ProofOfRegistration.Signer build() { + return new AccountCreateParams.Documents.ProofOfRegistration.Signer( + this.extraParams, this.person); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Documents.ProofOfRegistration.Signer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Documents.ProofOfRegistration.Signer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The token of the person signing the document, if applicable. */ + public Builder setPerson(String person) { + this.person = person; + return this; + } + } } } @@ -10242,17 +10425,21 @@ public static class ProofOfUltimateBeneficialOwnership { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; + /** Information regarding the person signing the document if applicable. */ + @SerializedName("signer") + Signer signer; + private ProofOfUltimateBeneficialOwnership( - Map extraParams, List files) { + Map extraParams, List files, Signer signer) { this.extraParams = extraParams; this.files = files; + this.signer = signer; } public static Builder builder() { @@ -10264,10 +10451,12 @@ public static class Builder { private List files; + private Signer signer; + /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership build() { return new AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership( - this.extraParams, this.files); + this.extraParams, this.files, this.signer); } /** @@ -10327,6 +10516,88 @@ public Builder addAllFile(List elements) { this.files.addAll(elements); return this; } + + /** Information regarding the person signing the document if applicable. */ + public Builder setSigner( + AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer signer) { + this.signer = signer; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Signer { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The token of the person signing the document, if applicable. */ + @SerializedName("person") + String person; + + private Signer(Map extraParams, String person) { + this.extraParams = extraParams; + this.person = person; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String person; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer build() { + return new AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer( + this.extraParams, this.person); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The token of the person signing the document, if applicable. */ + public Builder setPerson(String person) { + this.person = person; + return this; + } + } } } } @@ -10345,7 +10616,7 @@ public static class Groups { /** * The group the account is in to determine their payments pricing, and null if the account is - * on customized pricing. See + * on customized pricing. See * the Platform pricing tool documentation for details. */ @SerializedName("payments_pricing") @@ -10398,7 +10669,7 @@ public Builder putAllExtraParam(Map map) { /** * The group the account is in to determine their payments pricing, and null if the account is - * on customized pricing. See + * on customized pricing. See * the Platform pricing tool documentation for details. */ public Builder setPaymentsPricing(String paymentsPricing) { @@ -10408,7 +10679,7 @@ public Builder setPaymentsPricing(String paymentsPricing) { /** * The group the account is in to determine their payments pricing, and null if the account is - * on customized pricing. See + * on customized pricing. See * the Platform pricing tool documentation for details. */ public Builder setPaymentsPricing(EmptyParam paymentsPricing) { @@ -10507,7 +10778,7 @@ public static class Individual { String maidenName; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -10879,7 +11150,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -10890,7 +11161,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -10978,7 +11249,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -11091,7 +11365,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -11574,7 +11851,10 @@ public static class RegisteredAddress { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -11687,7 +11967,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -11948,7 +12231,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class AdditionalDocument { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -11967,7 +12250,7 @@ public static class AdditionalDocument { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -11999,7 +12282,7 @@ public AccountCreateParams.Individual.Verification.AdditionalDocument build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12040,7 +12323,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12056,7 +12339,7 @@ public Builder setFront(String front) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -12075,7 +12358,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -12107,7 +12390,7 @@ public AccountCreateParams.Individual.Verification.Document build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12146,7 +12429,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. diff --git a/src/main/java/com/stripe/param/AccountExternalAccountCreateParams.java b/src/main/java/com/stripe/param/AccountExternalAccountCreateParams.java index be3e016fde4..d429bd588b8 100644 --- a/src/main/java/com/stripe/param/AccountExternalAccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountExternalAccountCreateParams.java @@ -26,7 +26,7 @@ public class AccountExternalAccountCreateParams extends ApiRequestParams { /** * Required. A token, like the ones returned by Stripe.js or a dictionary containing a user's external + * href="https://docs.stripe.com/js">Stripe.js or a dictionary containing a user's external * account details (with the options shown below). Please refer to full documentation instead. */ @@ -43,7 +43,7 @@ public class AccountExternalAccountCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -126,7 +126,7 @@ public Builder addAllExpand(List elements) { /** * Required. A token, like the ones returned by Stripe.js or a dictionary containing a user's external + * href="https://docs.stripe.com/js">Stripe.js or a dictionary containing a user's external * account details (with the options shown below). Please refer to full documentation instead. */ @@ -137,7 +137,7 @@ public Builder setExternalAccount(String externalAccount) { /** * Required. A token, like the ones returned by Stripe.js or a dictionary containing a user's external + * href="https://docs.stripe.com/js">Stripe.js or a dictionary containing a user's external * account details (with the options shown below). Please refer to full documentation instead. */ @@ -148,7 +148,7 @@ public Builder setExternalAccount(AccountExternalAccountCreateParams.Card extern /** * Required. A token, like the ones returned by Stripe.js or a dictionary containing a user's external + * href="https://docs.stripe.com/js">Stripe.js or a dictionary containing a user's external * account details (with the options shown below). Please refer to full documentation instead. */ @@ -160,7 +160,7 @@ public Builder setExternalAccount( /** * Required. A token, like the ones returned by Stripe.js or a dictionary containing a user's external + * href="https://docs.stripe.com/js">Stripe.js or a dictionary containing a user's external * account details (with the options shown below). Please refer to full documentation instead. */ diff --git a/src/main/java/com/stripe/param/AccountExternalAccountUpdateParams.java b/src/main/java/com/stripe/param/AccountExternalAccountUpdateParams.java index 3c53284bdfb..f1b5486e447 100644 --- a/src/main/java/com/stripe/param/AccountExternalAccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountExternalAccountUpdateParams.java @@ -86,7 +86,7 @@ public class AccountExternalAccountUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -425,7 +425,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -436,7 +436,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -557,9 +557,8 @@ public static class BankAccountOwnershipVerification { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; diff --git a/src/main/java/com/stripe/param/AccountPersonCreateParams.java b/src/main/java/com/stripe/param/AccountPersonCreateParams.java index a9982ede685..fe380ee8a01 100644 --- a/src/main/java/com/stripe/param/AccountPersonCreateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonCreateParams.java @@ -117,7 +117,7 @@ public class AccountPersonCreateParams extends ApiRequestParams { String maidenName; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -581,7 +581,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -592,7 +592,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -896,7 +896,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -1007,7 +1010,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1573,9 +1579,8 @@ public static class CompanyAuthorization { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -1671,9 +1676,8 @@ public static class Passport { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -1766,9 +1770,8 @@ public static class Visa { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -1884,7 +1887,10 @@ public static class RegisteredAddress { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -1996,7 +2002,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -2741,7 +2750,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class AdditionalDocument { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2759,7 +2768,7 @@ public static class AdditionalDocument { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2791,7 +2800,7 @@ public AccountPersonCreateParams.Verification.AdditionalDocument build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2830,7 +2839,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2846,7 +2855,7 @@ public Builder setFront(String front) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2864,7 +2873,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2896,7 +2905,7 @@ public AccountPersonCreateParams.Verification.Document build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2935,7 +2944,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. diff --git a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java index ab515d80358..a3a2222ef03 100644 --- a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java @@ -117,7 +117,7 @@ public class AccountPersonUpdateParams extends ApiRequestParams { Object maidenName; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -661,7 +661,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -672,7 +672,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1013,7 +1013,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -1157,13 +1160,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -1819,9 +1828,8 @@ public static class CompanyAuthorization { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -1917,9 +1925,8 @@ public static class Passport { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -2012,9 +2019,8 @@ public static class Visa { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -2130,7 +2136,10 @@ public static class RegisteredAddress { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -2275,13 +2284,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -3050,7 +3065,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class AdditionalDocument { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3068,7 +3083,7 @@ public static class AdditionalDocument { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3100,7 +3115,7 @@ public AccountPersonUpdateParams.Verification.AdditionalDocument build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3111,7 +3126,7 @@ public Builder setBack(String back) { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3150,7 +3165,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3161,7 +3176,7 @@ public Builder setFront(String front) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3177,7 +3192,7 @@ public Builder setFront(EmptyParam front) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3195,7 +3210,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3227,7 +3242,7 @@ public AccountPersonUpdateParams.Verification.Document build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3238,7 +3253,7 @@ public Builder setBack(String back) { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3277,7 +3292,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3288,7 +3303,7 @@ public Builder setFront(String front) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 84a6588217b..f193b6d6e16 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -16,8 +16,8 @@ @EqualsAndHashCode(callSuper = false) public class AccountUpdateParams extends ApiRequestParams { /** - * An account token, used to - * securely provide details to the account. + * An account token, used to securely + * provide details to the account. */ @SerializedName("account_token") Object accountToken; @@ -137,7 +137,7 @@ public class AccountUpdateParams extends ApiRequestParams { Individual individual; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -254,8 +254,8 @@ public AccountUpdateParams build() { } /** - * An account token, used to - * securely provide details to the account. + * An account token, used to securely + * provide details to the account. */ public Builder setAccountToken(String accountToken) { this.accountToken = accountToken; @@ -263,8 +263,8 @@ public Builder setAccountToken(String accountToken) { } /** - * An account token, used to - * securely provide details to the account. + * An account token, used to securely + * provide details to the account. */ public Builder setAccountToken(EmptyParam accountToken) { this.accountToken = accountToken; @@ -519,7 +519,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -530,7 +530,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1185,7 +1185,10 @@ public static class SupportAddress { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -1331,13 +1334,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -1554,6 +1563,10 @@ public static class Capabilities { @SerializedName("paynow_payments") PaynowPayments paynowPayments; + /** The payto_payments capability. */ + @SerializedName("payto_payments") + PaytoPayments paytoPayments; + /** The pix_payments capability. */ @SerializedName("pix_payments") PixPayments pixPayments; @@ -1667,6 +1680,7 @@ private Capabilities( PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, + PaytoPayments paytoPayments, PixPayments pixPayments, PromptpayPayments promptpayPayments, RevolutPayPayments revolutPayPayments, @@ -1728,6 +1742,7 @@ private Capabilities( this.payByBankPayments = payByBankPayments; this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; + this.paytoPayments = paytoPayments; this.pixPayments = pixPayments; this.promptpayPayments = promptpayPayments; this.revolutPayPayments = revolutPayPayments; @@ -1840,6 +1855,8 @@ public static class Builder { private PaynowPayments paynowPayments; + private PaytoPayments paytoPayments; + private PixPayments pixPayments; private PromptpayPayments promptpayPayments; @@ -1921,6 +1938,7 @@ public AccountUpdateParams.Capabilities build() { this.payByBankPayments, this.paycoPayments, this.paynowPayments, + this.paytoPayments, this.pixPayments, this.promptpayPayments, this.revolutPayPayments, @@ -2258,6 +2276,13 @@ public Builder setPaynowPayments( return this; } + /** The payto_payments capability. */ + public Builder setPaytoPayments( + AccountUpdateParams.Capabilities.PaytoPayments paytoPayments) { + this.paytoPayments = paytoPayments; + return this; + } + /** The pix_payments capability. */ public Builder setPixPayments(AccountUpdateParams.Capabilities.PixPayments pixPayments) { this.pixPayments = pixPayments; @@ -5811,6 +5836,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaytoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private PaytoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Capabilities.PaytoPayments build() { + return new AccountUpdateParams.Capabilities.PaytoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.PaytoPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.PaytoPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PixPayments { @@ -7806,7 +7911,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -7952,13 +8060,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -8920,11 +9034,10 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The back of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The uploaded + * file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF + * format, and less than 10 MB in size. */ @SerializedName("back") Object back; @@ -8940,11 +9053,10 @@ public static class Document { Map extraParams; /** - * The front of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The front of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The uploaded + * file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF + * format, and less than 10 MB in size. */ @SerializedName("front") Object front; @@ -8973,11 +9085,10 @@ public AccountUpdateParams.Company.Verification.Document build() { } /** - * The back of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The back of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The + * uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, + * or PDF format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -8985,11 +9096,10 @@ public Builder setBack(String back) { } /** - * The back of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The back of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The + * uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, + * or PDF format, and less than 10 MB in size. */ public Builder setBack(EmptyParam back) { this.back = back; @@ -9025,11 +9135,10 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The front of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The + * uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, + * or PDF format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -9037,11 +9146,10 @@ public Builder setFront(String front) { } /** - * The front of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The front of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The + * uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, + * or PDF format, and less than 10 MB in size. */ public Builder setFront(EmptyParam front) { this.front = front; @@ -9393,9 +9501,8 @@ public static class BankAccountOwnershipVerification { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9494,9 +9601,8 @@ public static class CompanyLicense { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9589,9 +9695,8 @@ public static class CompanyMemorandumOfAssociation { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9687,9 +9792,8 @@ public static class CompanyMinisterialDecree { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9785,9 +9889,8 @@ public static class CompanyRegistrationVerification { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9885,9 +9988,8 @@ public static class CompanyTaxIdVerification { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -9983,9 +10085,8 @@ public static class ProofOfAddress { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -10078,16 +10179,21 @@ public static class ProofOfRegistration { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; - private ProofOfRegistration(Map extraParams, List files) { + /** Information regarding the person signing the document if applicable. */ + @SerializedName("signer") + Signer signer; + + private ProofOfRegistration( + Map extraParams, List files, Signer signer) { this.extraParams = extraParams; this.files = files; + this.signer = signer; } public static Builder builder() { @@ -10099,10 +10205,12 @@ public static class Builder { private List files; + private Signer signer; + /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Documents.ProofOfRegistration build() { return new AccountUpdateParams.Documents.ProofOfRegistration( - this.extraParams, this.files); + this.extraParams, this.files, this.signer); } /** @@ -10158,6 +10266,91 @@ public Builder addAllFile(List elements) { this.files.addAll(elements); return this; } + + /** Information regarding the person signing the document if applicable. */ + public Builder setSigner(AccountUpdateParams.Documents.ProofOfRegistration.Signer signer) { + this.signer = signer; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Signer { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The token of the person signing the document, if applicable. */ + @SerializedName("person") + Object person; + + private Signer(Map extraParams, Object person) { + this.extraParams = extraParams; + this.person = person; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object person; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Documents.ProofOfRegistration.Signer build() { + return new AccountUpdateParams.Documents.ProofOfRegistration.Signer( + this.extraParams, this.person); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Documents.ProofOfRegistration.Signer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Documents.ProofOfRegistration.Signer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The token of the person signing the document, if applicable. */ + public Builder setPerson(String person) { + this.person = person; + return this; + } + + /** The token of the person signing the document, if applicable. */ + public Builder setPerson(EmptyParam person) { + this.person = person; + return this; + } + } } } @@ -10174,17 +10367,21 @@ public static class ProofOfUltimateBeneficialOwnership { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; + /** Information regarding the person signing the document if applicable. */ + @SerializedName("signer") + Signer signer; + private ProofOfUltimateBeneficialOwnership( - Map extraParams, List files) { + Map extraParams, List files, Signer signer) { this.extraParams = extraParams; this.files = files; + this.signer = signer; } public static Builder builder() { @@ -10196,10 +10393,12 @@ public static class Builder { private List files; + private Signer signer; + /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership build() { return new AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership( - this.extraParams, this.files); + this.extraParams, this.files, this.signer); } /** @@ -10259,6 +10458,94 @@ public Builder addAllFile(List elements) { this.files.addAll(elements); return this; } + + /** Information regarding the person signing the document if applicable. */ + public Builder setSigner( + AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer signer) { + this.signer = signer; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Signer { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The token of the person signing the document, if applicable. */ + @SerializedName("person") + Object person; + + private Signer(Map extraParams, Object person) { + this.extraParams = extraParams; + this.person = person; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object person; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer build() { + return new AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer( + this.extraParams, this.person); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Documents.ProofOfUltimateBeneficialOwnership.Signer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The token of the person signing the document, if applicable. */ + public Builder setPerson(String person) { + this.person = person; + return this; + } + + /** The token of the person signing the document, if applicable. */ + public Builder setPerson(EmptyParam person) { + this.person = person; + return this; + } + } } } } @@ -10277,7 +10564,7 @@ public static class Groups { /** * The group the account is in to determine their payments pricing, and null if the account is - * on customized pricing. See + * on customized pricing. See * the Platform pricing tool documentation for details. */ @SerializedName("payments_pricing") @@ -10330,7 +10617,7 @@ public Builder putAllExtraParam(Map map) { /** * The group the account is in to determine their payments pricing, and null if the account is - * on customized pricing. See + * on customized pricing. See * the Platform pricing tool documentation for details. */ public Builder setPaymentsPricing(String paymentsPricing) { @@ -10340,7 +10627,7 @@ public Builder setPaymentsPricing(String paymentsPricing) { /** * The group the account is in to determine their payments pricing, and null if the account is - * on customized pricing. See + * on customized pricing. See * the Platform pricing tool documentation for details. */ public Builder setPaymentsPricing(EmptyParam paymentsPricing) { @@ -10439,7 +10726,7 @@ public static class Individual { Object maidenName; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -10889,7 +11176,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -10900,7 +11187,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -11000,7 +11287,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -11146,13 +11436,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -11725,7 +12021,10 @@ public static class RegisteredAddress { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -11871,13 +12170,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -12144,7 +12449,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class AdditionalDocument { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -12163,7 +12468,7 @@ public static class AdditionalDocument { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -12195,7 +12500,7 @@ public AccountUpdateParams.Individual.Verification.AdditionalDocument build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12206,7 +12511,7 @@ public Builder setBack(String back) { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12247,7 +12552,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12258,7 +12563,7 @@ public Builder setFront(String front) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12274,7 +12579,7 @@ public Builder setFront(EmptyParam front) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -12293,7 +12598,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -12325,7 +12630,7 @@ public AccountUpdateParams.Individual.Verification.Document build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12336,7 +12641,7 @@ public Builder setBack(String back) { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12375,7 +12680,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -12386,7 +12691,7 @@ public Builder setFront(String front) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. diff --git a/src/main/java/com/stripe/param/ApplicationFeeRefundCreateParams.java b/src/main/java/com/stripe/param/ApplicationFeeRefundCreateParams.java index 771046a7811..e95937dc9cb 100644 --- a/src/main/java/com/stripe/param/ApplicationFeeRefundCreateParams.java +++ b/src/main/java/com/stripe/param/ApplicationFeeRefundCreateParams.java @@ -34,7 +34,7 @@ public class ApplicationFeeRefundCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/ApplicationFeeRefundUpdateParams.java b/src/main/java/com/stripe/param/ApplicationFeeRefundUpdateParams.java index 4b3ab4d2fa0..8943675731c 100644 --- a/src/main/java/com/stripe/param/ApplicationFeeRefundUpdateParams.java +++ b/src/main/java/com/stripe/param/ApplicationFeeRefundUpdateParams.java @@ -28,7 +28,7 @@ public class ApplicationFeeRefundUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -140,7 +140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CashBalanceUpdateParams.java b/src/main/java/com/stripe/param/CashBalanceUpdateParams.java index 18b3dfc32d0..00fdc2d1a3a 100644 --- a/src/main/java/com/stripe/param/CashBalanceUpdateParams.java +++ b/src/main/java/com/stripe/param/CashBalanceUpdateParams.java @@ -128,7 +128,7 @@ public static class Settings { * Controls how funds transferred by the customer are applied to payment intents and invoices. * Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more * information about these reconciliation modes, see Reconciliation. + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">Reconciliation. */ @SerializedName("reconciliation_mode") ReconciliationMode reconciliationMode; @@ -182,7 +182,7 @@ public Builder putAllExtraParam(Map map) { * Controls how funds transferred by the customer are applied to payment intents and invoices. * Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more * information about these reconciliation modes, see Reconciliation. + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">Reconciliation. */ public Builder setReconciliationMode( CashBalanceUpdateParams.Settings.ReconciliationMode reconciliationMode) { diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java index fd360623381..ee0145e8340 100644 --- a/src/main/java/com/stripe/param/ChargeCaptureParams.java +++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java @@ -73,7 +73,7 @@ public class ChargeCaptureParams extends ApiRequestParams { /** * An optional dictionary including the account to automatically transfer to as part of a - * destination charge. See the + * destination charge. See the * Connect documentation for details. */ @SerializedName("transfer_data") @@ -82,7 +82,7 @@ public class ChargeCaptureParams extends ApiRequestParams { /** * A string that identifies this transaction as part of a group. {@code transfer_group} may only * be provided if it has not been set. See the Connect + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Connect * documentation for details. */ @SerializedName("transfer_group") @@ -263,7 +263,7 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { /** * An optional dictionary including the account to automatically transfer to as part of a - * destination charge. See the + * destination charge. See the * Connect documentation for details. */ public Builder setTransferData(ChargeCaptureParams.TransferData transferData) { @@ -274,7 +274,7 @@ public Builder setTransferData(ChargeCaptureParams.TransferData transferData) { /** * A string that identifies this transaction as part of a group. {@code transfer_group} may only * be provided if it has not been set. See the Connect + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Connect * documentation for details. */ public Builder setTransferGroup(String transferGroup) { diff --git a/src/main/java/com/stripe/param/ChargeCreateParams.java b/src/main/java/com/stripe/param/ChargeCreateParams.java index bc73185fe0e..52a2041671b 100644 --- a/src/main/java/com/stripe/param/ChargeCreateParams.java +++ b/src/main/java/com/stripe/param/ChargeCreateParams.java @@ -16,10 +16,10 @@ public class ChargeCreateParams extends ApiRequestParams { /** * Amount intended to be collected by this payment. A positive integer representing how much to - * charge in the smallest currency + * charge in the smallest currency * unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The * minimum amount is $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @@ -34,7 +34,7 @@ public class ChargeCreateParams extends ApiRequestParams { * application owner's Stripe account. The request must be made with an OAuth key or the {@code * Stripe-Account} header in order to take an application fee. For more information, see the * application fees documentation. + * href="https://docs.stripe.com/connect/direct-charges#collect-fees">documentation. */ @SerializedName("application_fee_amount") Long applicationFeeAmount; @@ -42,9 +42,9 @@ public class ChargeCreateParams extends ApiRequestParams { /** * Whether to immediately capture the charge. Defaults to {@code true}. When {@code false}, the * charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire + * href="https://api.stripe.com#capture_charge">captured later. Uncaptured charges expire * after a set number of days (7 by default). For more information, see the authorizing charges and settling + * href="https://docs.stripe.com/charges/placing-a-hold">authorizing charges and settling * later documentation. */ @SerializedName("capture") @@ -87,7 +87,7 @@ public class ChargeCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -96,16 +96,17 @@ public class ChargeCreateParams extends ApiRequestParams { Object metadata; /** - * The Stripe account ID for which these funds are intended. Automatically set if you use the - * {@code destination} parameter. For details, see Creating + * The Stripe account ID for which these funds are intended. You can specify the business of + * record as the connected account using the {@code on_behalf_of} attribute on the charge. For + * details, see Creating * Separate Charges and Transfers. */ @SerializedName("on_behalf_of") String onBehalfOf; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -113,9 +114,9 @@ public class ChargeCreateParams extends ApiRequestParams { /** * The email address to which this charge's receipt will be sent. The receipt will + * href="https://docs.stripe.com/dashboard/receipts">receipt will be sent. The receipt will * not be sent until the charge is paid, and no receipts will be sent for test mode charges. If - * this charge is for a Customer, the + * this charge is for a Customer, the * email address specified here will override the customer's email address. If {@code * receipt_email} is specified for a charge in live mode, a receipt will be sent regardless of * your email settings. @@ -129,15 +130,15 @@ public class ChargeCreateParams extends ApiRequestParams { /** * A payment source to be charged. This can be the ID of a card (i.e., credit or debit card), a bank account, a source, a token, or a connected + * href="https://docs.stripe.com/api#cards">card (i.e., credit or debit card), a bank account, a source, a token, or a connected * account. For certain sources---namely, cards, bank accounts, and attached sources---you must also pass the ID of the + * href="https://docs.stripe.com/api#cards">cards, bank accounts, and attached sources---you must also pass the ID of the * associated customer. */ @SerializedName("source") @@ -168,7 +169,7 @@ public class ChargeCreateParams extends ApiRequestParams { /** * An optional dictionary including the account to automatically transfer to as part of a - * destination charge. See the + * destination charge. See the * Connect documentation for details. */ @SerializedName("transfer_data") @@ -176,7 +177,7 @@ public class ChargeCreateParams extends ApiRequestParams { /** * A string that identifies this transaction as part of a group. For details, see Grouping + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Grouping * transactions. */ @SerializedName("transfer_group") @@ -297,10 +298,10 @@ public ChargeCreateParams build() { /** * Amount intended to be collected by this payment. A positive integer representing how much to - * charge in the smallest currency + * charge in the smallest currency * unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). * The minimum amount is $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @@ -319,7 +320,7 @@ public Builder setApplicationFee(Long applicationFee) { * the application owner's Stripe account. The request must be made with an OAuth key or the * {@code Stripe-Account} header in order to take an application fee. For more information, see * the application fees documentation. + * href="https://docs.stripe.com/connect/direct-charges#collect-fees">documentation. */ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { this.applicationFeeAmount = applicationFeeAmount; @@ -329,9 +330,9 @@ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { /** * Whether to immediately capture the charge. Defaults to {@code true}. When {@code false}, the * charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges - * expire after a set number of days (7 by default). For more information, see the authorizing charges and settling + * href="https://api.stripe.com#capture_charge">captured later. Uncaptured charges expire + * after a set number of days (7 by default). For more information, see the authorizing charges and settling * later documentation. */ public Builder setCapture(Boolean capture) { @@ -452,7 +453,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -463,7 +464,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -474,9 +475,10 @@ public Builder setMetadata(Map metadata) { } /** - * The Stripe account ID for which these funds are intended. Automatically set if you use the - * {@code destination} parameter. For details, see Creating + * The Stripe account ID for which these funds are intended. You can specify the business of + * record as the connected account using the {@code on_behalf_of} attribute on the charge. For + * details, see Creating * Separate Charges and Transfers. */ public Builder setOnBehalfOf(String onBehalfOf) { @@ -485,7 +487,7 @@ public Builder setOnBehalfOf(String onBehalfOf) { } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions(ChargeCreateParams.RadarOptions radarOptions) { @@ -495,9 +497,9 @@ public Builder setRadarOptions(ChargeCreateParams.RadarOptions radarOptions) { /** * The email address to which this charge's receipt will be sent. The receipt will + * href="https://docs.stripe.com/dashboard/receipts">receipt will be sent. The receipt will * not be sent until the charge is paid, and no receipts will be sent for test mode charges. If - * this charge is for a Customer, the + * this charge is for a Customer, the * email address specified here will override the customer's email address. If {@code * receipt_email} is specified for a charge in live mode, a receipt will be sent regardless of * your email settings. @@ -515,15 +517,15 @@ public Builder setShipping(ChargeCreateParams.Shipping shipping) { /** * A payment source to be charged. This can be the ID of a card (i.e., credit or debit card), a bank account, a source, a token, or a connected + * href="https://docs.stripe.com/api#cards">card (i.e., credit or debit card), a bank account, a source, a token, or a connected * account. For certain sources---namely, cards, bank accounts, and attached sources---you must also pass the ID of the + * href="https://docs.stripe.com/api#cards">cards, bank accounts, and attached sources---you must also pass the ID of the * associated customer. */ public Builder setSource(String source) { @@ -560,7 +562,7 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { /** * An optional dictionary including the account to automatically transfer to as part of a - * destination charge. See the + * destination charge. See the * Connect documentation for details. */ public Builder setTransferData(ChargeCreateParams.TransferData transferData) { @@ -570,7 +572,7 @@ public Builder setTransferData(ChargeCreateParams.TransferData transferData) { /** * A string that identifies this transaction as part of a group. For details, see Grouping + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Grouping * transactions. */ public Builder setTransferGroup(String transferGroup) { @@ -682,7 +684,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -735,7 +737,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -919,7 +921,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -1032,7 +1037,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/ChargeSearchParams.java b/src/main/java/com/stripe/param/ChargeSearchParams.java index 541a8c15ab9..1df86bbf856 100644 --- a/src/main/java/com/stripe/param/ChargeSearchParams.java +++ b/src/main/java/com/stripe/param/ChargeSearchParams.java @@ -43,8 +43,8 @@ public class ChargeSearchParams extends ApiRequestParams { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for charges. */ @SerializedName("query") @@ -153,8 +153,8 @@ public Builder setPage(String page) { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for charges. */ public Builder setQuery(String query) { diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index 63414340f50..df3343871a7 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -54,7 +54,7 @@ public class ChargeUpdateParams extends ApiRequestParams { FraudDetails fraudDetails; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -76,7 +76,7 @@ public class ChargeUpdateParams extends ApiRequestParams { /** * A string that identifies this transaction as part of a group. {@code transfer_group} may only * be provided if it has not been set. See the Connect + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Connect * documentation for details. */ @SerializedName("transfer_group") @@ -273,7 +273,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -284,7 +284,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -321,7 +321,7 @@ public Builder setShipping(ChargeUpdateParams.Shipping shipping) { /** * A string that identifies this transaction as part of a group. {@code transfer_group} may only * be provided if it has not been set. See the Connect + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Connect * documentation for details. */ public Builder setTransferGroup(String transferGroup) { @@ -332,7 +332,7 @@ public Builder setTransferGroup(String transferGroup) { /** * A string that identifies this transaction as part of a group. {@code transfer_group} may only * be provided if it has not been set. See the Connect + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Connect * documentation for details. */ public Builder setTransferGroup(EmptyParam transferGroup) { @@ -631,7 +631,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -777,13 +780,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index 81fbe94c2cb..c120c974de8 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -47,7 +47,7 @@ public class ConfirmationTokenCreateParams extends ApiRequestParams { * Indicates that you intend to make future payments with this ConfirmationToken's payment method. * *

The presence of this property will attach the payment method to + * href="https://docs.stripe.com/payments/save-during-payment">attach the payment method to * the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required * actions from the user are complete. */ @@ -194,7 +194,7 @@ public Builder setReturnUrl(String returnUrl) { * method. * *

The presence of this property will attach the payment method to + * href="https://docs.stripe.com/payments/save-during-payment">attach the payment method to * the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any * required actions from the user are complete. */ @@ -428,7 +428,7 @@ public static class PaymentMethodData { MbWay mbWay; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -506,6 +506,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -521,7 +528,7 @@ public static class PaymentMethodData { Promptpay promptpay; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -646,6 +653,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -701,6 +709,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -804,6 +813,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -876,6 +887,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -1314,6 +1326,15 @@ public Builder setPaypal(ConfirmationTokenCreateParams.PaymentMethodData.Paypal return this; } + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. + */ + public Builder setPayto(ConfirmationTokenCreateParams.PaymentMethodData.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1334,7 +1355,7 @@ public Builder setPromptpay( } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions( @@ -2329,7 +2350,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -2444,7 +2468,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -3326,6 +3353,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -4702,6 +4732,105 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + + private Payto( + String accountNumber, String bsbNumber, Map extraParams, String payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + private String payId; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfirmationTokenCreateParams.PaymentMethodData.Payto build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Payto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Payto#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -4831,7 +4960,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -4887,7 +5016,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot + * A Radar Session is a snapshot * of the browser metadata and device details that help Radar make more accurate predictions * on your payments. */ @@ -5779,6 +5908,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6342,7 +6474,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -6455,7 +6590,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/CouponCreateParams.java b/src/main/java/com/stripe/param/CouponCreateParams.java index b5f87bcbe24..4a9f1e35e1e 100644 --- a/src/main/java/com/stripe/param/CouponCreateParams.java +++ b/src/main/java/com/stripe/param/CouponCreateParams.java @@ -86,7 +86,7 @@ public class CouponCreateParams extends ApiRequestParams { Long maxRedemptions; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -367,7 +367,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -378,7 +378,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CouponUpdateParams.java b/src/main/java/com/stripe/param/CouponUpdateParams.java index 5f1ece4d17a..2b1ee890b21 100644 --- a/src/main/java/com/stripe/param/CouponUpdateParams.java +++ b/src/main/java/com/stripe/param/CouponUpdateParams.java @@ -37,7 +37,7 @@ public class CouponUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -193,7 +193,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -204,7 +204,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CreditNoteCreateParams.java b/src/main/java/com/stripe/param/CreditNoteCreateParams.java index 53c7738c60f..1bb4ad959cb 100644 --- a/src/main/java/com/stripe/param/CreditNoteCreateParams.java +++ b/src/main/java/com/stripe/param/CreditNoteCreateParams.java @@ -73,7 +73,7 @@ public class CreditNoteCreateParams extends ApiRequestParams { String memo; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CreditNoteListParams.java b/src/main/java/com/stripe/param/CreditNoteListParams.java index 7a712b72307..1b13ca0a6bc 100644 --- a/src/main/java/com/stripe/param/CreditNoteListParams.java +++ b/src/main/java/com/stripe/param/CreditNoteListParams.java @@ -21,6 +21,13 @@ public class CreditNoteListParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** + * Only return credit notes for the account representing the customer specified by this account + * ID. + */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -66,6 +73,7 @@ public class CreditNoteListParams extends ApiRequestParams { private CreditNoteListParams( Object created, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, @@ -74,6 +82,7 @@ private CreditNoteListParams( String startingAfter) { this.created = created; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -91,6 +100,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -108,6 +119,7 @@ public CreditNoteListParams build() { return new CreditNoteListParams( this.created, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -134,6 +146,15 @@ public Builder setCustomer(String customer) { return this; } + /** + * Only return credit notes for the account representing the customer specified by this account + * ID. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with diff --git a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java index 4445a387a6b..ef2dc2f119e 100644 --- a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java +++ b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java @@ -89,7 +89,7 @@ public class CreditNotePreviewLinesListParams extends ApiRequestParams { String memo; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CreditNotePreviewParams.java b/src/main/java/com/stripe/param/CreditNotePreviewParams.java index 1ca061957bc..1619ae42160 100644 --- a/src/main/java/com/stripe/param/CreditNotePreviewParams.java +++ b/src/main/java/com/stripe/param/CreditNotePreviewParams.java @@ -73,7 +73,7 @@ public class CreditNotePreviewParams extends ApiRequestParams { String memo; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CreditNoteUpdateParams.java b/src/main/java/com/stripe/param/CreditNoteUpdateParams.java index 5c2e137323d..0d0e333e7a0 100644 --- a/src/main/java/com/stripe/param/CreditNoteUpdateParams.java +++ b/src/main/java/com/stripe/param/CreditNoteUpdateParams.java @@ -32,7 +32,7 @@ public class CreditNoteUpdateParams extends ApiRequestParams { Object memo; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionCreateParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionCreateParams.java index 73951633ed7..69c60bbbeda 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionCreateParams.java @@ -25,7 +25,7 @@ public class CustomerBalanceTransactionCollectionCreateParams extends ApiRequest * Required. Three-letter ISO currency code, in lowercase. * Must be a supported currency. Specifies the {@code + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance">{@code * invoice_credit_balance} that this transaction will apply to. If the customer's {@code * currency} is not set, it will be updated to this value. */ @@ -50,7 +50,7 @@ public class CustomerBalanceTransactionCollectionCreateParams extends ApiRequest Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -115,7 +115,7 @@ public Builder setAmount(Long amount) { * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code, in lowercase. * Must be a supported currency. Specifies the * {@code + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance">{@code * invoice_credit_balance} that this transaction will apply to. If the customer's {@code * currency} is not set, it will be updated to this value. */ @@ -213,7 +213,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -224,7 +224,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java index 686751224ce..a6d58919467 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java @@ -39,6 +39,10 @@ public class CustomerBalanceTransactionCollectionListParams extends ApiRequestPa @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Only return transactions that are related to the specified invoice. */ + @SerializedName("invoice") + String invoice; + /** * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the * default is 10. @@ -60,12 +64,14 @@ private CustomerBalanceTransactionCollectionListParams( String endingBefore, List expand, Map extraParams, + String invoice, Long limit, String startingAfter) { this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; + this.invoice = invoice; this.limit = limit; this.startingAfter = startingAfter; } @@ -83,6 +89,8 @@ public static class Builder { private Map extraParams; + private String invoice; + private Long limit; private String startingAfter; @@ -94,6 +102,7 @@ public CustomerBalanceTransactionCollectionListParams build() { this.endingBefore, this.expand, this.extraParams, + this.invoice, this.limit, this.startingAfter); } @@ -178,6 +187,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Only return transactions that are related to the specified invoice. */ + public Builder setInvoice(String invoice) { + this.invoice = invoice; + return this; + } + /** * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the * default is 10. diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionCreateParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionCreateParams.java index 18402d47888..8b68b4dff7a 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionCreateParams.java @@ -25,7 +25,7 @@ public class CustomerBalanceTransactionCreateParams extends ApiRequestParams { * Required. Three-letter ISO currency code, in lowercase. * Must be a supported currency. Specifies the {@code + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance">{@code * invoice_credit_balance} that this transaction will apply to. If the customer's {@code * currency} is not set, it will be updated to this value. */ @@ -50,7 +50,7 @@ public class CustomerBalanceTransactionCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -115,7 +115,7 @@ public Builder setAmount(Long amount) { * href="https://www.iso.org/iso-4217-currency-codes.html">ISO currency code, in lowercase. * Must be a supported currency. Specifies the * {@code + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_credit_balance">{@code * invoice_credit_balance} that this transaction will apply to. If the customer's {@code * currency} is not set, it will be updated to this value. */ @@ -211,7 +211,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -222,7 +222,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java index e2191f7e6da..6e9b6139559 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java @@ -39,6 +39,10 @@ public class CustomerBalanceTransactionListParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Only return transactions that are related to the specified invoice. */ + @SerializedName("invoice") + String invoice; + /** * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the * default is 10. @@ -60,12 +64,14 @@ private CustomerBalanceTransactionListParams( String endingBefore, List expand, Map extraParams, + String invoice, Long limit, String startingAfter) { this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; + this.invoice = invoice; this.limit = limit; this.startingAfter = startingAfter; } @@ -83,6 +89,8 @@ public static class Builder { private Map extraParams; + private String invoice; + private Long limit; private String startingAfter; @@ -94,6 +102,7 @@ public CustomerBalanceTransactionListParams build() { this.endingBefore, this.expand, this.extraParams, + this.invoice, this.limit, this.startingAfter); } @@ -177,6 +186,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Only return transactions that are related to the specified invoice. */ + public Builder setInvoice(String invoice) { + this.invoice = invoice; + return this; + } + /** * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the * default is 10. diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionUpdateParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionUpdateParams.java index 9e5cc313fd0..bc729a96273 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionUpdateParams.java @@ -32,7 +32,7 @@ public class CustomerBalanceTransactionUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -160,7 +160,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -171,7 +171,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java b/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java index cc2de9dd2d7..8911b15a3a4 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java @@ -39,6 +39,10 @@ public class CustomerBalanceTransactionsParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Only return transactions that are related to the specified invoice. */ + @SerializedName("invoice") + String invoice; + /** * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the * default is 10. @@ -60,12 +64,14 @@ private CustomerBalanceTransactionsParams( String endingBefore, List expand, Map extraParams, + String invoice, Long limit, String startingAfter) { this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; + this.invoice = invoice; this.limit = limit; this.startingAfter = startingAfter; } @@ -83,6 +89,8 @@ public static class Builder { private Map extraParams; + private String invoice; + private Long limit; private String startingAfter; @@ -94,6 +102,7 @@ public CustomerBalanceTransactionsParams build() { this.endingBefore, this.expand, this.extraParams, + this.invoice, this.limit, this.startingAfter); } @@ -177,6 +186,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Only return transactions that are related to the specified invoice. */ + public Builder setInvoice(String invoice) { + this.invoice = invoice; + return this; + } + /** * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the * default is 10. diff --git a/src/main/java/com/stripe/param/CustomerCashBalanceUpdateParams.java b/src/main/java/com/stripe/param/CustomerCashBalanceUpdateParams.java index 4d475cb4c67..7e38ea7f9cd 100644 --- a/src/main/java/com/stripe/param/CustomerCashBalanceUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerCashBalanceUpdateParams.java @@ -128,7 +128,7 @@ public static class Settings { * Controls how funds transferred by the customer are applied to payment intents and invoices. * Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more * information about these reconciliation modes, see Reconciliation. + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">Reconciliation. */ @SerializedName("reconciliation_mode") ReconciliationMode reconciliationMode; @@ -184,7 +184,7 @@ public Builder putAllExtraParam(Map map) { * Controls how funds transferred by the customer are applied to payment intents and invoices. * Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more * information about these reconciliation modes, see Reconciliation. + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">Reconciliation. */ public Builder setReconciliationMode( CustomerCashBalanceUpdateParams.Settings.ReconciliationMode reconciliationMode) { diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index 18b6d44d0ad..e12cebfad7c 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -14,7 +14,11 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerCreateParams extends ApiRequestParams { - /** The customer's address. */ + /** + * The customer's address. Learn about country-specific + * requirements for calculating tax. + */ @SerializedName("address") Object address; @@ -78,7 +82,7 @@ public class CustomerCreateParams extends ApiRequestParams { InvoiceSettings invoiceSettings; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -264,13 +268,21 @@ public CustomerCreateParams build() { this.validate); } - /** The customer's address. */ + /** + * The customer's address. Learn about country-specific + * requirements for calculating tax. + */ public Builder setAddress(CustomerCreateParams.Address address) { this.address = address; return this; } - /** The customer's address. */ + /** + * The customer's address. Learn about country-specific + * requirements for calculating tax. + */ public Builder setAddress(EmptyParam address) { this.address = address; return this; @@ -431,7 +443,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -442,7 +454,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -610,7 +622,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -722,7 +737,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -820,7 +838,7 @@ public static class Settings { * Controls how funds transferred by the customer are applied to payment intents and invoices. * Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more * information about these reconciliation modes, see Reconciliation. + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">Reconciliation. */ @SerializedName("reconciliation_mode") ReconciliationMode reconciliationMode; @@ -877,7 +895,7 @@ public Builder putAllExtraParam(Map map) { * Controls how funds transferred by the customer are applied to payment intents and * invoices. Valid options are {@code automatic}, {@code manual}, or {@code * merchant_default}. For more information about these reconciliation modes, see Reconciliation. + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">Reconciliation. */ public Builder setReconciliationMode( CustomerCreateParams.CashBalance.Settings.ReconciliationMode reconciliationMode) { @@ -1436,7 +1454,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -1550,7 +1571,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/CustomerFundCashBalanceParams.java b/src/main/java/com/stripe/param/CustomerFundCashBalanceParams.java index 465e795ce09..7ec577c0d1d 100644 --- a/src/main/java/com/stripe/param/CustomerFundCashBalanceParams.java +++ b/src/main/java/com/stripe/param/CustomerFundCashBalanceParams.java @@ -16,7 +16,7 @@ public class CustomerFundCashBalanceParams extends ApiRequestParams { /** * Required. Amount to be used for this test cash balance transaction. A positive * integer representing how much to fund in the smallest currency unit (e.g., 100 + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit (e.g., 100 * cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). */ @SerializedName("amount") @@ -46,7 +46,7 @@ public class CustomerFundCashBalanceParams extends ApiRequestParams { /** * A description of the test funding. This simulates free-text references supplied by customers * when making bank transfers to their cash balance. You can use this to test how Stripe's reconciliation + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">reconciliation * algorithm applies to different user inputs. */ @SerializedName("reference") @@ -89,7 +89,7 @@ public CustomerFundCashBalanceParams build() { /** * Required. Amount to be used for this test cash balance transaction. A * positive integer representing how much to fund in the smallest currency unit (e.g., 100 + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit (e.g., 100 * cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). */ public Builder setAmount(Long amount) { @@ -162,7 +162,7 @@ public Builder putAllExtraParam(Map map) { /** * A description of the test funding. This simulates free-text references supplied by customers * when making bank transfers to their cash balance. You can use this to test how Stripe's reconciliation + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">reconciliation * algorithm applies to different user inputs. */ public Builder setReference(String reference) { diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index 1ef7256bbc5..9402cf8bf71 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -354,6 +354,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java index a9cbb227bb5..517eae5b7fe 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -354,6 +354,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentSourceCreateParams.java b/src/main/java/com/stripe/param/CustomerPaymentSourceCreateParams.java index 524ec69394e..590f0d922b2 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentSourceCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentSourceCreateParams.java @@ -27,7 +27,7 @@ public class CustomerPaymentSourceCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -37,7 +37,7 @@ public class CustomerPaymentSourceCreateParams extends ApiRequestParams { /** * Required. Please refer to full documentation instead. + * href="https://api.stripe.com">documentation instead. */ @SerializedName("source") String source; @@ -159,7 +159,7 @@ public Builder putAllMetadata(Map map) { /** * Required. Please refer to full documentation instead. + * href="https://api.stripe.com">documentation instead. */ public Builder setSource(String source) { this.source = source; diff --git a/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java b/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java index cfb835b3cf1..e53e3318ba6 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java @@ -71,7 +71,7 @@ public class CustomerPaymentSourceUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -373,7 +373,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -384,7 +384,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -575,7 +575,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -721,13 +724,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/CustomerSearchParams.java b/src/main/java/com/stripe/param/CustomerSearchParams.java index 94d5ea3e197..b1232c34303 100644 --- a/src/main/java/com/stripe/param/CustomerSearchParams.java +++ b/src/main/java/com/stripe/param/CustomerSearchParams.java @@ -43,8 +43,8 @@ public class CustomerSearchParams extends ApiRequestParams { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for customers. */ @SerializedName("query") @@ -153,8 +153,8 @@ public Builder setPage(String page) { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for customers. */ public Builder setQuery(String query) { diff --git a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java index ed4ad7be7e0..0c261c015d1 100644 --- a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java @@ -20,13 +20,14 @@ public class CustomerSessionCreateParams extends ApiRequestParams { @SerializedName("components") Components components; - /** - * Required. The ID of an existing customer for which to create the Customer - * Session. - */ + /** The ID of an existing customer for which to create the Customer Session. */ @SerializedName("customer") String customer; + /** The ID of an existing Account for which to create the Customer Session. */ + @SerializedName("customer_account") + String customerAccount; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -43,10 +44,12 @@ public class CustomerSessionCreateParams extends ApiRequestParams { private CustomerSessionCreateParams( Components components, String customer, + String customerAccount, List expand, Map extraParams) { this.components = components; this.customer = customer; + this.customerAccount = customerAccount; this.expand = expand; this.extraParams = extraParams; } @@ -60,6 +63,8 @@ public static class Builder { private String customer; + private String customerAccount; + private List expand; private Map extraParams; @@ -67,7 +72,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerSessionCreateParams build() { return new CustomerSessionCreateParams( - this.components, this.customer, this.expand, this.extraParams); + this.components, this.customer, this.customerAccount, this.expand, this.extraParams); } /** @@ -79,15 +84,18 @@ public Builder setComponents(CustomerSessionCreateParams.Components components) return this; } - /** - * Required. The ID of an existing customer for which to create the Customer - * Session. - */ + /** The ID of an existing customer for which to create the Customer Session. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of an existing Account for which to create the Customer Session. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link diff --git a/src/main/java/com/stripe/param/CustomerUpdateParams.java b/src/main/java/com/stripe/param/CustomerUpdateParams.java index c7bc87791f2..a13789bca39 100644 --- a/src/main/java/com/stripe/param/CustomerUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerUpdateParams.java @@ -14,7 +14,11 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerUpdateParams extends ApiRequestParams { - /** The customer's address. */ + /** + * The customer's address. Learn about country-specific + * requirements for calculating tax. + */ @SerializedName("address") Object address; @@ -37,14 +41,14 @@ public class CustomerUpdateParams extends ApiRequestParams { /** * If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method">invoice_settings.default_payment_method * parameter. * *

Provide the ID of a payment source already attached to this customer to make it this * customer's default payment source. * *

If you want to add a new payment source and make it the default, see the source property. + * href="https://docs.stripe.com/api/customers/update#update_customer-source">source property. */ @SerializedName("default_source") Object defaultSource; @@ -92,7 +96,7 @@ public class CustomerUpdateParams extends ApiRequestParams { InvoiceSettings invoiceSettings; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -257,13 +261,21 @@ public CustomerUpdateParams build() { this.validate); } - /** The customer's address. */ + /** + * The customer's address. Learn about country-specific + * requirements for calculating tax. + */ public Builder setAddress(CustomerUpdateParams.Address address) { this.address = address; return this; } - /** The customer's address. */ + /** + * The customer's address. Learn about country-specific + * requirements for calculating tax. + */ public Builder setAddress(EmptyParam address) { this.address = address; return this; @@ -300,14 +312,14 @@ public Builder setCashBalance(CustomerUpdateParams.CashBalance cashBalance) { /** * If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method">invoice_settings.default_payment_method * parameter. * *

Provide the ID of a payment source already attached to this customer to make it this * customer's default payment source. * *

If you want to add a new payment source and make it the default, see the source + * href="https://docs.stripe.com/api/customers/update#update_customer-source">source * property. */ public Builder setDefaultSource(String defaultSource) { @@ -317,14 +329,14 @@ public Builder setDefaultSource(String defaultSource) { /** * If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method">invoice_settings.default_payment_method * parameter. * *

Provide the ID of a payment source already attached to this customer to make it this * customer's default payment source. * *

If you want to add a new payment source and make it the default, see the source + * href="https://docs.stripe.com/api/customers/update#update_customer-source">source * property. */ public Builder setDefaultSource(EmptyParam defaultSource) { @@ -485,7 +497,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -496,7 +508,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -644,7 +656,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -790,13 +805,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -894,7 +915,7 @@ public static class Settings { * Controls how funds transferred by the customer are applied to payment intents and invoices. * Valid options are {@code automatic}, {@code manual}, or {@code merchant_default}. For more * information about these reconciliation modes, see Reconciliation. + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">Reconciliation. */ @SerializedName("reconciliation_mode") ReconciliationMode reconciliationMode; @@ -951,7 +972,7 @@ public Builder putAllExtraParam(Map map) { * Controls how funds transferred by the customer are applied to payment intents and * invoices. Valid options are {@code automatic}, {@code manual}, or {@code * merchant_default}. For more information about these reconciliation modes, see Reconciliation. + * href="https://docs.stripe.com/payments/customer-balance/reconciliation">Reconciliation. */ public Builder setReconciliationMode( CustomerUpdateParams.CashBalance.Settings.ReconciliationMode reconciliationMode) { @@ -1560,7 +1581,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -1708,13 +1732,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/DisputeUpdateParams.java b/src/main/java/com/stripe/param/DisputeUpdateParams.java index 2a650e20b18..ef5347d47e2 100644 --- a/src/main/java/com/stripe/param/DisputeUpdateParams.java +++ b/src/main/java/com/stripe/param/DisputeUpdateParams.java @@ -36,7 +36,7 @@ public class DisputeUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -177,7 +177,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -188,7 +188,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1593,7 +1593,10 @@ public static class ShippingAddress { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") Object state; @@ -1744,13 +1747,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -2079,7 +2088,10 @@ public static class ShippingAddress { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") Object state; @@ -2230,13 +2242,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/ExternalAccountCollectionCreateParams.java b/src/main/java/com/stripe/param/ExternalAccountCollectionCreateParams.java index 10be16b80d6..32e1c82052c 100644 --- a/src/main/java/com/stripe/param/ExternalAccountCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/ExternalAccountCollectionCreateParams.java @@ -26,7 +26,7 @@ public class ExternalAccountCollectionCreateParams extends ApiRequestParams { /** * Required. A token, like the ones returned by Stripe.js or a dictionary containing a user's external + * href="https://docs.stripe.com/js">Stripe.js or a dictionary containing a user's external * account details (with the options shown below). Please refer to full documentation instead. */ @@ -43,7 +43,7 @@ public class ExternalAccountCollectionCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -126,7 +126,7 @@ public Builder addAllExpand(List elements) { /** * Required. A token, like the ones returned by Stripe.js or a dictionary containing a user's external + * href="https://docs.stripe.com/js">Stripe.js or a dictionary containing a user's external * account details (with the options shown below). Please refer to full documentation instead. */ diff --git a/src/main/java/com/stripe/param/FeeRefundCollectionCreateParams.java b/src/main/java/com/stripe/param/FeeRefundCollectionCreateParams.java index 8f418d60536..fbce9061ecd 100644 --- a/src/main/java/com/stripe/param/FeeRefundCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/FeeRefundCollectionCreateParams.java @@ -34,7 +34,7 @@ public class FeeRefundCollectionCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/FeeRefundUpdateParams.java b/src/main/java/com/stripe/param/FeeRefundUpdateParams.java index 518fe6fee37..d5d95789a4b 100644 --- a/src/main/java/com/stripe/param/FeeRefundUpdateParams.java +++ b/src/main/java/com/stripe/param/FeeRefundUpdateParams.java @@ -28,7 +28,7 @@ public class FeeRefundUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -140,7 +140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/FileCreateParams.java b/src/main/java/com/stripe/param/FileCreateParams.java index 665a984b1b9..050660b7e08 100644 --- a/src/main/java/com/stripe/param/FileCreateParams.java +++ b/src/main/java/com/stripe/param/FileCreateParams.java @@ -38,14 +38,14 @@ public class FileCreateParams extends ApiRequestParams { /** * Optional parameters that automatically create a file link for the newly created file. + * href="https://api.stripe.com#file_links">file link for the newly created file. */ @SerializedName("file_link_data") FileLinkData fileLinkData; /** * Required. The purpose of the uploaded file. + * href="https://docs.stripe.com/file-upload#uploading-a-file">purpose of the uploaded file. */ @SerializedName("purpose") Purpose purpose; @@ -156,7 +156,7 @@ public Builder setFile(File file) { /** * Optional parameters that automatically create a file link for the newly created file. + * href="https://api.stripe.com#file_links">file link for the newly created file. */ public Builder setFileLinkData(FileCreateParams.FileLinkData fileLinkData) { this.fileLinkData = fileLinkData; @@ -165,7 +165,7 @@ public Builder setFileLinkData(FileCreateParams.FileLinkData fileLinkData) { /** * Required. The purpose of the uploaded file. + * href="https://docs.stripe.com/file-upload#uploading-a-file">purpose of the uploaded file. */ public Builder setPurpose(FileCreateParams.Purpose purpose) { this.purpose = purpose; @@ -201,7 +201,7 @@ public static class FileLinkData { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -310,7 +310,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -321,7 +321,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/FileLinkCreateParams.java b/src/main/java/com/stripe/param/FileLinkCreateParams.java index 29436ba56f9..2463f784c69 100644 --- a/src/main/java/com/stripe/param/FileLinkCreateParams.java +++ b/src/main/java/com/stripe/param/FileLinkCreateParams.java @@ -43,7 +43,7 @@ public class FileLinkCreateParams extends ApiRequestParams { String file; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -185,7 +185,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -196,7 +196,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/FileLinkUpdateParams.java b/src/main/java/com/stripe/param/FileLinkUpdateParams.java index eb0d23c9e1d..51856d3d725 100644 --- a/src/main/java/com/stripe/param/FileLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/FileLinkUpdateParams.java @@ -35,7 +35,7 @@ public class FileLinkUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -177,7 +177,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -188,7 +188,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java index ba1f9bdd2e8..6a56e9e115c 100644 --- a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java @@ -29,7 +29,7 @@ public class InvoiceAddLinesParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -152,7 +152,7 @@ public Builder putAllInvoiceMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -163,7 +163,7 @@ public Builder setInvoiceMetadata(EmptyParam invoiceMetadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -249,7 +249,7 @@ public static class Line { String invoiceItem; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -260,16 +260,16 @@ public static class Line { /** * The period associated with this invoice item. When set to different values, the period will * be rendered on the invoice. If you have Stripe Revenue Recognition enabled, + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, * the period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ @SerializedName("period") Period period; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -287,10 +287,10 @@ public static class Line { * A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes * on your own or use a third-party to calculate them. You cannot set tax amounts if any line * item has tax_rates + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates * or if the invoice has default_tax_rates - * or uses automatic tax. Pass an empty + * href="https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates + * or uses automatic tax. Pass an empty * string to remove previously defined tax amounts. */ @SerializedName("tax_amounts") @@ -523,7 +523,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -534,7 +534,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -547,9 +547,9 @@ public Builder setMetadata(Map metadata) { /** * The period associated with this invoice item. When set to different values, the period will * be rendered on the invoice. If you have Stripe Revenue Recognition enabled, + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, * the period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ public Builder setPeriod(InvoiceAddLinesParams.Line.Period period) { @@ -558,7 +558,7 @@ public Builder setPeriod(InvoiceAddLinesParams.Line.Period period) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ public Builder setPriceData(InvoiceAddLinesParams.Line.PriceData priceData) { @@ -610,10 +610,10 @@ public Builder addAllTaxAmount(List elemen * A list of up to 10 tax amounts for this line item. This can be useful if you calculate * taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any * line item has tax_rates + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates * or if the invoice has default_tax_rates - * or uses automatic tax. Pass an empty + * href="https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates + * or uses automatic tax. Pass an empty * string to remove previously defined tax amounts. */ public Builder setTaxAmounts(EmptyParam taxAmounts) { @@ -625,10 +625,10 @@ public Builder setTaxAmounts(EmptyParam taxAmounts) { * A list of up to 10 tax amounts for this line item. This can be useful if you calculate * taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any * line item has tax_rates + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates * or if the invoice has default_tax_rates - * or uses automatic tax. Pass an empty + * href="https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates + * or uses automatic tax. Pass an empty * string to remove previously defined tax amounts. */ public Builder setTaxAmounts(List taxAmounts) { @@ -911,7 +911,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1043,7 +1043,7 @@ public Builder setProductData( /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1104,7 +1104,7 @@ public static class ProductData { List images; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -1118,7 +1118,7 @@ public static class ProductData { @SerializedName("name") String name; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String taxCode; @@ -1277,7 +1277,7 @@ public Builder setName(String name) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index 9d170d2ed84..3f197a5c788 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -23,14 +23,14 @@ public class InvoiceCreateParams extends ApiRequestParams { * application owner's Stripe account. The request must be made with an OAuth key or the * Stripe-Account header in order to take an application fee. For more information, see the * application fees documentation. + * href="https://docs.stripe.com/billing/invoices/connect#collecting-fees">documentation. */ @SerializedName("application_fee_amount") Long applicationFeeAmount; /** * Controls whether Stripe performs automatic + * href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">automatic * collection of the invoice. If {@code false}, the invoice's state doesn't automatically * advance without an explicit action. Defaults to false. */ @@ -67,10 +67,14 @@ public class InvoiceCreateParams extends ApiRequestParams { @SerializedName("custom_fields") Object customFields; - /** The ID of the customer who will be billed. */ + /** The ID of the customer to bill. */ @SerializedName("customer") String customer; + /** The ID of the account to bill. */ + @SerializedName("customer_account") + String customerAccount; + /** * The number of days from when the invoice is created until it is due. Valid only for invoices * where {@code collection_method=send_invoice}. @@ -147,7 +151,7 @@ public class InvoiceCreateParams extends ApiRequestParams { /** * Revise an existing invoice. The new invoice will be created in {@code status=draft}. See the revision documentation for more + * href="https://docs.stripe.com/invoicing/invoice-revisions">revision documentation for more * details. */ @SerializedName("from_invoice") @@ -161,7 +165,7 @@ public class InvoiceCreateParams extends ApiRequestParams { Issuer issuer; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -183,7 +187,7 @@ public class InvoiceCreateParams extends ApiRequestParams { /** * The account (if any) for which the funds of the invoice payment are intended. If set, the * invoice will be presented with the branding and support information of the specified account. - * See the Invoices with Connect + * See the Invoices with Connect * documentation for details. */ @SerializedName("on_behalf_of") @@ -254,6 +258,7 @@ private InvoiceCreateParams( String currency, Object customFields, String customer, + String customerAccount, Long daysUntilDue, String defaultPaymentMethod, String defaultSource, @@ -287,6 +292,7 @@ private InvoiceCreateParams( this.currency = currency; this.customFields = customFields; this.customer = customer; + this.customerAccount = customerAccount; this.daysUntilDue = daysUntilDue; this.defaultPaymentMethod = defaultPaymentMethod; this.defaultSource = defaultSource; @@ -336,6 +342,8 @@ public static class Builder { private String customer; + private String customerAccount; + private Long daysUntilDue; private String defaultPaymentMethod; @@ -396,6 +404,7 @@ public InvoiceCreateParams build() { this.currency, this.customFields, this.customer, + this.customerAccount, this.daysUntilDue, this.defaultPaymentMethod, this.defaultSource, @@ -471,7 +480,7 @@ public Builder setAccountTaxIds(List accountTaxIds) { * the application owner's Stripe account. The request must be made with an OAuth key or the * Stripe-Account header in order to take an application fee. For more information, see the * application fees documentation. + * href="https://docs.stripe.com/billing/invoices/connect#collecting-fees">documentation. */ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { this.applicationFeeAmount = applicationFeeAmount; @@ -480,7 +489,7 @@ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { /** * Controls whether Stripe performs automatic + * href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">automatic * collection of the invoice. If {@code false}, the invoice's state doesn't automatically * advance without an explicit action. Defaults to false. */ @@ -564,12 +573,18 @@ public Builder setCustomFields(List customField return this; } - /** The ID of the customer who will be billed. */ + /** The ID of the customer to bill. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of the account to bill. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * The number of days from when the invoice is created until it is due. Valid only for invoices * where {@code collection_method=send_invoice}. @@ -761,7 +776,7 @@ public Builder setFooter(String footer) { /** * Revise an existing invoice. The new invoice will be created in {@code status=draft}. See the - * revision documentation for + * revision documentation for * more details. */ public Builder setFromInvoice(InvoiceCreateParams.FromInvoice fromInvoice) { @@ -807,7 +822,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -818,7 +833,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -844,7 +859,7 @@ public Builder setNumber(String number) { /** * The account (if any) for which the funds of the invoice payment are intended. If set, the * invoice will be presented with the branding and support information of the specified account. - * See the Invoices with Connect + * See the Invoices with Connect * documentation for details. */ public Builder setOnBehalfOf(String onBehalfOf) { @@ -931,7 +946,7 @@ public static class AutomaticTax { /** * Required. Whether Stripe automatically computes tax on this invoice. Note * that incompatible invoice items (invoice items with manually specified tax rates, negative amounts, or {@code + * href="https://docs.stripe.com/api/tax_rates">tax rates, negative amounts, or {@code * tax_behavior=unspecified}) cannot be added to automatic tax invoices. */ @SerializedName("enabled") @@ -979,7 +994,7 @@ public InvoiceCreateParams.AutomaticTax build() { /** * Required. Whether Stripe automatically computes tax on this invoice. Note * that incompatible invoice items (invoice items with manually specified tax rates, negative amounts, or {@code + * href="https://docs.stripe.com/api/tax_rates">tax rates, negative amounts, or {@code * tax_behavior=unspecified}) cannot be added to automatic tax invoices. */ public Builder setEnabled(Boolean enabled) { @@ -1733,6 +1748,13 @@ public static class PaymentMethodOptions { @SerializedName("konbini") Object konbini; + /** + * If paying by {@code payto}, this sub-hash contains details about the PayTo payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("payto") + Object payto; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -1754,6 +1776,7 @@ private PaymentMethodOptions( Object customerBalance, Map extraParams, Object konbini, + Object payto, Object sepaDebit, Object usBankAccount) { this.acssDebit = acssDebit; @@ -1762,6 +1785,7 @@ private PaymentMethodOptions( this.customerBalance = customerBalance; this.extraParams = extraParams; this.konbini = konbini; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -1783,6 +1807,8 @@ public static class Builder { private Object konbini; + private Object payto; + private Object sepaDebit; private Object usBankAccount; @@ -1796,6 +1822,7 @@ public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions build() { this.customerBalance, this.extraParams, this.konbini, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -1923,6 +1950,25 @@ public Builder setKonbini(EmptyParam konbini) { return this; } + /** + * If paying by {@code payto}, this sub-hash contains details about the PayTo payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPayto( + InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + + /** + * If paying by {@code payto}, this sub-hash contains details about the PayTo payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct * Debit payment method options to pass to the invoice’s PaymentIntent. @@ -2290,7 +2336,7 @@ public static class Card { * Installment configuration for payments attempted on this invoice. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ @SerializedName("installments") Installments installments; @@ -2298,10 +2344,10 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -2368,7 +2414,7 @@ public Builder putAllExtraParam(Map map) { * Installment configuration for payments attempted on this invoice. * *

For more information, see the installments integration + * href="https://docs.stripe.com/payments/installments">installments integration * guide. */ public Builder setInstallments( @@ -2381,10 +2427,10 @@ public Builder setInstallments( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -3029,6 +3075,229 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Payto(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto build() { + return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + Purpose purpose; + + private MandateOptions(Long amount, Map extraParams, Purpose purpose) { + this.amount = amount; + this.extraParams = extraParams; + this.purpose = purpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Purpose purpose; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + build() { + return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto + .MandateOptions(this.amount, this.extraParams, this.purpose); + } + + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + .Purpose + purpose) { + this.purpose = purpose; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -3679,6 +3948,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -4084,7 +4356,7 @@ public static class ShippingRateData { FixedAmount fixedAmount; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -4100,7 +4372,7 @@ public static class ShippingRateData { TaxBehavior taxBehavior; /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ @SerializedName("tax_code") @@ -4258,7 +4530,7 @@ public Builder setTaxBehavior( } /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ public Builder setTaxCode(String taxCode) { @@ -5053,7 +5325,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -5166,7 +5441,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index 39997538aa3..3566d4da7b0 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -26,13 +26,22 @@ public class InvoiceCreatePreviewParams extends ApiRequestParams { String currency; /** - * The identifier of the customer whose upcoming invoice you'd like to retrieve. If {@code + * The identifier of the customer whose upcoming invoice you're retrieving. If {@code * automatic_tax} is enabled then one of {@code customer}, {@code customer_details}, {@code * subscription}, or {@code schedule} must be set. */ @SerializedName("customer") String customer; + /** + * The identifier of the account representing the customer whose upcoming invoice you're + * retrieving. If {@code automatic_tax} is enabled then one of {@code customer}, {@code + * customer_account}, {@code customer_details}, {@code subscription}, or {@code schedule} must be + * set. + */ + @SerializedName("customer_account") + String customerAccount; + /** * Details about the customer you want to invoice or overrides for an existing customer. If {@code * automatic_tax} is enabled then one of {@code customer}, {@code customer_details}, {@code @@ -77,7 +86,7 @@ public class InvoiceCreatePreviewParams extends ApiRequestParams { /** * The account (if any) for which the funds of the invoice payment are intended. If set, the * invoice will be presented with the branding and support information of the specified account. - * See the Invoices with Connect + * See the Invoices with Connect * documentation for details. */ @SerializedName("on_behalf_of") @@ -125,6 +134,7 @@ private InvoiceCreatePreviewParams( AutomaticTax automaticTax, String currency, String customer, + String customerAccount, CustomerDetails customerDetails, Object discounts, List expand, @@ -140,6 +150,7 @@ private InvoiceCreatePreviewParams( this.automaticTax = automaticTax; this.currency = currency; this.customer = customer; + this.customerAccount = customerAccount; this.customerDetails = customerDetails; this.discounts = discounts; this.expand = expand; @@ -165,6 +176,8 @@ public static class Builder { private String customer; + private String customerAccount; + private CustomerDetails customerDetails; private Object discounts; @@ -195,6 +208,7 @@ public InvoiceCreatePreviewParams build() { this.automaticTax, this.currency, this.customer, + this.customerAccount, this.customerDetails, this.discounts, this.expand, @@ -225,7 +239,7 @@ public Builder setCurrency(String currency) { } /** - * The identifier of the customer whose upcoming invoice you'd like to retrieve. If {@code + * The identifier of the customer whose upcoming invoice you're retrieving. If {@code * automatic_tax} is enabled then one of {@code customer}, {@code customer_details}, {@code * subscription}, or {@code schedule} must be set. */ @@ -234,6 +248,17 @@ public Builder setCustomer(String customer) { return this; } + /** + * The identifier of the account representing the customer whose upcoming invoice you're + * retrieving. If {@code automatic_tax} is enabled then one of {@code customer}, {@code + * customer_account}, {@code customer_details}, {@code subscription}, or {@code schedule} must + * be set. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Details about the customer you want to invoice or overrides for an existing customer. If * {@code automatic_tax} is enabled then one of {@code customer}, {@code customer_details}, @@ -384,7 +409,7 @@ public Builder setIssuer(InvoiceCreatePreviewParams.Issuer issuer) { /** * The account (if any) for which the funds of the invoice payment are intended. If set, the * invoice will be presented with the branding and support information of the specified account. - * See the Invoices with Connect + * See the Invoices with Connect * documentation for details. */ public Builder setOnBehalfOf(String onBehalfOf) { @@ -395,7 +420,7 @@ public Builder setOnBehalfOf(String onBehalfOf) { /** * The account (if any) for which the funds of the invoice payment are intended. If set, the * invoice will be presented with the branding and support information of the specified account. - * See the Invoices with Connect + * See the Invoices with Connect * documentation for details. */ public Builder setOnBehalfOf(EmptyParam onBehalfOf) { @@ -459,7 +484,7 @@ public static class AutomaticTax { /** * Required. Whether Stripe automatically computes tax on this invoice. Note * that incompatible invoice items (invoice items with manually specified tax rates, negative amounts, or {@code + * href="https://docs.stripe.com/api/tax_rates">tax rates, negative amounts, or {@code * tax_behavior=unspecified}) cannot be added to automatic tax invoices. */ @SerializedName("enabled") @@ -508,7 +533,7 @@ public InvoiceCreatePreviewParams.AutomaticTax build() { /** * Required. Whether Stripe automatically computes tax on this invoice. Note * that incompatible invoice items (invoice items with manually specified tax rates, negative amounts, or {@code + * href="https://docs.stripe.com/api/tax_rates">tax rates, negative amounts, or {@code * tax_behavior=unspecified}) cannot be added to automatic tax invoices. */ public Builder setEnabled(Boolean enabled) { @@ -658,7 +683,11 @@ public enum Type implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CustomerDetails { - /** The customer's address. */ + /** + * The customer's address. Learn about country-specific + * requirements for calculating tax. + */ @SerializedName("address") Object address; @@ -725,13 +754,21 @@ public InvoiceCreatePreviewParams.CustomerDetails build() { this.address, this.extraParams, this.shipping, this.tax, this.taxExempt, this.taxIds); } - /** The customer's address. */ + /** + * The customer's address. Learn about country-specific + * requirements for calculating tax. + */ public Builder setAddress(InvoiceCreatePreviewParams.CustomerDetails.Address address) { this.address = address; return this; } - /** The customer's address. */ + /** + * The customer's address. Learn about country-specific + * requirements for calculating tax. + */ public Builder setAddress(EmptyParam address) { this.address = address; return this; @@ -856,7 +893,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -969,7 +1009,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1113,7 +1156,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -1229,7 +1275,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1966,7 +2015,7 @@ public static class InvoiceItem { String invoiceitem; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1977,9 +2026,9 @@ public static class InvoiceItem { /** * The period associated with this invoice item. When set to different values, the period will * be rendered on the invoice. If you have Stripe Revenue Recognition enabled, + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, * the period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ @SerializedName("period") @@ -1990,7 +2039,7 @@ public static class InvoiceItem { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -2002,7 +2051,7 @@ public static class InvoiceItem { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -2011,7 +2060,7 @@ public static class InvoiceItem { @SerializedName("tax_behavior") TaxBehavior taxBehavior; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") Object taxCode; @@ -2275,7 +2324,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -2286,7 +2335,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -2299,9 +2348,9 @@ public Builder setMetadata(Map metadata) { /** * The period associated with this invoice item. When set to different values, the period will * be rendered on the invoice. If you have Stripe Revenue Recognition enabled, + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, * the period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ public Builder setPeriod(InvoiceCreatePreviewParams.InvoiceItem.Period period) { @@ -2316,7 +2365,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData(InvoiceCreatePreviewParams.InvoiceItem.PriceData priceData) { @@ -2332,7 +2381,7 @@ public Builder setQuantity(Long quantity) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -2344,13 +2393,13 @@ public Builder setTaxBehavior( return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(EmptyParam taxCode) { this.taxCode = taxCode; return this; @@ -2644,7 +2693,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -2761,7 +2810,7 @@ public Builder setProduct(String product) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -3321,7 +3370,7 @@ public static class Phase { * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if * this phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ @SerializedName("billing_cycle_anchor") BillingCycleAnchor billingCycleAnchor; @@ -3360,11 +3409,11 @@ public static class Phase { String defaultPaymentMethod; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will set the Subscription's {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates}, which means they will be the Invoice's {@code + * href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">{@code * default_tax_rates} for any Invoices issued by the Subscription during this Phase. */ @SerializedName("default_tax_rates") @@ -3393,7 +3442,7 @@ public static class Phase { Duration duration; /** - * The date at which this phase of the subscription schedule ends. If set, {@code iterations} + * The date at which this phase of the subscription schedule ends. If set, {@code duration} * must not be set. */ @SerializedName("end_date") @@ -3420,7 +3469,7 @@ public static class Phase { List items; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to a phase. Metadata on a schedule's phase will update the underlying subscription's * {@code metadata} when the phase is entered, adding new keys and replacing existing keys in * the subscription's {@code metadata}. Individual keys in the subscription's {@code metadata} @@ -3440,10 +3489,10 @@ public static class Phase { /** * Controls whether the subscription schedule should create prorations when + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when * transitioning to this phase if there is a difference in billing configuration. It's * different from the request-level proration_behavior + * href="https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior">proration_behavior * parameter which controls what happens if the update request affects the billing * configuration (item price, quantity, etc.) of the current phase. */ @@ -3661,7 +3710,7 @@ public Builder setAutomaticTax( * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if * this phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ public Builder setBillingCycleAnchor( InvoiceCreatePreviewParams.ScheduleDetails.Phase.BillingCycleAnchor @@ -3753,11 +3802,11 @@ public Builder addAllDefaultTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will set the Subscription's {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates}, which means they will be the Invoice's {@code + * href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">{@code * default_tax_rates} for any Invoices issued by the Subscription during this Phase. */ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { @@ -3766,11 +3815,11 @@ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will set the Subscription's {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates}, which means they will be the Invoice's {@code + * href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">{@code * default_tax_rates} for any Invoices issued by the Subscription during this Phase. */ public Builder setDefaultTaxRates(List defaultTaxRates) { @@ -3863,8 +3912,8 @@ public Builder setDuration( } /** - * The date at which this phase of the subscription schedule ends. If set, {@code - * iterations} must not be set. + * The date at which this phase of the subscription schedule ends. If set, {@code duration} + * must not be set. */ public Builder setEndDate(Long endDate) { this.endDate = endDate; @@ -3872,8 +3921,8 @@ public Builder setEndDate(Long endDate) { } /** - * The date at which this phase of the subscription schedule ends. If set, {@code - * iterations} must not be set. + * The date at which this phase of the subscription schedule ends. If set, {@code duration} + * must not be set. */ public Builder setEndDate( InvoiceCreatePreviewParams.ScheduleDetails.Phase.EndDate endDate) { @@ -3981,10 +4030,10 @@ public Builder setOnBehalfOf(String onBehalfOf) { /** * Controls whether the subscription schedule should create prorations when + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when * transitioning to this phase if there is a difference in billing configuration. It's * different from the request-level proration_behavior + * href="https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior">proration_behavior * parameter which controls what happens if the update request affects the billing * configuration (item price, quantity, etc.) of the current phase. */ @@ -4070,7 +4119,7 @@ public static class AddInvoiceItem { Map extraParams; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -4091,7 +4140,7 @@ public static class AddInvoiceItem { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -4271,7 +4320,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price + * Data used to generate a new Price * object inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData( @@ -4806,7 +4855,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the * price is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, * {@code exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} @@ -4928,7 +4977,7 @@ public Builder setProduct(String product) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the * price is considered inclusive of taxes or exclusive of taxes. One of {@code * inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either @@ -5800,7 +5849,7 @@ public static class Item { Map extraParams; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to a configuration item. Metadata on a configuration item will update the * underlying subscription item's {@code metadata} when the phase is entered, adding new * keys and replacing existing keys. Individual keys in the subscription item's {@code @@ -5824,7 +5873,7 @@ public static class Item { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -5838,9 +5887,9 @@ public static class Item { Long quantity; /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -6046,7 +6095,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price + * Data used to generate a new Price * object inline. */ public Builder setPriceData( @@ -6095,9 +6144,9 @@ public Builder addAllTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to * remove previously-defined tax rates. */ @@ -6107,9 +6156,9 @@ public Builder setTaxRates(EmptyParam taxRates) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to * remove previously-defined tax rates. */ @@ -6135,7 +6184,7 @@ public static class BillingThresholds { /** * Required. Number of units that meets the billing threshold to advance * the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ @SerializedName("usage_gte") @@ -6195,7 +6244,7 @@ public Builder putAllExtraParam(Map map) { * Required. Number of units that meets the billing threshold to * advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet * a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ public Builder setUsageGte(Long usageGte) { @@ -6349,7 +6398,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the * price is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, * {@code exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} @@ -6485,7 +6534,7 @@ public Builder setRecurring( /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the * price is considered inclusive of taxes or exclusive of taxes. One of {@code * inclusive}, {@code exclusive}, or {@code unspecified}. Once specified as either @@ -6887,7 +6936,7 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { public static class SubscriptionDetails { /** * For new subscriptions, a future timestamp to anchor the subscription's billing cycle. This is used to + * href="https://docs.stripe.com/subscriptions/billing-cycle">billing cycle. This is used to * determine the date of the first full invoice, and, for plans with {@code month} or {@code * year} intervals, the day of the month for subsequent invoices. For existing subscriptions, * the value can only be set to {@code now} or {@code unchanged}. @@ -6942,7 +6991,7 @@ public static class SubscriptionDetails { /** * Determines how to handle prorations when the + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the * billing cycle changes (e.g., when switching plans, resetting {@code * billing_cycle_anchor=now}, or starting a trial), or if an item's {@code quantity} changes. * The default value is {@code create_prorations}. @@ -7061,7 +7110,7 @@ public InvoiceCreatePreviewParams.SubscriptionDetails build() { /** * For new subscriptions, a future timestamp to anchor the subscription's billing cycle. This is used + * href="https://docs.stripe.com/subscriptions/billing-cycle">billing cycle. This is used * to determine the date of the first full invoice, and, for plans with {@code month} or * {@code year} intervals, the day of the month for subsequent invoices. For existing * subscriptions, the value can only be set to {@code now} or {@code unchanged}. @@ -7074,7 +7123,7 @@ public Builder setBillingCycleAnchor( /** * For new subscriptions, a future timestamp to anchor the subscription's billing cycle. This is used + * href="https://docs.stripe.com/subscriptions/billing-cycle">billing cycle. This is used * to determine the date of the first full invoice, and, for plans with {@code month} or * {@code year} intervals, the day of the month for subsequent invoices. For existing * subscriptions, the value can only be set to {@code now} or {@code unchanged}. @@ -7245,7 +7294,7 @@ public Builder addAllItem( /** * Determines how to handle prorations when the + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the * billing cycle changes (e.g., when switching plans, resetting {@code * billing_cycle_anchor=now}, or starting a trial), or if an item's {@code quantity} changes. * The default value is {@code create_prorations}. @@ -7550,7 +7599,7 @@ public static class Item { String id; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -7571,7 +7620,7 @@ public static class Item { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -7582,9 +7631,9 @@ public static class Item { Long quantity; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -7814,7 +7863,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -7825,7 +7874,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -7852,7 +7901,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData( @@ -7898,9 +7947,9 @@ public Builder addAllTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -7910,9 +7959,9 @@ public Builder setTaxRates(EmptyParam taxRates) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -7938,7 +7987,7 @@ public static class BillingThresholds { /** * Required. Number of units that meets the billing threshold to advance * the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ @SerializedName("usage_gte") @@ -7997,7 +8046,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. Number of units that meets the billing threshold to advance * the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ public Builder setUsageGte(Long usageGte) { @@ -8147,7 +8196,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -8282,7 +8331,7 @@ public Builder setRecurring( /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the * price is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, * {@code exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} diff --git a/src/main/java/com/stripe/param/InvoiceFinalizeInvoiceParams.java b/src/main/java/com/stripe/param/InvoiceFinalizeInvoiceParams.java index 0d6a0a36f0f..34d6d6d547d 100644 --- a/src/main/java/com/stripe/param/InvoiceFinalizeInvoiceParams.java +++ b/src/main/java/com/stripe/param/InvoiceFinalizeInvoiceParams.java @@ -15,7 +15,7 @@ public class InvoiceFinalizeInvoiceParams extends ApiRequestParams { /** * Controls whether Stripe performs automatic + * href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">automatic * collection of the invoice. If {@code false}, the invoice's state doesn't automatically * advance without an explicit action. */ @@ -60,7 +60,7 @@ public InvoiceFinalizeInvoiceParams build() { /** * Controls whether Stripe performs automatic + * href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">automatic * collection of the invoice. If {@code false}, the invoice's state doesn't automatically * advance without an explicit action. */ diff --git a/src/main/java/com/stripe/param/InvoiceItemCreateParams.java b/src/main/java/com/stripe/param/InvoiceItemCreateParams.java index 0a8ba7a2474..fa63985c47e 100644 --- a/src/main/java/com/stripe/param/InvoiceItemCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceItemCreateParams.java @@ -30,13 +30,14 @@ public class InvoiceItemCreateParams extends ApiRequestParams { @SerializedName("currency") String currency; - /** - * Required. The ID of the customer who will be billed when this invoice item is - * billed. - */ + /** The ID of the customer to bill for this invoice item. */ @SerializedName("customer") String customer; + /** The ID of the account representing the customer to bill for this invoice item. */ + @SerializedName("customer_account") + String customerAccount; + /** * An arbitrary string which you can attach to the invoice item. The description is displayed in * the invoice for easy tracking. @@ -83,7 +84,7 @@ public class InvoiceItemCreateParams extends ApiRequestParams { String invoice; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -94,16 +95,16 @@ public class InvoiceItemCreateParams extends ApiRequestParams { /** * The period associated with this invoice item. When set to different values, the period will be * rendered on the invoice. If you have Stripe Revenue Recognition enabled, the + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, the * period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ @SerializedName("period") Period period; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -128,7 +129,7 @@ public class InvoiceItemCreateParams extends ApiRequestParams { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -137,7 +138,7 @@ public class InvoiceItemCreateParams extends ApiRequestParams { @SerializedName("tax_behavior") TaxBehavior taxBehavior; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") Object taxCode; @@ -161,6 +162,7 @@ private InvoiceItemCreateParams( Long amount, String currency, String customer, + String customerAccount, String description, Boolean discountable, Object discounts, @@ -180,6 +182,7 @@ private InvoiceItemCreateParams( this.amount = amount; this.currency = currency; this.customer = customer; + this.customerAccount = customerAccount; this.description = description; this.discountable = discountable; this.discounts = discounts; @@ -209,6 +212,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String description; private Boolean discountable; @@ -247,6 +252,7 @@ public InvoiceItemCreateParams build() { this.amount, this.currency, this.customer, + this.customerAccount, this.description, this.discountable, this.discounts, @@ -285,15 +291,18 @@ public Builder setCurrency(String currency) { return this; } - /** - * Required. The ID of the customer who will be billed when this invoice item - * is billed. - */ + /** The ID of the customer to bill for this invoice item. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of the account representing the customer to bill for this invoice item. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * An arbitrary string which you can attach to the invoice item. The description is displayed in * the invoice for easy tracking. @@ -452,7 +461,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -463,7 +472,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -476,9 +485,9 @@ public Builder setMetadata(Map metadata) { /** * The period associated with this invoice item. When set to different values, the period will * be rendered on the invoice. If you have Stripe Revenue Recognition enabled, + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, * the period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ public Builder setPeriod(InvoiceItemCreateParams.Period period) { @@ -487,7 +496,7 @@ public Builder setPeriod(InvoiceItemCreateParams.Period period) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ public Builder setPriceData(InvoiceItemCreateParams.PriceData priceData) { @@ -521,7 +530,7 @@ public Builder setSubscription(String subscription) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -532,13 +541,13 @@ public Builder setTaxBehavior(InvoiceItemCreateParams.TaxBehavior taxBehavior) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(EmptyParam taxCode) { this.taxCode = taxCode; return this; @@ -797,7 +806,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -912,7 +921,7 @@ public Builder setProduct(String product) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code diff --git a/src/main/java/com/stripe/param/InvoiceItemListParams.java b/src/main/java/com/stripe/param/InvoiceItemListParams.java index d6dbf0fbb16..0977a3bd709 100644 --- a/src/main/java/com/stripe/param/InvoiceItemListParams.java +++ b/src/main/java/com/stripe/param/InvoiceItemListParams.java @@ -18,12 +18,19 @@ public class InvoiceItemListParams extends ApiRequestParams { Object created; /** - * The identifier of the customer whose invoice items to return. If none is provided, all invoice - * items will be returned. + * The identifier of the customer whose invoice items to return. If none is provided, returns all + * invoice items. */ @SerializedName("customer") String customer; + /** + * The identifier of the account representing the customer whose invoice items to return. If none + * is provided, returns all invoice items. + */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -80,6 +87,7 @@ public class InvoiceItemListParams extends ApiRequestParams { private InvoiceItemListParams( Object created, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, @@ -89,6 +97,7 @@ private InvoiceItemListParams( String startingAfter) { this.created = created; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -107,6 +116,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -126,6 +137,7 @@ public InvoiceItemListParams build() { return new InvoiceItemListParams( this.created, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -148,14 +160,23 @@ public Builder setCreated(Long created) { } /** - * The identifier of the customer whose invoice items to return. If none is provided, all - * invoice items will be returned. + * The identifier of the customer whose invoice items to return. If none is provided, returns + * all invoice items. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** + * The identifier of the account representing the customer whose invoice items to return. If + * none is provided, returns all invoice items. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with diff --git a/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java index b0e5f059953..6ec7f103dd1 100644 --- a/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceItemUpdateParams.java @@ -59,7 +59,7 @@ public class InvoiceItemUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -70,16 +70,16 @@ public class InvoiceItemUpdateParams extends ApiRequestParams { /** * The period associated with this invoice item. When set to different values, the period will be * rendered on the invoice. If you have Stripe Revenue Recognition enabled, the + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, the * period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ @SerializedName("period") Period period; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -95,7 +95,7 @@ public class InvoiceItemUpdateParams extends ApiRequestParams { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -104,7 +104,7 @@ public class InvoiceItemUpdateParams extends ApiRequestParams { @SerializedName("tax_behavior") TaxBehavior taxBehavior; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") Object taxCode; @@ -379,7 +379,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -390,7 +390,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -403,9 +403,9 @@ public Builder setMetadata(Map metadata) { /** * The period associated with this invoice item. When set to different values, the period will * be rendered on the invoice. If you have Stripe Revenue Recognition enabled, + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, * the period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ public Builder setPeriod(InvoiceItemUpdateParams.Period period) { @@ -414,7 +414,7 @@ public Builder setPeriod(InvoiceItemUpdateParams.Period period) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ public Builder setPriceData(InvoiceItemUpdateParams.PriceData priceData) { @@ -436,7 +436,7 @@ public Builder setQuantity(Long quantity) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -447,13 +447,13 @@ public Builder setTaxBehavior(InvoiceItemUpdateParams.TaxBehavior taxBehavior) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(EmptyParam taxCode) { this.taxCode = taxCode; return this; @@ -763,7 +763,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -898,7 +898,7 @@ public Builder setProduct(EmptyParam product) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java index 7b97a557b1c..a5536459b48 100644 --- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java @@ -58,11 +58,11 @@ public class InvoiceLineItemUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. For type=subscription + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type">type=subscription * line items, the incoming metadata specified on the request is directly used to set this value, * in contrast to type=invoiceitem line items, @@ -74,16 +74,16 @@ public class InvoiceLineItemUpdateParams extends ApiRequestParams { /** * The period associated with this invoice item. When set to different values, the period will be * rendered on the invoice. If you have Stripe Revenue Recognition enabled, the + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, the * period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ @SerializedName("period") Period period; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -101,10 +101,10 @@ public class InvoiceLineItemUpdateParams extends ApiRequestParams { * A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on * your own or use a third-party to calculate them. You cannot set tax amounts if any line item * has tax_rates + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates * or if the invoice has default_tax_rates - * or uses automatic tax. Pass an empty string + * href="https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates + * or uses automatic tax. Pass an empty string * to remove previously defined tax amounts. */ @SerializedName("tax_amounts") @@ -361,11 +361,11 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. For type=subscription + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type">type=subscription * line items, the incoming metadata specified on the request is directly used to set this * value, in contrast to type=invoiceitem line items, @@ -377,11 +377,11 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. For type=subscription + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type">type=subscription * line items, the incoming metadata specified on the request is directly used to set this * value, in contrast to type=invoiceitem line items, @@ -395,9 +395,9 @@ public Builder setMetadata(Map metadata) { /** * The period associated with this invoice item. When set to different values, the period will * be rendered on the invoice. If you have Stripe Revenue Recognition enabled, + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, * the period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ public Builder setPeriod(InvoiceLineItemUpdateParams.Period period) { @@ -406,7 +406,7 @@ public Builder setPeriod(InvoiceLineItemUpdateParams.Period period) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ public Builder setPriceData(InvoiceLineItemUpdateParams.PriceData priceData) { @@ -458,10 +458,10 @@ public Builder addAllTaxAmount(List eleme * A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes * on your own or use a third-party to calculate them. You cannot set tax amounts if any line * item has tax_rates + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates * or if the invoice has default_tax_rates - * or uses automatic tax. Pass an empty + * href="https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates + * or uses automatic tax. Pass an empty * string to remove previously defined tax amounts. */ public Builder setTaxAmounts(EmptyParam taxAmounts) { @@ -473,10 +473,10 @@ public Builder setTaxAmounts(EmptyParam taxAmounts) { * A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes * on your own or use a third-party to calculate them. You cannot set tax amounts if any line * item has tax_rates + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates * or if the invoice has default_tax_rates - * or uses automatic tax. Pass an empty + * href="https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates + * or uses automatic tax. Pass an empty * string to remove previously defined tax amounts. */ public Builder setTaxAmounts(List taxAmounts) { @@ -773,7 +773,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -922,7 +922,7 @@ public Builder setProductData(InvoiceLineItemUpdateParams.PriceData.ProductData /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -990,7 +990,7 @@ public static class ProductData { List images; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -1002,7 +1002,7 @@ public static class ProductData { @SerializedName("name") Object name; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") Object taxCode; @@ -1178,13 +1178,13 @@ public Builder setName(EmptyParam name) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(EmptyParam taxCode) { this.taxCode = taxCode; return this; diff --git a/src/main/java/com/stripe/param/InvoiceListParams.java b/src/main/java/com/stripe/param/InvoiceListParams.java index 795ee1c7029..9c126b3afd9 100644 --- a/src/main/java/com/stripe/param/InvoiceListParams.java +++ b/src/main/java/com/stripe/param/InvoiceListParams.java @@ -28,6 +28,12 @@ public class InvoiceListParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** + * Only return invoices for the account representing the customer specified by this account ID. + */ + @SerializedName("customer_account") + String customerAccount; + @SerializedName("due_date") Object dueDate; @@ -72,7 +78,7 @@ public class InvoiceListParams extends ApiRequestParams { /** * The status of the invoice, one of {@code draft}, {@code open}, {@code paid}, {@code * uncollectible}, or {@code void}. Learn more + * href="https://docs.stripe.com/billing/invoices/workflow#workflow-overview">Learn more */ @SerializedName("status") Status status; @@ -85,6 +91,7 @@ private InvoiceListParams( CollectionMethod collectionMethod, Object created, String customer, + String customerAccount, Object dueDate, String endingBefore, List expand, @@ -96,6 +103,7 @@ private InvoiceListParams( this.collectionMethod = collectionMethod; this.created = created; this.customer = customer; + this.customerAccount = customerAccount; this.dueDate = dueDate; this.endingBefore = endingBefore; this.expand = expand; @@ -117,6 +125,8 @@ public static class Builder { private String customer; + private String customerAccount; + private Object dueDate; private String endingBefore; @@ -139,6 +149,7 @@ public InvoiceListParams build() { this.collectionMethod, this.created, this.customer, + this.customerAccount, this.dueDate, this.endingBefore, this.expand, @@ -176,6 +187,14 @@ public Builder setCustomer(String customer) { return this; } + /** + * Only return invoices for the account representing the customer specified by this account ID. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + public Builder setDueDate(InvoiceListParams.DueDate dueDate) { this.dueDate = dueDate; return this; @@ -272,7 +291,7 @@ public Builder setStartingAfter(String startingAfter) { /** * The status of the invoice, one of {@code draft}, {@code open}, {@code paid}, {@code * uncollectible}, or {@code void}. Learn more + * href="https://docs.stripe.com/billing/invoices/workflow#workflow-overview">Learn more */ public Builder setStatus(InvoiceListParams.Status status) { this.status = status; diff --git a/src/main/java/com/stripe/param/InvoiceRemoveLinesParams.java b/src/main/java/com/stripe/param/InvoiceRemoveLinesParams.java index 0af67b525e3..dad87e65ecb 100644 --- a/src/main/java/com/stripe/param/InvoiceRemoveLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceRemoveLinesParams.java @@ -28,7 +28,7 @@ public class InvoiceRemoveLinesParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder putAllInvoiceMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -162,7 +162,7 @@ public Builder setInvoiceMetadata(EmptyParam invoiceMetadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/InvoiceSearchParams.java b/src/main/java/com/stripe/param/InvoiceSearchParams.java index 51301977c56..105daab600c 100644 --- a/src/main/java/com/stripe/param/InvoiceSearchParams.java +++ b/src/main/java/com/stripe/param/InvoiceSearchParams.java @@ -43,8 +43,8 @@ public class InvoiceSearchParams extends ApiRequestParams { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for invoices. */ @SerializedName("query") @@ -153,8 +153,8 @@ public Builder setPage(String page) { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for invoices. */ public Builder setQuery(String query) { diff --git a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java index 131b46356cc..2cfd34330de 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java @@ -29,11 +29,11 @@ public class InvoiceUpdateLinesParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. For type=subscription + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type">type=subscription * line items, the incoming metadata specified on the request is directly used to set this value, * in contrast to type=invoiceitem line items, @@ -157,11 +157,11 @@ public Builder putAllInvoiceMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. For type=subscription + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type">type=subscription * line items, the incoming metadata specified on the request is directly used to set this * value, in contrast to type=invoiceitem line items, @@ -173,11 +173,11 @@ public Builder setInvoiceMetadata(EmptyParam invoiceMetadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. For type=subscription + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type">type=subscription * line items, the incoming metadata specified on the request is directly used to set this * value, in contrast to type=invoiceitem line items, @@ -261,11 +261,11 @@ public static class Line { String id; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. For type=subscription + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type">type=subscription * line items, the incoming metadata specified on the request is directly used to set this * value, in contrast to type=invoiceitem line items, @@ -277,16 +277,16 @@ public static class Line { /** * The period associated with this invoice item. When set to different values, the period will * be rendered on the invoice. If you have Stripe Revenue Recognition enabled, + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, * the period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ @SerializedName("period") Period period; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -304,10 +304,10 @@ public static class Line { * A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes * on your own or use a third-party to calculate them. You cannot set tax amounts if any line * item has tax_rates + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates * or if the invoice has default_tax_rates - * or uses automatic tax. Pass an empty + * href="https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates + * or uses automatic tax. Pass an empty * string to remove previously defined tax amounts. */ @SerializedName("tax_amounts") @@ -537,11 +537,11 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. For type=subscription + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type">type=subscription * line items, the incoming metadata specified on the request is directly used to set this * value, in contrast to type=invoiceitem line @@ -553,11 +553,11 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. For type=subscription + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-type">type=subscription * line items, the incoming metadata specified on the request is directly used to set this * value, in contrast to type=invoiceitem line @@ -571,9 +571,9 @@ public Builder setMetadata(Map metadata) { /** * The period associated with this invoice item. When set to different values, the period will * be rendered on the invoice. If you have Stripe Revenue Recognition enabled, + * href="https://docs.stripe.com/revenue-recognition">Stripe Revenue Recognition enabled, * the period will be used to recognize and defer revenue. See the Revenue + * href="https://docs.stripe.com/revenue-recognition/methodology/subscriptions-and-invoicing">Revenue * Recognition documentation for details. */ public Builder setPeriod(InvoiceUpdateLinesParams.Line.Period period) { @@ -582,7 +582,7 @@ public Builder setPeriod(InvoiceUpdateLinesParams.Line.Period period) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ public Builder setPriceData(InvoiceUpdateLinesParams.Line.PriceData priceData) { @@ -634,10 +634,10 @@ public Builder addAllTaxAmount(List ele * A list of up to 10 tax amounts for this line item. This can be useful if you calculate * taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any * line item has tax_rates + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates * or if the invoice has default_tax_rates - * or uses automatic tax. Pass an empty + * href="https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates + * or uses automatic tax. Pass an empty * string to remove previously defined tax amounts. */ public Builder setTaxAmounts(EmptyParam taxAmounts) { @@ -649,10 +649,10 @@ public Builder setTaxAmounts(EmptyParam taxAmounts) { * A list of up to 10 tax amounts for this line item. This can be useful if you calculate * taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any * line item has tax_rates + * href="https://docs.stripe.com/api/invoices/line_item#invoice_line_item_object-tax_rates">tax_rates * or if the invoice has default_tax_rates - * or uses automatic tax. Pass an empty + * href="https://docs.stripe.com/api/invoices/object#invoice_object-default_tax_rates">default_tax_rates + * or uses automatic tax. Pass an empty * string to remove previously defined tax amounts. */ public Builder setTaxAmounts(List taxAmounts) { @@ -935,7 +935,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1067,7 +1067,7 @@ public Builder setProductData( /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1128,7 +1128,7 @@ public static class ProductData { List images; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -1142,7 +1142,7 @@ public static class ProductData { @SerializedName("name") String name; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String taxCode; @@ -1303,7 +1303,7 @@ public Builder setName(String name) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index 302531429c1..73c20e08e6e 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -23,14 +23,14 @@ public class InvoiceUpdateParams extends ApiRequestParams { * application owner's Stripe account. The request must be made with an OAuth key or the * Stripe-Account header in order to take an application fee. For more information, see the * application fees documentation. + * href="https://docs.stripe.com/billing/invoices/connect#collecting-fees">documentation. */ @SerializedName("application_fee_amount") Long applicationFeeAmount; /** * Controls whether Stripe performs automatic + * href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">automatic * collection of the invoice. */ @SerializedName("auto_advance") @@ -148,7 +148,7 @@ public class InvoiceUpdateParams extends ApiRequestParams { Issuer issuer; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -170,7 +170,7 @@ public class InvoiceUpdateParams extends ApiRequestParams { /** * The account (if any) for which the funds of the invoice payment are intended. If set, the * invoice will be presented with the branding and support information of the specified account. - * See the Invoices with Connect + * See the Invoices with Connect * documentation for details. */ @SerializedName("on_behalf_of") @@ -419,7 +419,7 @@ public Builder setAccountTaxIds(List accountTaxIds) { * the application owner's Stripe account. The request must be made with an OAuth key or the * Stripe-Account header in order to take an application fee. For more information, see the * application fees documentation. + * href="https://docs.stripe.com/billing/invoices/connect#collecting-fees">documentation. */ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { this.applicationFeeAmount = applicationFeeAmount; @@ -428,7 +428,7 @@ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { /** * Controls whether Stripe performs automatic + * href="https://docs.stripe.com/invoicing/integration/automatic-advancement-collection">automatic * collection of the invoice. */ public Builder setAutoAdvance(Boolean autoAdvance) { @@ -800,7 +800,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -811,7 +811,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -850,7 +850,7 @@ public Builder setNumber(EmptyParam number) { /** * The account (if any) for which the funds of the invoice payment are intended. If set, the * invoice will be presented with the branding and support information of the specified account. - * See the Invoices with Connect + * See the Invoices with Connect * documentation for details. */ public Builder setOnBehalfOf(String onBehalfOf) { @@ -861,7 +861,7 @@ public Builder setOnBehalfOf(String onBehalfOf) { /** * The account (if any) for which the funds of the invoice payment are intended. If set, the * invoice will be presented with the branding and support information of the specified account. - * See the Invoices with Connect + * See the Invoices with Connect * documentation for details. */ public Builder setOnBehalfOf(EmptyParam onBehalfOf) { @@ -965,7 +965,7 @@ public static class AutomaticTax { /** * Required. Whether Stripe automatically computes tax on this invoice. Note * that incompatible invoice items (invoice items with manually specified tax rates, negative amounts, or {@code + * href="https://docs.stripe.com/api/tax_rates">tax rates, negative amounts, or {@code * tax_behavior=unspecified}) cannot be added to automatic tax invoices. */ @SerializedName("enabled") @@ -1013,7 +1013,7 @@ public InvoiceUpdateParams.AutomaticTax build() { /** * Required. Whether Stripe automatically computes tax on this invoice. Note * that incompatible invoice items (invoice items with manually specified tax rates, negative amounts, or {@code + * href="https://docs.stripe.com/api/tax_rates">tax rates, negative amounts, or {@code * tax_behavior=unspecified}) cannot be added to automatic tax invoices. */ public Builder setEnabled(Boolean enabled) { @@ -1713,6 +1713,13 @@ public static class PaymentMethodOptions { @SerializedName("konbini") Object konbini; + /** + * If paying by {@code payto}, this sub-hash contains details about the PayTo payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("payto") + Object payto; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -1734,6 +1741,7 @@ private PaymentMethodOptions( Object customerBalance, Map extraParams, Object konbini, + Object payto, Object sepaDebit, Object usBankAccount) { this.acssDebit = acssDebit; @@ -1742,6 +1750,7 @@ private PaymentMethodOptions( this.customerBalance = customerBalance; this.extraParams = extraParams; this.konbini = konbini; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -1763,6 +1772,8 @@ public static class Builder { private Object konbini; + private Object payto; + private Object sepaDebit; private Object usBankAccount; @@ -1776,6 +1787,7 @@ public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.customerBalance, this.extraParams, this.konbini, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -1903,6 +1915,25 @@ public Builder setKonbini(EmptyParam konbini) { return this; } + /** + * If paying by {@code payto}, this sub-hash contains details about the PayTo payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPayto( + InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + + /** + * If paying by {@code payto}, this sub-hash contains details about the PayTo payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct * Debit payment method options to pass to the invoice’s PaymentIntent. @@ -2270,7 +2301,7 @@ public static class Card { * Installment configuration for payments attempted on this invoice. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ @SerializedName("installments") Installments installments; @@ -2278,10 +2309,10 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -2348,7 +2379,7 @@ public Builder putAllExtraParam(Map map) { * Installment configuration for payments attempted on this invoice. * *

For more information, see the installments integration + * href="https://docs.stripe.com/payments/installments">installments integration * guide. */ public Builder setInstallments( @@ -2361,10 +2392,10 @@ public Builder setInstallments( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -3038,6 +3069,229 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Payto(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto build() { + return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + Purpose purpose; + + private MandateOptions(Long amount, Map extraParams, Purpose purpose) { + this.amount = amount; + this.extraParams = extraParams; + this.purpose = purpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Purpose purpose; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + build() { + return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto + .MandateOptions(this.amount, this.extraParams, this.purpose); + } + + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + .Purpose + purpose) { + this.purpose = purpose; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -3688,6 +3942,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -4105,7 +4362,7 @@ public static class ShippingRateData { FixedAmount fixedAmount; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -4121,7 +4378,7 @@ public static class ShippingRateData { TaxBehavior taxBehavior; /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ @SerializedName("tax_code") @@ -4288,7 +4545,7 @@ public Builder setTaxBehavior( } /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ public Builder setTaxCode(String taxCode) { @@ -4297,7 +4554,7 @@ public Builder setTaxCode(String taxCode) { } /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ public Builder setTaxCode(EmptyParam taxCode) { @@ -5109,7 +5366,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -5255,13 +5515,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java b/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java index 03ae01feef8..0d7c3b913f1 100644 --- a/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentApplyCustomerBalanceParams.java @@ -19,7 +19,7 @@ public class PaymentIntentApplyCustomerBalanceParams extends ApiRequestParams { * regardless of this parameter. * *

A positive integer representing how much to charge in the smallest currency unit (for example, + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit (for example, * 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum * amount is the amount of the PaymentIntent. * @@ -82,7 +82,7 @@ public PaymentIntentApplyCustomerBalanceParams build() { * regardless of this parameter. * *

A positive integer representing how much to charge in the smallest currency unit (for + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit (for * example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The * maximum amount is the amount of the PaymentIntent. * diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index 038551f6ef9..1d6717c1256 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -29,7 +29,7 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { * The amount of the application fee (if any) that will be requested to be applied to the payment * and transferred to the application owner's Stripe account. The amount of the application fee * collected will be capped at the total amount captured. For more information, see the - * PaymentIntents use case for + * PaymentIntents use case for * connected accounts. */ @SerializedName("application_fee_amount") @@ -52,7 +52,7 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { * Defaults to {@code true}. When capturing a PaymentIntent, setting {@code final_capture} to * {@code false} notifies Stripe to not release the remaining uncaptured funds to make sure that * they're captured in future requests. You can only use this setting when multicapture is available for + * href="https://docs.stripe.com/payments/multicapture">multicapture is available for * PaymentIntents. */ @SerializedName("final_capture") @@ -63,7 +63,7 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { Hooks hooks; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -101,7 +101,7 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { /** * The parameters that you can use to automatically create a transfer after the payment is * captured. Learn more about the use case for connected accounts. + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected accounts. */ @SerializedName("transfer_data") TransferData transferData; @@ -198,7 +198,7 @@ public Builder setAmountToCapture(Long amountToCapture) { * The amount of the application fee (if any) that will be requested to be applied to the * payment and transferred to the application owner's Stripe account. The amount of the * application fee collected will be capped at the total amount captured. For more information, - * see the PaymentIntents use case + * see the PaymentIntents use case * for connected accounts. */ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { @@ -262,7 +262,7 @@ public Builder putAllExtraParam(Map map) { * Defaults to {@code true}. When capturing a PaymentIntent, setting {@code final_capture} to * {@code false} notifies Stripe to not release the remaining uncaptured funds to make sure that * they're captured in future requests. You can only use this setting when multicapture is available for + * href="https://docs.stripe.com/payments/multicapture">multicapture is available for * PaymentIntents. */ public Builder setFinalCapture(Boolean finalCapture) { @@ -305,7 +305,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -316,7 +316,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -368,7 +368,7 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { /** * The parameters that you can use to automatically create a transfer after the payment is * captured. Learn more about the use case for connected + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected * accounts. */ public Builder setTransferData(PaymentIntentCaptureParams.TransferData transferData) { @@ -382,7 +382,7 @@ public Builder setTransferData(PaymentIntentCaptureParams.TransferData transferD public static class AmountDetails { /** * The total discount applied on the transaction represented in the smallest currency unit. An integer + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An integer * greater than 0. * *

This field is mutually exclusive with the {@code @@ -402,7 +402,7 @@ public static class AmountDetails { /** * A list of line items, each containing information about a product in the PaymentIntent. There - * is a maximum of 100 line items. + * is a maximum of 200 line items. */ @SerializedName("line_items") Object lineItems; @@ -451,7 +451,7 @@ public PaymentIntentCaptureParams.AmountDetails build() { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -464,7 +464,7 @@ public Builder setDiscountAmount(Long discountAmount) { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -533,7 +533,7 @@ public Builder addAllLineItem( /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems(EmptyParam lineItems) { this.lineItems = lineItems; @@ -542,7 +542,7 @@ public Builder setLineItems(EmptyParam lineItems) { /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems( List lineItems) { @@ -580,7 +580,7 @@ public Builder setTax(EmptyParam tax) { public static class LineItem { /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. @@ -631,7 +631,7 @@ public static class LineItem { /** * Required. The unit cost of the line item represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L3 rates. An integer greater than or equal to 0. */ @SerializedName("unit_cost") @@ -701,7 +701,7 @@ public PaymentIntentCaptureParams.AmountDetails.LineItem build() { /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} @@ -786,7 +786,7 @@ public Builder setTax(PaymentIntentCaptureParams.AmountDetails.LineItem.Tax tax) /** * Required. The unit cost of the line item represented in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. */ public Builder setUnitCost(Long unitCost) { @@ -1389,7 +1389,7 @@ public static class Tax { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency unit. + * the smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1448,7 +1448,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency + * the smallest currency * unit. Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1467,7 +1467,7 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { public static class Shipping { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ @SerializedName("amount") @@ -1528,7 +1528,7 @@ public PaymentIntentCaptureParams.AmountDetails.Shipping build() { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(Long amount) { @@ -1538,7 +1538,7 @@ public Builder setAmount(Long amount) { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(EmptyParam amount) { @@ -1626,7 +1626,7 @@ public static class Tax { /** * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1685,7 +1685,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on the transaction represented in the - * smallest currency unit. + * smallest currency unit. * Required for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1842,7 +1842,7 @@ public Builder setTax(PaymentIntentCaptureParams.Hooks.Inputs.Tax tax) { public static class Tax { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ @SerializedName("calculation") Object calculation; @@ -1879,7 +1879,7 @@ public PaymentIntentCaptureParams.Hooks.Inputs.Tax build() { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(String calculation) { this.calculation = calculation; @@ -1888,7 +1888,7 @@ public Builder setCalculation(String calculation) { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(EmptyParam calculation) { this.calculation = calculation; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index c3763295bee..13ea2b047cc 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -35,7 +35,7 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code * requires_action}. This parameter is intended for simpler integrations that do not handle * customer actions, like saving cards without + * href="https://docs.stripe.com/payments/save-card-without-authentication">saving cards without * authentication. */ @SerializedName("error_on_requires_action") @@ -72,7 +72,7 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { /** * Set to {@code true} to indicate that the customer isn't in your checkout flow during this * payment attempt and can't authenticate. Use this parameter in scenarios where you collect card - * details and charge them + * details and charge them * later. */ @SerializedName("off_session") @@ -84,11 +84,11 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { /** * ID of the payment method (a PaymentMethod, Card, or compatible + * href="https://docs.stripe.com/payments/payment-methods/transitioning#compatibility">compatible * Source object) to attach to this PaymentIntent. If the payment method is attached to a * Customer, it must match the customer that is set on - * this PaymentIntent. + * href="https://api.stripe.com#create_payment_intent-customer">customer that is set on this + * PaymentIntent. */ @SerializedName("payment_method") String paymentMethod; @@ -96,7 +96,7 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { /** * If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will * appear in the payment_method + * href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-payment_method">payment_method * property on the PaymentIntent. */ @SerializedName("payment_method_data") @@ -118,7 +118,7 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { /** * Options to configure Radar. Learn more about Radar Sessions. + * href="https://docs.stripe.com/radar/radar-session">Radar Sessions. */ @SerializedName("radar_options") RadarOptions radarOptions; @@ -333,7 +333,7 @@ public Builder setConfirmationToken(String confirmationToken) { * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code * requires_action}. This parameter is intended for simpler integrations that do not handle * customer actions, like saving cards without + * href="https://docs.stripe.com/payments/save-card-without-authentication">saving cards without * authentication. */ public Builder setErrorOnRequiresAction(Boolean errorOnRequiresAction) { @@ -467,7 +467,7 @@ public Builder setMandateData(EmptyParam mandateData) { /** * Set to {@code true} to indicate that the customer isn't in your checkout flow during this * payment attempt and can't authenticate. Use this parameter in scenarios where you collect - * card details and charge + * card details and charge * them later. */ public Builder setOffSession(Boolean offSession) { @@ -478,7 +478,7 @@ public Builder setOffSession(Boolean offSession) { /** * Set to {@code true} to indicate that the customer isn't in your checkout flow during this * payment attempt and can't authenticate. Use this parameter in scenarios where you collect - * card details and charge + * card details and charge * them later. */ public Builder setOffSession(PaymentIntentConfirmParams.OffSession offSession) { @@ -500,11 +500,11 @@ public Builder setPaymentDetails(EmptyParam paymentDetails) { /** * ID of the payment method (a PaymentMethod, Card, or compatible + * href="https://docs.stripe.com/payments/payment-methods/transitioning#compatibility">compatible * Source object) to attach to this PaymentIntent. If the payment method is attached to a * Customer, it must match the customer that is set on - * this PaymentIntent. + * href="https://api.stripe.com#create_payment_intent-customer">customer that is set on this + * PaymentIntent. */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -514,7 +514,7 @@ public Builder setPaymentMethod(String paymentMethod) { /** * If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will * appear in the payment_method + * href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-payment_method">payment_method * property on the PaymentIntent. */ public Builder setPaymentMethodData( @@ -558,7 +558,7 @@ public Builder addAllPaymentMethodType(List elements) { /** * Options to configure Radar. Learn more about Radar Sessions. + * href="https://docs.stripe.com/radar/radar-session">Radar Sessions. */ public Builder setRadarOptions(PaymentIntentConfirmParams.RadarOptions radarOptions) { this.radarOptions = radarOptions; @@ -680,7 +680,7 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) { public static class AmountDetails { /** * The total discount applied on the transaction represented in the smallest currency unit. An integer + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An integer * greater than 0. * *

This field is mutually exclusive with the {@code @@ -700,7 +700,7 @@ public static class AmountDetails { /** * A list of line items, each containing information about a product in the PaymentIntent. There - * is a maximum of 100 line items. + * is a maximum of 200 line items. */ @SerializedName("line_items") Object lineItems; @@ -749,7 +749,7 @@ public PaymentIntentConfirmParams.AmountDetails build() { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -762,7 +762,7 @@ public Builder setDiscountAmount(Long discountAmount) { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -831,7 +831,7 @@ public Builder addAllLineItem( /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems(EmptyParam lineItems) { this.lineItems = lineItems; @@ -840,7 +840,7 @@ public Builder setLineItems(EmptyParam lineItems) { /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems( List lineItems) { @@ -878,7 +878,7 @@ public Builder setTax(EmptyParam tax) { public static class LineItem { /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. @@ -929,7 +929,7 @@ public static class LineItem { /** * Required. The unit cost of the line item represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L3 rates. An integer greater than or equal to 0. */ @SerializedName("unit_cost") @@ -999,7 +999,7 @@ public PaymentIntentConfirmParams.AmountDetails.LineItem build() { /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} @@ -1084,7 +1084,7 @@ public Builder setTax(PaymentIntentConfirmParams.AmountDetails.LineItem.Tax tax) /** * Required. The unit cost of the line item represented in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. */ public Builder setUnitCost(Long unitCost) { @@ -1687,7 +1687,7 @@ public static class Tax { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency unit. + * the smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1746,7 +1746,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency + * the smallest currency * unit. Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1765,7 +1765,7 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { public static class Shipping { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ @SerializedName("amount") @@ -1826,7 +1826,7 @@ public PaymentIntentConfirmParams.AmountDetails.Shipping build() { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(Long amount) { @@ -1836,7 +1836,7 @@ public Builder setAmount(Long amount) { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(EmptyParam amount) { @@ -1924,7 +1924,7 @@ public static class Tax { /** * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1983,7 +1983,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on the transaction represented in the - * smallest currency unit. + * smallest currency unit. * Required for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -2140,7 +2140,7 @@ public Builder setTax(PaymentIntentConfirmParams.Hooks.Inputs.Tax tax) { public static class Tax { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ @SerializedName("calculation") Object calculation; @@ -2177,7 +2177,7 @@ public PaymentIntentConfirmParams.Hooks.Inputs.Tax build() { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(String calculation) { this.calculation = calculation; @@ -2186,7 +2186,7 @@ public Builder setCalculation(String calculation) { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(EmptyParam calculation) { this.calculation = calculation; @@ -2960,7 +2960,7 @@ public static class PaymentMethodData { MbWay mbWay; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -3038,6 +3038,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -3053,7 +3060,7 @@ public static class PaymentMethodData { Promptpay promptpay; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -3178,6 +3185,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -3233,6 +3241,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -3336,6 +3345,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -3408,6 +3419,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -3844,6 +3856,15 @@ public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodData.Paypal pay return this; } + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. + */ + public Builder setPayto(PaymentIntentConfirmParams.PaymentMethodData.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -3864,7 +3885,7 @@ public Builder setPromptpay( } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions( @@ -4856,7 +4877,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -4971,7 +4995,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -5848,6 +5875,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -7218,6 +7248,105 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + + private Payto( + String accountNumber, String bsbNumber, Map extraParams, String payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + private String payId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Payto build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -7347,7 +7476,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -7403,7 +7532,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot + * A Radar Session is a snapshot * of the browser metadata and device details that help Radar make more accurate predictions * on your payments. */ @@ -8293,6 +8422,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -8620,6 +8752,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Object paypal; + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + @SerializedName("payto") + Object payto; + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment * method options. @@ -8745,6 +8884,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object payto, Object pix, Object promptpay, Object revolutPay, @@ -8797,6 +8937,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -8896,6 +9037,8 @@ public static class Builder { private Object paypal; + private Object payto; + private Object pix; private Object promptpay; @@ -8963,6 +9106,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -9715,6 +9859,24 @@ public Builder setPaypal(EmptyParam paypal) { return this; } + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(PaymentIntentConfirmParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix * payment method options. @@ -12516,7 +12678,7 @@ public static class Card { * Installment configuration for payments attempted on this PaymentIntent. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ @SerializedName("installments") Installments installments; @@ -12542,7 +12704,7 @@ public static class Card { /** * Request ability to capture beyond the standard + * href="https://docs.stripe.com/payments/extended-authorization">capture beyond the standard * authorization validity window for this PaymentIntent. */ @SerializedName("request_extended_authorization") @@ -12550,21 +12712,21 @@ public static class Card { /** * Request ability to increment the + * href="https://docs.stripe.com/payments/incremental-authorization">increment the * authorization for this PaymentIntent. */ @SerializedName("request_incremental_authorization") RequestIncrementalAuthorization requestIncrementalAuthorization; /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. */ @SerializedName("request_multicapture") RequestMulticapture requestMulticapture; /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. */ @SerializedName("request_overcapture") @@ -12573,11 +12735,11 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -12815,7 +12977,7 @@ public Builder putAllExtraParam(Map map) { * Installment configuration for payments attempted on this PaymentIntent. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ public Builder setInstallments( PaymentIntentConfirmParams.PaymentMethodOptions.Card.Installments installments) { @@ -12852,7 +13014,7 @@ public Builder setNetwork( /** * Request ability to capture beyond the + * href="https://docs.stripe.com/payments/extended-authorization">capture beyond the * standard authorization validity window for this PaymentIntent. */ public Builder setRequestExtendedAuthorization( @@ -12864,7 +13026,7 @@ public Builder setRequestExtendedAuthorization( /** * Request ability to increment the + * href="https://docs.stripe.com/payments/incremental-authorization">increment the * authorization for this PaymentIntent. */ public Builder setRequestIncrementalAuthorization( @@ -12875,7 +13037,7 @@ public Builder setRequestIncrementalAuthorization( } /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. */ public Builder setRequestMulticapture( @@ -12886,7 +13048,7 @@ public Builder setRequestMulticapture( } /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. */ public Builder setRequestOvercapture( @@ -12899,11 +13061,11 @@ public Builder setRequestOvercapture( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -14379,7 +14541,7 @@ public static class CardPresent { /** * Request ability to capture this payment beyond the standard authorization + * href="https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity">authorization * validity window. */ @SerializedName("request_extended_authorization") @@ -14387,10 +14549,10 @@ public static class CardPresent { /** * Request ability to increment + * href="https://docs.stripe.com/terminal/features/incremental-authorizations">increment * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported + * in the Confirm response * to verify support. */ @SerializedName("request_incremental_authorization_support") @@ -14488,7 +14650,7 @@ public Builder putAllExtraParam(Map map) { /** * Request ability to capture this payment beyond the standard authorization + * href="https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity">authorization * validity window. */ public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { @@ -14498,10 +14660,10 @@ public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorizat /** * Request ability to increment + * href="https://docs.stripe.com/terminal/features/incremental-authorizations">increment * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported + * in the Confirm response * to verify support. */ public Builder setRequestIncrementalAuthorizationSupport( @@ -19543,7 +19705,7 @@ public static class Paypal { Map extraParams; /** - * Preferred locale of + * Preferred locale of * the PayPal checkout page that the customer is redirected to. */ @SerializedName("preferred_locale") @@ -19672,7 +19834,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Preferred locale + * Preferred locale * of the PayPal checkout page that the customer is redirected to. */ public Builder setPreferredLocale( @@ -19861,6 +20023,529 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Additional fields for Mandate creation. Only {@code purpose} field is configurable for + * PayTo PaymentIntent with {@code setup_future_usage=none}. Other fields are only applicable + * to PayTo PaymentIntent with {@code setup_future_usage=off_session} + */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + + private Payto( + Map extraParams, + MandateOptions mandateOptions, + ApiRequestParams.EnumParam setupFutureUsage) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Payto build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Payto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Payto#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Additional fields for Mandate creation. Only {@code purpose} field is configurable for + * PayTo PaymentIntent with {@code setup_future_usage=none}. Other fields are only + * applicable to PayTo PaymentIntent with {@code setup_future_usage=off_session} + */ + public Builder setMandateOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Payto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Object amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + */ + @SerializedName("amount_type") + ApiRequestParams.EnumParam amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + Object endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + @SerializedName("payment_schedule") + ApiRequestParams.EnumParam paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Object paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + ApiRequestParams.EnumParam purpose; + + private MandateOptions( + Object amount, + ApiRequestParams.EnumParam amountType, + Object endDate, + Map extraParams, + ApiRequestParams.EnumParam paymentSchedule, + Object paymentsPerPeriod, + ApiRequestParams.EnumParam purpose) { + this.amount = amount; + this.amountType = amountType; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.paymentsPerPeriod = paymentsPerPeriod; + this.purpose = purpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private ApiRequestParams.EnumParam amountType; + + private Object endDate; + + private Map extraParams; + + private ApiRequestParams.EnumParam paymentSchedule; + + private Object paymentsPerPeriod; + + private ApiRequestParams.EnumParam purpose; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions( + this.amount, + this.amountType, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.paymentsPerPeriod, + this.purpose); + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(EmptyParam amount) { + this.amount = amount; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType( + PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType(EmptyParam amountType) { + this.amountType = amountType; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule( + PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule(EmptyParam paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(EmptyParam paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.Purpose + purpose) { + this.purpose = purpose; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose(EmptyParam purpose) { + this.purpose = purpose; + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), + + @SerializedName("annual") + ANNUAL("annual"), + + @SerializedName("daily") + DAILY("daily"), + + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("semi_annual") + SEMI_ANNUAL("semi_annual"), + + @SerializedName("weekly") + WEEKLY("weekly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -22703,7 +23388,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -22757,7 +23442,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -22941,7 +23626,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -23054,7 +23742,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -23190,6 +23881,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 020b4c15756..9b21b69adff 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -17,10 +17,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Required. Amount intended to be collected by this PaymentIntent. A positive * integer representing how much to charge in the smallest currency unit (e.g., 100 + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit (e.g., 100 * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is * $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @@ -35,7 +35,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { * The amount of the application fee (if any) that will be requested to be applied to the payment * and transferred to the application owner's Stripe account. The amount of the application fee * collected will be capped at the total amount captured. For more information, see the - * PaymentIntents use case for + * PaymentIntents use case for * connected accounts. */ @SerializedName("application_fee_amount") @@ -54,10 +54,10 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Set to {@code true} to attempt to confirm this PaymentIntent + * href="https://docs.stripe.com/api/payment_intents/confirm">confirm this PaymentIntent * immediately. This parameter defaults to {@code false}. When creating and confirming a * PaymentIntent at the same time, you can also provide the parameters available in the Confirm API. + * href="https://docs.stripe.com/api/payment_intents/confirm">Confirm API. */ @SerializedName("confirm") Boolean confirm; @@ -92,7 +92,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { *

Payment methods attached to other Customers cannot be used with this PaymentIntent. * *

If setup_future_usage + * href="https://api.stripe.com#payment_intent_object-setup_future_usage">setup_future_usage * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment * method attaches to the Customer after the PaymentIntent has been confirmed and any required * actions from the user are complete. If the payment method is {@code card_present} and isn't a @@ -103,6 +103,23 @@ public class PaymentIntentCreateParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** + * ID of the Account representing the customer that this PaymentIntent belongs to, if one exists. + * + *

Payment methods attached to other Accounts cannot be used with this PaymentIntent. + * + *

If setup_future_usage + * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment + * method attaches to the Account after the PaymentIntent has been confirmed and any required + * actions from the user are complete. If the payment method is {@code card_present} and isn't a + * digital wallet, then a generated_card + * payment method representing the card is created and attached to the Account instead. + */ + @SerializedName("customer_account") + String customerAccount; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ @SerializedName("description") String description; @@ -111,9 +128,9 @@ public class PaymentIntentCreateParams extends ApiRequestParams { * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code * requires_action}. Use this parameter for simpler integrations that don't handle customer * actions, such as saving cards without + * href="https://docs.stripe.com/payments/save-card-without-authentication">saving cards without * authentication. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ @SerializedName("error_on_requires_action") @@ -142,7 +159,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * ID of the mandate that's used for this payment. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ @SerializedName("mandate") @@ -150,14 +167,14 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * This hash contains details about the Mandate to create. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ @SerializedName("mandate_data") Object mandateData; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -168,9 +185,9 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Set to {@code true} to indicate that the customer isn't in your checkout flow during this * payment attempt and can't authenticate. Use this parameter in scenarios where you collect card - * details and charge them + * details and charge them * later. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ @SerializedName("off_session") @@ -178,7 +195,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * The Stripe account ID that these funds are intended for. Learn more about the use case for connected accounts. + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected accounts. */ @SerializedName("on_behalf_of") String onBehalfOf; @@ -189,7 +206,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * ID of the payment method (a PaymentMethod, Card, or compatible Source + * href="https://docs.stripe.com/payments/payment-methods#compatibility">compatible Source * object) to attach to this PaymentIntent. * *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter @@ -197,14 +214,14 @@ public class PaymentIntentCreateParams extends ApiRequestParams { * customer.default_source} to improve migration for users of the Charges API. We recommend that * you explicitly provide the {@code payment_method} moving forward. If the payment method is * attached to a Customer, you must also provide the ID of that Customer as the customer parameter of - * this PaymentIntent. end + * href="https://api.stripe.com#create_payment_intent-customer">customer parameter of this + * PaymentIntent. end */ @SerializedName("payment_method") String paymentMethod; /** - * The ID of the payment + * The ID of the payment * method configuration to use with this PaymentIntent. */ @SerializedName("payment_method_configuration") @@ -213,7 +230,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will * appear in the payment_method + * href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-payment_method">payment_method * property on the PaymentIntent. */ @SerializedName("payment_method_data") @@ -235,7 +252,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * Options to configure Radar. Learn more about Radar Sessions. + * href="https://docs.stripe.com/radar/radar-session">Radar Sessions. */ @SerializedName("radar_options") RadarOptions radarOptions; @@ -252,7 +269,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { * The URL to redirect your customer back to after they authenticate or cancel their payment on * the payment method's app or site. If you'd prefer to redirect to a mobile application, you can * alternatively supply an application URI scheme. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ @SerializedName("return_url") @@ -309,14 +326,14 @@ public class PaymentIntentCreateParams extends ApiRequestParams { /** * The parameters that you can use to automatically create a Transfer. Learn more about the use case for connected accounts. + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected accounts. */ @SerializedName("transfer_data") TransferData transferData; /** * A string that identifies the resulting payment as part of a group. Learn more about the use case for connected + * href="https://docs.stripe.com/connect/separate-charges-and-transfers">use case for connected * accounts. */ @SerializedName("transfer_group") @@ -340,6 +357,7 @@ private PaymentIntentCreateParams( String confirmationToken, String currency, String customer, + String customerAccount, String description, Boolean errorOnRequiresAction, List excludedPaymentMethodTypes, @@ -377,6 +395,7 @@ private PaymentIntentCreateParams( this.confirmationToken = confirmationToken; this.currency = currency; this.customer = customer; + this.customerAccount = customerAccount; this.description = description; this.errorOnRequiresAction = errorOnRequiresAction; this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; @@ -431,6 +450,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String description; private Boolean errorOnRequiresAction; @@ -498,6 +519,7 @@ public PaymentIntentCreateParams build() { this.confirmationToken, this.currency, this.customer, + this.customerAccount, this.description, this.errorOnRequiresAction, this.excludedPaymentMethodTypes, @@ -530,10 +552,10 @@ public PaymentIntentCreateParams build() { /** * Required. Amount intended to be collected by this PaymentIntent. A positive * integer representing how much to charge in the smallest currency unit (e.g., 100 + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit (e.g., 100 * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is * $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @@ -552,7 +574,7 @@ public Builder setAmountDetails(PaymentIntentCreateParams.AmountDetails amountDe * The amount of the application fee (if any) that will be requested to be applied to the * payment and transferred to the application owner's Stripe account. The amount of the * application fee collected will be capped at the total amount captured. For more information, - * see the PaymentIntents use case + * see the PaymentIntents use case * for connected accounts. */ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { @@ -578,10 +600,10 @@ public Builder setCaptureMethod(PaymentIntentCreateParams.CaptureMethod captureM /** * Set to {@code true} to attempt to confirm this PaymentIntent + * href="https://docs.stripe.com/api/payment_intents/confirm">confirm this PaymentIntent * immediately. This parameter defaults to {@code false}. When creating and confirming a * PaymentIntent at the same time, you can also provide the parameters available in the Confirm API. + * href="https://docs.stripe.com/api/payment_intents/confirm">Confirm API. */ public Builder setConfirm(Boolean confirm) { this.confirm = confirm; @@ -626,7 +648,7 @@ public Builder setCurrency(String currency) { *

Payment methods attached to other Customers cannot be used with this PaymentIntent. * *

If setup_future_usage + * href="https://api.stripe.com#payment_intent_object-setup_future_usage">setup_future_usage * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment * method attaches to the Customer after the PaymentIntent has been confirmed and any required * actions from the user are complete. If the payment method is {@code card_present} and isn't a @@ -639,6 +661,26 @@ public Builder setCustomer(String customer) { return this; } + /** + * ID of the Account representing the customer that this PaymentIntent belongs to, if one + * exists. + * + *

Payment methods attached to other Accounts cannot be used with this PaymentIntent. + * + *

If setup_future_usage + * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment + * method attaches to the Account after the PaymentIntent has been confirmed and any required + * actions from the user are complete. If the payment method is {@code card_present} and isn't a + * digital wallet, then a generated_card + * payment method representing the card is created and attached to the Account instead. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** An arbitrary string attached to the object. Often useful for displaying to users. */ public Builder setDescription(String description) { this.description = description; @@ -649,9 +691,9 @@ public Builder setDescription(String description) { * Set to {@code true} to fail the payment attempt if the PaymentIntent transitions into {@code * requires_action}. Use this parameter for simpler integrations that don't handle customer * actions, such as saving cards without + * href="https://docs.stripe.com/payments/save-card-without-authentication">saving cards without * authentication. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ public Builder setErrorOnRequiresAction(Boolean errorOnRequiresAction) { @@ -747,7 +789,7 @@ public Builder setHooks(PaymentIntentCreateParams.Hooks hooks) { /** * ID of the mandate that's used for this payment. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ public Builder setMandate(String mandate) { @@ -758,7 +800,7 @@ public Builder setMandate(String mandate) { /** * This hash contains details about the Mandate to create. This parameter can only be used with * {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ public Builder setMandateData(PaymentIntentCreateParams.MandateData mandateData) { @@ -769,7 +811,7 @@ public Builder setMandateData(PaymentIntentCreateParams.MandateData mandateData) /** * This hash contains details about the Mandate to create. This parameter can only be used with * {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ public Builder setMandateData(EmptyParam mandateData) { @@ -806,9 +848,9 @@ public Builder putAllMetadata(Map map) { /** * Set to {@code true} to indicate that the customer isn't in your checkout flow during this * payment attempt and can't authenticate. Use this parameter in scenarios where you collect - * card details and charge + * card details and charge * them later. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ public Builder setOffSession(Boolean offSession) { @@ -819,9 +861,9 @@ public Builder setOffSession(Boolean offSession) { /** * Set to {@code true} to indicate that the customer isn't in your checkout flow during this * payment attempt and can't authenticate. Use this parameter in scenarios where you collect - * card details and charge + * card details and charge * them later. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ public Builder setOffSession(PaymentIntentCreateParams.OffSession offSession) { @@ -831,7 +873,7 @@ public Builder setOffSession(PaymentIntentCreateParams.OffSession offSession) { /** * The Stripe account ID that these funds are intended for. Learn more about the use case for connected + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected * accounts. */ public Builder setOnBehalfOf(String onBehalfOf) { @@ -847,7 +889,7 @@ public Builder setPaymentDetails(PaymentIntentCreateParams.PaymentDetails paymen /** * ID of the payment method (a PaymentMethod, Card, or compatible Source + * href="https://docs.stripe.com/payments/payment-methods#compatibility">compatible Source * object) to attach to this PaymentIntent. * *

If you don't provide the {@code payment_method} parameter or the {@code source} parameter @@ -855,8 +897,8 @@ public Builder setPaymentDetails(PaymentIntentCreateParams.PaymentDetails paymen * customer.default_source} to improve migration for users of the Charges API. We recommend that * you explicitly provide the {@code payment_method} moving forward. If the payment method is * attached to a Customer, you must also provide the ID of that Customer as the customer parameter of - * this PaymentIntent. end + * href="https://api.stripe.com#create_payment_intent-customer">customer parameter of this + * PaymentIntent. end */ public Builder setPaymentMethod(String paymentMethod) { this.paymentMethod = paymentMethod; @@ -864,7 +906,7 @@ public Builder setPaymentMethod(String paymentMethod) { } /** - * The ID of the payment + * The ID of the payment * method configuration to use with this PaymentIntent. */ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) { @@ -875,7 +917,7 @@ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) /** * If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will * appear in the payment_method + * href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-payment_method">payment_method * property on the PaymentIntent. */ public Builder setPaymentMethodData( @@ -919,7 +961,7 @@ public Builder addAllPaymentMethodType(List elements) { /** * Options to configure Radar. Learn more about Radar Sessions. + * href="https://docs.stripe.com/radar/radar-session">Radar Sessions. */ public Builder setRadarOptions(PaymentIntentCreateParams.RadarOptions radarOptions) { this.radarOptions = radarOptions; @@ -940,7 +982,7 @@ public Builder setReceiptEmail(String receiptEmail) { * The URL to redirect your customer back to after they authenticate or cancel their payment on * the payment method's app or site. If you'd prefer to redirect to a mobile application, you * can alternatively supply an application URI scheme. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-confirm">{@code * confirm=true}. */ public Builder setReturnUrl(String returnUrl) { @@ -1008,7 +1050,7 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { /** * The parameters that you can use to automatically create a Transfer. Learn more about the use case for connected + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected * accounts. */ public Builder setTransferData(PaymentIntentCreateParams.TransferData transferData) { @@ -1018,7 +1060,7 @@ public Builder setTransferData(PaymentIntentCreateParams.TransferData transferDa /** * A string that identifies the resulting payment as part of a group. Learn more about the use case for connected + * href="https://docs.stripe.com/connect/separate-charges-and-transfers">use case for connected * accounts. */ public Builder setTransferGroup(String transferGroup) { @@ -1041,7 +1083,7 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) { public static class AmountDetails { /** * The total discount applied on the transaction represented in the smallest currency unit. An integer + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An integer * greater than 0. * *

This field is mutually exclusive with the {@code @@ -1061,7 +1103,7 @@ public static class AmountDetails { /** * A list of line items, each containing information about a product in the PaymentIntent. There - * is a maximum of 100 line items. + * is a maximum of 200 line items. */ @SerializedName("line_items") Object lineItems; @@ -1110,7 +1152,7 @@ public PaymentIntentCreateParams.AmountDetails build() { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -1123,7 +1165,7 @@ public Builder setDiscountAmount(Long discountAmount) { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -1192,7 +1234,7 @@ public Builder addAllLineItem( /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems(EmptyParam lineItems) { this.lineItems = lineItems; @@ -1201,7 +1243,7 @@ public Builder setLineItems(EmptyParam lineItems) { /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems( List lineItems) { @@ -1239,7 +1281,7 @@ public Builder setTax(EmptyParam tax) { public static class LineItem { /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. @@ -1290,7 +1332,7 @@ public static class LineItem { /** * Required. The unit cost of the line item represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L3 rates. An integer greater than or equal to 0. */ @SerializedName("unit_cost") @@ -1360,7 +1402,7 @@ public PaymentIntentCreateParams.AmountDetails.LineItem build() { /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} @@ -1445,7 +1487,7 @@ public Builder setTax(PaymentIntentCreateParams.AmountDetails.LineItem.Tax tax) /** * Required. The unit cost of the line item represented in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. */ public Builder setUnitCost(Long unitCost) { @@ -2045,7 +2087,7 @@ public static class Tax { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency unit. + * the smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -2104,7 +2146,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency + * the smallest currency * unit. Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -2123,7 +2165,7 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { public static class Shipping { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ @SerializedName("amount") @@ -2184,7 +2226,7 @@ public PaymentIntentCreateParams.AmountDetails.Shipping build() { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(Long amount) { @@ -2194,7 +2236,7 @@ public Builder setAmount(Long amount) { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(EmptyParam amount) { @@ -2282,7 +2324,7 @@ public static class Tax { /** * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -2341,7 +2383,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on the transaction represented in the - * smallest currency unit. + * smallest currency unit. * Required for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -2363,7 +2405,7 @@ public static class AutomaticPaymentMethods { * *

Redirect-based payment methods may require your customer to be redirected to a payment * method's app or site for authentication or additional steps. To confirm this PaymentIntent, + * href="https://docs.stripe.com/api/payment_intents/confirm">confirm this PaymentIntent, * you may be required to provide a {@code return_url} to redirect customers back to your site * after they authenticate or complete the payment. */ @@ -2412,7 +2454,7 @@ public PaymentIntentCreateParams.AutomaticPaymentMethods build() { * *

Redirect-based payment methods may require your customer to be redirected to a payment * method's app or site for authentication or additional steps. To confirm this PaymentIntent, + * href="https://docs.stripe.com/api/payment_intents/confirm">confirm this PaymentIntent, * you may be required to provide a {@code return_url} to redirect customers back to your site * after they authenticate or complete the payment. */ @@ -2615,7 +2657,7 @@ public Builder setTax(PaymentIntentCreateParams.Hooks.Inputs.Tax tax) { public static class Tax { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ @SerializedName("calculation") Object calculation; @@ -2652,7 +2694,7 @@ public PaymentIntentCreateParams.Hooks.Inputs.Tax build() { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(String calculation) { this.calculation = calculation; @@ -2661,7 +2703,7 @@ public Builder setCalculation(String calculation) { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(EmptyParam calculation) { this.calculation = calculation; @@ -3451,7 +3493,7 @@ public static class PaymentMethodData { MbWay mbWay; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -3529,6 +3571,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -3544,7 +3593,7 @@ public static class PaymentMethodData { Promptpay promptpay; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -3669,6 +3718,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -3724,6 +3774,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -3827,6 +3878,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -3899,6 +3952,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -4330,6 +4384,15 @@ public Builder setPaypal(PaymentIntentCreateParams.PaymentMethodData.Paypal payp return this; } + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. + */ + public Builder setPayto(PaymentIntentCreateParams.PaymentMethodData.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -4349,7 +4412,7 @@ public Builder setPromptpay(PaymentIntentCreateParams.PaymentMethodData.Promptpa } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions( @@ -5336,7 +5399,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -5451,7 +5517,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -6327,6 +6396,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -7696,6 +7768,105 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + + private Payto( + String accountNumber, String bsbNumber, Map extraParams, String payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + private String payId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Payto build() { + return new PaymentIntentCreateParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -7825,7 +7996,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -7881,7 +8052,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot + * A Radar Session is a snapshot * of the browser metadata and device details that help Radar make more accurate predictions * on your payments. */ @@ -8771,6 +8942,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -9098,6 +9272,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Object paypal; + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + @SerializedName("payto") + Object payto; + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment * method options. @@ -9223,6 +9404,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object payto, Object pix, Object promptpay, Object revolutPay, @@ -9275,6 +9457,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -9374,6 +9557,8 @@ public static class Builder { private Object paypal; + private Object payto; + private Object pix; private Object promptpay; @@ -9441,6 +9626,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -10191,6 +10377,24 @@ public Builder setPaypal(EmptyParam paypal) { return this; } + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(PaymentIntentCreateParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix * payment method options. @@ -12990,7 +13194,7 @@ public static class Card { * Installment configuration for payments attempted on this PaymentIntent. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ @SerializedName("installments") Installments installments; @@ -13016,7 +13220,7 @@ public static class Card { /** * Request ability to capture beyond the standard + * href="https://docs.stripe.com/payments/extended-authorization">capture beyond the standard * authorization validity window for this PaymentIntent. */ @SerializedName("request_extended_authorization") @@ -13024,21 +13228,21 @@ public static class Card { /** * Request ability to increment the + * href="https://docs.stripe.com/payments/incremental-authorization">increment the * authorization for this PaymentIntent. */ @SerializedName("request_incremental_authorization") RequestIncrementalAuthorization requestIncrementalAuthorization; /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. */ @SerializedName("request_multicapture") RequestMulticapture requestMulticapture; /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. */ @SerializedName("request_overcapture") @@ -13047,11 +13251,11 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -13289,7 +13493,7 @@ public Builder putAllExtraParam(Map map) { * Installment configuration for payments attempted on this PaymentIntent. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ public Builder setInstallments( PaymentIntentCreateParams.PaymentMethodOptions.Card.Installments installments) { @@ -13326,7 +13530,7 @@ public Builder setNetwork( /** * Request ability to capture beyond the + * href="https://docs.stripe.com/payments/extended-authorization">capture beyond the * standard authorization validity window for this PaymentIntent. */ public Builder setRequestExtendedAuthorization( @@ -13338,7 +13542,7 @@ public Builder setRequestExtendedAuthorization( /** * Request ability to increment the + * href="https://docs.stripe.com/payments/incremental-authorization">increment the * authorization for this PaymentIntent. */ public Builder setRequestIncrementalAuthorization( @@ -13349,7 +13553,7 @@ public Builder setRequestIncrementalAuthorization( } /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. */ public Builder setRequestMulticapture( @@ -13360,7 +13564,7 @@ public Builder setRequestMulticapture( } /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. */ public Builder setRequestOvercapture( @@ -13373,11 +13577,11 @@ public Builder setRequestOvercapture( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -14850,7 +15054,7 @@ public static class CardPresent { /** * Request ability to capture this payment beyond the standard authorization + * href="https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity">authorization * validity window. */ @SerializedName("request_extended_authorization") @@ -14858,10 +15062,10 @@ public static class CardPresent { /** * Request ability to increment + * href="https://docs.stripe.com/terminal/features/incremental-authorizations">increment * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported + * in the Confirm response * to verify support. */ @SerializedName("request_incremental_authorization_support") @@ -14959,7 +15163,7 @@ public Builder putAllExtraParam(Map map) { /** * Request ability to capture this payment beyond the standard authorization + * href="https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity">authorization * validity window. */ public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { @@ -14969,10 +15173,10 @@ public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorizat /** * Request ability to increment + * href="https://docs.stripe.com/terminal/features/incremental-authorizations">increment * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported + * in the Confirm response * to verify support. */ public Builder setRequestIncrementalAuthorizationSupport( @@ -20007,7 +20211,7 @@ public static class Paypal { Map extraParams; /** - * Preferred locale of + * Preferred locale of * the PayPal checkout page that the customer is redirected to. */ @SerializedName("preferred_locale") @@ -20136,7 +20340,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Preferred locale + * Preferred locale * of the PayPal checkout page that the customer is redirected to. */ public Builder setPreferredLocale( @@ -20326,25 +20530,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Pix { - /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ - @SerializedName("amount_includes_iof") - AmountIncludesIof amountIncludesIof; - - /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. - */ - @SerializedName("expires_after_seconds") - Long expiresAfterSeconds; - - /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. - */ - @SerializedName("expires_at") - Long expiresAt; - + public static class Payto { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -20354,6 +20540,14 @@ public static class Pix { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Additional fields for Mandate creation. Only {@code purpose} field is configurable for + * PayTo PaymentIntent with {@code setup_future_usage=none}. Other fields are only applicable + * to PayTo PaymentIntent with {@code setup_future_usage=off_session} + */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -20378,18 +20572,14 @@ public static class Pix { * off_session}. */ @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + ApiRequestParams.EnumParam setupFutureUsage; - private Pix( - AmountIncludesIof amountIncludesIof, - Long expiresAfterSeconds, - Long expiresAt, + private Payto( Map extraParams, - SetupFutureUsage setupFutureUsage) { - this.amountIncludesIof = amountIncludesIof; - this.expiresAfterSeconds = expiresAfterSeconds; - this.expiresAt = expiresAt; + MandateOptions mandateOptions, + ApiRequestParams.EnumParam setupFutureUsage) { this.extraParams = extraParams; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -20398,56 +20588,22 @@ public static Builder builder() { } public static class Builder { - private AmountIncludesIof amountIncludesIof; - - private Long expiresAfterSeconds; - - private Long expiresAt; - private Map extraParams; - private SetupFutureUsage setupFutureUsage; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodOptions.Pix build() { - return new PaymentIntentCreateParams.PaymentMethodOptions.Pix( - this.amountIncludesIof, - this.expiresAfterSeconds, - this.expiresAt, - this.extraParams, - this.setupFutureUsage); - } - - /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ - public Builder setAmountIncludesIof( - PaymentIntentCreateParams.PaymentMethodOptions.Pix.AmountIncludesIof - amountIncludesIof) { - this.amountIncludesIof = amountIncludesIof; - return this; - } + private MandateOptions mandateOptions; - /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. - */ - public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { - this.expiresAfterSeconds = expiresAfterSeconds; - return this; - } + private ApiRequestParams.EnumParam setupFutureUsage; - /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. - */ - public Builder setExpiresAt(Long expiresAt) { - this.expiresAt = expiresAt; - return this; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Payto build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions, this.setupFutureUsage); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Pix#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Payto#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -20461,7 +20617,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Pix#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Payto#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -20472,6 +20628,17 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Additional fields for Mandate creation. Only {@code purpose} field is configurable for + * PayTo PaymentIntent with {@code setup_future_usage=none}. Other fields are only + * applicable to PayTo PaymentIntent with {@code setup_future_usage=off_session} + */ + public Builder setMandateOptions( + PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -20497,7 +20664,566 @@ public Builder putAllExtraParam(Map map) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Pix.SetupFutureUsage setupFutureUsage) { + PaymentIntentCreateParams.PaymentMethodOptions.Payto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Object amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + */ + @SerializedName("amount_type") + ApiRequestParams.EnumParam amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + Object endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + @SerializedName("payment_schedule") + ApiRequestParams.EnumParam paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Object paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + ApiRequestParams.EnumParam purpose; + + private MandateOptions( + Object amount, + ApiRequestParams.EnumParam amountType, + Object endDate, + Map extraParams, + ApiRequestParams.EnumParam paymentSchedule, + Object paymentsPerPeriod, + ApiRequestParams.EnumParam purpose) { + this.amount = amount; + this.amountType = amountType; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.paymentsPerPeriod = paymentsPerPeriod; + this.purpose = purpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private ApiRequestParams.EnumParam amountType; + + private Object endDate; + + private Map extraParams; + + private ApiRequestParams.EnumParam paymentSchedule; + + private Object paymentsPerPeriod; + + private ApiRequestParams.EnumParam purpose; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions( + this.amount, + this.amountType, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.paymentsPerPeriod, + this.purpose); + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(EmptyParam amount) { + this.amount = amount; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType( + PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType(EmptyParam amountType) { + this.amountType = amountType; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule( + PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule(EmptyParam paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(EmptyParam paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose(EmptyParam purpose) { + this.purpose = purpose; + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), + + @SerializedName("annual") + ANNUAL("annual"), + + @SerializedName("daily") + DAILY("daily"), + + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("semi_annual") + SEMI_ANNUAL("semi_annual"), + + @SerializedName("weekly") + WEEKLY("weekly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Pix( + AmountIncludesIof amountIncludesIof, + Long expiresAfterSeconds, + Long expiresAt, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.amountIncludesIof = amountIncludesIof; + this.expiresAfterSeconds = expiresAfterSeconds; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmountIncludesIof amountIncludesIof; + + private Long expiresAfterSeconds; + + private Long expiresAt; + + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Pix build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Pix( + this.amountIncludesIof, + this.expiresAfterSeconds, + this.expiresAt, + this.extraParams, + this.setupFutureUsage); + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + PaymentIntentCreateParams.PaymentMethodOptions.Pix.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + return this; + } + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentCreateParams.PaymentMethodOptions.Pix.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } @@ -23162,7 +23888,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -23215,7 +23941,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -23399,7 +24125,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -23512,7 +24241,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -23530,7 +24262,7 @@ public static class TransferData { * transferred. * *

If you intend to collect a fee and you need a more robust reporting experience, using application_fee_amount + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-application_fee_amount">application_fee_amount * might be a better fit for your integration. */ @SerializedName("amount") @@ -23583,7 +24315,7 @@ public PaymentIntentCreateParams.TransferData build() { * transferred. * *

If you intend to collect a fee and you need a more robust reporting experience, using application_fee_amount + * href="https://docs.stripe.com/api/payment_intents/create#create_payment_intent-application_fee_amount">application_fee_amount * might be a better fit for your integration. */ public Builder setAmount(Long amount) { @@ -23772,6 +24504,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index f5554e10234..868dc107a0b 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -29,7 +29,7 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams * The amount of the application fee (if any) that will be requested to be applied to the payment * and transferred to the application owner's Stripe account. The amount of the application fee * collected will be capped at the total amount captured. For more information, see the - * PaymentIntents use case for + * PaymentIntents use case for * connected accounts. */ @SerializedName("application_fee_amount") @@ -57,7 +57,7 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams Hooks hooks; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -81,7 +81,7 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams /** * The parameters used to automatically create a transfer after the payment is captured. Learn - * more about the use case for + * more about the use case for * connected accounts. */ @SerializedName("transfer_data") @@ -175,7 +175,7 @@ public Builder setAmountDetails( * The amount of the application fee (if any) that will be requested to be applied to the * payment and transferred to the application owner's Stripe account. The amount of the * application fee collected will be capped at the total amount captured. For more information, - * see the PaymentIntents use case + * see the PaymentIntents use case * for connected accounts. */ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { @@ -295,7 +295,7 @@ public Builder setStatementDescriptor(String statementDescriptor) { /** * The parameters used to automatically create a transfer after the payment is captured. Learn - * more about the use case for + * more about the use case for * connected accounts. */ public Builder setTransferData( @@ -310,7 +310,7 @@ public Builder setTransferData( public static class AmountDetails { /** * The total discount applied on the transaction represented in the smallest currency unit. An integer + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An integer * greater than 0. * *

This field is mutually exclusive with the {@code @@ -330,7 +330,7 @@ public static class AmountDetails { /** * A list of line items, each containing information about a product in the PaymentIntent. There - * is a maximum of 100 line items. + * is a maximum of 200 line items. */ @SerializedName("line_items") Object lineItems; @@ -379,7 +379,7 @@ public PaymentIntentIncrementAuthorizationParams.AmountDetails build() { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -392,7 +392,7 @@ public Builder setDiscountAmount(Long discountAmount) { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -469,7 +469,7 @@ public Builder addAllLineItem( /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems(EmptyParam lineItems) { this.lineItems = lineItems; @@ -478,7 +478,7 @@ public Builder setLineItems(EmptyParam lineItems) { /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems( List lineItems) { @@ -517,7 +517,7 @@ public Builder setTax(EmptyParam tax) { public static class LineItem { /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. @@ -568,7 +568,7 @@ public static class LineItem { /** * Required. The unit cost of the line item represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L3 rates. An integer greater than or equal to 0. */ @SerializedName("unit_cost") @@ -638,7 +638,7 @@ public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem build() /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} @@ -726,7 +726,7 @@ public Builder setTax( /** * Required. The unit cost of the line item represented in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. */ public Builder setUnitCost(Long unitCost) { @@ -1341,7 +1341,7 @@ public static class Tax { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency unit. + * the smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1402,7 +1402,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency + * the smallest currency * unit. Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1421,7 +1421,7 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { public static class Shipping { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ @SerializedName("amount") @@ -1482,7 +1482,7 @@ public PaymentIntentIncrementAuthorizationParams.AmountDetails.Shipping build() /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(Long amount) { @@ -1492,7 +1492,7 @@ public Builder setAmount(Long amount) { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(EmptyParam amount) { @@ -1582,7 +1582,7 @@ public static class Tax { /** * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1641,7 +1641,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on the transaction represented in the - * smallest currency unit. + * smallest currency unit. * Required for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -1800,7 +1800,7 @@ public Builder setTax(PaymentIntentIncrementAuthorizationParams.Hooks.Inputs.Tax public static class Tax { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ @SerializedName("calculation") Object calculation; @@ -1837,7 +1837,7 @@ public PaymentIntentIncrementAuthorizationParams.Hooks.Inputs.Tax build() { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(String calculation) { this.calculation = calculation; @@ -1846,7 +1846,7 @@ public Builder setCalculation(String calculation) { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(EmptyParam calculation) { this.calculation = calculation; diff --git a/src/main/java/com/stripe/param/PaymentIntentListParams.java b/src/main/java/com/stripe/param/PaymentIntentListParams.java index 3a306e9ef34..80af19d8a5d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentListParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentListParams.java @@ -24,6 +24,12 @@ public class PaymentIntentListParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** + * Only return PaymentIntents for the account representing the customer that this ID specifies. + */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -65,6 +71,7 @@ public class PaymentIntentListParams extends ApiRequestParams { private PaymentIntentListParams( Object created, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, @@ -72,6 +79,7 @@ private PaymentIntentListParams( String startingAfter) { this.created = created; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -88,6 +96,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -103,6 +113,7 @@ public PaymentIntentListParams build() { return new PaymentIntentListParams( this.created, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -134,6 +145,14 @@ public Builder setCustomer(String customer) { return this; } + /** + * Only return PaymentIntents for the account representing the customer that this ID specifies. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with diff --git a/src/main/java/com/stripe/param/PaymentIntentSearchParams.java b/src/main/java/com/stripe/param/PaymentIntentSearchParams.java index 8221c82d580..2d3c0a37d24 100644 --- a/src/main/java/com/stripe/param/PaymentIntentSearchParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentSearchParams.java @@ -43,9 +43,9 @@ public class PaymentIntentSearchParams extends ApiRequestParams { /** * Required. The search query string. See search query language and the + * href="https://docs.stripe.com/search#search-query-language">search query language and the * list of supported query fields for payment + * href="https://docs.stripe.com/search#query-fields-for-payment-intents">query fields for payment * intents. */ @SerializedName("query") @@ -154,9 +154,9 @@ public Builder setPage(String page) { /** * Required. The search query string. See search query language and the + * href="https://docs.stripe.com/search#search-query-language">search query language and the * list of supported query fields for + * href="https://docs.stripe.com/search#query-fields-for-payment-intents">query fields for * payment intents. */ public Builder setQuery(String query) { diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index bb478056734..1a94270da8c 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -16,10 +16,10 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { /** * Amount intended to be collected by this PaymentIntent. A positive integer representing how much - * to charge in the smallest currency + * to charge in the smallest currency * unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The * minimum amount is $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @@ -34,7 +34,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { * The amount of the application fee (if any) that will be requested to be applied to the payment * and transferred to the application owner's Stripe account. The amount of the application fee * collected will be capped at the total amount captured. For more information, see the - * PaymentIntents use case for + * PaymentIntents use case for * connected accounts. */ @SerializedName("application_fee_amount") @@ -57,7 +57,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { *

Payment methods attached to other Customers cannot be used with this PaymentIntent. * *

If setup_future_usage + * href="https://api.stripe.com#payment_intent_object-setup_future_usage">setup_future_usage * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment * method attaches to the Customer after the PaymentIntent has been confirmed and any required * actions from the user are complete. If the payment method is {@code card_present} and isn't a @@ -68,6 +68,23 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { @SerializedName("customer") Object customer; + /** + * ID of the Account representing the customer that this PaymentIntent belongs to, if one exists. + * + *

Payment methods attached to other Accounts cannot be used with this PaymentIntent. + * + *

If setup_future_usage + * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment + * method attaches to the Account after the PaymentIntent has been confirmed and any required + * actions from the user are complete. If the payment method is {@code card_present} and isn't a + * digital wallet, then a generated_card + * payment method representing the card is created and attached to the Account instead. + */ + @SerializedName("customer_account") + Object customerAccount; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ @SerializedName("description") Object description; @@ -94,7 +111,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { Hooks hooks; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -108,7 +125,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { /** * ID of the payment method (a PaymentMethod, Card, or compatible + * href="https://docs.stripe.com/payments/payment-methods/transitioning#compatibility">compatible * Source object) to attach to this PaymentIntent. To unset this field to null, pass in an * empty string. */ @@ -116,7 +133,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { Object paymentMethod; /** - * The ID of the payment + * The ID of the payment * method configuration to use with this PaymentIntent. */ @SerializedName("payment_method_configuration") @@ -125,7 +142,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { /** * If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will * appear in the payment_method + * href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-payment_method">payment_method * property on the PaymentIntent. */ @SerializedName("payment_method_data") @@ -207,7 +224,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { /** * Use this parameter to automatically create a Transfer when the payment succeeds. Learn more - * about the use case for connected + * about the use case for connected * accounts. */ @SerializedName("transfer_data") @@ -216,7 +233,7 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { /** * A string that identifies the resulting payment as part of a group. You can only provide {@code * transfer_group} if it hasn't been set. Learn more about the use case for connected accounts. + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected accounts. */ @SerializedName("transfer_group") Object transferGroup; @@ -228,6 +245,7 @@ private PaymentIntentUpdateParams( CaptureMethod captureMethod, Object currency, Object customer, + Object customerAccount, Object description, Object excludedPaymentMethodTypes, List expand, @@ -253,6 +271,7 @@ private PaymentIntentUpdateParams( this.captureMethod = captureMethod; this.currency = currency; this.customer = customer; + this.customerAccount = customerAccount; this.description = description; this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; @@ -291,6 +310,8 @@ public static class Builder { private Object customer; + private Object customerAccount; + private Object description; private Object excludedPaymentMethodTypes; @@ -338,6 +359,7 @@ public PaymentIntentUpdateParams build() { this.captureMethod, this.currency, this.customer, + this.customerAccount, this.description, this.excludedPaymentMethodTypes, this.expand, @@ -361,10 +383,10 @@ public PaymentIntentUpdateParams build() { /** * Amount intended to be collected by this PaymentIntent. A positive integer representing how - * much to charge in the smallest + * much to charge in the smallest * currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal * currency). The minimum amount is $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @@ -389,7 +411,7 @@ public Builder setAmountDetails(EmptyParam amountDetails) { * The amount of the application fee (if any) that will be requested to be applied to the * payment and transferred to the application owner's Stripe account. The amount of the * application fee collected will be capped at the total amount captured. For more information, - * see the PaymentIntents use case + * see the PaymentIntents use case * for connected accounts. */ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { @@ -401,7 +423,7 @@ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { * The amount of the application fee (if any) that will be requested to be applied to the * payment and transferred to the application owner's Stripe account. The amount of the * application fee collected will be capped at the total amount captured. For more information, - * see the PaymentIntents use case + * see the PaymentIntents use case * for connected accounts. */ public Builder setApplicationFeeAmount(EmptyParam applicationFeeAmount) { @@ -441,7 +463,7 @@ public Builder setCurrency(EmptyParam currency) { *

Payment methods attached to other Customers cannot be used with this PaymentIntent. * *

If setup_future_usage + * href="https://api.stripe.com#payment_intent_object-setup_future_usage">setup_future_usage * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment * method attaches to the Customer after the PaymentIntent has been confirmed and any required * actions from the user are complete. If the payment method is {@code card_present} and isn't a @@ -460,7 +482,7 @@ public Builder setCustomer(String customer) { *

Payment methods attached to other Customers cannot be used with this PaymentIntent. * *

If setup_future_usage + * href="https://api.stripe.com#payment_intent_object-setup_future_usage">setup_future_usage * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment * method attaches to the Customer after the PaymentIntent has been confirmed and any required * actions from the user are complete. If the payment method is {@code card_present} and isn't a @@ -473,6 +495,46 @@ public Builder setCustomer(EmptyParam customer) { return this; } + /** + * ID of the Account representing the customer that this PaymentIntent belongs to, if one + * exists. + * + *

Payment methods attached to other Accounts cannot be used with this PaymentIntent. + * + *

If setup_future_usage + * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment + * method attaches to the Account after the PaymentIntent has been confirmed and any required + * actions from the user are complete. If the payment method is {@code card_present} and isn't a + * digital wallet, then a generated_card + * payment method representing the card is created and attached to the Account instead. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + + /** + * ID of the Account representing the customer that this PaymentIntent belongs to, if one + * exists. + * + *

Payment methods attached to other Accounts cannot be used with this PaymentIntent. + * + *

If setup_future_usage + * is set and this PaymentIntent's payment method is not {@code card_present}, then the payment + * method attaches to the Account after the PaymentIntent has been confirmed and any required + * actions from the user are complete. If the payment method is {@code card_present} and isn't a + * digital wallet, then a generated_card + * payment method representing the card is created and attached to the Account instead. + */ + public Builder setCustomerAccount(EmptyParam customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** An arbitrary string attached to the object. Often useful for displaying to users. */ public Builder setDescription(String description) { this.description = description; @@ -621,7 +683,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -632,7 +694,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -656,7 +718,7 @@ public Builder setPaymentDetails(EmptyParam paymentDetails) { /** * ID of the payment method (a PaymentMethod, Card, or compatible + * href="https://docs.stripe.com/payments/payment-methods/transitioning#compatibility">compatible * Source object) to attach to this PaymentIntent. To unset this field to null, pass in an * empty string. */ @@ -667,7 +729,7 @@ public Builder setPaymentMethod(String paymentMethod) { /** * ID of the payment method (a PaymentMethod, Card, or compatible + * href="https://docs.stripe.com/payments/payment-methods/transitioning#compatibility">compatible * Source object) to attach to this PaymentIntent. To unset this field to null, pass in an * empty string. */ @@ -677,7 +739,7 @@ public Builder setPaymentMethod(EmptyParam paymentMethod) { } /** - * The ID of the payment + * The ID of the payment * method configuration to use with this PaymentIntent. */ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) { @@ -686,7 +748,7 @@ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) } /** - * The ID of the payment + * The ID of the payment * method configuration to use with this PaymentIntent. */ public Builder setPaymentMethodConfiguration(EmptyParam paymentMethodConfiguration) { @@ -697,7 +759,7 @@ public Builder setPaymentMethodConfiguration(EmptyParam paymentMethodConfigurati /** * If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will * appear in the payment_method + * href="https://docs.stripe.com/api/payment_intents/object#payment_intent_object-payment_method">payment_method * property on the PaymentIntent. */ public Builder setPaymentMethodData( @@ -884,7 +946,7 @@ public Builder setStatementDescriptorSuffix(EmptyParam statementDescriptorSuffix /** * Use this parameter to automatically create a Transfer when the payment succeeds. Learn more - * about the use case for + * about the use case for * connected accounts. */ public Builder setTransferData(PaymentIntentUpdateParams.TransferData transferData) { @@ -895,7 +957,7 @@ public Builder setTransferData(PaymentIntentUpdateParams.TransferData transferDa /** * A string that identifies the resulting payment as part of a group. You can only provide * {@code transfer_group} if it hasn't been set. Learn more about the use case for connected + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected * accounts. */ public Builder setTransferGroup(String transferGroup) { @@ -906,7 +968,7 @@ public Builder setTransferGroup(String transferGroup) { /** * A string that identifies the resulting payment as part of a group. You can only provide * {@code transfer_group} if it hasn't been set. Learn more about the use case for connected + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected * accounts. */ public Builder setTransferGroup(EmptyParam transferGroup) { @@ -920,7 +982,7 @@ public Builder setTransferGroup(EmptyParam transferGroup) { public static class AmountDetails { /** * The total discount applied on the transaction represented in the smallest currency unit. An integer + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An integer * greater than 0. * *

This field is mutually exclusive with the {@code @@ -940,7 +1002,7 @@ public static class AmountDetails { /** * A list of line items, each containing information about a product in the PaymentIntent. There - * is a maximum of 100 line items. + * is a maximum of 200 line items. */ @SerializedName("line_items") Object lineItems; @@ -989,7 +1051,7 @@ public PaymentIntentUpdateParams.AmountDetails build() { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -1002,7 +1064,7 @@ public Builder setDiscountAmount(Long discountAmount) { /** * The total discount applied on the transaction represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code @@ -1071,7 +1133,7 @@ public Builder addAllLineItem( /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems(EmptyParam lineItems) { this.lineItems = lineItems; @@ -1080,7 +1142,7 @@ public Builder setLineItems(EmptyParam lineItems) { /** * A list of line items, each containing information about a product in the PaymentIntent. - * There is a maximum of 100 line items. + * There is a maximum of 200 line items. */ public Builder setLineItems( List lineItems) { @@ -1118,7 +1180,7 @@ public Builder setTax(EmptyParam tax) { public static class LineItem { /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. @@ -1169,7 +1231,7 @@ public static class LineItem { /** * Required. The unit cost of the line item represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L3 rates. An integer greater than or equal to 0. */ @SerializedName("unit_cost") @@ -1239,7 +1301,7 @@ public PaymentIntentUpdateParams.AmountDetails.LineItem build() { /** * The discount applied on this line item represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than 0. * *

This field is mutually exclusive with the {@code amount_details[discount_amount]} @@ -1345,7 +1407,7 @@ public Builder setTax(PaymentIntentUpdateParams.AmountDetails.LineItem.Tax tax) /** * Required. The unit cost of the line item represented in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. */ public Builder setUnitCost(Long unitCost) { @@ -2008,7 +2070,7 @@ public static class Tax { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency unit. + * the smallest currency unit. * Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -2067,7 +2129,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on a single line item represented in - * the smallest currency + * the smallest currency * unit. Required for L3 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -2086,7 +2148,7 @@ public Builder setTotalTaxAmount(Long totalTaxAmount) { public static class Shipping { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ @SerializedName("amount") @@ -2147,7 +2209,7 @@ public PaymentIntentUpdateParams.AmountDetails.Shipping build() { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(Long amount) { @@ -2157,7 +2219,7 @@ public Builder setAmount(Long amount) { /** * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. An * integer greater than or equal to 0. */ public Builder setAmount(EmptyParam amount) { @@ -2245,7 +2307,7 @@ public static class Tax { /** * Required. The total amount of tax on the transaction represented in the smallest currency unit. Required + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. Required * for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -2304,7 +2366,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The total amount of tax on the transaction represented in the - * smallest currency unit. + * smallest currency unit. * Required for L2 rates. An integer greater than or equal to 0. * *

This field is mutually exclusive with the {@code @@ -2461,7 +2523,7 @@ public Builder setTax(PaymentIntentUpdateParams.Hooks.Inputs.Tax tax) { public static class Tax { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ @SerializedName("calculation") Object calculation; @@ -2498,7 +2560,7 @@ public PaymentIntentUpdateParams.Hooks.Inputs.Tax build() { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(String calculation) { this.calculation = calculation; @@ -2507,7 +2569,7 @@ public Builder setCalculation(String calculation) { /** * Required. The TaxCalculation id + * href="https://docs.stripe.com/api/tax/calculations">TaxCalculation id */ public Builder setCalculation(EmptyParam calculation) { this.calculation = calculation; @@ -2908,7 +2970,7 @@ public static class PaymentMethodData { MbWay mbWay; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -2986,6 +3048,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -3001,7 +3070,7 @@ public static class PaymentMethodData { Promptpay promptpay; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -3126,6 +3195,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -3181,6 +3251,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -3284,6 +3355,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -3356,6 +3429,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -3787,6 +3861,15 @@ public Builder setPaypal(PaymentIntentUpdateParams.PaymentMethodData.Paypal payp return this; } + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. + */ + public Builder setPayto(PaymentIntentUpdateParams.PaymentMethodData.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -3806,7 +3889,7 @@ public Builder setPromptpay(PaymentIntentUpdateParams.PaymentMethodData.Promptpa } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions( @@ -4844,7 +4927,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") Object state; @@ -4992,13 +5078,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -5883,6 +5975,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -7290,6 +7385,123 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + Object accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + Object bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + Object payId; + + private Payto( + Object accountNumber, Object bsbNumber, Map extraParams, Object payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountNumber; + + private Object bsbNumber; + + private Map extraParams; + + private Object payId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Payto build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(EmptyParam bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(EmptyParam payId) { + this.payId = payId; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -7419,7 +7631,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -7475,7 +7687,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot + * A Radar Session is a snapshot * of the browser metadata and device details that help Radar make more accurate predictions * on your payments. */ @@ -7485,7 +7697,7 @@ public Builder setSession(String session) { } /** - * A Radar Session is a snapshot + * A Radar Session is a snapshot * of the browser metadata and device details that help Radar make more accurate predictions * on your payments. */ @@ -8399,6 +8611,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -8726,6 +8941,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Object paypal; + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + @SerializedName("payto") + Object payto; + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix payment * method options. @@ -8851,6 +9073,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object payto, Object pix, Object promptpay, Object revolutPay, @@ -8903,6 +9126,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -9002,6 +9226,8 @@ public static class Builder { private Object paypal; + private Object payto; + private Object pix; private Object promptpay; @@ -9069,6 +9295,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -9819,6 +10046,24 @@ public Builder setPaypal(EmptyParam paypal) { return this; } + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(PaymentIntentUpdateParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + + /** + * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this sub-hash contains details about the Pix * payment method options. @@ -12684,7 +12929,7 @@ public static class Card { * Installment configuration for payments attempted on this PaymentIntent. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ @SerializedName("installments") Installments installments; @@ -12710,7 +12955,7 @@ public static class Card { /** * Request ability to capture beyond the standard + * href="https://docs.stripe.com/payments/extended-authorization">capture beyond the standard * authorization validity window for this PaymentIntent. */ @SerializedName("request_extended_authorization") @@ -12718,21 +12963,21 @@ public static class Card { /** * Request ability to increment the + * href="https://docs.stripe.com/payments/incremental-authorization">increment the * authorization for this PaymentIntent. */ @SerializedName("request_incremental_authorization") RequestIncrementalAuthorization requestIncrementalAuthorization; /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. */ @SerializedName("request_multicapture") RequestMulticapture requestMulticapture; /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. */ @SerializedName("request_overcapture") @@ -12741,11 +12986,11 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -12993,7 +13238,7 @@ public Builder putAllExtraParam(Map map) { * Installment configuration for payments attempted on this PaymentIntent. * *

For more information, see the installments integration guide. + * href="https://docs.stripe.com/payments/installments">installments integration guide. */ public Builder setInstallments( PaymentIntentUpdateParams.PaymentMethodOptions.Card.Installments installments) { @@ -13030,7 +13275,7 @@ public Builder setNetwork( /** * Request ability to capture beyond the + * href="https://docs.stripe.com/payments/extended-authorization">capture beyond the * standard authorization validity window for this PaymentIntent. */ public Builder setRequestExtendedAuthorization( @@ -13042,7 +13287,7 @@ public Builder setRequestExtendedAuthorization( /** * Request ability to increment the + * href="https://docs.stripe.com/payments/incremental-authorization">increment the * authorization for this PaymentIntent. */ public Builder setRequestIncrementalAuthorization( @@ -13053,7 +13298,7 @@ public Builder setRequestIncrementalAuthorization( } /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. */ public Builder setRequestMulticapture( @@ -13064,7 +13309,7 @@ public Builder setRequestMulticapture( } /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. */ public Builder setRequestOvercapture( @@ -13077,11 +13322,11 @@ public Builder setRequestOvercapture( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -14608,7 +14853,7 @@ public static class CardPresent { /** * Request ability to capture this payment beyond the standard authorization + * href="https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity">authorization * validity window. */ @SerializedName("request_extended_authorization") @@ -14616,10 +14861,10 @@ public static class CardPresent { /** * Request ability to increment + * href="https://docs.stripe.com/terminal/features/incremental-authorizations">increment * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported + * in the Confirm response * to verify support. */ @SerializedName("request_incremental_authorization_support") @@ -14717,7 +14962,7 @@ public Builder putAllExtraParam(Map map) { /** * Request ability to capture this payment beyond the standard authorization + * href="https://docs.stripe.com/terminal/features/extended-authorizations#authorization-validity">authorization * validity window. */ public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorization) { @@ -14727,10 +14972,10 @@ public Builder setRequestExtendedAuthorization(Boolean requestExtendedAuthorizat /** * Request ability to increment + * href="https://docs.stripe.com/terminal/features/incremental-authorizations">increment * this PaymentIntent if the combination of MCC and card brand is eligible. Check incremental_authorization_supported - * in the Confirm response + * href="https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported">incremental_authorization_supported + * in the Confirm response * to verify support. */ public Builder setRequestIncrementalAuthorizationSupport( @@ -19816,7 +20061,7 @@ public static class Paypal { Map extraParams; /** - * Preferred locale of + * Preferred locale of * the PayPal checkout page that the customer is redirected to. */ @SerializedName("preferred_locale") @@ -19945,7 +20190,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Preferred locale + * Preferred locale * of the PayPal checkout page that the customer is redirected to. */ public Builder setPreferredLocale( @@ -20153,25 +20398,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Pix { - /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ - @SerializedName("amount_includes_iof") - AmountIncludesIof amountIncludesIof; - - /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. - */ - @SerializedName("expires_after_seconds") - Long expiresAfterSeconds; - - /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. - */ - @SerializedName("expires_at") - Long expiresAt; - + public static class Payto { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -20181,6 +20408,14 @@ public static class Pix { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Additional fields for Mandate creation. Only {@code purpose} field is configurable for + * PayTo PaymentIntent with {@code setup_future_usage=none}. Other fields are only applicable + * to PayTo PaymentIntent with {@code setup_future_usage=off_session} + */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -20205,18 +20440,14 @@ public static class Pix { * off_session}. */ @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + ApiRequestParams.EnumParam setupFutureUsage; - private Pix( - AmountIncludesIof amountIncludesIof, - Long expiresAfterSeconds, - Long expiresAt, + private Payto( Map extraParams, - SetupFutureUsage setupFutureUsage) { - this.amountIncludesIof = amountIncludesIof; - this.expiresAfterSeconds = expiresAfterSeconds; - this.expiresAt = expiresAt; + MandateOptions mandateOptions, + ApiRequestParams.EnumParam setupFutureUsage) { this.extraParams = extraParams; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -20225,56 +20456,22 @@ public static Builder builder() { } public static class Builder { - private AmountIncludesIof amountIncludesIof; - - private Long expiresAfterSeconds; - - private Long expiresAt; - private Map extraParams; - private SetupFutureUsage setupFutureUsage; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Pix build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Pix( - this.amountIncludesIof, - this.expiresAfterSeconds, - this.expiresAt, - this.extraParams, - this.setupFutureUsage); - } - - /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ - public Builder setAmountIncludesIof( - PaymentIntentUpdateParams.PaymentMethodOptions.Pix.AmountIncludesIof - amountIncludesIof) { - this.amountIncludesIof = amountIncludesIof; - return this; - } + private MandateOptions mandateOptions; - /** - * The number of seconds (between 10 and 1209600) after which Pix payment will expire. - * Defaults to 86400 seconds. - */ - public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { - this.expiresAfterSeconds = expiresAfterSeconds; - return this; - } + private ApiRequestParams.EnumParam setupFutureUsage; - /** - * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). - * Defaults to 1 day in the future. - */ - public Builder setExpiresAt(Long expiresAt) { - this.expiresAt = expiresAt; - return this; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Payto build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions, this.setupFutureUsage); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Pix#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Payto#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -20288,7 +20485,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Pix#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Payto#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -20299,6 +20496,17 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Additional fields for Mandate creation. Only {@code purpose} field is configurable for + * PayTo PaymentIntent with {@code setup_future_usage=none}. Other fields are only + * applicable to PayTo PaymentIntent with {@code setup_future_usage=off_session} + */ + public Builder setMandateOptions( + PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -20324,13 +20532,572 @@ public Builder putAllExtraParam(Map map) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Pix.SetupFutureUsage setupFutureUsage) { + PaymentIntentUpdateParams.PaymentMethodOptions.Payto.SetupFutureUsage + setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } - } - public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Object amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + */ + @SerializedName("amount_type") + ApiRequestParams.EnumParam amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + Object endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + @SerializedName("payment_schedule") + ApiRequestParams.EnumParam paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Object paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + ApiRequestParams.EnumParam purpose; + + private MandateOptions( + Object amount, + ApiRequestParams.EnumParam amountType, + Object endDate, + Map extraParams, + ApiRequestParams.EnumParam paymentSchedule, + Object paymentsPerPeriod, + ApiRequestParams.EnumParam purpose) { + this.amount = amount; + this.amountType = amountType; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.paymentsPerPeriod = paymentsPerPeriod; + this.purpose = purpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private ApiRequestParams.EnumParam amountType; + + private Object endDate; + + private Map extraParams; + + private ApiRequestParams.EnumParam paymentSchedule; + + private Object paymentsPerPeriod; + + private ApiRequestParams.EnumParam purpose; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions( + this.amount, + this.amountType, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.paymentsPerPeriod, + this.purpose); + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(EmptyParam amount) { + this.amount = amount; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType( + PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType(EmptyParam amountType) { + this.amountType = amountType; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule( + PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule(EmptyParam paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(EmptyParam paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose(EmptyParam purpose) { + this.purpose = purpose; + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), + + @SerializedName("annual") + ANNUAL("annual"), + + @SerializedName("daily") + DAILY("daily"), + + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("semi_annual") + SEMI_ANNUAL("semi_annual"), + + @SerializedName("weekly") + WEEKLY("weekly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + @SerializedName("expires_after_seconds") + Long expiresAfterSeconds; + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + @SerializedName("expires_at") + Long expiresAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using a + * publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Pix( + AmountIncludesIof amountIncludesIof, + Long expiresAfterSeconds, + Long expiresAt, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.amountIncludesIof = amountIncludesIof; + this.expiresAfterSeconds = expiresAfterSeconds; + this.expiresAt = expiresAt; + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmountIncludesIof amountIncludesIof; + + private Long expiresAfterSeconds; + + private Long expiresAt; + + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Pix build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Pix( + this.amountIncludesIof, + this.expiresAfterSeconds, + this.expiresAt, + this.extraParams, + this.setupFutureUsage); + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + PaymentIntentUpdateParams.PaymentMethodOptions.Pix.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * The number of seconds (between 10 and 1209600) after which Pix payment will expire. + * Defaults to 86400 seconds. + */ + public Builder setExpiresAfterSeconds(Long expiresAfterSeconds) { + this.expiresAfterSeconds = expiresAfterSeconds; + return this; + } + + /** + * The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). + * Defaults to 1 day in the future. + */ + public Builder setExpiresAt(Long expiresAt) { + this.expiresAt = expiresAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + * + *

If you've already set {@code setup_future_usage} and you're performing a request using + * a publishable key, you can only update the value from {@code on_session} to {@code + * off_session}. + */ + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Pix.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { @SerializedName("always") ALWAYS("always"), @@ -23211,7 +23978,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -23357,13 +24127,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -23568,6 +24344,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index b2557038eaa..8a8146b7349 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -72,9 +72,9 @@ public class PaymentLinkCreateParams extends ApiRequestParams { CustomText customText; /** - * Configures whether checkout + * Configures whether checkout * sessions created by this payment link create a Customer. + * href="https://docs.stripe.com/api/customers">Customer. */ @SerializedName("customer_creation") CustomerCreation customerCreation; @@ -108,12 +108,12 @@ public class PaymentLinkCreateParams extends ApiRequestParams { List lineItems; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. Metadata associated with this Payment * Link will automatically be copied to checkout sessions created by this + * href="https://docs.stripe.com/api/checkout/sessions">checkout sessions created by this * payment link. */ @SerializedName("metadata") @@ -129,7 +129,7 @@ public class PaymentLinkCreateParams extends ApiRequestParams { /** * A list of optional items the customer can add to their order at checkout. Use this parameter to - * pass one-time or recurring Prices. There is a + * pass one-time or recurring Prices. There is a * maximum of 10 optional items allowed on a payment link, and the existing limits on the number * of line items allowed on a payment link apply to the combined number of line items and optional * items. There is a maximum of 20 combined line items and optional items. @@ -152,7 +152,7 @@ public class PaymentLinkCreateParams extends ApiRequestParams { *

Can only be set in {@code subscription} mode. Defaults to {@code always}. * *

If you'd like information on how to collect a payment method outside of Checkout, read the - * guide on configuring + * guide on configuring * subscriptions with a free trial. */ @SerializedName("payment_method_collection") @@ -163,7 +163,7 @@ public class PaymentLinkCreateParams extends ApiRequestParams { * dynamically show relevant payment methods from your payment method settings (20+ * payment methods supported). + * href="https://docs.stripe.com/payments/payment-methods/integration-options#payment-method-product-support">supported). */ @SerializedName("payment_method_types") List paymentMethodTypes; @@ -186,7 +186,7 @@ public class PaymentLinkCreateParams extends ApiRequestParams { /** * The shipping rate options to apply to checkout sessions created by this + * href="https://docs.stripe.com/api/checkout/sessions">checkout sessions created by this * payment link. */ @SerializedName("shipping_options") @@ -195,7 +195,7 @@ public class PaymentLinkCreateParams extends ApiRequestParams { /** * Describes the type of transaction being performed in order to customize relevant text on the * page, such as the submit button. Changing this value will also affect the hostname in the url property + * href="https://docs.stripe.com/api/payment_links/payment_links/object#url">url property * (example: {@code donate.stripe.com}). */ @SerializedName("submit_type") @@ -483,9 +483,9 @@ public Builder setCustomText(PaymentLinkCreateParams.CustomText customText) { } /** - * Configures whether checkout + * Configures whether checkout * sessions created by this payment link create a Customer. + * href="https://docs.stripe.com/api/customers">Customer. */ public Builder setCustomerCreation(PaymentLinkCreateParams.CustomerCreation customerCreation) { this.customerCreation = customerCreation; @@ -664,7 +664,7 @@ public Builder setPaymentIntentData( *

Can only be set in {@code subscription} mode. Defaults to {@code always}. * *

If you'd like information on how to collect a payment method outside of Checkout, read the - * guide on configuring + * guide on configuring * subscriptions with a free trial. */ public Builder setPaymentMethodCollection( @@ -753,7 +753,7 @@ public Builder addAllShippingOption(List /** * Describes the type of transaction being performed in order to customize relevant text on the * page, such as the submit button. Changing this value will also affect the hostname in the url property + * href="https://docs.stripe.com/api/payment_links/payment_links/object#url">url property * (example: {@code donate.stripe.com}). */ public Builder setSubmitType(PaymentLinkCreateParams.SubmitType submitType) { @@ -981,7 +981,7 @@ public static class Redirect { * Required. The URL the customer will be redirected to after the purchase is * complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code id} * of the completed checkout + * href="https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-id">checkout * session included. */ @SerializedName("url") @@ -1038,7 +1038,7 @@ public Builder putAllExtraParam(Map map) { * Required. The URL the customer will be redirected to after the purchase * is complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code * id} of the completed checkout + * href="https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-id">checkout * session included. */ public Builder setUrl(String url) { @@ -2809,7 +2809,7 @@ public static class InvoiceData { Issuer issuer; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -3048,7 +3048,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -3059,7 +3059,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -3438,15 +3438,15 @@ public static class LineItem { Map extraParams; /** - * The ID of the Price or Plan object. One of {@code price} or {@code + * The ID of the Price or Plan object. One of {@code price} or {@code * price_data} is required. */ @SerializedName("price") String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -3527,8 +3527,8 @@ public Builder putAllExtraParam(Map map) { } /** - * The ID of the Price or Plan object. One of {@code price} or {@code + * The ID of the Price or Plan object. One of {@code price} or {@code * price_data} is required. */ public Builder setPrice(String price) { @@ -3537,7 +3537,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData(PaymentLinkCreateParams.LineItem.PriceData priceData) { @@ -3712,7 +3712,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -3858,7 +3858,7 @@ public Builder setRecurring( /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -3919,7 +3919,7 @@ public static class ProductData { List images; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -3933,7 +3933,7 @@ public static class ProductData { @SerializedName("name") String name; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String taxCode; @@ -4094,7 +4094,7 @@ public Builder setName(String name) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; @@ -4552,8 +4552,8 @@ public static class OptionalItem { /** * Required. The ID of the Price or Plan object. + * href="https://docs.stripe.com/api/prices">Price or Plan object. */ @SerializedName("price") String price; @@ -4633,8 +4633,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The ID of the Price or Plan object. + * href="https://docs.stripe.com/api/prices">Price or Plan object. */ public Builder setPrice(String price) { this.price = price; @@ -4792,8 +4792,8 @@ public static class PaymentIntentData { Map extraParams; /** - * Set of key-value pairs that will - * declaratively set metadata on Payment + * Set of key-value pairs that will + * declaratively set metadata on Payment * Intents generated from this payment link. Unlike object-level metadata, this field is * declarative. Updates will clear prior values. */ @@ -4802,7 +4802,7 @@ public static class PaymentIntentData { /** * Indicates that you intend to make future payments + * href="https://docs.stripe.com/payments/payment-intents#future-usage">make future payments * with the payment method collected by this Checkout Session. * *

When setting this to {@code on_session}, Checkout will show a notice to the customer that @@ -4849,7 +4849,7 @@ public static class PaymentIntentData { /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected + * href="https://docs.stripe.com/connect/separate-charges-and-transfers">use case for connected * accounts for details. */ @SerializedName("transfer_group") @@ -4976,7 +4976,7 @@ public Builder putAllMetadata(Map map) { /** * Indicates that you intend to make future + * href="https://docs.stripe.com/payments/payment-intents#future-usage">make future * payments with the payment method collected by this Checkout Session. * *

When setting this to {@code on_session}, Checkout will show a notice to the customer @@ -5031,7 +5031,7 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents - * use case for + * use case for * connected accounts for details. */ public Builder setTransferGroup(String transferGroup) { @@ -6215,9 +6215,9 @@ public static class SubscriptionData { InvoiceSettings invoiceSettings; /** - * Set of key-value pairs that will + * Set of key-value pairs that will * declaratively set metadata on Subscriptions generated from this + * href="https://docs.stripe.com/api/subscriptions">Subscriptions generated from this * payment link. Unlike object-level metadata, this field is declarative. Updates will clear * prior values. */ @@ -7059,6 +7059,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 94282a144a5..939c7cc1595 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -49,9 +49,9 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { CustomText customText; /** - * Configures whether checkout + * Configures whether checkout * sessions created by this payment link create a Customer. + * href="https://docs.stripe.com/api/customers">Customer. */ @SerializedName("customer_creation") CustomerCreation customerCreation; @@ -85,12 +85,12 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { List lineItems; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. Metadata associated with this Payment * Link will automatically be copied to checkout sessions created by this + * href="https://docs.stripe.com/api/checkout/sessions">checkout sessions created by this * payment link. */ @SerializedName("metadata") @@ -115,7 +115,7 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { *

Can only be set in {@code subscription} mode. Defaults to {@code always}. * *

If you'd like information on how to collect a payment method outside of Checkout, read the - * guide on configuring + * guide on configuring * subscriptions with a free trial. */ @SerializedName("payment_method_collection") @@ -148,7 +148,7 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { /** * Describes the type of transaction being performed in order to customize relevant text on the * page, such as the submit button. Changing this value will also affect the hostname in the url property + * href="https://docs.stripe.com/api/payment_links/payment_links/object#url">url property * (example: {@code donate.stripe.com}). */ @SerializedName("submit_type") @@ -385,9 +385,9 @@ public Builder setCustomText(PaymentLinkUpdateParams.CustomText customText) { } /** - * Configures whether checkout + * Configures whether checkout * sessions created by this payment link create a Customer. + * href="https://docs.stripe.com/api/customers">Customer. */ public Builder setCustomerCreation(PaymentLinkUpdateParams.CustomerCreation customerCreation) { this.customerCreation = customerCreation; @@ -546,7 +546,7 @@ public Builder setPaymentIntentData( *

Can only be set in {@code subscription} mode. Defaults to {@code always}. * *

If you'd like information on how to collect a payment method outside of Checkout, read the - * guide on configuring + * guide on configuring * subscriptions with a free trial. */ public Builder setPaymentMethodCollection( @@ -644,7 +644,7 @@ public Builder setShippingAddressCollection(EmptyParam shippingAddressCollection /** * Describes the type of transaction being performed in order to customize relevant text on the * page, such as the submit button. Changing this value will also affect the hostname in the url property + * href="https://docs.stripe.com/api/payment_links/payment_links/object#url">url property * (example: {@code donate.stripe.com}). */ public Builder setSubmitType(PaymentLinkUpdateParams.SubmitType submitType) { @@ -869,7 +869,7 @@ public static class Redirect { * Required. The URL the customer will be redirected to after the purchase is * complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code id} * of the completed checkout + * href="https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-id">checkout * session included. */ @SerializedName("url") @@ -926,7 +926,7 @@ public Builder putAllExtraParam(Map map) { * Required. The URL the customer will be redirected to after the purchase * is complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code * id} of the completed checkout + * href="https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-id">checkout * session included. */ public Builder setUrl(String url) { @@ -938,7 +938,7 @@ public Builder setUrl(String url) { * Required. The URL the customer will be redirected to after the purchase * is complete. You can embed {@code {CHECKOUT_SESSION_ID}} into the URL to have the {@code * id} of the completed checkout + * href="https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-id">checkout * session included. */ public Builder setUrl(EmptyParam url) { @@ -2534,7 +2534,7 @@ public static class InvoiceData { Issuer issuer; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -2785,7 +2785,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -2796,7 +2796,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -3710,8 +3710,8 @@ public static class PaymentIntentData { Map extraParams; /** - * Set of key-value pairs that will - * declaratively set metadata on Payment + * Set of key-value pairs that will + * declaratively set metadata on Payment * Intents generated from this payment link. Unlike object-level metadata, this field is * declarative. Updates will clear prior values. */ @@ -3743,7 +3743,7 @@ public static class PaymentIntentData { /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected + * href="https://docs.stripe.com/connect/separate-charges-and-transfers">use case for connected * accounts for details. */ @SerializedName("transfer_group") @@ -3860,8 +3860,8 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that will - * declaratively set metadata on Payment + * Set of key-value pairs that will + * declaratively set metadata on Payment * Intents generated from this payment link. Unlike object-level metadata, this field is * declarative. Updates will clear prior values. */ @@ -3871,8 +3871,8 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that will - * declaratively set metadata on Payment + * Set of key-value pairs that will + * declaratively set metadata on Payment * Intents generated from this payment link. Unlike object-level metadata, this field is * declarative. Updates will clear prior values. */ @@ -3937,7 +3937,7 @@ public Builder setStatementDescriptorSuffix(EmptyParam statementDescriptorSuffix /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents - * use case for + * use case for * connected accounts for details. */ public Builder setTransferGroup(String transferGroup) { @@ -3947,7 +3947,7 @@ public Builder setTransferGroup(String transferGroup) { /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents - * use case for + * use case for * connected accounts for details. */ public Builder setTransferGroup(EmptyParam transferGroup) { @@ -5021,9 +5021,9 @@ public static class SubscriptionData { InvoiceSettings invoiceSettings; /** - * Set of key-value pairs that will + * Set of key-value pairs that will * declaratively set metadata on Subscriptions generated from this + * href="https://docs.stripe.com/api/subscriptions">Subscriptions generated from this * payment link. Unlike object-level metadata, this field is declarative. Updates will clear * prior values. */ @@ -5142,9 +5142,9 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that will + * Set of key-value pairs that will * declaratively set metadata on Subscriptions generated from this + * href="https://docs.stripe.com/api/subscriptions">Subscriptions generated from this * payment link. Unlike object-level metadata, this field is declarative. Updates will clear * prior values. */ @@ -5154,9 +5154,9 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that will + * Set of key-value pairs that will * declaratively set metadata on Subscriptions generated from this + * href="https://docs.stripe.com/api/subscriptions">Subscriptions generated from this * payment link. Unlike object-level metadata, this field is declarative. Updates will clear * prior values. */ @@ -5804,6 +5804,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentMethodAttachParams.java b/src/main/java/com/stripe/param/PaymentMethodAttachParams.java index 1e50e1b4e8f..d0f2362559d 100644 --- a/src/main/java/com/stripe/param/PaymentMethodAttachParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodAttachParams.java @@ -13,10 +13,14 @@ @Getter @EqualsAndHashCode(callSuper = false) public class PaymentMethodAttachParams extends ApiRequestParams { - /** Required. The ID of the customer to which to attach the PaymentMethod. */ + /** The ID of the customer to which to attach the PaymentMethod. */ @SerializedName("customer") String customer; + /** The ID of the Account representing the customer to which to attach the PaymentMethod. */ + @SerializedName("customer_account") + String customerAccount; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -31,8 +35,12 @@ public class PaymentMethodAttachParams extends ApiRequestParams { Map extraParams; private PaymentMethodAttachParams( - String customer, List expand, Map extraParams) { + String customer, + String customerAccount, + List expand, + Map extraParams) { this.customer = customer; + this.customerAccount = customerAccount; this.expand = expand; this.extraParams = extraParams; } @@ -44,21 +52,30 @@ public static Builder builder() { public static class Builder { private String customer; + private String customerAccount; + private List expand; private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public PaymentMethodAttachParams build() { - return new PaymentMethodAttachParams(this.customer, this.expand, this.extraParams); + return new PaymentMethodAttachParams( + this.customer, this.customerAccount, this.expand, this.extraParams); } - /** Required. The ID of the customer to which to attach the PaymentMethod. */ + /** The ID of the customer to which to attach the PaymentMethod. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of the Account representing the customer to which to attach the PaymentMethod. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index a8afe38dca3..88173144d23 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -15,7 +15,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Canadian pre-authorized debit payments, check this page for more details like country + * href="https://docs.stripe.com/payments/acss-debit">page for more details like country * availability. */ @SerializedName("acss_debit") @@ -25,7 +25,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * Affirm gives your customers a way to split purchases over * a series of payments. Depending on the purchase, they can pay with four interest-free payments * (Split Pay) or pay over a longer term (Installments), which might include interest. Check this - * page for more details like country + * page for more details like country * availability. */ @SerializedName("affirm") @@ -33,7 +33,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Afterpay gives your customers a way to pay for purchases in installments, check this page for more details like + * href="https://docs.stripe.com/payments/afterpay-clearpay">page for more details like * country availability. Afterpay is particularly popular among businesses selling fashion, * beauty, and sports products. */ @@ -44,7 +44,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay * users can pay on the web or on a mobile device using login credentials or their Alipay app. * Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's - * login credentials. Check this page for + * login credentials. Check this page for * more details. */ @SerializedName("alipay") @@ -69,7 +69,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. * There are no additional fees to process Apple Pay payments, and the pricing is the same as other card transactions. Check - * this page for more details. + * this page for more details. */ @SerializedName("apple_pay") ApplePay applePay; @@ -84,7 +84,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit * payments from customers with an Australian bank account. Check this page for more details. + * href="https://docs.stripe.com/payments/au-becs-debit">page for more details. */ @SerializedName("au_becs_debit") AuBecsDebit auBecsDebit; @@ -92,17 +92,17 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank * account, check this page for more details. + * href="https://docs.stripe.com/payments/payment-methods/bacs-debit">page for more details. */ @SerializedName("bacs_debit") BacsDebit bacsDebit; /** * Bancontact is the most popular online payment method in Belgium, with over 15 million cards in - * circulation. Customers use a Bancontact + * circulation. Customers use a Bancontact * card or mobile app linked to a Belgian bank account to make online payments that are secure, * guaranteed, and confirmed immediately. Check this page for more details. + * href="https://docs.stripe.com/payments/bancontact">page for more details. */ @SerializedName("bancontact") Bancontact bancontact; @@ -119,18 +119,18 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { Billie billie; /** - * BLIK is a single use + * BLIK is a single use * payment method that requires customers to authenticate their payments. When customers want to * pay online using BLIK, they request a six-digit code from their banking application and enter * it into the payment collection form. Check this page for more details. + * href="https://docs.stripe.com/payments/blik">page for more details. */ @SerializedName("blik") Blik blik; /** * Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check - * this page for more details. + * this page for more details. */ @SerializedName("boleto") Boleto boleto; @@ -146,7 +146,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded * with either Visa or Mastercard, meaning you can process these cards over either Cartes * Bancaires or the Visa or Mastercard networks. Check this page for more details. + * href="https://docs.stripe.com/payments/cartes-bancaires">page for more details. */ @SerializedName("cartes_bancaires") CartesBancaires cartesBancaires; @@ -154,22 +154,22 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and * receive money using their digital wallet. Check this page for more details. + * href="https://docs.stripe.com/payments/cash-app-pay">page for more details. */ @SerializedName("cashapp") Cashapp cashapp; /** - * Stablecoin payments enable + * Stablecoin payments enable * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and Metamask. */ @SerializedName("crypto") Crypto crypto; /** - * Uses a customer’s cash balance + * Uses a customer’s cash balance * for the payment. The cash balance can be funded via a bank transfer. Check this page for more details. + * href="https://docs.stripe.com/payments/bank-transfers">page for more details. */ @SerializedName("customer_balance") CustomerBalance customerBalance; @@ -178,7 +178,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * EPS is an Austria-based payment method that allows customers to complete transactions online * using their bank credentials. EPS is supported by all Austrian banks and is accepted by over * 80% of Austrian online retailers. Check this page for more details. + * href="https://docs.stripe.com/payments/eps">page for more details. */ @SerializedName("eps") Eps eps; @@ -202,7 +202,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members * of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment * methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this - * page for more details. + * page for more details. */ @SerializedName("fpx") Fpx fpx; @@ -210,7 +210,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. Check - * this page for more + * this page for more * details. */ @SerializedName("fr_meal_voucher_conecs") @@ -221,7 +221,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * customers to complete transactions online using their online banking environment, with funds * debited from their bank account. Depending on their bank, customers confirm payments on giropay * using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts - * in Germany. Check this page for more + * in Germany. Check this page for more * details. */ @SerializedName("giropay") @@ -231,7 +231,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * Google Pay allows customers to make payments in your app or website using any credit or debit * card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an * Android device. Use the Google Pay API to request any credit or debit card stored in your - * customer's Google account. Check this page for + * customer's Google account. Check this page for * more details. */ @SerializedName("google_pay") @@ -241,7 +241,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * GrabPay is a payment method developed by Grab. GrabPay is a digital wallet - * customers maintain a balance in their wallets that they pay out with. Check this page for more details. + * href="https://docs.stripe.com/payments/grabpay">page for more details. */ @SerializedName("grabpay") Grabpay grabpay; @@ -251,7 +251,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * online using their bank credentials. All major Dutch banks are members of Currence, the scheme * that operates iDEAL, making it the most popular online payment method in the Netherlands with a * share of online transactions close to 55%. Check this page for more details. + * href="https://docs.stripe.com/payments/ideal">page for more details. */ @SerializedName("ideal") Ideal ideal; @@ -273,10 +273,10 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Klarna gives customers a range of payment options during + * href="https://docs.stripe.com/payments/klarna#payment-options">payment options during * checkout. Available payment options vary depending on the customer's billing address and the * transaction amount. These payment options make it convenient for customers to purchase items in - * all price ranges. Check this page for + * all price ranges. Check this page for * more details. */ @SerializedName("klarna") @@ -284,7 +284,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Konbini allows customers in Japan to pay for bills and online purchases at convenience stores - * with cash. Check this page for more + * with cash. Check this page for more * details. */ @SerializedName("konbini") @@ -295,7 +295,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { KrCard krCard; /** - * Link is a payment method network. With + * Link is a payment method network. With * Link, users save their payment details once, then reuse that information to pay with one click * for any business on the network. */ @@ -305,17 +305,17 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * MB WAY is the most popular wallet in Portugal. After entering their phone number in your * checkout, customers approve the payment directly in their MB WAY app. Check this page for more details. + * href="https://docs.stripe.com/payments/mb-way">page for more details. */ @SerializedName("mb_way") MbWay mbWay; /** - * MobilePay is a single-use + * MobilePay is a single-use * card wallet payment method used in Denmark and Finland. It allows customers to authenticate and + * href="https://docs.stripe.com/payments/payment-methods#customer-actions">authenticate and * approve payments using the MobilePay app. Check this page for more details. + * href="https://docs.stripe.com/payments/mobilepay">page for more details. */ @SerializedName("mobilepay") Mobilepay mobilepay; @@ -339,7 +339,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit * payments from customers with a New Zeland bank account. Check this page for more details. + * href="https://docs.stripe.com/payments/nz-bank-account">page for more details. */ @SerializedName("nz_bank_account") NzBankAccount nzBankAccount; @@ -348,7 +348,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America * and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills * and online purchases in-store with cash. Check this page for more details. + * href="https://docs.stripe.com/payments/oxxo">page for more details. */ @SerializedName("oxxo") Oxxo oxxo; @@ -357,7 +357,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * Przelewy24 is a Poland-based payment method aggregator that allows customers to complete * transactions online using bank transfers and other methods. Bank transfers account for 30% of * online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 - * banks. Check this page for more details. + * banks. Check this page for more details. */ @SerializedName("p24") P24 p24; @@ -385,7 +385,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * PayNow is a Singapore-based payment method that allows customers to make a payment using their * preferred app from participating banks and participating non-bank financial institutions. Check - * this page for more details. + * this page for more details. */ @SerializedName("paynow") Paynow paynow; @@ -393,11 +393,20 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to * pay using their PayPal account. Check this page for more details. + * href="https://docs.stripe.com/payments/paypal">page for more details. */ @SerializedName("paypal") Paypal paypal; + /** + * PayTo is a real-time payment method + * that enables customers in Australia to pay by providing their bank account details. Customers + * must accept a mandate authorizing you to debit their account. Check this page for more details. + */ + @SerializedName("payto") + Payto payto; + /** * Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and * approve payments by scanning a QR code in their preferred banking app. Check this page for more details. + * href="https://docs.stripe.com/payments/promptpay">page for more details. */ @SerializedName("promptpay") Promptpay promptpay; @@ -446,7 +455,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * (SEPA) is an initiative of the European Union to simplify payments within and across member * countries. SEPA established and enforced banking standards to allow for the direct debiting of * every EUR-denominated bank account within the SEPA region, check this page for more details. + * href="https://docs.stripe.com/payments/sepa-debit">page for more details. */ @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -456,17 +465,17 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * href="https://stripe.com/docs/payments/payment-intents">Payment Intents API—a single * integration path for creating payments using any supported method—to accept Sofort payments from customers. Check this page for more details. + * href="https://docs.stripe.com/payments/sofort">page for more details. */ @SerializedName("sofort") Sofort sofort; /** - * Swish is a real-time payment method + * Swish is a real-time payment method * popular in Sweden. It allows customers to authenticate and + * href="https://docs.stripe.com/payments/payment-methods#customer-actions">authenticate and * approve payments using the Swish mobile app and the Swedish BankID mobile app. Check this - * page for more details. + * page for more details. */ @SerializedName("swish") Swish swish; @@ -481,7 +490,7 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { /** * Stripe users in the United States can accept ACH direct debit payments from customers with a US * bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check - * this page for more details. + * this page for more details. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -491,14 +500,14 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { * users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' * apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online * education, and food/nutrition. Check this page for more details. + * href="https://docs.stripe.com/payments/wechat-pay">page for more details. */ @SerializedName("wechat_pay") WechatPay wechatPay; /** * Zip gives your customers a way to split purchases over a series of payments. Check this page for more details like country + * href="https://docs.stripe.com/payments/zip">page for more details like country * availability. */ @SerializedName("zip") @@ -552,6 +561,7 @@ private PaymentMethodConfigurationCreateParams( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RevolutPay revolutPay, @@ -611,6 +621,7 @@ private PaymentMethodConfigurationCreateParams( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -724,6 +735,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -798,6 +811,7 @@ public PaymentMethodConfigurationCreateParams build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -814,7 +828,7 @@ public PaymentMethodConfigurationCreateParams build() { /** * Canadian pre-authorized debit payments, check this page for more details like country + * href="https://docs.stripe.com/payments/acss-debit">page for more details like country * availability. */ public Builder setAcssDebit(PaymentMethodConfigurationCreateParams.AcssDebit acssDebit) { @@ -826,7 +840,7 @@ public Builder setAcssDebit(PaymentMethodConfigurationCreateParams.AcssDebit acs * Affirm gives your customers a way to split purchases * over a series of payments. Depending on the purchase, they can pay with four interest-free * payments (Split Pay) or pay over a longer term (Installments), which might include interest. - * Check this page for more details like + * Check this page for more details like * country availability. */ public Builder setAffirm(PaymentMethodConfigurationCreateParams.Affirm affirm) { @@ -836,7 +850,7 @@ public Builder setAffirm(PaymentMethodConfigurationCreateParams.Affirm affirm) { /** * Afterpay gives your customers a way to pay for purchases in installments, check this page for more details like + * href="https://docs.stripe.com/payments/afterpay-clearpay">page for more details like * country availability. Afterpay is particularly popular among businesses selling fashion, * beauty, and sports products. */ @@ -851,7 +865,7 @@ public Builder setAfterpayClearpay( * Alipay users can pay on the web or on a mobile device using login credentials or their Alipay * app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the * customer's login credentials. Check this page for more details. + * href="https://docs.stripe.com/payments/alipay">page for more details. */ public Builder setAlipay(PaymentMethodConfigurationCreateParams.Alipay alipay) { this.alipay = alipay; @@ -881,7 +895,7 @@ public Builder setAmazonPay(PaymentMethodConfigurationCreateParams.AmazonPay ama * applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS * Sierra. There are no additional fees to process Apple Pay payments, and the pricing is the same as other card transactions. Check - * this page for more details. + * this page for more details. */ public Builder setApplePay(PaymentMethodConfigurationCreateParams.ApplePay applePay) { this.applePay = applePay; @@ -901,7 +915,7 @@ public Builder setApplePayLater( /** * Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit * payments from customers with an Australian bank account. Check this page for more details. + * href="https://docs.stripe.com/payments/au-becs-debit">page for more details. */ public Builder setAuBecsDebit(PaymentMethodConfigurationCreateParams.AuBecsDebit auBecsDebit) { this.auBecsDebit = auBecsDebit; @@ -911,7 +925,7 @@ public Builder setAuBecsDebit(PaymentMethodConfigurationCreateParams.AuBecsDebit /** * Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank * account, check this page for more details. + * href="https://docs.stripe.com/payments/payment-methods/bacs-debit">page for more details. */ public Builder setBacsDebit(PaymentMethodConfigurationCreateParams.BacsDebit bacsDebit) { this.bacsDebit = bacsDebit; @@ -920,10 +934,10 @@ public Builder setBacsDebit(PaymentMethodConfigurationCreateParams.BacsDebit bac /** * Bancontact is the most popular online payment method in Belgium, with over 15 million cards - * in circulation. Customers use a + * in circulation. Customers use a * Bancontact card or mobile app linked to a Belgian bank account to make online payments that * are secure, guaranteed, and confirmed immediately. Check this page for more details. + * href="https://docs.stripe.com/payments/bancontact">page for more details. */ public Builder setBancontact(PaymentMethodConfigurationCreateParams.Bancontact bancontact) { this.bancontact = bancontact; @@ -944,11 +958,11 @@ public Builder setBillie(PaymentMethodConfigurationCreateParams.Billie billie) { } /** - * BLIK is a single use + * BLIK is a single use * payment method that requires customers to authenticate their payments. When customers want to * pay online using BLIK, they request a six-digit code from their banking application and enter * it into the payment collection form. Check this page for more details. + * href="https://docs.stripe.com/payments/blik">page for more details. */ public Builder setBlik(PaymentMethodConfigurationCreateParams.Blik blik) { this.blik = blik; @@ -957,7 +971,7 @@ public Builder setBlik(PaymentMethodConfigurationCreateParams.Blik blik) { /** * Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. - * Check this page for more details. + * Check this page for more details. */ public Builder setBoleto(PaymentMethodConfigurationCreateParams.Boleto boleto) { this.boleto = boleto; @@ -977,7 +991,7 @@ public Builder setCard(PaymentMethodConfigurationCreateParams.Card card) { * Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded * with either Visa or Mastercard, meaning you can process these cards over either Cartes * Bancaires or the Visa or Mastercard networks. Check this page for more details. + * href="https://docs.stripe.com/payments/cartes-bancaires">page for more details. */ public Builder setCartesBancaires( PaymentMethodConfigurationCreateParams.CartesBancaires cartesBancaires) { @@ -988,7 +1002,7 @@ public Builder setCartesBancaires( /** * Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and * receive money using their digital wallet. Check this page for more details. + * href="https://docs.stripe.com/payments/cash-app-pay">page for more details. */ public Builder setCashapp(PaymentMethodConfigurationCreateParams.Cashapp cashapp) { this.cashapp = cashapp; @@ -996,7 +1010,7 @@ public Builder setCashapp(PaymentMethodConfigurationCreateParams.Cashapp cashapp } /** - * Stablecoin payments enable + * Stablecoin payments enable * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and * Metamask. */ @@ -1006,9 +1020,9 @@ public Builder setCrypto(PaymentMethodConfigurationCreateParams.Crypto crypto) { } /** - * Uses a customer’s cash + * Uses a customer’s cash * balance for the payment. The cash balance can be funded via a bank transfer. Check this - * page for more details. + * page for more details. */ public Builder setCustomerBalance( PaymentMethodConfigurationCreateParams.CustomerBalance customerBalance) { @@ -1020,7 +1034,7 @@ public Builder setCustomerBalance( * EPS is an Austria-based payment method that allows customers to complete transactions online * using their bank credentials. EPS is supported by all Austrian banks and is accepted by over * 80% of Austrian online retailers. Check this page for more details. + * href="https://docs.stripe.com/payments/eps">page for more details. */ public Builder setEps(PaymentMethodConfigurationCreateParams.Eps eps) { this.eps = eps; @@ -1085,7 +1099,7 @@ public Builder putAllExtraParam(Map map) { * Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members * of the PayNet Group, which owns and operates FPX. It is one of the most popular online * payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. - * Check this page for more details. + * Check this page for more details. */ public Builder setFpx(PaymentMethodConfigurationCreateParams.Fpx fpx) { this.fpx = fpx; @@ -1095,7 +1109,7 @@ public Builder setFpx(PaymentMethodConfigurationCreateParams.Fpx fpx) { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. - * Check this page for + * Check this page for * more details. */ public Builder setFrMealVoucherConecs( @@ -1109,7 +1123,7 @@ public Builder setFrMealVoucherConecs( * customers to complete transactions online using their online banking environment, with funds * debited from their bank account. Depending on their bank, customers confirm payments on * giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online - * checkouts in Germany. Check this page + * checkouts in Germany. Check this page * for more details. */ public Builder setGiropay(PaymentMethodConfigurationCreateParams.Giropay giropay) { @@ -1121,7 +1135,7 @@ public Builder setGiropay(PaymentMethodConfigurationCreateParams.Giropay giropay * Google Pay allows customers to make payments in your app or website using any credit or debit * card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an * Android device. Use the Google Pay API to request any credit or debit card stored in your - * customer's Google account. Check this page + * customer's Google account. Check this page * for more details. */ public Builder setGooglePay(PaymentMethodConfigurationCreateParams.GooglePay googlePay) { @@ -1133,7 +1147,7 @@ public Builder setGooglePay(PaymentMethodConfigurationCreateParams.GooglePay goo * GrabPay is a payment method developed by Grab. GrabPay is a digital wallet - * customers maintain a balance in their wallets that they pay out with. Check this page for more details. + * href="https://docs.stripe.com/payments/grabpay">page for more details. */ public Builder setGrabpay(PaymentMethodConfigurationCreateParams.Grabpay grabpay) { this.grabpay = grabpay; @@ -1145,7 +1159,7 @@ public Builder setGrabpay(PaymentMethodConfigurationCreateParams.Grabpay grabpay * online using their bank credentials. All major Dutch banks are members of Currence, the * scheme that operates iDEAL, making it the most popular online payment method in the * Netherlands with a share of online transactions close to 55%. Check this page for more details. + * href="https://docs.stripe.com/payments/ideal">page for more details. */ public Builder setIdeal(PaymentMethodConfigurationCreateParams.Ideal ideal) { this.ideal = ideal; @@ -1173,10 +1187,10 @@ public Builder setKakaoPay(PaymentMethodConfigurationCreateParams.KakaoPay kakao /** * Klarna gives customers a range of payment options during + * href="https://docs.stripe.com/payments/klarna#payment-options">payment options during * checkout. Available payment options vary depending on the customer's billing address and the * transaction amount. These payment options make it convenient for customers to purchase items - * in all price ranges. Check this page + * in all price ranges. Check this page * for more details. */ public Builder setKlarna(PaymentMethodConfigurationCreateParams.Klarna klarna) { @@ -1186,7 +1200,7 @@ public Builder setKlarna(PaymentMethodConfigurationCreateParams.Klarna klarna) { /** * Konbini allows customers in Japan to pay for bills and online purchases at convenience stores - * with cash. Check this page for more + * with cash. Check this page for more * details. */ public Builder setKonbini(PaymentMethodConfigurationCreateParams.Konbini konbini) { @@ -1201,7 +1215,7 @@ public Builder setKrCard(PaymentMethodConfigurationCreateParams.KrCard krCard) { } /** - * Link is a payment method network. With + * Link is a payment method network. With * Link, users save their payment details once, then reuse that information to pay with one * click for any business on the network. */ @@ -1213,7 +1227,7 @@ public Builder setLink(PaymentMethodConfigurationCreateParams.Link link) { /** * MB WAY is the most popular wallet in Portugal. After entering their phone number in your * checkout, customers approve the payment directly in their MB WAY app. Check this page for more details. + * href="https://docs.stripe.com/payments/mb-way">page for more details. */ public Builder setMbWay(PaymentMethodConfigurationCreateParams.MbWay mbWay) { this.mbWay = mbWay; @@ -1222,11 +1236,11 @@ public Builder setMbWay(PaymentMethodConfigurationCreateParams.MbWay mbWay) { /** * MobilePay is a single-use card wallet + * href="https://docs.stripe.com/payments/payment-methods#usage">single-use card wallet * payment method used in Denmark and Finland. It allows customers to authenticate and + * href="https://docs.stripe.com/payments/payment-methods#customer-actions">authenticate and * approve payments using the MobilePay app. Check this page for more details. + * href="https://docs.stripe.com/payments/mobilepay">page for more details. */ public Builder setMobilepay(PaymentMethodConfigurationCreateParams.Mobilepay mobilepay) { this.mobilepay = mobilepay; @@ -1258,7 +1272,7 @@ public Builder setNaverPay(PaymentMethodConfigurationCreateParams.NaverPay naver /** * Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit * payments from customers with a New Zeland bank account. Check this page for more details. + * href="https://docs.stripe.com/payments/nz-bank-account">page for more details. */ public Builder setNzBankAccount( PaymentMethodConfigurationCreateParams.NzBankAccount nzBankAccount) { @@ -1270,7 +1284,7 @@ public Builder setNzBankAccount( * OXXO is a Mexican chain of convenience stores with thousands of locations across Latin * America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to * pay bills and online purchases in-store with cash. Check this page for more details. + * href="https://docs.stripe.com/payments/oxxo">page for more details. */ public Builder setOxxo(PaymentMethodConfigurationCreateParams.Oxxo oxxo) { this.oxxo = oxxo; @@ -1281,7 +1295,7 @@ public Builder setOxxo(PaymentMethodConfigurationCreateParams.Oxxo oxxo) { * Przelewy24 is a Poland-based payment method aggregator that allows customers to complete * transactions online using bank transfers and other methods. Bank transfers account for 30% of * online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 - * banks. Check this page for more details. + * banks. Check this page for more details. */ public Builder setP24(PaymentMethodConfigurationCreateParams.P24 p24) { this.p24 = p24; @@ -1317,7 +1331,7 @@ public Builder setPayco(PaymentMethodConfigurationCreateParams.Payco payco) { /** * PayNow is a Singapore-based payment method that allows customers to make a payment using * their preferred app from participating banks and participating non-bank financial - * institutions. Check this page for more + * institutions. Check this page for more * details. */ public Builder setPaynow(PaymentMethodConfigurationCreateParams.Paynow paynow) { @@ -1328,13 +1342,24 @@ public Builder setPaynow(PaymentMethodConfigurationCreateParams.Paynow paynow) { /** * PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to * pay using their PayPal account. Check this page for more details. + * href="https://docs.stripe.com/payments/paypal">page for more details. */ public Builder setPaypal(PaymentMethodConfigurationCreateParams.Paypal paypal) { this.paypal = paypal; return this; } + /** + * PayTo is a real-time payment method + * that enables customers in Australia to pay by providing their bank account details. Customers + * must accept a mandate authorizing you to debit their account. Check this page for more details. + */ + public Builder setPayto(PaymentMethodConfigurationCreateParams.Payto payto) { + this.payto = payto; + return this; + } + /** * Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and * approve payments by scanning a QR code in their preferred banking app. Check this page for more details. + * href="https://docs.stripe.com/payments/promptpay">page for more details. */ public Builder setPromptpay(PaymentMethodConfigurationCreateParams.Promptpay promptpay) { this.promptpay = promptpay; @@ -1393,7 +1418,7 @@ public Builder setSatispay(PaymentMethodConfigurationCreateParams.Satispay satis * Area (SEPA) is an initiative of the European Union to simplify payments within and across * member countries. SEPA established and enforced banking standards to allow for the direct * debiting of every EUR-denominated bank account within the SEPA region, check this page for more details. + * href="https://docs.stripe.com/payments/sepa-debit">page for more details. */ public Builder setSepaDebit(PaymentMethodConfigurationCreateParams.SepaDebit sepaDebit) { this.sepaDebit = sepaDebit; @@ -1405,7 +1430,7 @@ public Builder setSepaDebit(PaymentMethodConfigurationCreateParams.SepaDebit sep * href="https://stripe.com/docs/payments/payment-intents">Payment Intents API—a single * integration path for creating payments using any supported method—to accept Sofort payments from customers. Check this page for more details. + * href="https://docs.stripe.com/payments/sofort">page for more details. */ public Builder setSofort(PaymentMethodConfigurationCreateParams.Sofort sofort) { this.sofort = sofort; @@ -1413,11 +1438,11 @@ public Builder setSofort(PaymentMethodConfigurationCreateParams.Sofort sofort) { } /** - * Swish is a real-time payment method + * Swish is a real-time payment method * popular in Sweden. It allows customers to authenticate and + * href="https://docs.stripe.com/payments/payment-methods#customer-actions">authenticate and * approve payments using the Swish mobile app and the Swedish BankID mobile app. Check this - * page for more details. + * page for more details. */ public Builder setSwish(PaymentMethodConfigurationCreateParams.Swish swish) { this.swish = swish; @@ -1437,7 +1462,7 @@ public Builder setTwint(PaymentMethodConfigurationCreateParams.Twint twint) { /** * Stripe users in the United States can accept ACH direct debit payments from customers with a * US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. - * Check this page for more + * Check this page for more * details. */ public Builder setUsBankAccount( @@ -1451,7 +1476,7 @@ public Builder setUsBankAccount( * users. Chinese consumers can use WeChat Pay to pay for goods and services inside of * businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, * travel, online education, and food/nutrition. Check this page for more details. + * href="https://docs.stripe.com/payments/wechat-pay">page for more details. */ public Builder setWechatPay(PaymentMethodConfigurationCreateParams.WechatPay wechatPay) { this.wechatPay = wechatPay; @@ -1460,7 +1485,7 @@ public Builder setWechatPay(PaymentMethodConfigurationCreateParams.WechatPay wec /** * Zip gives your customers a way to split purchases over a series of payments. Check this page for more details like country + * href="https://docs.stripe.com/payments/zip">page for more details like country * availability. */ public Builder setZip(PaymentMethodConfigurationCreateParams.Zip zip) { @@ -8593,6 +8618,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Payto(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Payto build() { + return new PaymentMethodConfigurationCreateParams.Payto( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Payto.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationCreateParams.Payto#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationCreateParams.Payto#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Payto.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Payto.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.Payto.DisplayPreference#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.Payto.DisplayPreference#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationCreateParams.Payto.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index 357a3b6e0ba..a1aeee447ef 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -16,7 +16,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Canadian pre-authorized debit payments, check this page for more details like country + * href="https://docs.stripe.com/payments/acss-debit">page for more details like country * availability. */ @SerializedName("acss_debit") @@ -30,7 +30,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * Affirm gives your customers a way to split purchases over * a series of payments. Depending on the purchase, they can pay with four interest-free payments * (Split Pay) or pay over a longer term (Installments), which might include interest. Check this - * page for more details like country + * page for more details like country * availability. */ @SerializedName("affirm") @@ -38,7 +38,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Afterpay gives your customers a way to pay for purchases in installments, check this page for more details like + * href="https://docs.stripe.com/payments/afterpay-clearpay">page for more details like * country availability. Afterpay is particularly popular among businesses selling fashion, * beauty, and sports products. */ @@ -49,7 +49,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay * users can pay on the web or on a mobile device using login credentials or their Alipay app. * Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's - * login credentials. Check this page for + * login credentials. Check this page for * more details. */ @SerializedName("alipay") @@ -74,7 +74,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. * There are no additional fees to process Apple Pay payments, and the pricing is the same as other card transactions. Check - * this page for more details. + * this page for more details. */ @SerializedName("apple_pay") ApplePay applePay; @@ -89,7 +89,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit * payments from customers with an Australian bank account. Check this page for more details. + * href="https://docs.stripe.com/payments/au-becs-debit">page for more details. */ @SerializedName("au_becs_debit") AuBecsDebit auBecsDebit; @@ -97,17 +97,17 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank * account, check this page for more details. + * href="https://docs.stripe.com/payments/payment-methods/bacs-debit">page for more details. */ @SerializedName("bacs_debit") BacsDebit bacsDebit; /** * Bancontact is the most popular online payment method in Belgium, with over 15 million cards in - * circulation. Customers use a Bancontact + * circulation. Customers use a Bancontact * card or mobile app linked to a Belgian bank account to make online payments that are secure, * guaranteed, and confirmed immediately. Check this page for more details. + * href="https://docs.stripe.com/payments/bancontact">page for more details. */ @SerializedName("bancontact") Bancontact bancontact; @@ -124,18 +124,18 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { Billie billie; /** - * BLIK is a single use + * BLIK is a single use * payment method that requires customers to authenticate their payments. When customers want to * pay online using BLIK, they request a six-digit code from their banking application and enter * it into the payment collection form. Check this page for more details. + * href="https://docs.stripe.com/payments/blik">page for more details. */ @SerializedName("blik") Blik blik; /** * Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check - * this page for more details. + * this page for more details. */ @SerializedName("boleto") Boleto boleto; @@ -151,7 +151,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded * with either Visa or Mastercard, meaning you can process these cards over either Cartes * Bancaires or the Visa or Mastercard networks. Check this page for more details. + * href="https://docs.stripe.com/payments/cartes-bancaires">page for more details. */ @SerializedName("cartes_bancaires") CartesBancaires cartesBancaires; @@ -159,22 +159,22 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and * receive money using their digital wallet. Check this page for more details. + * href="https://docs.stripe.com/payments/cash-app-pay">page for more details. */ @SerializedName("cashapp") Cashapp cashapp; /** - * Stablecoin payments enable + * Stablecoin payments enable * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and Metamask. */ @SerializedName("crypto") Crypto crypto; /** - * Uses a customer’s cash balance + * Uses a customer’s cash balance * for the payment. The cash balance can be funded via a bank transfer. Check this page for more details. + * href="https://docs.stripe.com/payments/bank-transfers">page for more details. */ @SerializedName("customer_balance") CustomerBalance customerBalance; @@ -183,7 +183,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * EPS is an Austria-based payment method that allows customers to complete transactions online * using their bank credentials. EPS is supported by all Austrian banks and is accepted by over * 80% of Austrian online retailers. Check this page for more details. + * href="https://docs.stripe.com/payments/eps">page for more details. */ @SerializedName("eps") Eps eps; @@ -207,7 +207,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members * of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment * methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this - * page for more details. + * page for more details. */ @SerializedName("fpx") Fpx fpx; @@ -215,7 +215,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. Check - * this page for more + * this page for more * details. */ @SerializedName("fr_meal_voucher_conecs") @@ -226,7 +226,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * customers to complete transactions online using their online banking environment, with funds * debited from their bank account. Depending on their bank, customers confirm payments on giropay * using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts - * in Germany. Check this page for more + * in Germany. Check this page for more * details. */ @SerializedName("giropay") @@ -236,7 +236,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * Google Pay allows customers to make payments in your app or website using any credit or debit * card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an * Android device. Use the Google Pay API to request any credit or debit card stored in your - * customer's Google account. Check this page for + * customer's Google account. Check this page for * more details. */ @SerializedName("google_pay") @@ -246,7 +246,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * GrabPay is a payment method developed by Grab. GrabPay is a digital wallet - * customers maintain a balance in their wallets that they pay out with. Check this page for more details. + * href="https://docs.stripe.com/payments/grabpay">page for more details. */ @SerializedName("grabpay") Grabpay grabpay; @@ -256,7 +256,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * online using their bank credentials. All major Dutch banks are members of Currence, the scheme * that operates iDEAL, making it the most popular online payment method in the Netherlands with a * share of online transactions close to 55%. Check this page for more details. + * href="https://docs.stripe.com/payments/ideal">page for more details. */ @SerializedName("ideal") Ideal ideal; @@ -278,10 +278,10 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Klarna gives customers a range of payment options during + * href="https://docs.stripe.com/payments/klarna#payment-options">payment options during * checkout. Available payment options vary depending on the customer's billing address and the * transaction amount. These payment options make it convenient for customers to purchase items in - * all price ranges. Check this page for + * all price ranges. Check this page for * more details. */ @SerializedName("klarna") @@ -289,7 +289,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Konbini allows customers in Japan to pay for bills and online purchases at convenience stores - * with cash. Check this page for more + * with cash. Check this page for more * details. */ @SerializedName("konbini") @@ -300,7 +300,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { KrCard krCard; /** - * Link is a payment method network. With + * Link is a payment method network. With * Link, users save their payment details once, then reuse that information to pay with one click * for any business on the network. */ @@ -310,17 +310,17 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * MB WAY is the most popular wallet in Portugal. After entering their phone number in your * checkout, customers approve the payment directly in their MB WAY app. Check this page for more details. + * href="https://docs.stripe.com/payments/mb-way">page for more details. */ @SerializedName("mb_way") MbWay mbWay; /** - * MobilePay is a single-use + * MobilePay is a single-use * card wallet payment method used in Denmark and Finland. It allows customers to authenticate and + * href="https://docs.stripe.com/payments/payment-methods#customer-actions">authenticate and * approve payments using the MobilePay app. Check this page for more details. + * href="https://docs.stripe.com/payments/mobilepay">page for more details. */ @SerializedName("mobilepay") Mobilepay mobilepay; @@ -344,7 +344,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit * payments from customers with a New Zeland bank account. Check this page for more details. + * href="https://docs.stripe.com/payments/nz-bank-account">page for more details. */ @SerializedName("nz_bank_account") NzBankAccount nzBankAccount; @@ -353,7 +353,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America * and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills * and online purchases in-store with cash. Check this page for more details. + * href="https://docs.stripe.com/payments/oxxo">page for more details. */ @SerializedName("oxxo") Oxxo oxxo; @@ -362,7 +362,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * Przelewy24 is a Poland-based payment method aggregator that allows customers to complete * transactions online using bank transfers and other methods. Bank transfers account for 30% of * online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 - * banks. Check this page for more details. + * banks. Check this page for more details. */ @SerializedName("p24") P24 p24; @@ -386,7 +386,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * PayNow is a Singapore-based payment method that allows customers to make a payment using their * preferred app from participating banks and participating non-bank financial institutions. Check - * this page for more details. + * this page for more details. */ @SerializedName("paynow") Paynow paynow; @@ -394,11 +394,20 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to * pay using their PayPal account. Check this page for more details. + * href="https://docs.stripe.com/payments/paypal">page for more details. */ @SerializedName("paypal") Paypal paypal; + /** + * PayTo is a real-time payment method + * that enables customers in Australia to pay by providing their bank account details. Customers + * must accept a mandate authorizing you to debit their account. Check this page for more details. + */ + @SerializedName("payto") + Payto payto; + /** * Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and * approve payments by scanning a QR code in their preferred banking app. Check this page for more details. + * href="https://docs.stripe.com/payments/promptpay">page for more details. */ @SerializedName("promptpay") Promptpay promptpay; @@ -447,7 +456,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * (SEPA) is an initiative of the European Union to simplify payments within and across member * countries. SEPA established and enforced banking standards to allow for the direct debiting of * every EUR-denominated bank account within the SEPA region, check this page for more details. + * href="https://docs.stripe.com/payments/sepa-debit">page for more details. */ @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -457,17 +466,17 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * href="https://stripe.com/docs/payments/payment-intents">Payment Intents API—a single * integration path for creating payments using any supported method—to accept Sofort payments from customers. Check this page for more details. + * href="https://docs.stripe.com/payments/sofort">page for more details. */ @SerializedName("sofort") Sofort sofort; /** - * Swish is a real-time payment method + * Swish is a real-time payment method * popular in Sweden. It allows customers to authenticate and + * href="https://docs.stripe.com/payments/payment-methods#customer-actions">authenticate and * approve payments using the Swish mobile app and the Swedish BankID mobile app. Check this - * page for more details. + * page for more details. */ @SerializedName("swish") Swish swish; @@ -482,7 +491,7 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { /** * Stripe users in the United States can accept ACH direct debit payments from customers with a US * bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check - * this page for more details. + * this page for more details. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -492,14 +501,14 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { * users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' * apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online * education, and food/nutrition. Check this page for more details. + * href="https://docs.stripe.com/payments/wechat-pay">page for more details. */ @SerializedName("wechat_pay") WechatPay wechatPay; /** * Zip gives your customers a way to split purchases over a series of payments. Check this page for more details like country + * href="https://docs.stripe.com/payments/zip">page for more details like country * availability. */ @SerializedName("zip") @@ -553,6 +562,7 @@ private PaymentMethodConfigurationUpdateParams( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RevolutPay revolutPay, @@ -612,6 +622,7 @@ private PaymentMethodConfigurationUpdateParams( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -725,6 +736,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -799,6 +812,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -815,7 +829,7 @@ public PaymentMethodConfigurationUpdateParams build() { /** * Canadian pre-authorized debit payments, check this page for more details like country + * href="https://docs.stripe.com/payments/acss-debit">page for more details like country * availability. */ public Builder setAcssDebit(PaymentMethodConfigurationUpdateParams.AcssDebit acssDebit) { @@ -833,7 +847,7 @@ public Builder setActive(Boolean active) { * Affirm gives your customers a way to split purchases * over a series of payments. Depending on the purchase, they can pay with four interest-free * payments (Split Pay) or pay over a longer term (Installments), which might include interest. - * Check this page for more details like + * Check this page for more details like * country availability. */ public Builder setAffirm(PaymentMethodConfigurationUpdateParams.Affirm affirm) { @@ -843,7 +857,7 @@ public Builder setAffirm(PaymentMethodConfigurationUpdateParams.Affirm affirm) { /** * Afterpay gives your customers a way to pay for purchases in installments, check this page for more details like + * href="https://docs.stripe.com/payments/afterpay-clearpay">page for more details like * country availability. Afterpay is particularly popular among businesses selling fashion, * beauty, and sports products. */ @@ -858,7 +872,7 @@ public Builder setAfterpayClearpay( * Alipay users can pay on the web or on a mobile device using login credentials or their Alipay * app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the * customer's login credentials. Check this page for more details. + * href="https://docs.stripe.com/payments/alipay">page for more details. */ public Builder setAlipay(PaymentMethodConfigurationUpdateParams.Alipay alipay) { this.alipay = alipay; @@ -888,7 +902,7 @@ public Builder setAmazonPay(PaymentMethodConfigurationUpdateParams.AmazonPay ama * applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS * Sierra. There are no additional fees to process Apple Pay payments, and the pricing is the same as other card transactions. Check - * this page for more details. + * this page for more details. */ public Builder setApplePay(PaymentMethodConfigurationUpdateParams.ApplePay applePay) { this.applePay = applePay; @@ -908,7 +922,7 @@ public Builder setApplePayLater( /** * Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit * payments from customers with an Australian bank account. Check this page for more details. + * href="https://docs.stripe.com/payments/au-becs-debit">page for more details. */ public Builder setAuBecsDebit(PaymentMethodConfigurationUpdateParams.AuBecsDebit auBecsDebit) { this.auBecsDebit = auBecsDebit; @@ -918,7 +932,7 @@ public Builder setAuBecsDebit(PaymentMethodConfigurationUpdateParams.AuBecsDebit /** * Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank * account, check this page for more details. + * href="https://docs.stripe.com/payments/payment-methods/bacs-debit">page for more details. */ public Builder setBacsDebit(PaymentMethodConfigurationUpdateParams.BacsDebit bacsDebit) { this.bacsDebit = bacsDebit; @@ -927,10 +941,10 @@ public Builder setBacsDebit(PaymentMethodConfigurationUpdateParams.BacsDebit bac /** * Bancontact is the most popular online payment method in Belgium, with over 15 million cards - * in circulation. Customers use a + * in circulation. Customers use a * Bancontact card or mobile app linked to a Belgian bank account to make online payments that * are secure, guaranteed, and confirmed immediately. Check this page for more details. + * href="https://docs.stripe.com/payments/bancontact">page for more details. */ public Builder setBancontact(PaymentMethodConfigurationUpdateParams.Bancontact bancontact) { this.bancontact = bancontact; @@ -951,11 +965,11 @@ public Builder setBillie(PaymentMethodConfigurationUpdateParams.Billie billie) { } /** - * BLIK is a single use + * BLIK is a single use * payment method that requires customers to authenticate their payments. When customers want to * pay online using BLIK, they request a six-digit code from their banking application and enter * it into the payment collection form. Check this page for more details. + * href="https://docs.stripe.com/payments/blik">page for more details. */ public Builder setBlik(PaymentMethodConfigurationUpdateParams.Blik blik) { this.blik = blik; @@ -964,7 +978,7 @@ public Builder setBlik(PaymentMethodConfigurationUpdateParams.Blik blik) { /** * Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. - * Check this page for more details. + * Check this page for more details. */ public Builder setBoleto(PaymentMethodConfigurationUpdateParams.Boleto boleto) { this.boleto = boleto; @@ -984,7 +998,7 @@ public Builder setCard(PaymentMethodConfigurationUpdateParams.Card card) { * Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded * with either Visa or Mastercard, meaning you can process these cards over either Cartes * Bancaires or the Visa or Mastercard networks. Check this page for more details. + * href="https://docs.stripe.com/payments/cartes-bancaires">page for more details. */ public Builder setCartesBancaires( PaymentMethodConfigurationUpdateParams.CartesBancaires cartesBancaires) { @@ -995,7 +1009,7 @@ public Builder setCartesBancaires( /** * Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and * receive money using their digital wallet. Check this page for more details. + * href="https://docs.stripe.com/payments/cash-app-pay">page for more details. */ public Builder setCashapp(PaymentMethodConfigurationUpdateParams.Cashapp cashapp) { this.cashapp = cashapp; @@ -1003,7 +1017,7 @@ public Builder setCashapp(PaymentMethodConfigurationUpdateParams.Cashapp cashapp } /** - * Stablecoin payments enable + * Stablecoin payments enable * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and * Metamask. */ @@ -1013,9 +1027,9 @@ public Builder setCrypto(PaymentMethodConfigurationUpdateParams.Crypto crypto) { } /** - * Uses a customer’s cash + * Uses a customer’s cash * balance for the payment. The cash balance can be funded via a bank transfer. Check this - * page for more details. + * page for more details. */ public Builder setCustomerBalance( PaymentMethodConfigurationUpdateParams.CustomerBalance customerBalance) { @@ -1027,7 +1041,7 @@ public Builder setCustomerBalance( * EPS is an Austria-based payment method that allows customers to complete transactions online * using their bank credentials. EPS is supported by all Austrian banks and is accepted by over * 80% of Austrian online retailers. Check this page for more details. + * href="https://docs.stripe.com/payments/eps">page for more details. */ public Builder setEps(PaymentMethodConfigurationUpdateParams.Eps eps) { this.eps = eps; @@ -1092,7 +1106,7 @@ public Builder putAllExtraParam(Map map) { * Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members * of the PayNet Group, which owns and operates FPX. It is one of the most popular online * payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. - * Check this page for more details. + * Check this page for more details. */ public Builder setFpx(PaymentMethodConfigurationUpdateParams.Fpx fpx) { this.fpx = fpx; @@ -1102,7 +1116,7 @@ public Builder setFpx(PaymentMethodConfigurationUpdateParams.Fpx fpx) { /** * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered * by employers for their employees to purchase prepared food and beverages on working days. - * Check this page for + * Check this page for * more details. */ public Builder setFrMealVoucherConecs( @@ -1116,7 +1130,7 @@ public Builder setFrMealVoucherConecs( * customers to complete transactions online using their online banking environment, with funds * debited from their bank account. Depending on their bank, customers confirm payments on * giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online - * checkouts in Germany. Check this page + * checkouts in Germany. Check this page * for more details. */ public Builder setGiropay(PaymentMethodConfigurationUpdateParams.Giropay giropay) { @@ -1128,7 +1142,7 @@ public Builder setGiropay(PaymentMethodConfigurationUpdateParams.Giropay giropay * Google Pay allows customers to make payments in your app or website using any credit or debit * card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an * Android device. Use the Google Pay API to request any credit or debit card stored in your - * customer's Google account. Check this page + * customer's Google account. Check this page * for more details. */ public Builder setGooglePay(PaymentMethodConfigurationUpdateParams.GooglePay googlePay) { @@ -1140,7 +1154,7 @@ public Builder setGooglePay(PaymentMethodConfigurationUpdateParams.GooglePay goo * GrabPay is a payment method developed by Grab. GrabPay is a digital wallet - * customers maintain a balance in their wallets that they pay out with. Check this page for more details. + * href="https://docs.stripe.com/payments/grabpay">page for more details. */ public Builder setGrabpay(PaymentMethodConfigurationUpdateParams.Grabpay grabpay) { this.grabpay = grabpay; @@ -1152,7 +1166,7 @@ public Builder setGrabpay(PaymentMethodConfigurationUpdateParams.Grabpay grabpay * online using their bank credentials. All major Dutch banks are members of Currence, the * scheme that operates iDEAL, making it the most popular online payment method in the * Netherlands with a share of online transactions close to 55%. Check this page for more details. + * href="https://docs.stripe.com/payments/ideal">page for more details. */ public Builder setIdeal(PaymentMethodConfigurationUpdateParams.Ideal ideal) { this.ideal = ideal; @@ -1180,10 +1194,10 @@ public Builder setKakaoPay(PaymentMethodConfigurationUpdateParams.KakaoPay kakao /** * Klarna gives customers a range of payment options during + * href="https://docs.stripe.com/payments/klarna#payment-options">payment options during * checkout. Available payment options vary depending on the customer's billing address and the * transaction amount. These payment options make it convenient for customers to purchase items - * in all price ranges. Check this page + * in all price ranges. Check this page * for more details. */ public Builder setKlarna(PaymentMethodConfigurationUpdateParams.Klarna klarna) { @@ -1193,7 +1207,7 @@ public Builder setKlarna(PaymentMethodConfigurationUpdateParams.Klarna klarna) { /** * Konbini allows customers in Japan to pay for bills and online purchases at convenience stores - * with cash. Check this page for more + * with cash. Check this page for more * details. */ public Builder setKonbini(PaymentMethodConfigurationUpdateParams.Konbini konbini) { @@ -1208,7 +1222,7 @@ public Builder setKrCard(PaymentMethodConfigurationUpdateParams.KrCard krCard) { } /** - * Link is a payment method network. With + * Link is a payment method network. With * Link, users save their payment details once, then reuse that information to pay with one * click for any business on the network. */ @@ -1220,7 +1234,7 @@ public Builder setLink(PaymentMethodConfigurationUpdateParams.Link link) { /** * MB WAY is the most popular wallet in Portugal. After entering their phone number in your * checkout, customers approve the payment directly in their MB WAY app. Check this page for more details. + * href="https://docs.stripe.com/payments/mb-way">page for more details. */ public Builder setMbWay(PaymentMethodConfigurationUpdateParams.MbWay mbWay) { this.mbWay = mbWay; @@ -1229,11 +1243,11 @@ public Builder setMbWay(PaymentMethodConfigurationUpdateParams.MbWay mbWay) { /** * MobilePay is a single-use card wallet + * href="https://docs.stripe.com/payments/payment-methods#usage">single-use card wallet * payment method used in Denmark and Finland. It allows customers to authenticate and + * href="https://docs.stripe.com/payments/payment-methods#customer-actions">authenticate and * approve payments using the MobilePay app. Check this page for more details. + * href="https://docs.stripe.com/payments/mobilepay">page for more details. */ public Builder setMobilepay(PaymentMethodConfigurationUpdateParams.Mobilepay mobilepay) { this.mobilepay = mobilepay; @@ -1271,7 +1285,7 @@ public Builder setNaverPay(PaymentMethodConfigurationUpdateParams.NaverPay naver /** * Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit * payments from customers with a New Zeland bank account. Check this page for more details. + * href="https://docs.stripe.com/payments/nz-bank-account">page for more details. */ public Builder setNzBankAccount( PaymentMethodConfigurationUpdateParams.NzBankAccount nzBankAccount) { @@ -1283,7 +1297,7 @@ public Builder setNzBankAccount( * OXXO is a Mexican chain of convenience stores with thousands of locations across Latin * America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to * pay bills and online purchases in-store with cash. Check this page for more details. + * href="https://docs.stripe.com/payments/oxxo">page for more details. */ public Builder setOxxo(PaymentMethodConfigurationUpdateParams.Oxxo oxxo) { this.oxxo = oxxo; @@ -1294,7 +1308,7 @@ public Builder setOxxo(PaymentMethodConfigurationUpdateParams.Oxxo oxxo) { * Przelewy24 is a Poland-based payment method aggregator that allows customers to complete * transactions online using bank transfers and other methods. Bank transfers account for 30% of * online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 - * banks. Check this page for more details. + * banks. Check this page for more details. */ public Builder setP24(PaymentMethodConfigurationUpdateParams.P24 p24) { this.p24 = p24; @@ -1324,7 +1338,7 @@ public Builder setPayco(PaymentMethodConfigurationUpdateParams.Payco payco) { /** * PayNow is a Singapore-based payment method that allows customers to make a payment using * their preferred app from participating banks and participating non-bank financial - * institutions. Check this page for more + * institutions. Check this page for more * details. */ public Builder setPaynow(PaymentMethodConfigurationUpdateParams.Paynow paynow) { @@ -1335,13 +1349,24 @@ public Builder setPaynow(PaymentMethodConfigurationUpdateParams.Paynow paynow) { /** * PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to * pay using their PayPal account. Check this page for more details. + * href="https://docs.stripe.com/payments/paypal">page for more details. */ public Builder setPaypal(PaymentMethodConfigurationUpdateParams.Paypal paypal) { this.paypal = paypal; return this; } + /** + * PayTo is a real-time payment method + * that enables customers in Australia to pay by providing their bank account details. Customers + * must accept a mandate authorizing you to debit their account. Check this page for more details. + */ + public Builder setPayto(PaymentMethodConfigurationUpdateParams.Payto payto) { + this.payto = payto; + return this; + } + /** * Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and * approve payments by scanning a QR code in their preferred banking app. Check this page for more details. + * href="https://docs.stripe.com/payments/promptpay">page for more details. */ public Builder setPromptpay(PaymentMethodConfigurationUpdateParams.Promptpay promptpay) { this.promptpay = promptpay; @@ -1400,7 +1425,7 @@ public Builder setSatispay(PaymentMethodConfigurationUpdateParams.Satispay satis * Area (SEPA) is an initiative of the European Union to simplify payments within and across * member countries. SEPA established and enforced banking standards to allow for the direct * debiting of every EUR-denominated bank account within the SEPA region, check this page for more details. + * href="https://docs.stripe.com/payments/sepa-debit">page for more details. */ public Builder setSepaDebit(PaymentMethodConfigurationUpdateParams.SepaDebit sepaDebit) { this.sepaDebit = sepaDebit; @@ -1412,7 +1437,7 @@ public Builder setSepaDebit(PaymentMethodConfigurationUpdateParams.SepaDebit sep * href="https://stripe.com/docs/payments/payment-intents">Payment Intents API—a single * integration path for creating payments using any supported method—to accept Sofort payments from customers. Check this page for more details. + * href="https://docs.stripe.com/payments/sofort">page for more details. */ public Builder setSofort(PaymentMethodConfigurationUpdateParams.Sofort sofort) { this.sofort = sofort; @@ -1420,11 +1445,11 @@ public Builder setSofort(PaymentMethodConfigurationUpdateParams.Sofort sofort) { } /** - * Swish is a real-time payment method + * Swish is a real-time payment method * popular in Sweden. It allows customers to authenticate and + * href="https://docs.stripe.com/payments/payment-methods#customer-actions">authenticate and * approve payments using the Swish mobile app and the Swedish BankID mobile app. Check this - * page for more details. + * page for more details. */ public Builder setSwish(PaymentMethodConfigurationUpdateParams.Swish swish) { this.swish = swish; @@ -1444,7 +1469,7 @@ public Builder setTwint(PaymentMethodConfigurationUpdateParams.Twint twint) { /** * Stripe users in the United States can accept ACH direct debit payments from customers with a * US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. - * Check this page for more + * Check this page for more * details. */ public Builder setUsBankAccount( @@ -1458,7 +1483,7 @@ public Builder setUsBankAccount( * users. Chinese consumers can use WeChat Pay to pay for goods and services inside of * businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, * travel, online education, and food/nutrition. Check this page for more details. + * href="https://docs.stripe.com/payments/wechat-pay">page for more details. */ public Builder setWechatPay(PaymentMethodConfigurationUpdateParams.WechatPay wechatPay) { this.wechatPay = wechatPay; @@ -1467,7 +1492,7 @@ public Builder setWechatPay(PaymentMethodConfigurationUpdateParams.WechatPay wec /** * Zip gives your customers a way to split purchases over a series of payments. Check this page for more details like country + * href="https://docs.stripe.com/payments/zip">page for more details like country * availability. */ public Builder setZip(PaymentMethodConfigurationUpdateParams.Zip zip) { @@ -8600,6 +8625,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Payto(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Payto build() { + return new PaymentMethodConfigurationUpdateParams.Payto( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationUpdateParams.Payto#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationUpdateParams.Payto#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationUpdateParams.Payto.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index 9808d903ed2..ba1d8389e5e 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -250,7 +250,7 @@ public class PaymentMethodCreateParams extends ApiRequestParams { MbWay mbWay; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -332,6 +332,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -347,7 +354,7 @@ public class PaymentMethodCreateParams extends ApiRequestParams { Promptpay promptpay; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -476,6 +483,7 @@ private PaymentMethodCreateParams( String paymentMethod, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -536,6 +544,7 @@ private PaymentMethodCreateParams( this.paymentMethod = paymentMethod; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -649,6 +658,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -726,6 +737,7 @@ public PaymentMethodCreateParams build() { this.paymentMethod, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -1220,6 +1232,15 @@ public Builder setPaypal(PaymentMethodCreateParams.Paypal paypal) { return this; } + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + public Builder setPayto(PaymentMethodCreateParams.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1239,7 +1260,7 @@ public Builder setPromptpay(PaymentMethodCreateParams.Promptpay promptpay) { } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions(PaymentMethodCreateParams.RadarOptions radarOptions) { @@ -2199,7 +2220,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -2312,7 +2336,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -3470,6 +3497,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -4804,6 +4834,103 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + + private Payto( + String accountNumber, String bsbNumber, Map extraParams, String payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + private String payId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.Payto build() { + return new PaymentMethodCreateParams.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodCreateParams.Payto#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodCreateParams.Payto#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -4929,7 +5056,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -4982,7 +5109,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -5932,6 +6059,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index 86903b802ea..b9ed4dcb712 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -13,10 +13,22 @@ @Getter @EqualsAndHashCode(callSuper = false) public class PaymentMethodListParams extends ApiRequestParams { + /** + * This field indicates whether this payment method can be shown again to its customer in a + * checkout flow. Stripe products such as Checkout and Elements use this field to determine + * whether a payment method can be shown as a saved payment method in a checkout flow. + */ + @SerializedName("allow_redisplay") + AllowRedisplay allowRedisplay; + /** The ID of the customer whose PaymentMethods will be retrieved. */ @SerializedName("customer") String customer; + /** The ID of the Account whose PaymentMethods will be retrieved. */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -64,14 +76,18 @@ public class PaymentMethodListParams extends ApiRequestParams { Type type; private PaymentMethodListParams( + AllowRedisplay allowRedisplay, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, Long limit, String startingAfter, Type type) { + this.allowRedisplay = allowRedisplay; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -85,8 +101,12 @@ public static Builder builder() { } public static class Builder { + private AllowRedisplay allowRedisplay; + private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -102,7 +122,9 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentMethodListParams build() { return new PaymentMethodListParams( + this.allowRedisplay, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -111,12 +133,28 @@ public PaymentMethodListParams build() { this.type); } + /** + * This field indicates whether this payment method can be shown again to its customer in a + * checkout flow. Stripe products such as Checkout and Elements use this field to determine + * whether a payment method can be shown as a saved payment method in a checkout flow. + */ + public Builder setAllowRedisplay(PaymentMethodListParams.AllowRedisplay allowRedisplay) { + this.allowRedisplay = allowRedisplay; + return this; + } + /** The ID of the customer whose PaymentMethods will be retrieved. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of the Account whose PaymentMethods will be retrieved. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -211,6 +249,24 @@ public Builder setType(PaymentMethodListParams.Type type) { } } + public enum AllowRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowRedisplay(String value) { + this.value = value; + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), @@ -326,6 +382,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java index c6f102ca1f0..4c5f7005907 100644 --- a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java @@ -48,7 +48,7 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -56,6 +56,13 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; + /** * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US * bank account payment method. @@ -70,6 +77,7 @@ private PaymentMethodUpdateParams( List expand, Map extraParams, Object metadata, + Payto payto, UsBankAccount usBankAccount) { this.allowRedisplay = allowRedisplay; this.billingDetails = billingDetails; @@ -77,6 +85,7 @@ private PaymentMethodUpdateParams( this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; + this.payto = payto; this.usBankAccount = usBankAccount; } @@ -97,6 +106,8 @@ public static class Builder { private Object metadata; + private Payto payto; + private UsBankAccount usBankAccount; /** Finalize and obtain parameter instance from this builder. */ @@ -108,6 +119,7 @@ public PaymentMethodUpdateParams build() { this.expand, this.extraParams, this.metadata, + this.payto, this.usBankAccount); } @@ -218,7 +230,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -229,7 +241,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -239,6 +251,15 @@ public Builder setMetadata(Map metadata) { return this; } + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + public Builder setPayto(PaymentMethodUpdateParams.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US * bank account payment method. @@ -451,7 +472,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -597,13 +621,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -815,6 +845,121 @@ public enum Preferred implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + Object accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + Object bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + Object payId; + + private Payto( + Object accountNumber, Object bsbNumber, Map extraParams, Object payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountNumber; + + private Object bsbNumber; + + private Map extraParams; + + private Object payId; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodUpdateParams.Payto build() { + return new PaymentMethodUpdateParams.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(EmptyParam bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodUpdateParams.Payto#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodUpdateParams.Payto#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(EmptyParam payId) { + this.payId = payId; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class UsBankAccount { diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java index 1aaf61e2087..d2c0cd4377a 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java @@ -36,7 +36,7 @@ public class PaymentRecordReportPaymentAttemptInformationalParams extends ApiReq Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -194,7 +194,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -205,7 +205,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -477,7 +477,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -593,7 +596,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java index aedcfec9878..8d960fabddc 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java @@ -47,7 +47,7 @@ public class PaymentRecordReportPaymentAttemptParams extends ApiRequestParams { Long initiatedAt; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -238,7 +238,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -249,7 +249,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -716,7 +716,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -833,7 +836,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1080,7 +1086,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -1195,7 +1204,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java index 9ec23aaca3d..2194f0f91db 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java @@ -59,7 +59,7 @@ public class PaymentRecordReportPaymentParams extends ApiRequestParams { Long initiatedAt; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -295,7 +295,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -306,7 +306,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -366,7 +366,7 @@ public static class AmountRequested { /** * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -434,7 +434,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ public Builder setValue(Long value) { @@ -986,7 +986,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -1102,7 +1105,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1527,7 +1533,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -1640,7 +1649,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java index 992e5c875ce..3d4f5354b69 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java @@ -15,7 +15,7 @@ @EqualsAndHashCode(callSuper = false) public class PaymentRecordReportRefundParams extends ApiRequestParams { /** - * A positive integer in the smallest + * A positive integer in the smallest * currency unit representing how much of this payment to refund. Can refund only up to the * remaining, unrefunded amount of the payment. */ @@ -40,7 +40,7 @@ public class PaymentRecordReportRefundParams extends ApiRequestParams { Long initiatedAt; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -114,7 +114,7 @@ public PaymentRecordReportRefundParams build() { } /** - * A positive integer in the smallest + * A positive integer in the smallest * currency unit representing how much of this payment to refund. Can refund only up to the * remaining, unrefunded amount of the payment. */ @@ -210,7 +210,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -221,7 +221,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -273,7 +273,7 @@ public static class Amount { /** * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ @SerializedName("value") @@ -340,7 +340,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * href="https://docs.stripe.com/currencies#zero-decimal">minor unit. For example, {@code * 100} can represent 1 USD or 100 JPY. */ public Builder setValue(Long value) { diff --git a/src/main/java/com/stripe/param/PaymentSourceCollectionCreateParams.java b/src/main/java/com/stripe/param/PaymentSourceCollectionCreateParams.java index abaa14739d8..4d1b2d79eae 100644 --- a/src/main/java/com/stripe/param/PaymentSourceCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentSourceCollectionCreateParams.java @@ -27,7 +27,7 @@ public class PaymentSourceCollectionCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -37,7 +37,7 @@ public class PaymentSourceCollectionCreateParams extends ApiRequestParams { /** * Required. Please refer to full documentation instead. + * href="https://api.stripe.com">documentation instead. */ @SerializedName("source") String source; @@ -159,7 +159,7 @@ public Builder putAllMetadata(Map map) { /** * Required. Please refer to full documentation instead. + * href="https://api.stripe.com">documentation instead. */ public Builder setSource(String source) { this.source = source; diff --git a/src/main/java/com/stripe/param/PayoutCreateParams.java b/src/main/java/com/stripe/param/PayoutCreateParams.java index 9502c4927ee..9b3edaca1b0 100644 --- a/src/main/java/com/stripe/param/PayoutCreateParams.java +++ b/src/main/java/com/stripe/param/PayoutCreateParams.java @@ -50,7 +50,7 @@ public class PayoutCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/PayoutReverseParams.java b/src/main/java/com/stripe/param/PayoutReverseParams.java index e0d629c37b5..3a6c1e78143 100644 --- a/src/main/java/com/stripe/param/PayoutReverseParams.java +++ b/src/main/java/com/stripe/param/PayoutReverseParams.java @@ -27,7 +27,7 @@ public class PayoutReverseParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/PayoutUpdateParams.java b/src/main/java/com/stripe/param/PayoutUpdateParams.java index 9dea9a44472..50cf36f89d4 100644 --- a/src/main/java/com/stripe/param/PayoutUpdateParams.java +++ b/src/main/java/com/stripe/param/PayoutUpdateParams.java @@ -28,7 +28,7 @@ public class PayoutUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -140,7 +140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java index 0f874ddb3dd..cfe05d1a1f8 100644 --- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java @@ -117,7 +117,7 @@ public class PersonCollectionCreateParams extends ApiRequestParams { String maidenName; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -581,7 +581,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -592,7 +592,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -898,7 +898,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -1009,7 +1012,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1578,9 +1584,8 @@ public static class CompanyAuthorization { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -1676,9 +1681,8 @@ public static class Passport { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -1771,9 +1775,8 @@ public static class Visa { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -1889,7 +1892,10 @@ public static class RegisteredAddress { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -2001,7 +2007,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -2750,7 +2759,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class AdditionalDocument { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2768,7 +2777,7 @@ public static class AdditionalDocument { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2800,7 +2809,7 @@ public PersonCollectionCreateParams.Verification.AdditionalDocument build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2839,7 +2848,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2855,7 +2864,7 @@ public Builder setFront(String front) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2873,7 +2882,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2905,7 +2914,7 @@ public PersonCollectionCreateParams.Verification.Document build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -2944,7 +2953,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java index 72ac9d708e6..bb6e6b882cf 100644 --- a/src/main/java/com/stripe/param/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/PersonUpdateParams.java @@ -117,7 +117,7 @@ public class PersonUpdateParams extends ApiRequestParams { Object maidenName; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -661,7 +661,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -672,7 +672,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1008,7 +1008,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -1152,13 +1155,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -1814,9 +1823,8 @@ public static class CompanyAuthorization { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -1910,9 +1918,8 @@ public static class Passport { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -2005,9 +2012,8 @@ public static class Visa { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} value - * of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -2123,7 +2129,10 @@ public static class RegisteredAddress { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -2267,13 +2276,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -3039,7 +3054,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class AdditionalDocument { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3057,7 +3072,7 @@ public static class AdditionalDocument { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3089,7 +3104,7 @@ public PersonUpdateParams.Verification.AdditionalDocument build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3100,7 +3115,7 @@ public Builder setBack(String back) { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3139,7 +3154,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3150,7 +3165,7 @@ public Builder setFront(String front) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3166,7 +3181,7 @@ public Builder setFront(EmptyParam front) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3184,7 +3199,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3216,7 +3231,7 @@ public PersonUpdateParams.Verification.Document build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3227,7 +3242,7 @@ public Builder setBack(String back) { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3266,7 +3281,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -3277,7 +3292,7 @@ public Builder setFront(String front) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. diff --git a/src/main/java/com/stripe/param/PlanCreateParams.java b/src/main/java/com/stripe/param/PlanCreateParams.java index 81c26dd8bb0..874c7c03d7b 100644 --- a/src/main/java/com/stripe/param/PlanCreateParams.java +++ b/src/main/java/com/stripe/param/PlanCreateParams.java @@ -89,7 +89,7 @@ public class PlanCreateParams extends ApiRequestParams { Long intervalCount; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -132,7 +132,7 @@ public class PlanCreateParams extends ApiRequestParams { /** * Default number of trial days when subscribing a customer to this plan using {@code + * href="https://docs.stripe.com/api#create_subscription-trial_from_plan">{@code * trial_from_plan=true}. */ @SerializedName("trial_period_days") @@ -412,7 +412,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -423,7 +423,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -502,7 +502,7 @@ public Builder setTransformUsage(PlanCreateParams.TransformUsage transformUsage) /** * Default number of trial days when subscribing a customer to this plan using {@code + * href="https://docs.stripe.com/api#create_subscription-trial_from_plan">{@code * trial_from_plan=true}. */ public Builder setTrialPeriodDays(Long trialPeriodDays) { @@ -546,7 +546,7 @@ public static class Product { String id; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -570,7 +570,7 @@ public static class Product { @SerializedName("statement_descriptor") String statementDescriptor; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String taxCode; @@ -721,7 +721,7 @@ public Builder setStatementDescriptor(String statementDescriptor) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; diff --git a/src/main/java/com/stripe/param/PlanUpdateParams.java b/src/main/java/com/stripe/param/PlanUpdateParams.java index 6f12398ff53..d047c8663fc 100644 --- a/src/main/java/com/stripe/param/PlanUpdateParams.java +++ b/src/main/java/com/stripe/param/PlanUpdateParams.java @@ -32,7 +32,7 @@ public class PlanUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -53,7 +53,7 @@ public class PlanUpdateParams extends ApiRequestParams { /** * Default number of trial days when subscribing a customer to this plan using {@code + * href="https://docs.stripe.com/api#create_subscription-trial_from_plan">{@code * trial_from_plan=true}. */ @SerializedName("trial_period_days") @@ -194,7 +194,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -205,7 +205,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -247,7 +247,7 @@ public Builder setProduct(EmptyParam product) { /** * Default number of trial days when subscribing a customer to this plan using {@code + * href="https://docs.stripe.com/api#create_subscription-trial_from_plan">{@code * trial_from_plan=true}. */ public Builder setTrialPeriodDays(Long trialPeriodDays) { diff --git a/src/main/java/com/stripe/param/PriceCreateParams.java b/src/main/java/com/stripe/param/PriceCreateParams.java index e677afe0b47..3748c9890a8 100644 --- a/src/main/java/com/stripe/param/PriceCreateParams.java +++ b/src/main/java/com/stripe/param/PriceCreateParams.java @@ -73,7 +73,7 @@ public class PriceCreateParams extends ApiRequestParams { String lookupKey; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -102,7 +102,7 @@ public class PriceCreateParams extends ApiRequestParams { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -449,7 +449,7 @@ public Builder setRecurring(PriceCreateParams.Recurring recurring) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -556,7 +556,7 @@ public static class CurrencyOption { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -668,7 +668,7 @@ public Builder putAllExtraParam(Map map) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1204,7 +1204,7 @@ public static class ProductData { String id; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1228,7 +1228,7 @@ public static class ProductData { @SerializedName("statement_descriptor") String statementDescriptor; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String taxCode; @@ -1379,7 +1379,7 @@ public Builder setStatementDescriptor(String statementDescriptor) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; @@ -1429,7 +1429,7 @@ public static class Recurring { /** * Default number of trial days when subscribing a customer to this price using {@code + * href="https://docs.stripe.com/api#create_subscription-trial_from_plan">{@code * trial_from_plan=true}. */ @SerializedName("trial_period_days") @@ -1540,7 +1540,7 @@ public Builder setMeter(String meter) { /** * Default number of trial days when subscribing a customer to this price using {@code + * href="https://docs.stripe.com/api#create_subscription-trial_from_plan">{@code * trial_from_plan=true}. */ public Builder setTrialPeriodDays(Long trialPeriodDays) { diff --git a/src/main/java/com/stripe/param/PriceSearchParams.java b/src/main/java/com/stripe/param/PriceSearchParams.java index e7819665d1b..86e1cfffdda 100644 --- a/src/main/java/com/stripe/param/PriceSearchParams.java +++ b/src/main/java/com/stripe/param/PriceSearchParams.java @@ -43,8 +43,8 @@ public class PriceSearchParams extends ApiRequestParams { /** * Required. The search query string. See search query language and the - * list of supported query fields + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query fields * for prices. */ @SerializedName("query") @@ -153,8 +153,8 @@ public Builder setPage(String page) { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for prices. */ public Builder setQuery(String query) { diff --git a/src/main/java/com/stripe/param/PriceUpdateParams.java b/src/main/java/com/stripe/param/PriceUpdateParams.java index da030aea9f6..00440c68f81 100644 --- a/src/main/java/com/stripe/param/PriceUpdateParams.java +++ b/src/main/java/com/stripe/param/PriceUpdateParams.java @@ -48,7 +48,7 @@ public class PriceUpdateParams extends ApiRequestParams { Object lookupKey; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -62,7 +62,7 @@ public class PriceUpdateParams extends ApiRequestParams { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -290,7 +290,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -301,7 +301,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -325,7 +325,7 @@ public Builder setNickname(EmptyParam nickname) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -367,7 +367,7 @@ public static class CurrencyOption { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -479,7 +479,7 @@ public Builder putAllExtraParam(Map map) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code diff --git a/src/main/java/com/stripe/param/ProductCreateParams.java b/src/main/java/com/stripe/param/ProductCreateParams.java index 42bccd8261a..2c612b09e0c 100644 --- a/src/main/java/com/stripe/param/ProductCreateParams.java +++ b/src/main/java/com/stripe/param/ProductCreateParams.java @@ -19,7 +19,7 @@ public class ProductCreateParams extends ApiRequestParams { Boolean active; /** - * Data used to generate a new Price object. This + * Data used to generate a new Price object. This * Price will be set as the default price for this product. */ @SerializedName("default_price_data") @@ -59,13 +59,13 @@ public class ProductCreateParams extends ApiRequestParams { /** * A list of up to 15 marketing features for this product. These are displayed in pricing tables. + * href="https://docs.stripe.com/payments/checkout/pricing-table">pricing tables. */ @SerializedName("marketing_features") List marketingFeatures; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -98,7 +98,7 @@ public class ProductCreateParams extends ApiRequestParams { @SerializedName("statement_descriptor") String statementDescriptor; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String taxCode; @@ -227,7 +227,7 @@ public Builder setActive(Boolean active) { } /** - * Data used to generate a new Price object. + * Data used to generate a new Price object. * This Price will be set as the default price for this product. */ public Builder setDefaultPriceData(ProductCreateParams.DefaultPriceData defaultPriceData) { @@ -417,7 +417,7 @@ public Builder setStatementDescriptor(String statementDescriptor) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; @@ -486,7 +486,7 @@ public static class DefaultPriceData { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -500,7 +500,7 @@ public static class DefaultPriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -695,7 +695,7 @@ public Builder setRecurring(ProductCreateParams.DefaultPriceData.Recurring recur /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -748,7 +748,7 @@ public static class CurrencyOption { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -862,7 +862,7 @@ public Builder putAllExtraParam(Map map) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code diff --git a/src/main/java/com/stripe/param/ProductFeatureCreateParams.java b/src/main/java/com/stripe/param/ProductFeatureCreateParams.java index 2d2b96386ee..8361ee5bcc4 100644 --- a/src/main/java/com/stripe/param/ProductFeatureCreateParams.java +++ b/src/main/java/com/stripe/param/ProductFeatureCreateParams.java @@ -15,7 +15,7 @@ public class ProductFeatureCreateParams extends ApiRequestParams { /** * Required. The ID of the Feature object attached to this + * href="https://docs.stripe.com/api/entitlements/feature">Feature object attached to this * product. */ @SerializedName("entitlement_feature") @@ -59,7 +59,7 @@ public ProductFeatureCreateParams build() { /** * Required. The ID of the Feature object attached to this + * href="https://docs.stripe.com/api/entitlements/feature">Feature object attached to this * product. */ public Builder setEntitlementFeature(String entitlementFeature) { diff --git a/src/main/java/com/stripe/param/ProductListParams.java b/src/main/java/com/stripe/param/ProductListParams.java index 135328cf223..aea6a9f299d 100644 --- a/src/main/java/com/stripe/param/ProductListParams.java +++ b/src/main/java/com/stripe/param/ProductListParams.java @@ -48,8 +48,8 @@ public class ProductListParams extends ApiRequestParams { /** * Only return products with the given IDs. Cannot be used with starting_after or ending_before. + * href="https://api.stripe.com#list_products-starting_after">starting_after or ending_before. */ @SerializedName("ids") List ids; diff --git a/src/main/java/com/stripe/param/ProductSearchParams.java b/src/main/java/com/stripe/param/ProductSearchParams.java index 8ee382db26a..7b4d11d511c 100644 --- a/src/main/java/com/stripe/param/ProductSearchParams.java +++ b/src/main/java/com/stripe/param/ProductSearchParams.java @@ -43,8 +43,8 @@ public class ProductSearchParams extends ApiRequestParams { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for products. */ @SerializedName("query") @@ -153,8 +153,8 @@ public Builder setPage(String page) { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for products. */ public Builder setQuery(String query) { diff --git a/src/main/java/com/stripe/param/ProductUpdateParams.java b/src/main/java/com/stripe/param/ProductUpdateParams.java index 4a15e4131a3..ad8b06c6632 100644 --- a/src/main/java/com/stripe/param/ProductUpdateParams.java +++ b/src/main/java/com/stripe/param/ProductUpdateParams.java @@ -20,7 +20,7 @@ public class ProductUpdateParams extends ApiRequestParams { Boolean active; /** - * The ID of the Price object that is the default + * The ID of the Price object that is the default * price for this product. */ @SerializedName("default_price") @@ -53,13 +53,13 @@ public class ProductUpdateParams extends ApiRequestParams { /** * A list of up to 15 marketing features for this product. These are displayed in pricing tables. + * href="https://docs.stripe.com/payments/checkout/pricing-table">pricing tables. */ @SerializedName("marketing_features") Object marketingFeatures; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -92,7 +92,7 @@ public class ProductUpdateParams extends ApiRequestParams { @SerializedName("statement_descriptor") Object statementDescriptor; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") Object taxCode; @@ -202,7 +202,7 @@ public Builder setActive(Boolean active) { } /** - * The ID of the Price object that is the + * The ID of the Price object that is the * default price for this product. */ public Builder setDefaultPrice(String defaultPrice) { @@ -211,7 +211,7 @@ public Builder setDefaultPrice(String defaultPrice) { } /** - * The ID of the Price object that is the + * The ID of the Price object that is the * default price for this product. */ public Builder setDefaultPrice(EmptyParam defaultPrice) { @@ -365,7 +365,7 @@ public Builder addAllMarketingFeature(List /** * A list of up to 15 marketing features for this product. These are displayed in pricing tables. + * href="https://docs.stripe.com/payments/checkout/pricing-table">pricing tables. */ public Builder setMarketingFeatures(EmptyParam marketingFeatures) { this.marketingFeatures = marketingFeatures; @@ -374,7 +374,7 @@ public Builder setMarketingFeatures(EmptyParam marketingFeatures) { /** * A list of up to 15 marketing features for this product. These are displayed in pricing tables. + * href="https://docs.stripe.com/payments/checkout/pricing-table">pricing tables. */ public Builder setMarketingFeatures( List marketingFeatures) { @@ -411,7 +411,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -422,7 +422,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -494,13 +494,13 @@ public Builder setStatementDescriptor(EmptyParam statementDescriptor) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(EmptyParam taxCode) { this.taxCode = taxCode; return this; diff --git a/src/main/java/com/stripe/param/PromotionCodeCreateParams.java b/src/main/java/com/stripe/param/PromotionCodeCreateParams.java index d10279ef596..0cf5e0616d1 100644 --- a/src/main/java/com/stripe/param/PromotionCodeCreateParams.java +++ b/src/main/java/com/stripe/param/PromotionCodeCreateParams.java @@ -28,12 +28,19 @@ public class PromotionCodeCreateParams extends ApiRequestParams { String code; /** - * The customer that this promotion code can be used by. If not set, the promotion code can be - * used by all customers. + * The customer who can use this promotion code. If not set, all customers can use the promotion + * code. */ @SerializedName("customer") String customer; + /** + * The account representing the customer who can use this promotion code. If not set, all + * customers can use the promotion code. + */ + @SerializedName("customer_account") + String customerAccount; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -63,7 +70,7 @@ public class PromotionCodeCreateParams extends ApiRequestParams { Long maxRedemptions; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -83,6 +90,7 @@ private PromotionCodeCreateParams( Boolean active, String code, String customer, + String customerAccount, List expand, Long expiresAt, Map extraParams, @@ -93,6 +101,7 @@ private PromotionCodeCreateParams( this.active = active; this.code = code; this.customer = customer; + this.customerAccount = customerAccount; this.expand = expand; this.expiresAt = expiresAt; this.extraParams = extraParams; @@ -113,6 +122,8 @@ public static class Builder { private String customer; + private String customerAccount; + private List expand; private Long expiresAt; @@ -133,6 +144,7 @@ public PromotionCodeCreateParams build() { this.active, this.code, this.customer, + this.customerAccount, this.expand, this.expiresAt, this.extraParams, @@ -161,14 +173,23 @@ public Builder setCode(String code) { } /** - * The customer that this promotion code can be used by. If not set, the promotion code can be - * used by all customers. + * The customer who can use this promotion code. If not set, all customers can use the promotion + * code. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** + * The account representing the customer who can use this promotion code. If not set, all + * customers can use the promotion code. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link diff --git a/src/main/java/com/stripe/param/PromotionCodeListParams.java b/src/main/java/com/stripe/param/PromotionCodeListParams.java index 427f6e9d6af..e5ef7694dce 100644 --- a/src/main/java/com/stripe/param/PromotionCodeListParams.java +++ b/src/main/java/com/stripe/param/PromotionCodeListParams.java @@ -36,6 +36,10 @@ public class PromotionCodeListParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** Only return promotion codes that are restricted to this account representing the customer. */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -80,6 +84,7 @@ private PromotionCodeListParams( String coupon, Object created, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, @@ -90,6 +95,7 @@ private PromotionCodeListParams( this.coupon = coupon; this.created = created; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -112,6 +118,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -130,6 +138,7 @@ public PromotionCodeListParams build() { this.coupon, this.created, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -181,6 +190,14 @@ public Builder setCustomer(String customer) { return this; } + /** + * Only return promotion codes that are restricted to this account representing the customer. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with diff --git a/src/main/java/com/stripe/param/PromotionCodeUpdateParams.java b/src/main/java/com/stripe/param/PromotionCodeUpdateParams.java index ae279ba4057..ba997102900 100644 --- a/src/main/java/com/stripe/param/PromotionCodeUpdateParams.java +++ b/src/main/java/com/stripe/param/PromotionCodeUpdateParams.java @@ -35,7 +35,7 @@ public class PromotionCodeUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -171,7 +171,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -182,7 +182,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java index 0143b2665e7..72bf8f09a56 100644 --- a/src/main/java/com/stripe/param/QuoteCreateParams.java +++ b/src/main/java/com/stripe/param/QuoteCreateParams.java @@ -53,6 +53,13 @@ public class QuoteCreateParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** + * The account for which this quote belongs to. A customer or account is required before + * finalizing the quote. Once specified, it cannot be changed. + */ + @SerializedName("customer_account") + String customerAccount; + /** The tax rates that will apply to any line item that does not have {@code tax_rates} set. */ @SerializedName("default_tax_rates") Object defaultTaxRates; @@ -127,7 +134,7 @@ public class QuoteCreateParams extends ApiRequestParams { List lineItems; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -163,6 +170,7 @@ private QuoteCreateParams( AutomaticTax automaticTax, CollectionMethod collectionMethod, String customer, + String customerAccount, Object defaultTaxRates, Object description, Object discounts, @@ -184,6 +192,7 @@ private QuoteCreateParams( this.automaticTax = automaticTax; this.collectionMethod = collectionMethod; this.customer = customer; + this.customerAccount = customerAccount; this.defaultTaxRates = defaultTaxRates; this.description = description; this.discounts = discounts; @@ -217,6 +226,8 @@ public static class Builder { private String customer; + private String customerAccount; + private Object defaultTaxRates; private Object description; @@ -257,6 +268,7 @@ public QuoteCreateParams build() { this.automaticTax, this.collectionMethod, this.customer, + this.customerAccount, this.defaultTaxRates, this.description, this.discounts, @@ -346,6 +358,15 @@ public Builder setCustomer(String customer) { return this; } + /** + * The account for which this quote belongs to. A customer or account is required before + * finalizing the quote. Once specified, it cannot be changed. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add an element to `defaultTaxRates` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link @@ -1253,7 +1274,7 @@ public static class LineItem { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -1386,7 +1407,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData(QuoteCreateParams.LineItem.PriceData priceData) { @@ -1582,7 +1603,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1712,7 +1733,7 @@ public Builder setRecurring(QuoteCreateParams.LineItem.PriceData.Recurring recur /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1919,7 +1940,7 @@ public static class SubscriptionData { Map extraParams; /** - * Set of key-value pairs that will set + * Set of key-value pairs that will set * metadata on the subscription or subscription schedule when the quote is accepted. If a * recurring price is included in {@code line_items}, this field will be passed to the resulting * subscription's {@code metadata} field. If {@code subscription_data.effective_date} is used, diff --git a/src/main/java/com/stripe/param/QuoteListParams.java b/src/main/java/com/stripe/param/QuoteListParams.java index f6c75b0958a..a1dc2757b60 100644 --- a/src/main/java/com/stripe/param/QuoteListParams.java +++ b/src/main/java/com/stripe/param/QuoteListParams.java @@ -13,10 +13,14 @@ @Getter @EqualsAndHashCode(callSuper = false) public class QuoteListParams extends ApiRequestParams { - /** The ID of the customer whose quotes will be retrieved. */ + /** The ID of the customer whose quotes you're retrieving. */ @SerializedName("customer") String customer; + /** The ID of the account representing the customer whose quotes you're retrieving. */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -68,6 +72,7 @@ public class QuoteListParams extends ApiRequestParams { private QuoteListParams( String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, @@ -76,6 +81,7 @@ private QuoteListParams( Status status, String testClock) { this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -92,6 +98,8 @@ public static Builder builder() { public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -110,6 +118,7 @@ public static class Builder { public QuoteListParams build() { return new QuoteListParams( this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -119,12 +128,18 @@ public QuoteListParams build() { this.testClock); } - /** The ID of the customer whose quotes will be retrieved. */ + /** The ID of the customer whose quotes you're retrieving. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of the account representing the customer whose quotes you're retrieving. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with diff --git a/src/main/java/com/stripe/param/QuoteUpdateParams.java b/src/main/java/com/stripe/param/QuoteUpdateParams.java index ea73937c61d..0512eaa122c 100644 --- a/src/main/java/com/stripe/param/QuoteUpdateParams.java +++ b/src/main/java/com/stripe/param/QuoteUpdateParams.java @@ -53,6 +53,13 @@ public class QuoteUpdateParams extends ApiRequestParams { @SerializedName("customer") Object customer; + /** + * The account for which this quote belongs to. A customer or account is required before + * finalizing the quote. Once specified, it cannot be changed. + */ + @SerializedName("customer_account") + Object customerAccount; + /** The tax rates that will apply to any line item that does not have {@code tax_rates} set. */ @SerializedName("default_tax_rates") Object defaultTaxRates; @@ -105,7 +112,7 @@ public class QuoteUpdateParams extends ApiRequestParams { List lineItems; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -137,6 +144,7 @@ private QuoteUpdateParams( AutomaticTax automaticTax, CollectionMethod collectionMethod, Object customer, + Object customerAccount, Object defaultTaxRates, Object description, Object discounts, @@ -156,6 +164,7 @@ private QuoteUpdateParams( this.automaticTax = automaticTax; this.collectionMethod = collectionMethod; this.customer = customer; + this.customerAccount = customerAccount; this.defaultTaxRates = defaultTaxRates; this.description = description; this.discounts = discounts; @@ -187,6 +196,8 @@ public static class Builder { private Object customer; + private Object customerAccount; + private Object defaultTaxRates; private Object description; @@ -223,6 +234,7 @@ public QuoteUpdateParams build() { this.automaticTax, this.collectionMethod, this.customer, + this.customerAccount, this.defaultTaxRates, this.description, this.discounts, @@ -319,6 +331,24 @@ public Builder setCustomer(EmptyParam customer) { return this; } + /** + * The account for which this quote belongs to. A customer or account is required before + * finalizing the quote. Once specified, it cannot be changed. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + + /** + * The account for which this quote belongs to. A customer or account is required before + * finalizing the quote. Once specified, it cannot be changed. + */ + public Builder setCustomerAccount(EmptyParam customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add an element to `defaultTaxRates` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link @@ -1134,7 +1164,7 @@ public static class LineItem { Object price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -1290,7 +1320,7 @@ public Builder setPrice(EmptyParam price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData(QuoteUpdateParams.LineItem.PriceData priceData) { @@ -1504,7 +1534,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1654,7 +1684,7 @@ public Builder setRecurring(QuoteUpdateParams.LineItem.PriceData.Recurring recur /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1867,7 +1897,7 @@ public static class SubscriptionData { Map extraParams; /** - * Set of key-value pairs that will set + * Set of key-value pairs that will set * metadata on the subscription or subscription schedule when the quote is accepted. If a * recurring price is included in {@code line_items}, this field will be passed to the resulting * subscription's {@code metadata} field. If {@code subscription_data.effective_date} is used, diff --git a/src/main/java/com/stripe/param/RefundCreateParams.java b/src/main/java/com/stripe/param/RefundCreateParams.java index 15722e33649..e403f7e75ee 100644 --- a/src/main/java/com/stripe/param/RefundCreateParams.java +++ b/src/main/java/com/stripe/param/RefundCreateParams.java @@ -53,7 +53,7 @@ public class RefundCreateParams extends ApiRequestParams { String instructionsEmail; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -73,7 +73,7 @@ public class RefundCreateParams extends ApiRequestParams { * String indicating the reason for the refund. If set, possible values are {@code duplicate}, * {@code fraudulent}, and {@code requested_by_customer}. If you believe the charge to be * fraudulent, specifying {@code fraudulent} as the reason will add the associated card and email - * to your block lists, and will also help us + * to your block lists, and will also help us * improve our fraud detection algorithms. */ @SerializedName("reason") @@ -293,7 +293,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -304,7 +304,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -330,7 +330,7 @@ public Builder setPaymentIntent(String paymentIntent) { * String indicating the reason for the refund. If set, possible values are {@code duplicate}, * {@code fraudulent}, and {@code requested_by_customer}. If you believe the charge to be * fraudulent, specifying {@code fraudulent} as the reason will add the associated card and - * email to your block lists, and will also + * email to your block lists, and will also * help us improve our fraud detection algorithms. */ public Builder setReason(RefundCreateParams.Reason reason) { diff --git a/src/main/java/com/stripe/param/RefundUpdateParams.java b/src/main/java/com/stripe/param/RefundUpdateParams.java index d169830b825..ff28c3b7174 100644 --- a/src/main/java/com/stripe/param/RefundUpdateParams.java +++ b/src/main/java/com/stripe/param/RefundUpdateParams.java @@ -28,7 +28,7 @@ public class RefundUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -140,7 +140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 9ec2a506642..09ecee2dc4b 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -48,7 +48,7 @@ public class SetupIntentConfirmParams extends ApiRequestParams { /** * When included, this hash creates a PaymentMethod that is set as the {@code + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method">{@code * payment_method} value in the SetupIntent. */ @SerializedName("payment_method_data") @@ -217,7 +217,7 @@ public Builder setPaymentMethod(String paymentMethod) { /** * When included, this hash creates a PaymentMethod that is set as the {@code + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method">{@code * payment_method} value in the SetupIntent. */ public Builder setPaymentMethodData( @@ -842,7 +842,7 @@ public static class PaymentMethodData { MbWay mbWay; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -920,6 +920,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -935,7 +942,7 @@ public static class PaymentMethodData { Promptpay promptpay; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -1060,6 +1067,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1115,6 +1123,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -1218,6 +1227,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -1290,6 +1301,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -1721,6 +1733,15 @@ public Builder setPaypal(SetupIntentConfirmParams.PaymentMethodData.Paypal paypa return this; } + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. + */ + public Builder setPayto(SetupIntentConfirmParams.PaymentMethodData.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1740,7 +1761,7 @@ public Builder setPromptpay(SetupIntentConfirmParams.PaymentMethodData.Promptpay } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions( @@ -2727,7 +2748,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -2842,7 +2866,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -3718,6 +3745,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -5087,6 +5117,105 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + + private Payto( + String accountNumber, String bsbNumber, Map extraParams, String payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + private String payId; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodData.Payto build() { + return new SetupIntentConfirmParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -5216,7 +5345,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -5272,7 +5401,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot + * A Radar Session is a snapshot * of the browser metadata and device details that help Radar make more accurate predictions * on your payments. */ @@ -6162,6 +6291,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6272,6 +6404,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} SetupIntent, this sub-hash contains details about the PayTo + * payment method options. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -6296,6 +6435,7 @@ private PaymentMethodOptions( Klarna klarna, Link link, Paypal paypal, + Payto payto, SepaDebit sepaDebit, UsBankAccount usBankAccount) { this.acssDebit = acssDebit; @@ -6307,6 +6447,7 @@ private PaymentMethodOptions( this.klarna = klarna; this.link = link; this.paypal = paypal; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -6334,6 +6475,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private SepaDebit sepaDebit; private UsBankAccount usBankAccount; @@ -6350,6 +6493,7 @@ public SetupIntentConfirmParams.PaymentMethodOptions build() { this.klarna, this.link, this.paypal, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -6454,6 +6598,15 @@ public Builder setPaypal(SetupIntentConfirmParams.PaymentMethodOptions.Paypal pa return this; } + /** + * If this is a {@code payto} SetupIntent, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(SetupIntentConfirmParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -7129,11 +7282,11 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -7248,11 +7401,11 @@ public Builder setNetwork( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -9192,6 +9345,443 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Payto(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Payto build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Object amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + */ + @SerializedName("amount_type") + ApiRequestParams.EnumParam amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + Object endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + @SerializedName("payment_schedule") + ApiRequestParams.EnumParam paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Object paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + ApiRequestParams.EnumParam purpose; + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + @SerializedName("start_date") + Object startDate; + + private MandateOptions( + Object amount, + ApiRequestParams.EnumParam amountType, + Object endDate, + Map extraParams, + ApiRequestParams.EnumParam paymentSchedule, + Object paymentsPerPeriod, + ApiRequestParams.EnumParam purpose, + Object startDate) { + this.amount = amount; + this.amountType = amountType; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.paymentsPerPeriod = paymentsPerPeriod; + this.purpose = purpose; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private ApiRequestParams.EnumParam amountType; + + private Object endDate; + + private Map extraParams; + + private ApiRequestParams.EnumParam paymentSchedule; + + private Object paymentsPerPeriod; + + private ApiRequestParams.EnumParam purpose; + + private Object startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions build() { + return new SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions( + this.amount, + this.amountType, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.paymentsPerPeriod, + this.purpose, + this.startDate); + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(EmptyParam amount) { + this.amount = amount; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType( + SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType(EmptyParam amountType) { + this.amountType = amountType; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule( + SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule(EmptyParam paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(EmptyParam paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + SetupIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose(EmptyParam purpose) { + this.purpose = purpose; + return this; + } + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + public Builder setStartDate(EmptyParam startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), + + @SerializedName("annual") + ANNUAL("annual"), + + @SerializedName("daily") + DAILY("daily"), + + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("semi_annual") + SEMI_ANNUAL("semi_annual"), + + @SerializedName("weekly") + WEEKLY("weekly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index d6941f506e7..6222f201ccc 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -57,6 +57,15 @@ public class SetupIntentCreateParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** + * ID of the Account this SetupIntent belongs to, if one exists. + * + *

If present, the SetupIntent's payment method will be attached to the Account on successful + * setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + */ + @SerializedName("customer_account") + String customerAccount; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ @SerializedName("description") String description; @@ -91,14 +100,14 @@ public class SetupIntentCreateParams extends ApiRequestParams { /** * This hash contains details about the mandate to create. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/setup_intents/create#create_setup_intent-confirm">{@code * confirm=true}. */ @SerializedName("mandate_data") Object mandateData; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -118,7 +127,7 @@ public class SetupIntentCreateParams extends ApiRequestParams { String paymentMethod; /** - * The ID of the payment + * The ID of the payment * method configuration to use with this SetupIntent. */ @SerializedName("payment_method_configuration") @@ -126,7 +135,7 @@ public class SetupIntentCreateParams extends ApiRequestParams { /** * When included, this hash creates a PaymentMethod that is set as the {@code + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method">{@code * payment_method} value in the SetupIntent. */ @SerializedName("payment_method_data") @@ -150,7 +159,7 @@ public class SetupIntentCreateParams extends ApiRequestParams { * The URL to redirect your customer back to after they authenticate or cancel their payment on * the payment method's app or site. To redirect to a mobile application, you can alternatively * supply an application URI scheme. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/setup_intents/create#create_setup_intent-confirm">{@code * confirm=true}. */ @SerializedName("return_url") @@ -187,6 +196,7 @@ private SetupIntentCreateParams( Boolean confirm, String confirmationToken, String customer, + String customerAccount, String description, List excludedPaymentMethodTypes, List expand, @@ -209,6 +219,7 @@ private SetupIntentCreateParams( this.confirm = confirm; this.confirmationToken = confirmationToken; this.customer = customer; + this.customerAccount = customerAccount; this.description = description; this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; @@ -243,6 +254,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String description; private List excludedPaymentMethodTypes; @@ -285,6 +298,7 @@ public SetupIntentCreateParams build() { this.confirm, this.confirmationToken, this.customer, + this.customerAccount, this.description, this.excludedPaymentMethodTypes, this.expand, @@ -362,6 +376,17 @@ public Builder setCustomer(String customer) { return this; } + /** + * ID of the Account this SetupIntent belongs to, if one exists. + * + *

If present, the SetupIntent's payment method will be attached to the Account on successful + * setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** An arbitrary string attached to the object. Often useful for displaying to users. */ public Builder setDescription(String description) { this.description = description; @@ -476,7 +501,7 @@ public Builder addAllFlowDirection(List e /** * This hash contains details about the mandate to create. This parameter can only be used with - * {@code + * {@code * confirm=true}. */ public Builder setMandateData(SetupIntentCreateParams.MandateData mandateData) { @@ -486,7 +511,7 @@ public Builder setMandateData(SetupIntentCreateParams.MandateData mandateData) { /** * This hash contains details about the mandate to create. This parameter can only be used with - * {@code + * {@code * confirm=true}. */ public Builder setMandateData(EmptyParam mandateData) { @@ -536,7 +561,7 @@ public Builder setPaymentMethod(String paymentMethod) { } /** - * The ID of the payment + * The ID of the payment * method configuration to use with this SetupIntent. */ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) { @@ -546,7 +571,7 @@ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) /** * When included, this hash creates a PaymentMethod that is set as the {@code + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method">{@code * payment_method} value in the SetupIntent. */ public Builder setPaymentMethodData( @@ -592,7 +617,7 @@ public Builder addAllPaymentMethodType(List elements) { * The URL to redirect your customer back to after they authenticate or cancel their payment on * the payment method's app or site. To redirect to a mobile application, you can alternatively * supply an application URI scheme. This parameter can only be used with {@code + * href="https://docs.stripe.com/api/setup_intents/create#create_setup_intent-confirm">{@code * confirm=true}. */ public Builder setReturnUrl(String returnUrl) { @@ -640,7 +665,7 @@ public static class AutomaticPaymentMethods { * *

Redirect-based payment methods may require your customer to be redirected to a payment * method's app or site for authentication or additional steps. To confirm this SetupIntent, you + * href="https://docs.stripe.com/api/setup_intents/confirm">confirm this SetupIntent, you * may be required to provide a {@code return_url} to redirect customers back to your site after * they authenticate or complete the setup. */ @@ -689,7 +714,7 @@ public SetupIntentCreateParams.AutomaticPaymentMethods build() { * *

Redirect-based payment methods may require your customer to be redirected to a payment * method's app or site for authentication or additional steps. To confirm this SetupIntent, you + * href="https://docs.stripe.com/api/setup_intents/confirm">confirm this SetupIntent, you * may be required to provide a {@code return_url} to redirect customers back to your site * after they authenticate or complete the setup. */ @@ -1355,7 +1380,7 @@ public static class PaymentMethodData { MbWay mbWay; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1433,6 +1458,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1448,7 +1480,7 @@ public static class PaymentMethodData { Promptpay promptpay; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -1573,6 +1605,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1628,6 +1661,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -1731,6 +1765,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -1803,6 +1839,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -2233,6 +2270,15 @@ public Builder setPaypal(SetupIntentCreateParams.PaymentMethodData.Paypal paypal return this; } + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. + */ + public Builder setPayto(SetupIntentCreateParams.PaymentMethodData.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -2252,7 +2298,7 @@ public Builder setPromptpay(SetupIntentCreateParams.PaymentMethodData.Promptpay } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions( @@ -3239,7 +3285,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -3354,7 +3403,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -4229,6 +4281,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -5598,6 +5653,105 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + String accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + String bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + String payId; + + private Payto( + String accountNumber, String bsbNumber, Map extraParams, String payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountNumber; + + private String bsbNumber; + + private Map extraParams; + + private String payId; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodData.Payto build() { + return new SetupIntentCreateParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -5727,7 +5881,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -5783,7 +5937,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot + * A Radar Session is a snapshot * of the browser metadata and device details that help Radar make more accurate predictions * on your payments. */ @@ -6673,6 +6827,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6783,6 +6940,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} SetupIntent, this sub-hash contains details about the PayTo + * payment method options. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -6807,6 +6971,7 @@ private PaymentMethodOptions( Klarna klarna, Link link, Paypal paypal, + Payto payto, SepaDebit sepaDebit, UsBankAccount usBankAccount) { this.acssDebit = acssDebit; @@ -6818,6 +6983,7 @@ private PaymentMethodOptions( this.klarna = klarna; this.link = link; this.paypal = paypal; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -6845,6 +7011,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private SepaDebit sepaDebit; private UsBankAccount usBankAccount; @@ -6861,6 +7029,7 @@ public SetupIntentCreateParams.PaymentMethodOptions build() { this.klarna, this.link, this.paypal, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -6965,6 +7134,15 @@ public Builder setPaypal(SetupIntentCreateParams.PaymentMethodOptions.Paypal pay return this; } + /** + * If this is a {@code payto} SetupIntent, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(SetupIntentCreateParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -7638,11 +7816,11 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -7757,11 +7935,11 @@ public Builder setNetwork( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -9701,6 +9879,443 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Payto(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Payto build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Object amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + */ + @SerializedName("amount_type") + ApiRequestParams.EnumParam amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + Object endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + @SerializedName("payment_schedule") + ApiRequestParams.EnumParam paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Object paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + ApiRequestParams.EnumParam purpose; + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + @SerializedName("start_date") + Object startDate; + + private MandateOptions( + Object amount, + ApiRequestParams.EnumParam amountType, + Object endDate, + Map extraParams, + ApiRequestParams.EnumParam paymentSchedule, + Object paymentsPerPeriod, + ApiRequestParams.EnumParam purpose, + Object startDate) { + this.amount = amount; + this.amountType = amountType; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.paymentsPerPeriod = paymentsPerPeriod; + this.purpose = purpose; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private ApiRequestParams.EnumParam amountType; + + private Object endDate; + + private Map extraParams; + + private ApiRequestParams.EnumParam paymentSchedule; + + private Object paymentsPerPeriod; + + private ApiRequestParams.EnumParam purpose; + + private Object startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions build() { + return new SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions( + this.amount, + this.amountType, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.paymentsPerPeriod, + this.purpose, + this.startDate); + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(EmptyParam amount) { + this.amount = amount; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType( + SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType(EmptyParam amountType) { + this.amountType = amountType; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule( + SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule(EmptyParam paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(EmptyParam paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose(EmptyParam purpose) { + this.purpose = purpose; + return this; + } + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + public Builder setStartDate(EmptyParam startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), + + @SerializedName("annual") + ANNUAL("annual"), + + @SerializedName("daily") + DAILY("daily"), + + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("semi_annual") + SEMI_ANNUAL("semi_annual"), + + @SerializedName("weekly") + WEEKLY("weekly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -10631,10 +11246,10 @@ public static class SingleUse { /** * Required. Amount the customer is granting permission to collect later. A * positive integer representing how much to charge in the smallest currency unit (e.g., 100 + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit (e.g., 100 * cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is * $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 * for a USD charge of $999,999.99). */ @@ -10683,10 +11298,10 @@ public SetupIntentCreateParams.SingleUse build() { /** * Required. Amount the customer is granting permission to collect later. A * positive integer representing how much to charge in the smallest currency unit (e.g., + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit (e.g., * 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum * amount is $0.50 US or equivalent in + * href="https://docs.stripe.com/currencies#minimum-and-maximum-charge-amounts">equivalent in * charge currency. The amount value supports up to eight digits (e.g., a value of * 99999999 for a USD charge of $999,999.99). */ @@ -10842,6 +11457,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/SetupIntentListParams.java b/src/main/java/com/stripe/param/SetupIntentListParams.java index 37de43ccede..fa2299a99cb 100644 --- a/src/main/java/com/stripe/param/SetupIntentListParams.java +++ b/src/main/java/com/stripe/param/SetupIntentListParams.java @@ -34,6 +34,10 @@ public class SetupIntentListParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** Only return SetupIntents for the account specified by this customer ID. */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -80,6 +84,7 @@ private SetupIntentListParams( Boolean attachToSelf, Object created, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, @@ -89,6 +94,7 @@ private SetupIntentListParams( this.attachToSelf = attachToSelf; this.created = created; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -108,6 +114,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -126,6 +134,7 @@ public SetupIntentListParams build() { this.attachToSelf, this.created, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -174,6 +183,12 @@ public Builder setCustomer(String customer) { return this; } + /** Only return SetupIntents for the account specified by this customer ID. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 6408d4445fb..7a5c6be9f37 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -33,6 +33,15 @@ public class SetupIntentUpdateParams extends ApiRequestParams { @SerializedName("customer") Object customer; + /** + * ID of the Account this SetupIntent belongs to, if one exists. + * + *

If present, the SetupIntent's payment method will be attached to the Account on successful + * setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + */ + @SerializedName("customer_account") + Object customerAccount; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ @SerializedName("description") Object description; @@ -66,7 +75,7 @@ public class SetupIntentUpdateParams extends ApiRequestParams { List flowDirections; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -82,7 +91,7 @@ public class SetupIntentUpdateParams extends ApiRequestParams { Object paymentMethod; /** - * The ID of the payment + * The ID of the payment * method configuration to use with this SetupIntent. */ @SerializedName("payment_method_configuration") @@ -90,7 +99,7 @@ public class SetupIntentUpdateParams extends ApiRequestParams { /** * When included, this hash creates a PaymentMethod that is set as the {@code + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method">{@code * payment_method} value in the SetupIntent. */ @SerializedName("payment_method_data") @@ -113,6 +122,7 @@ public class SetupIntentUpdateParams extends ApiRequestParams { private SetupIntentUpdateParams( Boolean attachToSelf, Object customer, + Object customerAccount, Object description, Object excludedPaymentMethodTypes, List expand, @@ -126,6 +136,7 @@ private SetupIntentUpdateParams( List paymentMethodTypes) { this.attachToSelf = attachToSelf; this.customer = customer; + this.customerAccount = customerAccount; this.description = description; this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; @@ -148,6 +159,8 @@ public static class Builder { private Object customer; + private Object customerAccount; + private Object description; private Object excludedPaymentMethodTypes; @@ -175,6 +188,7 @@ public SetupIntentUpdateParams build() { return new SetupIntentUpdateParams( this.attachToSelf, this.customer, + this.customerAccount, this.description, this.excludedPaymentMethodTypes, this.expand, @@ -226,6 +240,28 @@ public Builder setCustomer(EmptyParam customer) { return this; } + /** + * ID of the Account this SetupIntent belongs to, if one exists. + * + *

If present, the SetupIntent's payment method will be attached to the Account on successful + * setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + + /** + * ID of the Account this SetupIntent belongs to, if one exists. + * + *

If present, the SetupIntent's payment method will be attached to the Account on successful + * setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + */ + public Builder setCustomerAccount(EmptyParam customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** An arbitrary string attached to the object. Often useful for displaying to users. */ public Builder setDescription(String description) { this.description = description; @@ -394,7 +430,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -405,7 +441,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -434,7 +470,7 @@ public Builder setPaymentMethod(EmptyParam paymentMethod) { } /** - * The ID of the payment + * The ID of the payment * method configuration to use with this SetupIntent. */ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) { @@ -443,7 +479,7 @@ public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) } /** - * The ID of the payment + * The ID of the payment * method configuration to use with this SetupIntent. */ public Builder setPaymentMethodConfiguration(EmptyParam paymentMethodConfiguration) { @@ -453,7 +489,7 @@ public Builder setPaymentMethodConfiguration(EmptyParam paymentMethodConfigurati /** * When included, this hash creates a PaymentMethod that is set as the {@code + * href="https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method">{@code * payment_method} value in the SetupIntent. */ public Builder setPaymentMethodData( @@ -713,7 +749,7 @@ public static class PaymentMethodData { MbWay mbWay; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -791,6 +827,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -806,7 +849,7 @@ public static class PaymentMethodData { Promptpay promptpay; /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ @SerializedName("radar_options") @@ -931,6 +974,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -986,6 +1030,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -1089,6 +1134,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -1161,6 +1208,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -1591,6 +1639,15 @@ public Builder setPaypal(SetupIntentUpdateParams.PaymentMethodData.Paypal paypal return this; } + /** + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo + * payment method. + */ + public Builder setPayto(SetupIntentUpdateParams.PaymentMethodData.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code pix} PaymentMethod, this hash contains details about the Pix payment * method. @@ -1610,7 +1667,7 @@ public Builder setPromptpay(SetupIntentUpdateParams.PaymentMethodData.Promptpay } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions( @@ -2648,7 +2705,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") Object state; @@ -2796,13 +2856,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -3686,6 +3752,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -5093,6 +5162,123 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** The account number for the bank account. */ + @SerializedName("account_number") + Object accountNumber; + + /** Bank-State-Branch number of the bank account. */ + @SerializedName("bsb_number") + Object bsbNumber; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The PayID alias for the bank account. */ + @SerializedName("pay_id") + Object payId; + + private Payto( + Object accountNumber, Object bsbNumber, Map extraParams, Object payId) { + this.accountNumber = accountNumber; + this.bsbNumber = bsbNumber; + this.extraParams = extraParams; + this.payId = payId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountNumber; + + private Object bsbNumber; + + private Map extraParams; + + private Object payId; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodData.Payto build() { + return new SetupIntentUpdateParams.PaymentMethodData.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** The account number for the bank account. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(EmptyParam bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } + + /** The PayID alias for the bank account. */ + public Builder setPayId(EmptyParam payId) { + this.payId = payId; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -5222,7 +5408,7 @@ public static class RadarOptions { Map extraParams; /** - * A Radar Session is a snapshot of + * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on * your payments. */ @@ -5278,7 +5464,7 @@ public Builder putAllExtraParam(Map map) { } /** - * A Radar Session is a snapshot + * A Radar Session is a snapshot * of the browser metadata and device details that help Radar make more accurate predictions * on your payments. */ @@ -5288,7 +5474,7 @@ public Builder setSession(String session) { } /** - * A Radar Session is a snapshot + * A Radar Session is a snapshot * of the browser metadata and device details that help Radar make more accurate predictions * on your payments. */ @@ -6202,6 +6388,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6312,6 +6501,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code payto} SetupIntent, this sub-hash contains details about the PayTo + * payment method options. + */ + @SerializedName("payto") + Payto payto; + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -6336,6 +6532,7 @@ private PaymentMethodOptions( Klarna klarna, Link link, Paypal paypal, + Payto payto, SepaDebit sepaDebit, UsBankAccount usBankAccount) { this.acssDebit = acssDebit; @@ -6347,6 +6544,7 @@ private PaymentMethodOptions( this.klarna = klarna; this.link = link; this.paypal = paypal; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -6374,6 +6572,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private SepaDebit sepaDebit; private UsBankAccount usBankAccount; @@ -6390,6 +6590,7 @@ public SetupIntentUpdateParams.PaymentMethodOptions build() { this.klarna, this.link, this.paypal, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -6494,6 +6695,15 @@ public Builder setPaypal(SetupIntentUpdateParams.PaymentMethodOptions.Paypal pay return this; } + /** + * If this is a {@code payto} SetupIntent, this sub-hash contains details about the PayTo + * payment method options. + */ + public Builder setPayto(SetupIntentUpdateParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + /** * If this is a {@code sepa_debit} SetupIntent, this sub-hash contains details about the SEPA * Debit payment method options. @@ -7176,11 +7386,11 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -7295,11 +7505,11 @@ public Builder setNetwork( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -9350,6 +9560,443 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Payto(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Payto build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Object amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + */ + @SerializedName("amount_type") + ApiRequestParams.EnumParam amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + Object endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + @SerializedName("payment_schedule") + ApiRequestParams.EnumParam paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Object paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + ApiRequestParams.EnumParam purpose; + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + @SerializedName("start_date") + Object startDate; + + private MandateOptions( + Object amount, + ApiRequestParams.EnumParam amountType, + Object endDate, + Map extraParams, + ApiRequestParams.EnumParam paymentSchedule, + Object paymentsPerPeriod, + ApiRequestParams.EnumParam purpose, + Object startDate) { + this.amount = amount; + this.amountType = amountType; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.paymentsPerPeriod = paymentsPerPeriod; + this.purpose = purpose; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private ApiRequestParams.EnumParam amountType; + + private Object endDate; + + private Map extraParams; + + private ApiRequestParams.EnumParam paymentSchedule; + + private Object paymentsPerPeriod; + + private ApiRequestParams.EnumParam purpose; + + private Object startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions( + this.amount, + this.amountType, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.paymentsPerPeriod, + this.purpose, + this.startDate); + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(EmptyParam amount) { + this.amount = amount; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType( + SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType + amountType) { + this.amountType = amountType; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType(EmptyParam amountType) { + this.amountType = amountType; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule( + SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule(EmptyParam paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(EmptyParam paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose(EmptyParam purpose) { + this.purpose = purpose; + return this; + } + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + public Builder setStartDate(EmptyParam startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), + + @SerializedName("annual") + ANNUAL("annual"), + + @SerializedName("daily") + DAILY("daily"), + + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("semi_annual") + SEMI_ANNUAL("semi_annual"), + + @SerializedName("weekly") + WEEKLY("weekly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -10392,6 +11039,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/ShippingRateCreateParams.java b/src/main/java/com/stripe/param/ShippingRateCreateParams.java index 14cd0691bc3..6921468a83f 100644 --- a/src/main/java/com/stripe/param/ShippingRateCreateParams.java +++ b/src/main/java/com/stripe/param/ShippingRateCreateParams.java @@ -48,7 +48,7 @@ public class ShippingRateCreateParams extends ApiRequestParams { FixedAmount fixedAmount; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -64,7 +64,7 @@ public class ShippingRateCreateParams extends ApiRequestParams { TaxBehavior taxBehavior; /** - * A tax code ID. The Shipping tax code + * A tax code ID. The Shipping tax code * is {@code txcd_92010001}. */ @SerializedName("tax_code") @@ -247,7 +247,7 @@ public Builder setTaxBehavior(ShippingRateCreateParams.TaxBehavior taxBehavior) } /** - * A tax code ID. The Shipping tax code + * A tax code ID. The Shipping tax code * is {@code txcd_92010001}. */ public Builder setTaxCode(String taxCode) { diff --git a/src/main/java/com/stripe/param/ShippingRateUpdateParams.java b/src/main/java/com/stripe/param/ShippingRateUpdateParams.java index 09a40c7f4d1..9b92be2c973 100644 --- a/src/main/java/com/stripe/param/ShippingRateUpdateParams.java +++ b/src/main/java/com/stripe/param/ShippingRateUpdateParams.java @@ -39,7 +39,7 @@ public class ShippingRateUpdateParams extends ApiRequestParams { FixedAmount fixedAmount; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -193,7 +193,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -204,7 +204,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/SourceCreateParams.java b/src/main/java/com/stripe/param/SourceCreateParams.java index 6e8f469e17e..8dacedef0be 100644 --- a/src/main/java/com/stripe/param/SourceCreateParams.java +++ b/src/main/java/com/stripe/param/SourceCreateParams.java @@ -119,7 +119,7 @@ public class SourceCreateParams extends ApiRequestParams { /** * The {@code type} of the source to create. Required unless {@code customer} and {@code * original_source} are specified (see the Cloning card Sources + * href="https://docs.stripe.com/sources/connect#cloning-card-sources">Cloning card Sources * guide) */ @SerializedName("type") @@ -417,7 +417,7 @@ public Builder setToken(String token) { /** * The {@code type} of the source to create. Required unless {@code customer} and {@code * original_source} are specified (see the Cloning card Sources + * href="https://docs.stripe.com/sources/connect#cloning-card-sources">Cloning card Sources * guide) */ public Builder setType(String type) { @@ -1208,7 +1208,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -1321,7 +1324,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1965,7 +1971,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -2080,7 +2089,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/SourceUpdateParams.java b/src/main/java/com/stripe/param/SourceUpdateParams.java index f8544e86199..94ea5ab5f57 100644 --- a/src/main/java/com/stripe/param/SourceUpdateParams.java +++ b/src/main/java/com/stripe/param/SourceUpdateParams.java @@ -39,7 +39,7 @@ public class SourceUpdateParams extends ApiRequestParams { Mandate mandate; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -205,7 +205,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -216,7 +216,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1085,7 +1085,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -1231,13 +1234,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -1748,7 +1757,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") Object state; @@ -1898,13 +1910,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index 1d972678574..50a0291608f 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -47,7 +47,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { /** * A future timestamp in UTC format to anchor the subscription's billing cycle. The anchor is the + * href="https://docs.stripe.com/subscriptions/billing-cycle">billing cycle. The anchor is the * reference point that aligns future billing cycle dates. It sets the day of week for {@code * week} intervals, the day of month for {@code month} and {@code year} intervals, and the month * of year for {@code year} intervals. @@ -107,10 +107,14 @@ public class SubscriptionCreateParams extends ApiRequestParams { @SerializedName("currency") String currency; - /** Required. The identifier of the customer to subscribe. */ + /** The identifier of the customer to subscribe. */ @SerializedName("customer") String customer; + /** The identifier of the account representing the customer to subscribe. */ + @SerializedName("customer_account") + String customerAccount; + /** * Number of days a customer has to pay invoices generated by this subscription. Valid only for * subscriptions where {@code collection_method} is set to {@code send_invoice}. @@ -122,9 +126,9 @@ public class SubscriptionCreateParams extends ApiRequestParams { * ID of the default payment method for the subscription. It must belong to the customer * associated with the subscription. This takes precedence over {@code default_source}. If neither * are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ @SerializedName("default_payment_method") String defaultPaymentMethod; @@ -134,9 +138,9 @@ public class SubscriptionCreateParams extends ApiRequestParams { * associated with the subscription and be in a chargeable state. If {@code * default_payment_method} is also set, {@code default_payment_method} will take precedence. If * neither are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ @SerializedName("default_source") String defaultSource; @@ -186,7 +190,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { List items; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -212,7 +216,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { * first invoice can't be paid. Creating Subscriptions with this status allows you to manage * scenarios where additional customer actions are needed to pay a subscription's invoice. For * example, SCA regulation may require 3DS authentication to complete payment. See the SCA Migration + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA Migration * Guide for Billing to learn more. This is the default behavior. * *

Use {@code default_incomplete} to create Subscriptions with {@code status=incomplete} when @@ -220,7 +224,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { * {@code status=active} when successfully confirming the PaymentIntent on the first invoice. This * allows simpler management of scenarios where additional customer actions are needed to pay a * subscription’s invoice, such as failed payments, SCA + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA * regulation, or collecting a mandate for a bank debit payment method. If the PaymentIntent * is not confirmed within 23 hours Subscriptions transition to {@code status=incomplete_expired}, * which is a terminal state. @@ -230,7 +234,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { * authentication due to SCA regulation and further customer action is needed, this parameter * doesn't create a Subscription and returns an error instead. This was the default behavior for * API versions prior to 2019-03-14. See the changelog to learn more. + * href="https://docs.stripe.com/upgrades#2019-03-14">changelog to learn more. * *

{@code pending_if_incomplete} is only used with updates and cannot be passed when creating a * Subscription. @@ -247,7 +251,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { /** * Specifies an interval for how often to bill for any pending invoice items. It is analogous to - * calling Create an invoice for the + * calling Create an invoice for the * given subscription at the specified interval. */ @SerializedName("pending_invoice_item_interval") @@ -255,7 +259,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { /** * Determines how to handle prorations resulting from + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations resulting from * the {@code billing_cycle_anchor}. If no value is passed, the default is {@code * create_prorations}. */ @@ -274,7 +278,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { * charged for the first time. If set, trial_end will override the default trial period of the * plan the customer is being subscribed to. The special value {@code now} can be provided to end * the customer's trial immediately. Can be at most two years from {@code billing_cycle_anchor}. - * See Using trial periods on + * See Using trial periods on * subscriptions to learn more. */ @SerializedName("trial_end") @@ -284,7 +288,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { * Indicates if a plan's {@code trial_period_days} should be applied to the subscription. Setting * {@code trial_end} per subscription is preferred, and this defaults to {@code false}. Setting * this flag to {@code true} together with {@code trial_end} is not allowed. See Using trial periods on + * href="https://docs.stripe.com/billing/subscriptions/trials">Using trial periods on * subscriptions to learn more. */ @SerializedName("trial_from_plan") @@ -293,7 +297,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { /** * Integer representing the number of trial period days before the customer is charged for the * first time. This will always overwrite any trials that might apply via a subscribed plan. See - * Using trial periods on + * Using trial periods on * subscriptions to learn more. */ @SerializedName("trial_period_days") @@ -317,6 +321,7 @@ private SubscriptionCreateParams( CollectionMethod collectionMethod, String currency, String customer, + String customerAccount, Long daysUntilDue, String defaultPaymentMethod, String defaultSource, @@ -352,6 +357,7 @@ private SubscriptionCreateParams( this.collectionMethod = collectionMethod; this.currency = currency; this.customer = customer; + this.customerAccount = customerAccount; this.daysUntilDue = daysUntilDue; this.defaultPaymentMethod = defaultPaymentMethod; this.defaultSource = defaultSource; @@ -407,6 +413,8 @@ public static class Builder { private String customer; + private String customerAccount; + private Long daysUntilDue; private String defaultPaymentMethod; @@ -467,6 +475,7 @@ public SubscriptionCreateParams build() { this.collectionMethod, this.currency, this.customer, + this.customerAccount, this.daysUntilDue, this.defaultPaymentMethod, this.defaultSource, @@ -561,7 +570,7 @@ public Builder setBackdateStartDate(Long backdateStartDate) { /** * A future timestamp in UTC format to anchor the subscription's billing cycle. The anchor is + * href="https://docs.stripe.com/subscriptions/billing-cycle">billing cycle. The anchor is * the reference point that aligns future billing cycle dates. It sets the day of week for * {@code week} intervals, the day of month for {@code month} and {@code year} intervals, and * the month of year for {@code year} intervals. @@ -660,12 +669,18 @@ public Builder setCurrency(String currency) { return this; } - /** Required. The identifier of the customer to subscribe. */ + /** The identifier of the customer to subscribe. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The identifier of the account representing the customer to subscribe. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Number of days a customer has to pay invoices generated by this subscription. Valid only for * subscriptions where {@code collection_method} is set to {@code send_invoice}. @@ -679,9 +694,9 @@ public Builder setDaysUntilDue(Long daysUntilDue) { * ID of the default payment method for the subscription. It must belong to the customer * associated with the subscription. This takes precedence over {@code default_source}. If * neither are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ public Builder setDefaultPaymentMethod(String defaultPaymentMethod) { this.defaultPaymentMethod = defaultPaymentMethod; @@ -693,9 +708,9 @@ public Builder setDefaultPaymentMethod(String defaultPaymentMethod) { * associated with the subscription and be in a chargeable state. If {@code * default_payment_method} is also set, {@code default_payment_method} will take precedence. If * neither are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ public Builder setDefaultSource(String defaultSource) { this.defaultSource = defaultSource; @@ -919,7 +934,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -930,7 +945,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -968,7 +983,7 @@ public Builder setOnBehalfOf(EmptyParam onBehalfOf) { * first invoice can't be paid. Creating Subscriptions with this status allows you to manage * scenarios where additional customer actions are needed to pay a subscription's invoice. For * example, SCA regulation may require 3DS authentication to complete payment. See the SCA Migration + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA Migration * Guide for Billing to learn more. This is the default behavior. * *

Use {@code default_incomplete} to create Subscriptions with {@code status=incomplete} when @@ -976,7 +991,7 @@ public Builder setOnBehalfOf(EmptyParam onBehalfOf) { * {@code status=active} when successfully confirming the PaymentIntent on the first invoice. * This allows simpler management of scenarios where additional customer actions are needed to * pay a subscription’s invoice, such as failed payments, SCA + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA * regulation, or collecting a mandate for a bank debit payment method. If the PaymentIntent * is not confirmed within 23 hours Subscriptions transition to {@code * status=incomplete_expired}, which is a terminal state. @@ -986,7 +1001,7 @@ public Builder setOnBehalfOf(EmptyParam onBehalfOf) { * authentication due to SCA regulation and further customer action is needed, this parameter * doesn't create a Subscription and returns an error instead. This was the default behavior for * API versions prior to 2019-03-14. See the changelog to learn more. + * href="https://docs.stripe.com/upgrades#2019-03-14">changelog to learn more. * *

{@code pending_if_incomplete} is only used with updates and cannot be passed when creating * a Subscription. @@ -1007,7 +1022,7 @@ public Builder setPaymentSettings(SubscriptionCreateParams.PaymentSettings payme /** * Specifies an interval for how often to bill for any pending invoice items. It is analogous to - * calling Create an invoice for the + * calling Create an invoice for the * given subscription at the specified interval. */ public Builder setPendingInvoiceItemInterval( @@ -1018,7 +1033,7 @@ public Builder setPendingInvoiceItemInterval( /** * Specifies an interval for how often to bill for any pending invoice items. It is analogous to - * calling Create an invoice for the + * calling Create an invoice for the * given subscription at the specified interval. */ public Builder setPendingInvoiceItemInterval(EmptyParam pendingInvoiceItemInterval) { @@ -1028,7 +1043,7 @@ public Builder setPendingInvoiceItemInterval(EmptyParam pendingInvoiceItemInterv /** * Determines how to handle prorations resulting from + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations resulting from * the {@code billing_cycle_anchor}. If no value is passed, the default is {@code * create_prorations}. */ @@ -1053,7 +1068,7 @@ public Builder setTransferData(SubscriptionCreateParams.TransferData transferDat * plan the customer is being subscribed to. The special value {@code now} can be provided to * end the customer's trial immediately. Can be at most two years from {@code * billing_cycle_anchor}. See Using trial periods on + * href="https://docs.stripe.com/billing/subscriptions/trials">Using trial periods on * subscriptions to learn more. */ public Builder setTrialEnd(SubscriptionCreateParams.TrialEnd trialEnd) { @@ -1067,7 +1082,7 @@ public Builder setTrialEnd(SubscriptionCreateParams.TrialEnd trialEnd) { * plan the customer is being subscribed to. The special value {@code now} can be provided to * end the customer's trial immediately. Can be at most two years from {@code * billing_cycle_anchor}. See Using trial periods on + * href="https://docs.stripe.com/billing/subscriptions/trials">Using trial periods on * subscriptions to learn more. */ public Builder setTrialEnd(Long trialEnd) { @@ -1079,7 +1094,7 @@ public Builder setTrialEnd(Long trialEnd) { * Indicates if a plan's {@code trial_period_days} should be applied to the subscription. * Setting {@code trial_end} per subscription is preferred, and this defaults to {@code false}. * Setting this flag to {@code true} together with {@code trial_end} is not allowed. See Using trial periods on + * href="https://docs.stripe.com/billing/subscriptions/trials">Using trial periods on * subscriptions to learn more. */ public Builder setTrialFromPlan(Boolean trialFromPlan) { @@ -1090,7 +1105,7 @@ public Builder setTrialFromPlan(Boolean trialFromPlan) { /** * Integer representing the number of trial period days before the customer is charged for the * first time. This will always overwrite any trials that might apply via a subscribed plan. See - * Using trial periods on + * Using trial periods on * subscriptions to learn more. */ public Builder setTrialPeriodDays(Long trialPeriodDays) { @@ -1122,7 +1137,7 @@ public static class AddInvoiceItem { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1143,7 +1158,7 @@ public static class AddInvoiceItem { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -1310,7 +1325,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData(SubscriptionCreateParams.AddInvoiceItem.PriceData priceData) { @@ -1811,7 +1826,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1928,7 +1943,7 @@ public Builder setProduct(String product) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -2951,7 +2966,7 @@ public static class Item { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -2968,7 +2983,7 @@ public static class Item { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -2979,9 +2994,9 @@ public static class Item { Long quantity; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -3170,7 +3185,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ public Builder setPriceData(SubscriptionCreateParams.Item.PriceData priceData) { @@ -3213,9 +3228,9 @@ public Builder addAllTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -3225,9 +3240,9 @@ public Builder setTaxRates(EmptyParam taxRates) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -3252,7 +3267,7 @@ public static class BillingThresholds { /** * Required. Number of units that meets the billing threshold to advance the * subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ @SerializedName("usage_gte") @@ -3309,7 +3324,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. Number of units that meets the billing threshold to advance * the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ public Builder setUsageGte(Long usageGte) { @@ -3455,7 +3470,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -3586,7 +3601,7 @@ public Builder setRecurring(SubscriptionCreateParams.Item.PriceData.Recurring re /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -3985,6 +4000,13 @@ public static class PaymentMethodOptions { @SerializedName("konbini") Object konbini; + /** + * This sub-hash contains details about the PayTo payment method options to pass to the + * invoice’s PaymentIntent. + */ + @SerializedName("payto") + Object payto; + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -4006,6 +4028,7 @@ private PaymentMethodOptions( Object customerBalance, Map extraParams, Object konbini, + Object payto, Object sepaDebit, Object usBankAccount) { this.acssDebit = acssDebit; @@ -4014,6 +4037,7 @@ private PaymentMethodOptions( this.customerBalance = customerBalance; this.extraParams = extraParams; this.konbini = konbini; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -4035,6 +4059,8 @@ public static class Builder { private Object konbini; + private Object payto; + private Object sepaDebit; private Object usBankAccount; @@ -4048,6 +4074,7 @@ public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions build() { this.customerBalance, this.extraParams, this.konbini, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -4178,6 +4205,25 @@ public Builder setKonbini(EmptyParam konbini) { return this; } + /** + * This sub-hash contains details about the PayTo payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPayto( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + + /** + * This sub-hash contains details about the PayTo payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -4559,10 +4605,10 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -4650,10 +4696,10 @@ public Builder setNetwork( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -5224,6 +5270,230 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Payto(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto build() { + return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + Purpose purpose; + + private MandateOptions(Long amount, Map extraParams, Purpose purpose) { + this.amount = amount; + this.extraParams = extraParams; + this.purpose = purpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Purpose purpose; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto + .MandateOptions + build() { + return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto + .MandateOptions(this.amount, this.extraParams, this.purpose); + } + + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + .Purpose + purpose) { + this.purpose = purpose; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -5876,6 +6146,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java b/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java index 034d162a1a9..4a5f7729b09 100644 --- a/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionItemCreateParams.java @@ -40,7 +40,7 @@ public class SubscriptionItemCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -53,20 +53,20 @@ public class SubscriptionItemCreateParams extends ApiRequestParams { * payment is required but cannot be paid. This allows you to manage scenarios where additional * user actions are needed to pay a subscription's invoice. For example, SCA regulation may * require 3DS authentication to complete payment. See the SCA Migration + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA Migration * Guide for Billing to learn more. This is the default behavior. * *

Use {@code default_incomplete} to transition the subscription to {@code status=past_due} * when payment is required and await explicit confirmation of the invoice's payment intent. This * allows simpler management of scenarios where additional user actions are needed to pay a * subscription’s invoice. Such as failed payments, SCA + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA * regulation, or collecting a mandate for a bank debit payment method. * *

Use {@code pending_if_incomplete} to update the subscription using pending updates. When + * href="https://docs.stripe.com/billing/subscriptions/pending-updates">pending updates. When * you use {@code pending_if_incomplete} you can only pass the parameters supported + * href="https://docs.stripe.com/billing/pending-updates-reference#supported-attributes">supported * by pending updates. * *

Use {@code error_if_incomplete} if you want Stripe to return an HTTP 402 status code if a @@ -88,7 +88,7 @@ public class SubscriptionItemCreateParams extends ApiRequestParams { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -96,7 +96,7 @@ public class SubscriptionItemCreateParams extends ApiRequestParams { /** * Determines how to handle prorations when the billing + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the billing * cycle changes (e.g., when switching plans, resetting {@code billing_cycle_anchor=now}, or * starting a trial), or if an item's {@code quantity} changes. The default value is {@code * create_prorations}. @@ -107,7 +107,7 @@ public class SubscriptionItemCreateParams extends ApiRequestParams { /** * If set, the proration will be calculated as though the subscription was updated at the given * time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint. + * href="https://api.stripe.com#retrieve_customer_invoice">upcoming invoice endpoint. */ @SerializedName("proration_date") Long prorationDate; @@ -121,9 +121,9 @@ public class SubscriptionItemCreateParams extends ApiRequestParams { String subscription; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -355,20 +355,20 @@ public Builder putAllMetadata(Map map) { * payment is required but cannot be paid. This allows you to manage scenarios where additional * user actions are needed to pay a subscription's invoice. For example, SCA regulation may * require 3DS authentication to complete payment. See the SCA Migration + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA Migration * Guide for Billing to learn more. This is the default behavior. * *

Use {@code default_incomplete} to transition the subscription to {@code status=past_due} * when payment is required and await explicit confirmation of the invoice's payment intent. * This allows simpler management of scenarios where additional user actions are needed to pay a * subscription’s invoice. Such as failed payments, SCA + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA * regulation, or collecting a mandate for a bank debit payment method. * *

Use {@code pending_if_incomplete} to update the subscription using pending updates. + * href="https://docs.stripe.com/billing/subscriptions/pending-updates">pending updates. * When you use {@code pending_if_incomplete} you can only pass the parameters supported + * href="https://docs.stripe.com/billing/pending-updates-reference#supported-attributes">supported * by pending updates. * *

Use {@code error_if_incomplete} if you want Stripe to return an HTTP 402 status code if a @@ -397,7 +397,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ public Builder setPriceData(SubscriptionItemCreateParams.PriceData priceData) { @@ -407,7 +407,7 @@ public Builder setPriceData(SubscriptionItemCreateParams.PriceData priceData) { /** * Determines how to handle prorations when the + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the * billing cycle changes (e.g., when switching plans, resetting {@code * billing_cycle_anchor=now}, or starting a trial), or if an item's {@code quantity} changes. * The default value is {@code create_prorations}. @@ -421,7 +421,7 @@ public Builder setProrationBehavior( /** * If set, the proration will be calculated as though the subscription was updated at the given * time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint. + * href="https://api.stripe.com#retrieve_customer_invoice">upcoming invoice endpoint. */ public Builder setProrationDate(Long prorationDate) { this.prorationDate = prorationDate; @@ -469,9 +469,9 @@ public Builder addAllTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -481,9 +481,9 @@ public Builder setTaxRates(EmptyParam taxRates) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -508,7 +508,7 @@ public static class BillingThresholds { /** * Required. Number of units that meets the billing threshold to advance the * subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ @SerializedName("usage_gte") @@ -563,7 +563,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. Number of units that meets the billing threshold to advance the * subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ public Builder setUsageGte(Long usageGte) { @@ -707,7 +707,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -836,7 +836,7 @@ public Builder setRecurring(SubscriptionItemCreateParams.PriceData.Recurring rec /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code diff --git a/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java b/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java index b1d825acf94..5b3eed7d402 100644 --- a/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java +++ b/src/main/java/com/stripe/param/SubscriptionItemDeleteParams.java @@ -29,7 +29,7 @@ public class SubscriptionItemDeleteParams extends ApiRequestParams { /** * Determines how to handle prorations when the billing + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the billing * cycle changes (e.g., when switching plans, resetting {@code billing_cycle_anchor=now}, or * starting a trial), or if an item's {@code quantity} changes. The default value is {@code * create_prorations}. @@ -40,7 +40,7 @@ public class SubscriptionItemDeleteParams extends ApiRequestParams { /** * If set, the proration will be calculated as though the subscription was updated at the given * time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint. + * href="https://api.stripe.com#retrieve_customer_invoice">upcoming invoice endpoint. */ @SerializedName("proration_date") Long prorationDate; @@ -112,7 +112,7 @@ public Builder putAllExtraParam(Map map) { /** * Determines how to handle prorations when the + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the * billing cycle changes (e.g., when switching plans, resetting {@code * billing_cycle_anchor=now}, or starting a trial), or if an item's {@code quantity} changes. * The default value is {@code create_prorations}. @@ -126,7 +126,7 @@ public Builder setProrationBehavior( /** * If set, the proration will be calculated as though the subscription was updated at the given * time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint. + * href="https://api.stripe.com#retrieve_customer_invoice">upcoming invoice endpoint. */ public Builder setProrationDate(Long prorationDate) { this.prorationDate = prorationDate; diff --git a/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java index 64f220b7a7d..e23d13bc509 100644 --- a/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionItemUpdateParams.java @@ -40,7 +40,7 @@ public class SubscriptionItemUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -60,20 +60,20 @@ public class SubscriptionItemUpdateParams extends ApiRequestParams { * payment is required but cannot be paid. This allows you to manage scenarios where additional * user actions are needed to pay a subscription's invoice. For example, SCA regulation may * require 3DS authentication to complete payment. See the SCA Migration + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA Migration * Guide for Billing to learn more. This is the default behavior. * *

Use {@code default_incomplete} to transition the subscription to {@code status=past_due} * when payment is required and await explicit confirmation of the invoice's payment intent. This * allows simpler management of scenarios where additional user actions are needed to pay a * subscription’s invoice. Such as failed payments, SCA + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA * regulation, or collecting a mandate for a bank debit payment method. * *

Use {@code pending_if_incomplete} to update the subscription using pending updates. When + * href="https://docs.stripe.com/billing/subscriptions/pending-updates">pending updates. When * you use {@code pending_if_incomplete} you can only pass the parameters supported + * href="https://docs.stripe.com/billing/pending-updates-reference#supported-attributes">supported * by pending updates. * *

Use {@code error_if_incomplete} if you want Stripe to return an HTTP 402 status code if a @@ -99,7 +99,7 @@ public class SubscriptionItemUpdateParams extends ApiRequestParams { Object price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -107,7 +107,7 @@ public class SubscriptionItemUpdateParams extends ApiRequestParams { /** * Determines how to handle prorations when the billing + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the billing * cycle changes (e.g., when switching plans, resetting {@code billing_cycle_anchor=now}, or * starting a trial), or if an item's {@code quantity} changes. The default value is {@code * create_prorations}. @@ -118,7 +118,7 @@ public class SubscriptionItemUpdateParams extends ApiRequestParams { /** * If set, the proration will be calculated as though the subscription was updated at the given * time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint. + * href="https://api.stripe.com#retrieve_customer_invoice">upcoming invoice endpoint. */ @SerializedName("proration_date") Long prorationDate; @@ -128,9 +128,9 @@ public class SubscriptionItemUpdateParams extends ApiRequestParams { Long quantity; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -360,7 +360,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -371,7 +371,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -395,20 +395,20 @@ public Builder setOffSession(Boolean offSession) { * payment is required but cannot be paid. This allows you to manage scenarios where additional * user actions are needed to pay a subscription's invoice. For example, SCA regulation may * require 3DS authentication to complete payment. See the SCA Migration + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA Migration * Guide for Billing to learn more. This is the default behavior. * *

Use {@code default_incomplete} to transition the subscription to {@code status=past_due} * when payment is required and await explicit confirmation of the invoice's payment intent. * This allows simpler management of scenarios where additional user actions are needed to pay a * subscription’s invoice. Such as failed payments, SCA + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA * regulation, or collecting a mandate for a bank debit payment method. * *

Use {@code pending_if_incomplete} to update the subscription using pending updates. + * href="https://docs.stripe.com/billing/subscriptions/pending-updates">pending updates. * When you use {@code pending_if_incomplete} you can only pass the parameters supported + * href="https://docs.stripe.com/billing/pending-updates-reference#supported-attributes">supported * by pending updates. * *

Use {@code error_if_incomplete} if you want Stripe to return an HTTP 402 status code if a @@ -457,7 +457,7 @@ public Builder setPrice(EmptyParam price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData(SubscriptionItemUpdateParams.PriceData priceData) { @@ -467,7 +467,7 @@ public Builder setPriceData(SubscriptionItemUpdateParams.PriceData priceData) { /** * Determines how to handle prorations when the + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the * billing cycle changes (e.g., when switching plans, resetting {@code * billing_cycle_anchor=now}, or starting a trial), or if an item's {@code quantity} changes. * The default value is {@code create_prorations}. @@ -481,7 +481,7 @@ public Builder setProrationBehavior( /** * If set, the proration will be calculated as though the subscription was updated at the given * time. This can be used to apply the same proration that was previewed with the upcoming invoice endpoint. + * href="https://api.stripe.com#retrieve_customer_invoice">upcoming invoice endpoint. */ public Builder setProrationDate(Long prorationDate) { this.prorationDate = prorationDate; @@ -523,9 +523,9 @@ public Builder addAllTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -535,9 +535,9 @@ public Builder setTaxRates(EmptyParam taxRates) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -562,7 +562,7 @@ public static class BillingThresholds { /** * Required. Number of units that meets the billing threshold to advance the * subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ @SerializedName("usage_gte") @@ -617,7 +617,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. Number of units that meets the billing threshold to advance the * subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ public Builder setUsageGte(Long usageGte) { @@ -779,7 +779,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is * considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -928,7 +928,7 @@ public Builder setRecurring(SubscriptionItemUpdateParams.PriceData.Recurring rec /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code diff --git a/src/main/java/com/stripe/param/SubscriptionListParams.java b/src/main/java/com/stripe/param/SubscriptionListParams.java index 1a348e7fa44..20fd3bbde7a 100644 --- a/src/main/java/com/stripe/param/SubscriptionListParams.java +++ b/src/main/java/com/stripe/param/SubscriptionListParams.java @@ -42,10 +42,14 @@ public class SubscriptionListParams extends ApiRequestParams { @SerializedName("current_period_start") Object currentPeriodStart; - /** The ID of the customer whose subscriptions will be retrieved. */ + /** The ID of the customer whose subscriptions you're retrieving. */ @SerializedName("customer") String customer; + /** The ID of the account representing the customer whose subscriptions you're retrieving. */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -96,7 +100,7 @@ public class SubscriptionListParams extends ApiRequestParams { * The status of the subscriptions to retrieve. Passing in a value of {@code canceled} will return * all canceled subscriptions, including those belonging to deleted customers. Pass {@code ended} * to find subscriptions that are canceled and subscriptions that are expired due to incomplete + * href="https://docs.stripe.com/billing/subscriptions/overview#subscription-statuses">incomplete * payment. Passing in a value of {@code all} will return subscriptions of all statuses. If no * value is supplied, all subscriptions that have not been canceled are returned. */ @@ -117,6 +121,7 @@ private SubscriptionListParams( Object currentPeriodEnd, Object currentPeriodStart, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, @@ -132,6 +137,7 @@ private SubscriptionListParams( this.currentPeriodEnd = currentPeriodEnd; this.currentPeriodStart = currentPeriodStart; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -160,6 +166,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -187,6 +195,7 @@ public SubscriptionListParams build() { this.currentPeriodEnd, this.currentPeriodStart, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -262,12 +271,18 @@ public Builder setCurrentPeriodStart(Long currentPeriodStart) { return this; } - /** The ID of the customer whose subscriptions will be retrieved. */ + /** The ID of the customer whose subscriptions you're retrieving. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of the account representing the customer whose subscriptions you're retrieving. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -368,7 +383,7 @@ public Builder setStartingAfter(String startingAfter) { * return all canceled subscriptions, including those belonging to deleted customers. Pass * {@code ended} to find subscriptions that are canceled and subscriptions that are expired due * to incomplete + * href="https://docs.stripe.com/billing/subscriptions/overview#subscription-statuses">incomplete * payment. Passing in a value of {@code all} will return subscriptions of all statuses. If * no value is supplied, all subscriptions that have not been canceled are returned. */ diff --git a/src/main/java/com/stripe/param/SubscriptionResumeParams.java b/src/main/java/com/stripe/param/SubscriptionResumeParams.java index 0630cf0e49a..67738afcad4 100644 --- a/src/main/java/com/stripe/param/SubscriptionResumeParams.java +++ b/src/main/java/com/stripe/param/SubscriptionResumeParams.java @@ -16,7 +16,7 @@ public class SubscriptionResumeParams extends ApiRequestParams { /** * The billing cycle anchor that applies when the subscription is resumed. Either {@code now} or * {@code unchanged}. The default is {@code now}. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ @SerializedName("billing_cycle_anchor") BillingCycleAnchor billingCycleAnchor; @@ -36,7 +36,7 @@ public class SubscriptionResumeParams extends ApiRequestParams { /** * Determines how to handle prorations resulting from + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations resulting from * the {@code billing_cycle_anchor} being {@code unchanged}. When the {@code billing_cycle_anchor} * is set to {@code now} (default value), no prorations are generated. If no value is passed, the * default is {@code create_prorations}. @@ -93,7 +93,7 @@ public SubscriptionResumeParams build() { /** * The billing cycle anchor that applies when the subscription is resumed. Either {@code now} or * {@code unchanged}. The default is {@code now}. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ public Builder setBillingCycleAnchor( SubscriptionResumeParams.BillingCycleAnchor billingCycleAnchor) { @@ -155,7 +155,7 @@ public Builder putAllExtraParam(Map map) { /** * Determines how to handle prorations resulting from + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations resulting from * the {@code billing_cycle_anchor} being {@code unchanged}. When the {@code * billing_cycle_anchor} is set to {@code now} (default value), no prorations are generated. If * no value is passed, the default is {@code create_prorations}. diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java index ad564bd7269..dbf9348e897 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java @@ -23,6 +23,10 @@ public class SubscriptionScheduleCreateParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** The identifier of the account to create the subscription schedule for. */ + @SerializedName("customer_account") + String customerAccount; + /** Object representing the subscription schedule's default settings. */ @SerializedName("default_settings") DefaultSettings defaultSettings; @@ -60,7 +64,7 @@ public class SubscriptionScheduleCreateParams extends ApiRequestParams { String fromSubscription; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -87,6 +91,7 @@ public class SubscriptionScheduleCreateParams extends ApiRequestParams { private SubscriptionScheduleCreateParams( BillingMode billingMode, String customer, + String customerAccount, DefaultSettings defaultSettings, EndBehavior endBehavior, List expand, @@ -97,6 +102,7 @@ private SubscriptionScheduleCreateParams( Object startDate) { this.billingMode = billingMode; this.customer = customer; + this.customerAccount = customerAccount; this.defaultSettings = defaultSettings; this.endBehavior = endBehavior; this.expand = expand; @@ -116,6 +122,8 @@ public static class Builder { private String customer; + private String customerAccount; + private DefaultSettings defaultSettings; private EndBehavior endBehavior; @@ -137,6 +145,7 @@ public SubscriptionScheduleCreateParams build() { return new SubscriptionScheduleCreateParams( this.billingMode, this.customer, + this.customerAccount, this.defaultSettings, this.endBehavior, this.expand, @@ -159,6 +168,12 @@ public Builder setCustomer(String customer) { return this; } + /** The identifier of the account to create the subscription schedule for. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** Object representing the subscription schedule's default settings. */ public Builder setDefaultSettings( SubscriptionScheduleCreateParams.DefaultSettings defaultSettings) { @@ -270,7 +285,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -281,7 +296,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -556,7 +571,7 @@ public static class DefaultSettings { * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if this * phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ @SerializedName("billing_cycle_anchor") BillingCycleAnchor billingCycleAnchor; @@ -712,7 +727,7 @@ public Builder setAutomaticTax( * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if * this phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ public Builder setBillingCycleAnchor( SubscriptionScheduleCreateParams.DefaultSettings.BillingCycleAnchor billingCycleAnchor) { @@ -1578,7 +1593,7 @@ public static class Phase { * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if this * phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ @SerializedName("billing_cycle_anchor") BillingCycleAnchor billingCycleAnchor; @@ -1617,11 +1632,11 @@ public static class Phase { String defaultPaymentMethod; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will set the Subscription's {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates}, which means they will be the Invoice's {@code + * href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">{@code * default_tax_rates} for any Invoices issued by the Subscription during this Phase. */ @SerializedName("default_tax_rates") @@ -1648,8 +1663,8 @@ public static class Phase { Duration duration; /** - * The date at which this phase of the subscription schedule ends. If set, {@code iterations} - * must not be set. + * The date at which this phase of the subscription schedule ends. If set, {@code duration} must + * not be set. */ @SerializedName("end_date") Long endDate; @@ -1675,7 +1690,7 @@ public static class Phase { List items; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to a phase. Metadata on a schedule's phase will update the underlying subscription's {@code * metadata} when the phase is entered, adding new keys and replacing existing keys in the * subscription's {@code metadata}. Individual keys in the subscription's {@code metadata} can @@ -1694,10 +1709,10 @@ public static class Phase { /** * Controls whether the subscription schedule should create prorations when + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when * transitioning to this phase if there is a difference in billing configuration. It's different * from the request-level proration_behavior + * href="https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior">proration_behavior * parameter which controls what happens if the update request affects the billing configuration * (item price, quantity, etc.) of the current phase. */ @@ -1900,7 +1915,7 @@ public Builder setAutomaticTax( * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if * this phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ public Builder setBillingCycleAnchor( SubscriptionScheduleCreateParams.Phase.BillingCycleAnchor billingCycleAnchor) { @@ -1989,11 +2004,11 @@ public Builder addAllDefaultTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will set the Subscription's {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates}, which means they will be the Invoice's {@code + * href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">{@code * default_tax_rates} for any Invoices issued by the Subscription during this Phase. */ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { @@ -2002,11 +2017,11 @@ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will set the Subscription's {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates}, which means they will be the Invoice's {@code + * href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">{@code * default_tax_rates} for any Invoices issued by the Subscription during this Phase. */ public Builder setDefaultTaxRates(List defaultTaxRates) { @@ -2092,7 +2107,7 @@ public Builder setDuration(SubscriptionScheduleCreateParams.Phase.Duration durat } /** - * The date at which this phase of the subscription schedule ends. If set, {@code iterations} + * The date at which this phase of the subscription schedule ends. If set, {@code duration} * must not be set. */ public Builder setEndDate(Long endDate) { @@ -2196,10 +2211,10 @@ public Builder setOnBehalfOf(String onBehalfOf) { /** * Controls whether the subscription schedule should create prorations when + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when * transitioning to this phase if there is a difference in billing configuration. It's * different from the request-level proration_behavior + * href="https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior">proration_behavior * parameter which controls what happens if the update request affects the billing * configuration (item price, quantity, etc.) of the current phase. */ @@ -2255,7 +2270,7 @@ public static class AddInvoiceItem { Map extraParams; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -2276,7 +2291,7 @@ public static class AddInvoiceItem { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -2450,7 +2465,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData( @@ -2974,7 +2989,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -3095,7 +3110,7 @@ public Builder setProduct(String product) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the * price is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, * {@code exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} @@ -3946,7 +3961,7 @@ public static class Item { Map extraParams; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to a configuration item. Metadata on a configuration item will update the underlying * subscription item's {@code metadata} when the phase is entered, adding new keys and * replacing existing keys. Individual keys in the subscription item's {@code metadata} can be @@ -3968,7 +3983,7 @@ public static class Item { String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -3982,9 +3997,9 @@ public static class Item { Long quantity; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -4183,7 +4198,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ public Builder setPriceData( @@ -4230,9 +4245,9 @@ public Builder addAllTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -4242,9 +4257,9 @@ public Builder setTaxRates(EmptyParam taxRates) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -4270,7 +4285,7 @@ public static class BillingThresholds { /** * Required. Number of units that meets the billing threshold to advance * the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ @SerializedName("usage_gte") @@ -4329,7 +4344,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. Number of units that meets the billing threshold to advance * the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ public Builder setUsageGte(Long usageGte) { @@ -4477,7 +4492,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -4610,7 +4625,7 @@ public Builder setRecurring( /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the * price is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, * {@code exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java index 9637ef846ab..0bf4525e628 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleListParams.java @@ -29,6 +29,10 @@ public class SubscriptionScheduleListParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** Only return subscription schedules for the given account. */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -80,6 +84,7 @@ private SubscriptionScheduleListParams( Object completedAt, Object created, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, @@ -91,6 +96,7 @@ private SubscriptionScheduleListParams( this.completedAt = completedAt; this.created = created; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -113,6 +119,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -134,6 +142,7 @@ public SubscriptionScheduleListParams build() { this.completedAt, this.created, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -185,6 +194,12 @@ public Builder setCustomer(String customer) { return this; } + /** Only return subscription schedules for the given account. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java index 89c4df4397a..ccae91250ce 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java @@ -42,7 +42,7 @@ public class SubscriptionScheduleUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -214,7 +214,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -225,7 +225,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -295,7 +295,7 @@ public static class DefaultSettings { * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if this * phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ @SerializedName("billing_cycle_anchor") BillingCycleAnchor billingCycleAnchor; @@ -451,7 +451,7 @@ public Builder setAutomaticTax( * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if * this phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ public Builder setBillingCycleAnchor( SubscriptionScheduleUpdateParams.DefaultSettings.BillingCycleAnchor billingCycleAnchor) { @@ -1345,7 +1345,7 @@ public static class Phase { * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if this * phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ @SerializedName("billing_cycle_anchor") BillingCycleAnchor billingCycleAnchor; @@ -1384,11 +1384,11 @@ public static class Phase { Object defaultPaymentMethod; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will set the Subscription's {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates}, which means they will be the Invoice's {@code + * href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">{@code * default_tax_rates} for any Invoices issued by the Subscription during this Phase. */ @SerializedName("default_tax_rates") @@ -1415,8 +1415,8 @@ public static class Phase { Duration duration; /** - * The date at which this phase of the subscription schedule ends. If set, {@code iterations} - * must not be set. + * The date at which this phase of the subscription schedule ends. If set, {@code duration} must + * not be set. */ @SerializedName("end_date") Object endDate; @@ -1442,7 +1442,7 @@ public static class Phase { List items; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to a phase. Metadata on a schedule's phase will update the underlying subscription's {@code * metadata} when the phase is entered, adding new keys and replacing existing keys in the * subscription's {@code metadata}. Individual keys in the subscription's {@code metadata} can @@ -1461,10 +1461,10 @@ public static class Phase { /** * Controls whether the subscription schedule should create prorations when + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when * transitioning to this phase if there is a difference in billing configuration. It's different * from the request-level proration_behavior + * href="https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior">proration_behavior * parameter which controls what happens if the update request affects the billing configuration * (item price, quantity, etc.) of the current phase. */ @@ -1679,7 +1679,7 @@ public Builder setAutomaticTax( * Can be set to {@code phase_start} to set the anchor to the start of the phase or {@code * automatic} to automatically change it if needed. Cannot be set to {@code phase_start} if * this phase specifies a trial. For more information, see the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ public Builder setBillingCycleAnchor( SubscriptionScheduleUpdateParams.Phase.BillingCycleAnchor billingCycleAnchor) { @@ -1788,11 +1788,11 @@ public Builder addAllDefaultTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will set the Subscription's {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates}, which means they will be the Invoice's {@code + * href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">{@code * default_tax_rates} for any Invoices issued by the Subscription during this Phase. */ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { @@ -1801,11 +1801,11 @@ public Builder setDefaultTaxRates(EmptyParam defaultTaxRates) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will set the Subscription's {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates}, which means they will be the Invoice's {@code + * href="https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates">{@code * default_tax_rates} for any Invoices issued by the Subscription during this Phase. */ public Builder setDefaultTaxRates(List defaultTaxRates) { @@ -1891,7 +1891,7 @@ public Builder setDuration(SubscriptionScheduleUpdateParams.Phase.Duration durat } /** - * The date at which this phase of the subscription schedule ends. If set, {@code iterations} + * The date at which this phase of the subscription schedule ends. If set, {@code duration} * must not be set. */ public Builder setEndDate(Long endDate) { @@ -1900,7 +1900,7 @@ public Builder setEndDate(Long endDate) { } /** - * The date at which this phase of the subscription schedule ends. If set, {@code iterations} + * The date at which this phase of the subscription schedule ends. If set, {@code duration} * must not be set. */ public Builder setEndDate(SubscriptionScheduleUpdateParams.Phase.EndDate endDate) { @@ -2013,10 +2013,10 @@ public Builder setOnBehalfOf(EmptyParam onBehalfOf) { /** * Controls whether the subscription schedule should create prorations when + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when * transitioning to this phase if there is a difference in billing configuration. It's * different from the request-level proration_behavior + * href="https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior">proration_behavior * parameter which controls what happens if the update request affects the billing * configuration (item price, quantity, etc.) of the current phase. */ @@ -2099,7 +2099,7 @@ public static class AddInvoiceItem { Map extraParams; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -2120,7 +2120,7 @@ public static class AddInvoiceItem { Object price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -2300,7 +2300,7 @@ public Builder setPrice(EmptyParam price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData( @@ -2842,7 +2842,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -2984,7 +2984,7 @@ public Builder setProduct(EmptyParam product) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the * price is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, * {@code exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} @@ -3875,7 +3875,7 @@ public static class Item { Map extraParams; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to a configuration item. Metadata on a configuration item will update the underlying * subscription item's {@code metadata} when the phase is entered, adding new keys and * replacing existing keys. Individual keys in the subscription item's {@code metadata} can be @@ -3897,7 +3897,7 @@ public static class Item { Object price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ @SerializedName("price_data") @@ -3911,9 +3911,9 @@ public static class Item { Long quantity; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -4127,7 +4127,7 @@ public Builder setPrice(EmptyParam price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. */ public Builder setPriceData( @@ -4174,9 +4174,9 @@ public Builder addAllTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -4186,9 +4186,9 @@ public Builder setTaxRates(EmptyParam taxRates) { } /** - * A list of Tax Rate ids. These Tax + * A list of Tax Rate ids. These Tax * Rates will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -4214,7 +4214,7 @@ public static class BillingThresholds { /** * Required. Number of units that meets the billing threshold to advance * the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ @SerializedName("usage_gte") @@ -4273,7 +4273,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. Number of units that meets the billing threshold to advance * the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ public Builder setUsageGte(Long usageGte) { @@ -4439,7 +4439,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -4593,7 +4593,7 @@ public Builder setRecurring( /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the * price is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, * {@code exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} diff --git a/src/main/java/com/stripe/param/SubscriptionSearchParams.java b/src/main/java/com/stripe/param/SubscriptionSearchParams.java index e3258640a08..27c01b19ac1 100644 --- a/src/main/java/com/stripe/param/SubscriptionSearchParams.java +++ b/src/main/java/com/stripe/param/SubscriptionSearchParams.java @@ -43,8 +43,8 @@ public class SubscriptionSearchParams extends ApiRequestParams { /** * Required. The search query string. See search query language and the - * list of supported query + * href="https://docs.stripe.com/search#search-query-language">search query language and the + * list of supported query * fields for subscriptions. */ @SerializedName("query") @@ -153,9 +153,9 @@ public Builder setPage(String page) { /** * Required. The search query string. See search query language and the + * href="https://docs.stripe.com/search#search-query-language">search query language and the * list of supported query fields for + * href="https://docs.stripe.com/search#query-fields-for-subscriptions">query fields for * subscriptions. */ public Builder setQuery(String query) { diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index 0223a1f5cbc..52aaf15a09d 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -44,7 +44,7 @@ public class SubscriptionUpdateParams extends ApiRequestParams { * Either {@code now} or {@code unchanged}. Setting the value to {@code now} resets the * subscription's billing cycle anchor to the current time (in UTC). For more information, see the * billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ @SerializedName("billing_cycle_anchor") BillingCycleAnchor billingCycleAnchor; @@ -97,9 +97,9 @@ public class SubscriptionUpdateParams extends ApiRequestParams { * ID of the default payment method for the subscription. It must belong to the customer * associated with the subscription. This takes precedence over {@code default_source}. If neither * are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ @SerializedName("default_payment_method") Object defaultPaymentMethod; @@ -109,9 +109,9 @@ public class SubscriptionUpdateParams extends ApiRequestParams { * associated with the subscription and be in a chargeable state. If {@code * default_payment_method} is also set, {@code default_payment_method} will take precedence. If * neither are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ @SerializedName("default_source") Object defaultSource; @@ -161,7 +161,7 @@ public class SubscriptionUpdateParams extends ApiRequestParams { List items; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -183,7 +183,7 @@ public class SubscriptionUpdateParams extends ApiRequestParams { /** * If specified, payment collection for this subscription will be paused. Note that the * subscription status will be unchanged and will not be updated to {@code paused}. Learn more - * about pausing + * about pausing * collection. */ @SerializedName("pause_collection") @@ -194,20 +194,20 @@ public class SubscriptionUpdateParams extends ApiRequestParams { * payment is required but cannot be paid. This allows you to manage scenarios where additional * user actions are needed to pay a subscription's invoice. For example, SCA regulation may * require 3DS authentication to complete payment. See the SCA Migration + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA Migration * Guide for Billing to learn more. This is the default behavior. * *

Use {@code default_incomplete} to transition the subscription to {@code status=past_due} * when payment is required and await explicit confirmation of the invoice's payment intent. This * allows simpler management of scenarios where additional user actions are needed to pay a * subscription’s invoice. Such as failed payments, SCA + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA * regulation, or collecting a mandate for a bank debit payment method. * *

Use {@code pending_if_incomplete} to update the subscription using pending updates. When + * href="https://docs.stripe.com/billing/subscriptions/pending-updates">pending updates. When * you use {@code pending_if_incomplete} you can only pass the parameters supported + * href="https://docs.stripe.com/billing/pending-updates-reference#supported-attributes">supported * by pending updates. * *

Use {@code error_if_incomplete} if you want Stripe to return an HTTP 402 status code if a @@ -226,7 +226,7 @@ public class SubscriptionUpdateParams extends ApiRequestParams { /** * Specifies an interval for how often to bill for any pending invoice items. It is analogous to - * calling Create an invoice for the + * calling Create an invoice for the * given subscription at the specified interval. */ @SerializedName("pending_invoice_item_interval") @@ -234,7 +234,7 @@ public class SubscriptionUpdateParams extends ApiRequestParams { /** * Determines how to handle prorations when the billing + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the billing * cycle changes (e.g., when switching plans, resetting {@code billing_cycle_anchor=now}, or * starting a trial), or if an item's {@code quantity} changes. The default value is {@code * create_prorations}. @@ -275,7 +275,7 @@ public class SubscriptionUpdateParams extends ApiRequestParams { * Indicates if a plan's {@code trial_period_days} should be applied to the subscription. Setting * {@code trial_end} per subscription is preferred, and this defaults to {@code false}. Setting * this flag to {@code true} together with {@code trial_end} is not allowed. See Using trial periods on + * href="https://docs.stripe.com/billing/subscriptions/trials">Using trial periods on * subscriptions to learn more. */ @SerializedName("trial_from_plan") @@ -523,7 +523,7 @@ public Builder setAutomaticTax(SubscriptionUpdateParams.AutomaticTax automaticTa * Either {@code now} or {@code unchanged}. Setting the value to {@code now} resets the * subscription's billing cycle anchor to the current time (in UTC). For more information, see * the billing cycle documentation. + * href="https://docs.stripe.com/billing/subscriptions/billing-cycle">documentation. */ public Builder setBillingCycleAnchor( SubscriptionUpdateParams.BillingCycleAnchor billingCycleAnchor) { @@ -624,9 +624,9 @@ public Builder setDaysUntilDue(Long daysUntilDue) { * ID of the default payment method for the subscription. It must belong to the customer * associated with the subscription. This takes precedence over {@code default_source}. If * neither are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ public Builder setDefaultPaymentMethod(String defaultPaymentMethod) { this.defaultPaymentMethod = defaultPaymentMethod; @@ -637,9 +637,9 @@ public Builder setDefaultPaymentMethod(String defaultPaymentMethod) { * ID of the default payment method for the subscription. It must belong to the customer * associated with the subscription. This takes precedence over {@code default_source}. If * neither are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ public Builder setDefaultPaymentMethod(EmptyParam defaultPaymentMethod) { this.defaultPaymentMethod = defaultPaymentMethod; @@ -651,9 +651,9 @@ public Builder setDefaultPaymentMethod(EmptyParam defaultPaymentMethod) { * associated with the subscription and be in a chargeable state. If {@code * default_payment_method} is also set, {@code default_payment_method} will take precedence. If * neither are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ public Builder setDefaultSource(String defaultSource) { this.defaultSource = defaultSource; @@ -665,9 +665,9 @@ public Builder setDefaultSource(String defaultSource) { * associated with the subscription and be in a chargeable state. If {@code * default_payment_method} is also set, {@code default_payment_method} will take precedence. If * neither are set, invoices will use the customer's invoice_settings.default_payment_method + * href="https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method">invoice_settings.default_payment_method * or default_source. + * href="https://docs.stripe.com/api/customers/object#customer_object-default_source">default_source. */ public Builder setDefaultSource(EmptyParam defaultSource) { this.defaultSource = defaultSource; @@ -901,7 +901,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -912,7 +912,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -946,7 +946,7 @@ public Builder setOnBehalfOf(EmptyParam onBehalfOf) { /** * If specified, payment collection for this subscription will be paused. Note that the * subscription status will be unchanged and will not be updated to {@code paused}. Learn more - * about pausing + * about pausing * collection. */ public Builder setPauseCollection(SubscriptionUpdateParams.PauseCollection pauseCollection) { @@ -957,7 +957,7 @@ public Builder setPauseCollection(SubscriptionUpdateParams.PauseCollection pause /** * If specified, payment collection for this subscription will be paused. Note that the * subscription status will be unchanged and will not be updated to {@code paused}. Learn more - * about pausing + * about pausing * collection. */ public Builder setPauseCollection(EmptyParam pauseCollection) { @@ -970,20 +970,20 @@ public Builder setPauseCollection(EmptyParam pauseCollection) { * payment is required but cannot be paid. This allows you to manage scenarios where additional * user actions are needed to pay a subscription's invoice. For example, SCA regulation may * require 3DS authentication to complete payment. See the SCA Migration + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA Migration * Guide for Billing to learn more. This is the default behavior. * *

Use {@code default_incomplete} to transition the subscription to {@code status=past_due} * when payment is required and await explicit confirmation of the invoice's payment intent. * This allows simpler management of scenarios where additional user actions are needed to pay a * subscription’s invoice. Such as failed payments, SCA + * href="https://docs.stripe.com/billing/migration/strong-customer-authentication">SCA * regulation, or collecting a mandate for a bank debit payment method. * *

Use {@code pending_if_incomplete} to update the subscription using pending updates. + * href="https://docs.stripe.com/billing/subscriptions/pending-updates">pending updates. * When you use {@code pending_if_incomplete} you can only pass the parameters supported + * href="https://docs.stripe.com/billing/pending-updates-reference#supported-attributes">supported * by pending updates. * *

Use {@code error_if_incomplete} if you want Stripe to return an HTTP 402 status code if a @@ -1006,7 +1006,7 @@ public Builder setPaymentSettings(SubscriptionUpdateParams.PaymentSettings payme /** * Specifies an interval for how often to bill for any pending invoice items. It is analogous to - * calling Create an invoice for the + * calling Create an invoice for the * given subscription at the specified interval. */ public Builder setPendingInvoiceItemInterval( @@ -1017,7 +1017,7 @@ public Builder setPendingInvoiceItemInterval( /** * Specifies an interval for how often to bill for any pending invoice items. It is analogous to - * calling Create an invoice for the + * calling Create an invoice for the * given subscription at the specified interval. */ public Builder setPendingInvoiceItemInterval(EmptyParam pendingInvoiceItemInterval) { @@ -1027,7 +1027,7 @@ public Builder setPendingInvoiceItemInterval(EmptyParam pendingInvoiceItemInterv /** * Determines how to handle prorations when the + * href="https://docs.stripe.com/billing/subscriptions/prorations">prorations when the * billing cycle changes (e.g., when switching plans, resetting {@code * billing_cycle_anchor=now}, or starting a trial), or if an item's {@code quantity} changes. * The default value is {@code create_prorations}. @@ -1101,7 +1101,7 @@ public Builder setTrialEnd(Long trialEnd) { * Indicates if a plan's {@code trial_period_days} should be applied to the subscription. * Setting {@code trial_end} per subscription is preferred, and this defaults to {@code false}. * Setting this flag to {@code true} together with {@code trial_end} is not allowed. See Using trial periods on + * href="https://docs.stripe.com/billing/subscriptions/trials">Using trial periods on * subscriptions to learn more. */ public Builder setTrialFromPlan(Boolean trialFromPlan) { @@ -1133,7 +1133,7 @@ public static class AddInvoiceItem { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1154,7 +1154,7 @@ public static class AddInvoiceItem { Object price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -1327,7 +1327,7 @@ public Builder setPrice(EmptyParam price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData(SubscriptionUpdateParams.AddInvoiceItem.PriceData priceData) { @@ -1846,7 +1846,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -1983,7 +1983,7 @@ public Builder setProduct(EmptyParam product) { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -2884,7 +2884,7 @@ public static class Item { Object id; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -2905,7 +2905,7 @@ public static class Item { Object price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -2916,9 +2916,9 @@ public static class Item { Long quantity; /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -3140,7 +3140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -3151,7 +3151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -3194,7 +3194,7 @@ public Builder setPrice(EmptyParam price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData(SubscriptionUpdateParams.Item.PriceData priceData) { @@ -3237,9 +3237,9 @@ public Builder addAllTaxRate(List elements) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -3249,9 +3249,9 @@ public Builder setTaxRates(EmptyParam taxRates) { } /** - * A list of Tax Rate ids. These Tax Rates + * A list of Tax Rate ids. These Tax Rates * will override the {@code + * href="https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates">{@code * default_tax_rates} on the Subscription. When updating, pass an empty string to remove * previously-defined tax rates. */ @@ -3276,7 +3276,7 @@ public static class BillingThresholds { /** * Required. Number of units that meets the billing threshold to advance the * subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ @SerializedName("usage_gte") @@ -3333,7 +3333,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. Number of units that meets the billing threshold to advance * the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 monetary + * href="https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte">monetary * threshold) */ public Builder setUsageGte(Long usageGte) { @@ -3497,7 +3497,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -3648,7 +3648,7 @@ public Builder setRecurring(SubscriptionUpdateParams.Item.PriceData.Recurring re /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -4165,6 +4165,13 @@ public static class PaymentMethodOptions { @SerializedName("konbini") Object konbini; + /** + * This sub-hash contains details about the PayTo payment method options to pass to the + * invoice’s PaymentIntent. + */ + @SerializedName("payto") + Object payto; + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -4186,6 +4193,7 @@ private PaymentMethodOptions( Object customerBalance, Map extraParams, Object konbini, + Object payto, Object sepaDebit, Object usBankAccount) { this.acssDebit = acssDebit; @@ -4194,6 +4202,7 @@ private PaymentMethodOptions( this.customerBalance = customerBalance; this.extraParams = extraParams; this.konbini = konbini; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -4215,6 +4224,8 @@ public static class Builder { private Object konbini; + private Object payto; + private Object sepaDebit; private Object usBankAccount; @@ -4228,6 +4239,7 @@ public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.customerBalance, this.extraParams, this.konbini, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -4358,6 +4370,25 @@ public Builder setKonbini(EmptyParam konbini) { return this; } + /** + * This sub-hash contains details about the PayTo payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPayto( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + + /** + * This sub-hash contains details about the PayTo payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPayto(EmptyParam payto) { + this.payto = payto; + return this; + } + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -4739,10 +4770,10 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -4830,10 +4861,10 @@ public Builder setNetwork( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. Read our guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -5442,6 +5473,230 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Payto(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto build() { + return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + Purpose purpose; + + private MandateOptions(Long amount, Map extraParams, Purpose purpose) { + this.amount = amount; + this.extraParams = extraParams; + this.purpose = purpose; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private Purpose purpose; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto + .MandateOptions + build() { + return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto + .MandateOptions(this.amount, this.extraParams, this.purpose); + } + + /** + * The maximum amount that can be collected in a single invoice. If you don't specify a + * maximum, then there is no limit. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Payto.MandateOptions + .Purpose + purpose) { + this.purpose = purpose; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -6094,6 +6349,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/TaxIdCreateParams.java b/src/main/java/com/stripe/param/TaxIdCreateParams.java index ea8838e67c7..f0e76ac3d39 100644 --- a/src/main/java/com/stripe/param/TaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCreateParams.java @@ -185,7 +185,7 @@ public Builder setValue(String value) { @Getter @EqualsAndHashCode(callSuper = false) public static class Owner { - /** Account the tax ID belongs to. Required when {@code type=account} */ + /** Connected Account the tax ID belongs to. Required when {@code type=account} */ @SerializedName("account") String account; @@ -193,6 +193,13 @@ public static class Owner { @SerializedName("customer") String customer; + /** + * ID of the Account representing the customer that the tax ID belongs to. Can be used in place + * of {@code customer} when {@code type=customer} + */ + @SerializedName("customer_account") + String customerAccount; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -206,9 +213,15 @@ public static class Owner { @SerializedName("type") Type type; - private Owner(String account, String customer, Map extraParams, Type type) { + private Owner( + String account, + String customer, + String customerAccount, + Map extraParams, + Type type) { this.account = account; this.customer = customer; + this.customerAccount = customerAccount; this.extraParams = extraParams; this.type = type; } @@ -222,6 +235,8 @@ public static class Builder { private String customer; + private String customerAccount; + private Map extraParams; private Type type; @@ -229,10 +244,10 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public TaxIdCreateParams.Owner build() { return new TaxIdCreateParams.Owner( - this.account, this.customer, this.extraParams, this.type); + this.account, this.customer, this.customerAccount, this.extraParams, this.type); } - /** Account the tax ID belongs to. Required when {@code type=account} */ + /** Connected Account the tax ID belongs to. Required when {@code type=account} */ public Builder setAccount(String account) { this.account = account; return this; @@ -244,6 +259,15 @@ public Builder setCustomer(String customer) { return this; } + /** + * ID of the Account representing the customer that the tax ID belongs to. Can be used in + * place of {@code customer} when {@code type=customer} + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link diff --git a/src/main/java/com/stripe/param/TaxIdListParams.java b/src/main/java/com/stripe/param/TaxIdListParams.java index d419da737bf..464d1aa6dac 100644 --- a/src/main/java/com/stripe/param/TaxIdListParams.java +++ b/src/main/java/com/stripe/param/TaxIdListParams.java @@ -191,7 +191,7 @@ public Builder setStartingAfter(String startingAfter) { @Getter @EqualsAndHashCode(callSuper = false) public static class Owner { - /** Account the tax ID belongs to. Required when {@code type=account} */ + /** Connected Account the tax ID belongs to. Required when {@code type=account} */ @SerializedName("account") String account; @@ -199,6 +199,13 @@ public static class Owner { @SerializedName("customer") String customer; + /** + * ID of the Account representing the customer that the tax ID belongs to. Can be used in place + * of {@code customer} when {@code type=customer} + */ + @SerializedName("customer_account") + String customerAccount; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -212,9 +219,15 @@ public static class Owner { @SerializedName("type") Type type; - private Owner(String account, String customer, Map extraParams, Type type) { + private Owner( + String account, + String customer, + String customerAccount, + Map extraParams, + Type type) { this.account = account; this.customer = customer; + this.customerAccount = customerAccount; this.extraParams = extraParams; this.type = type; } @@ -228,16 +241,19 @@ public static class Builder { private String customer; + private String customerAccount; + private Map extraParams; private Type type; /** Finalize and obtain parameter instance from this builder. */ public TaxIdListParams.Owner build() { - return new TaxIdListParams.Owner(this.account, this.customer, this.extraParams, this.type); + return new TaxIdListParams.Owner( + this.account, this.customer, this.customerAccount, this.extraParams, this.type); } - /** Account the tax ID belongs to. Required when {@code type=account} */ + /** Connected Account the tax ID belongs to. Required when {@code type=account} */ public Builder setAccount(String account) { this.account = account; return this; @@ -249,6 +265,15 @@ public Builder setCustomer(String customer) { return this; } + /** + * ID of the Account representing the customer that the tax ID belongs to. Can be used in + * place of {@code customer} when {@code type=customer} + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link diff --git a/src/main/java/com/stripe/param/TaxRateCreateParams.java b/src/main/java/com/stripe/param/TaxRateCreateParams.java index bdff4e936dc..ab45cf45776 100644 --- a/src/main/java/com/stripe/param/TaxRateCreateParams.java +++ b/src/main/java/com/stripe/param/TaxRateCreateParams.java @@ -65,7 +65,7 @@ public class TaxRateCreateParams extends ApiRequestParams { String jurisdiction; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/TaxRateUpdateParams.java b/src/main/java/com/stripe/param/TaxRateUpdateParams.java index a2146a8c87d..af68f049e23 100644 --- a/src/main/java/com/stripe/param/TaxRateUpdateParams.java +++ b/src/main/java/com/stripe/param/TaxRateUpdateParams.java @@ -61,7 +61,7 @@ public class TaxRateUpdateParams extends ApiRequestParams { Object jurisdiction; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -300,7 +300,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -311,7 +311,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 857516bf055..5a2dff74094 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -33,9 +33,9 @@ public class TokenCreateParams extends ApiRequestParams { /** * Create a token for the customer, which is owned by the application's account. You can only use - * this with an OAuth access token - * or Stripe-Account header. Learn - * more about cloning + * this with an OAuth access token + * or Stripe-Account header. Learn + * more about cloning * saved payment methods. */ @SerializedName("customer") @@ -158,10 +158,10 @@ public Builder setCard(String card) { /** * Create a token for the customer, which is owned by the application's account. You can only - * use this with an OAuth access - * token or Stripe-Account + * use this with an OAuth access + * token or Stripe-Account * header. Learn more about cloning saved payment + * href="https://docs.stripe.com/connect/cloning-saved-payment-methods">cloning saved payment * methods. */ public Builder setCustomer(String customer) { @@ -964,7 +964,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -1077,7 +1080,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1921,11 +1927,10 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The back of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The + * uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, + * or PDF format, and less than 10 MB in size. */ @SerializedName("back") String back; @@ -1941,11 +1946,10 @@ public static class Document { Map extraParams; /** - * The front of a document returned by a file upload with a {@code purpose} - * value of {@code additional_verification}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The front of a document returned by a file + * upload with a {@code purpose} value of {@code additional_verification}. The + * uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, + * or PDF format, and less than 10 MB in size. */ @SerializedName("front") String front; @@ -1975,7 +1979,7 @@ public TokenCreateParams.Account.Company.Verification.Document build() { /** * The back of a document returned by a file upload with a {@code purpose} + * href="https://api.stripe.com#create_file">file upload with a {@code purpose} * value of {@code additional_verification}. The uploaded file needs to be a color image * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in * size. @@ -2017,7 +2021,7 @@ public Builder putAllExtraParam(Map map) { /** * The front of a document returned by a file upload with a {@code purpose} + * href="https://api.stripe.com#create_file">file upload with a {@code purpose} * value of {@code additional_verification}. The uploaded file needs to be a color image * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in * size. @@ -2214,7 +2218,7 @@ public static class Individual { String maidenName; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -2594,7 +2598,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -2605,7 +2609,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -2696,7 +2700,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -2809,7 +2816,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -3296,7 +3306,10 @@ public static class RegisteredAddress { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -3409,7 +3422,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -3674,7 +3690,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class AdditionalDocument { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -3693,7 +3709,7 @@ public static class AdditionalDocument { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -3725,11 +3741,10 @@ public TokenCreateParams.Account.Individual.Verification.AdditionalDocument buil } /** - * The back of an ID returned by a file upload with a {@code purpose} - * value of {@code identity_document}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The back of an ID returned by a file + * upload with a {@code purpose} value of {@code identity_document}. The uploaded + * file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF + * format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -3767,11 +3782,10 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file upload with a {@code purpose} - * value of {@code identity_document}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The front of an ID returned by a file + * upload with a {@code purpose} value of {@code identity_document}. The uploaded + * file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF + * format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -3784,7 +3798,7 @@ public Builder setFront(String front) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -3803,7 +3817,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -3835,11 +3849,10 @@ public TokenCreateParams.Account.Individual.Verification.Document build() { } /** - * The back of an ID returned by a file upload with a {@code purpose} - * value of {@code identity_document}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The back of an ID returned by a file + * upload with a {@code purpose} value of {@code identity_document}. The uploaded + * file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF + * format, and less than 10 MB in size. */ public Builder setBack(String back) { this.back = back; @@ -3877,11 +3890,10 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file upload with a {@code purpose} - * value of {@code identity_document}. The uploaded file needs to be a color image - * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in - * size. + * The front of an ID returned by a file + * upload with a {@code purpose} value of {@code identity_document}. The uploaded + * file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF + * format, and less than 10 MB in size. */ public Builder setFront(String front) { this.front = front; @@ -3966,7 +3978,7 @@ public static class BankAccount { /** * The currency the bank account is in. This must be a country/currency pairing that Stripe supports. + * href="https://docs.stripe.com/payouts">Stripe supports. */ @SerializedName("currency") String currency; @@ -4104,7 +4116,7 @@ public Builder setCountry(String country) { /** * The currency the bank account is in. This must be a country/currency pairing that Stripe supports. + * href="https://docs.stripe.com/payouts">Stripe supports. */ public Builder setCurrency(String currency) { this.currency = currency; @@ -4731,7 +4743,7 @@ public static class Person { String maidenName; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -5154,7 +5166,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -5165,7 +5177,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -5464,7 +5476,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -5577,7 +5592,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -6153,9 +6171,8 @@ public static class CompanyAuthorization { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} - * value of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -6252,9 +6269,8 @@ public static class Passport { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} - * value of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -6348,9 +6364,8 @@ public static class Visa { Map extraParams; /** - * One or more document ids returned by a file upload with a {@code purpose} - * value of {@code account_requirement}. + * One or more document ids returned by a file + * upload with a {@code purpose} value of {@code account_requirement}. */ @SerializedName("files") List files; @@ -6466,7 +6481,10 @@ public static class RegisteredAddress { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -6579,7 +6597,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -7334,7 +7355,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class AdditionalDocument { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -7353,7 +7374,7 @@ public static class AdditionalDocument { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -7385,7 +7406,7 @@ public TokenCreateParams.Person.Verification.AdditionalDocument build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -7424,7 +7445,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -7440,7 +7461,7 @@ public Builder setFront(String front) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -7459,7 +7480,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, * and less than 10 MB in size. @@ -7491,7 +7512,7 @@ public TokenCreateParams.Person.Verification.Document build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. @@ -7530,7 +7551,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. The uploaded file * needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF * format, and less than 10 MB in size. diff --git a/src/main/java/com/stripe/param/TopupCreateParams.java b/src/main/java/com/stripe/param/TopupCreateParams.java index 4c0ea457597..2cfecf1c0a4 100644 --- a/src/main/java/com/stripe/param/TopupCreateParams.java +++ b/src/main/java/com/stripe/param/TopupCreateParams.java @@ -44,7 +44,7 @@ public class TopupCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -56,7 +56,7 @@ public class TopupCreateParams extends ApiRequestParams { * The ID of a source to transfer funds from. For most users, this should be left unspecified * which will use the bank account that was set up in the dashboard for the specified currency. In * test mode, this can be a test bank token (see Testing Top-ups). + * href="https://docs.stripe.com/connect/testing#testing-top-ups">Testing Top-ups). */ @SerializedName("source") String source; @@ -233,7 +233,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -244,7 +244,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -258,7 +258,7 @@ public Builder setMetadata(Map metadata) { * The ID of a source to transfer funds from. For most users, this should be left unspecified * which will use the bank account that was set up in the dashboard for the specified currency. * In test mode, this can be a test bank token (see Testing Top-ups). + * href="https://docs.stripe.com/connect/testing#testing-top-ups">Testing Top-ups). */ public Builder setSource(String source) { this.source = source; diff --git a/src/main/java/com/stripe/param/TopupUpdateParams.java b/src/main/java/com/stripe/param/TopupUpdateParams.java index 0692ceef223..54e8fb511b7 100644 --- a/src/main/java/com/stripe/param/TopupUpdateParams.java +++ b/src/main/java/com/stripe/param/TopupUpdateParams.java @@ -32,7 +32,7 @@ public class TopupUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -159,7 +159,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -170,7 +170,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/TransferCreateParams.java b/src/main/java/com/stripe/param/TransferCreateParams.java index a8335d619ac..328e422b00f 100644 --- a/src/main/java/com/stripe/param/TransferCreateParams.java +++ b/src/main/java/com/stripe/param/TransferCreateParams.java @@ -51,7 +51,7 @@ public class TransferCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -63,7 +63,7 @@ public class TransferCreateParams extends ApiRequestParams { * You can use this parameter to transfer funds from a charge before they are added to your * available balance. A pending balance will transfer immediately but the funds will not become * available until the original charge becomes available. See + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-availability">See * the Connect documentation for details. */ @SerializedName("source_transaction") @@ -78,7 +78,7 @@ public class TransferCreateParams extends ApiRequestParams { /** * A string that identifies this transaction as part of a group. See the Connect + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Connect * documentation for details. */ @SerializedName("transfer_group") @@ -261,7 +261,7 @@ public Builder putAllMetadata(Map map) { * You can use this parameter to transfer funds from a charge before they are added to your * available balance. A pending balance will transfer immediately but the funds will not become * available until the original charge becomes available. See + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-availability">See * the Connect documentation for details. */ public Builder setSourceTransaction(String sourceTransaction) { @@ -280,7 +280,7 @@ public Builder setSourceType(TransferCreateParams.SourceType sourceType) { /** * A string that identifies this transaction as part of a group. See the Connect + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#transfer-options">Connect * documentation for details. */ public Builder setTransferGroup(String transferGroup) { diff --git a/src/main/java/com/stripe/param/TransferReversalCollectionCreateParams.java b/src/main/java/com/stripe/param/TransferReversalCollectionCreateParams.java index dae32f3cc10..d39d1d3b03a 100644 --- a/src/main/java/com/stripe/param/TransferReversalCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TransferReversalCollectionCreateParams.java @@ -44,7 +44,7 @@ public class TransferReversalCollectionCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -205,7 +205,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -216,7 +216,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/TransferReversalCreateParams.java b/src/main/java/com/stripe/param/TransferReversalCreateParams.java index 6fe0aff4aff..bd83415cbac 100644 --- a/src/main/java/com/stripe/param/TransferReversalCreateParams.java +++ b/src/main/java/com/stripe/param/TransferReversalCreateParams.java @@ -44,7 +44,7 @@ public class TransferReversalCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -205,7 +205,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -216,7 +216,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/TransferReversalUpdateParams.java b/src/main/java/com/stripe/param/TransferReversalUpdateParams.java index 6d2d06ff154..05f8200e6c9 100644 --- a/src/main/java/com/stripe/param/TransferReversalUpdateParams.java +++ b/src/main/java/com/stripe/param/TransferReversalUpdateParams.java @@ -28,7 +28,7 @@ public class TransferReversalUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -140,7 +140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/TransferUpdateParams.java b/src/main/java/com/stripe/param/TransferUpdateParams.java index f845d8e5b0a..8ee8386f521 100644 --- a/src/main/java/com/stripe/param/TransferUpdateParams.java +++ b/src/main/java/com/stripe/param/TransferUpdateParams.java @@ -32,7 +32,7 @@ public class TransferUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -160,7 +160,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -171,7 +171,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 9387c1fb16e..df86f66cde2 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -53,7 +53,7 @@ public class WebhookEndpointCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -255,7 +255,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -266,7 +266,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -636,7 +636,13 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2025_10_29_CLOVER("2025-10-29.clover"), @SerializedName("2025-11-17.clover") - VERSION_2025_11_17_CLOVER("2025-11-17.clover"); + VERSION_2025_11_17_CLOVER("2025-11-17.clover"), + + @SerializedName("2025-12-15.clover") + VERSION_2025_12_15_CLOVER("2025-12-15.clover"), + + @SerializedName("2026-01-28.clover") + VERSION_2026_01_28_CLOVER("2026-01-28.clover"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index 79dd030613d..b281eac08ff 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java @@ -43,7 +43,7 @@ public class WebhookEndpointUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -228,7 +228,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -239,7 +239,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java index 0315df5351b..c65c9a20d50 100644 --- a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java +++ b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java @@ -13,10 +13,14 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CreditBalanceSummaryRetrieveParams extends ApiRequestParams { - /** Required. The customer for which to fetch credit balance summary. */ + /** The customer whose credit balance summary you're retrieving. */ @SerializedName("customer") String customer; + /** The account representing the customer whose credit balance summary you're retrieving. */ + @SerializedName("customer_account") + String customerAccount; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -35,8 +39,13 @@ public class CreditBalanceSummaryRetrieveParams extends ApiRequestParams { Filter filter; private CreditBalanceSummaryRetrieveParams( - String customer, List expand, Map extraParams, Filter filter) { + String customer, + String customerAccount, + List expand, + Map extraParams, + Filter filter) { this.customer = customer; + this.customerAccount = customerAccount; this.expand = expand; this.extraParams = extraParams; this.filter = filter; @@ -49,6 +58,8 @@ public static Builder builder() { public static class Builder { private String customer; + private String customerAccount; + private List expand; private Map extraParams; @@ -58,15 +69,21 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CreditBalanceSummaryRetrieveParams build() { return new CreditBalanceSummaryRetrieveParams( - this.customer, this.expand, this.extraParams, this.filter); + this.customer, this.customerAccount, this.expand, this.extraParams, this.filter); } - /** Required. The customer for which to fetch credit balance summary. */ + /** The customer whose credit balance summary you're retrieving. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The account representing the customer whose credit balance summary you're retrieving. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link diff --git a/src/main/java/com/stripe/param/billing/CreditBalanceTransactionListParams.java b/src/main/java/com/stripe/param/billing/CreditBalanceTransactionListParams.java index c796d0f90c3..b223162d26a 100644 --- a/src/main/java/com/stripe/param/billing/CreditBalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/billing/CreditBalanceTransactionListParams.java @@ -17,10 +17,14 @@ public class CreditBalanceTransactionListParams extends ApiRequestParams { @SerializedName("credit_grant") String creditGrant; - /** Required. The customer for which to fetch credit balance transactions. */ + /** The customer whose credit balance transactions you're retrieving. */ @SerializedName("customer") String customer; + /** The account representing the customer whose credit balance transactions you're retrieving. */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -62,6 +66,7 @@ public class CreditBalanceTransactionListParams extends ApiRequestParams { private CreditBalanceTransactionListParams( String creditGrant, String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, @@ -69,6 +74,7 @@ private CreditBalanceTransactionListParams( String startingAfter) { this.creditGrant = creditGrant; this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -85,6 +91,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -100,6 +108,7 @@ public CreditBalanceTransactionListParams build() { return new CreditBalanceTransactionListParams( this.creditGrant, this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -113,12 +122,20 @@ public Builder setCreditGrant(String creditGrant) { return this; } - /** Required. The customer for which to fetch credit balance transactions. */ + /** The customer whose credit balance transactions you're retrieving. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** + * The account representing the customer whose credit balance transactions you're retrieving. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with diff --git a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java index d6f3383a14c..a13a2f380a8 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java @@ -29,10 +29,14 @@ public class CreditGrantCreateParams extends ApiRequestParams { @SerializedName("category") Category category; - /** Required. ID of the customer to receive the billing credits. */ + /** ID of the customer receiving the billing credits. */ @SerializedName("customer") String customer; + /** ID of the account representing the customer receiving the billing credits. */ + @SerializedName("customer_account") + String customerAccount; + /** * The time when the billing credits become effective-when they're eligible for use. It defaults * to the current timestamp if not specified. @@ -82,6 +86,7 @@ private CreditGrantCreateParams( ApplicabilityConfig applicabilityConfig, Category category, String customer, + String customerAccount, Long effectiveAt, List expand, Long expiresAt, @@ -93,6 +98,7 @@ private CreditGrantCreateParams( this.applicabilityConfig = applicabilityConfig; this.category = category; this.customer = customer; + this.customerAccount = customerAccount; this.effectiveAt = effectiveAt; this.expand = expand; this.expiresAt = expiresAt; @@ -115,6 +121,8 @@ public static class Builder { private String customer; + private String customerAccount; + private Long effectiveAt; private List expand; @@ -136,6 +144,7 @@ public CreditGrantCreateParams build() { this.applicabilityConfig, this.category, this.customer, + this.customerAccount, this.effectiveAt, this.expand, this.expiresAt, @@ -168,12 +177,18 @@ public Builder setCategory(CreditGrantCreateParams.Category category) { return this; } - /** Required. ID of the customer to receive the billing credits. */ + /** ID of the customer receiving the billing credits. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** ID of the account representing the customer receiving the billing credits. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * The time when the billing credits become effective-when they're eligible for use. It defaults * to the current timestamp if not specified. diff --git a/src/main/java/com/stripe/param/billing/CreditGrantListParams.java b/src/main/java/com/stripe/param/billing/CreditGrantListParams.java index 1051ad2ccb9..59c467094b0 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantListParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantListParams.java @@ -17,6 +17,10 @@ public class CreditGrantListParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** Only return credit grants for this account representing the customer. */ + @SerializedName("customer_account") + String customerAccount; + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with @@ -57,12 +61,14 @@ public class CreditGrantListParams extends ApiRequestParams { private CreditGrantListParams( String customer, + String customerAccount, String endingBefore, List expand, Map extraParams, Long limit, String startingAfter) { this.customer = customer; + this.customerAccount = customerAccount; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -77,6 +83,8 @@ public static Builder builder() { public static class Builder { private String customer; + private String customerAccount; + private String endingBefore; private List expand; @@ -91,6 +99,7 @@ public static class Builder { public CreditGrantListParams build() { return new CreditGrantListParams( this.customer, + this.customerAccount, this.endingBefore, this.expand, this.extraParams, @@ -104,6 +113,12 @@ public Builder setCustomer(String customer) { return this; } + /** Only return credit grants for this account representing the customer. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, starting with diff --git a/src/main/java/com/stripe/param/billing/MeterEventCreateParams.java b/src/main/java/com/stripe/param/billing/MeterEventCreateParams.java index 837fda2b22a..85b5afa8cd0 100644 --- a/src/main/java/com/stripe/param/billing/MeterEventCreateParams.java +++ b/src/main/java/com/stripe/param/billing/MeterEventCreateParams.java @@ -47,7 +47,7 @@ public class MeterEventCreateParams extends ApiRequestParams { * Required. The payload of the event. This must contain the fields corresponding * to a meter's {@code customer_mapping.event_payload_key} (default is {@code stripe_customer_id}) * and {@code value_settings.event_payload_key} (default is {@code value}). Read more about the payload. + * href="https://docs.stripe.com/billing/subscriptions/usage-based/meters/configure#meter-configuration-attributes">payload. */ @SerializedName("payload") Map payload; diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java index 2b6d5ac1d0f..84478490051 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java @@ -21,7 +21,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { /** * The default URL to redirect customers to when they click on the portal's link to return to your * website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden * when creating the session. */ @SerializedName("default_return_url") @@ -53,7 +53,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { LoginPage loginPage; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -127,7 +127,7 @@ public Builder setBusinessProfile(ConfigurationCreateParams.BusinessProfile busi /** * The default URL to redirect customers to when they click on the portal's link to return to * your website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden * when creating the session. */ public Builder setDefaultReturnUrl(String defaultReturnUrl) { @@ -138,7 +138,7 @@ public Builder setDefaultReturnUrl(String defaultReturnUrl) { /** * The default URL to redirect customers to when they click on the portal's link to return to * your website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden * when creating the session. */ public Builder setDefaultReturnUrl(EmptyParam defaultReturnUrl) { @@ -1205,6 +1205,16 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class SubscriptionUpdate { + /** + * Determines the value to use for the billing cycle anchor on subscription updates. Valid + * values are {@code now} or {@code unchanged}, and the default value is {@code unchanged}. + * Setting the value to {@code now} resets the subscription's billing cycle anchor to the + * current time (in UTC). For more information, see the billing cycle documentation. + */ + @SerializedName("billing_cycle_anchor") + BillingCycleAnchor billingCycleAnchor; + /** * The types of subscription updates that are supported. When empty, subscriptions are not * updateable. @@ -1248,6 +1258,7 @@ public static class SubscriptionUpdate { TrialUpdateBehavior trialUpdateBehavior; private SubscriptionUpdate( + BillingCycleAnchor billingCycleAnchor, Object defaultAllowedUpdates, Boolean enabled, Map extraParams, @@ -1255,6 +1266,7 @@ private SubscriptionUpdate( ProrationBehavior prorationBehavior, ScheduleAtPeriodEnd scheduleAtPeriodEnd, TrialUpdateBehavior trialUpdateBehavior) { + this.billingCycleAnchor = billingCycleAnchor; this.defaultAllowedUpdates = defaultAllowedUpdates; this.enabled = enabled; this.extraParams = extraParams; @@ -1269,6 +1281,8 @@ public static Builder builder() { } public static class Builder { + private BillingCycleAnchor billingCycleAnchor; + private Object defaultAllowedUpdates; private Boolean enabled; @@ -1286,6 +1300,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public ConfigurationCreateParams.Features.SubscriptionUpdate build() { return new ConfigurationCreateParams.Features.SubscriptionUpdate( + this.billingCycleAnchor, this.defaultAllowedUpdates, this.enabled, this.extraParams, @@ -1295,6 +1310,20 @@ public ConfigurationCreateParams.Features.SubscriptionUpdate build() { this.trialUpdateBehavior); } + /** + * Determines the value to use for the billing cycle anchor on subscription updates. Valid + * values are {@code now} or {@code unchanged}, and the default value is {@code unchanged}. + * Setting the value to {@code now} resets the subscription's billing cycle anchor to the + * current time (in UTC). For more information, see the billing cycle documentation. + */ + public Builder setBillingCycleAnchor( + ConfigurationCreateParams.Features.SubscriptionUpdate.BillingCycleAnchor + billingCycleAnchor) { + this.billingCycleAnchor = billingCycleAnchor; + return this; + } + /** * Add an element to `defaultAllowedUpdates` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. @@ -1923,6 +1952,21 @@ public enum Type implements ApiRequestParams.EnumParam { } } + public enum BillingCycleAnchor implements ApiRequestParams.EnumParam { + @SerializedName("now") + NOW("now"), + + @SerializedName("unchanged") + UNCHANGED("unchanged"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BillingCycleAnchor(String value) { + this.value = value; + } + } + public enum DefaultAllowedUpdate implements ApiRequestParams.EnumParam { @SerializedName("price") PRICE("price"), @@ -1981,7 +2025,7 @@ public enum TrialUpdateBehavior implements ApiRequestParams.EnumParam { public static class LoginPage { /** * Required. Set to {@code true} to generate a shareable URL {@code + * href="https://docs.stripe.com/api/customer_portal/configuration#portal_configuration_object-login_page-url">{@code * login_page.url} that will take your customers to a hosted login page for the customer * portal. */ @@ -2018,7 +2062,7 @@ public ConfigurationCreateParams.LoginPage build() { /** * Required. Set to {@code true} to generate a shareable URL {@code + * href="https://docs.stripe.com/api/customer_portal/configuration#portal_configuration_object-login_page-url">{@code * login_page.url} that will take your customers to a hosted login page for the customer * portal. */ diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java index cc2c2da7c24..ace7cc763f7 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java @@ -25,7 +25,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { /** * The default URL to redirect customers to when they click on the portal's link to return to your * website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden * when creating the session. */ @SerializedName("default_return_url") @@ -57,7 +57,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { LoginPage loginPage; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -142,7 +142,7 @@ public Builder setBusinessProfile(ConfigurationUpdateParams.BusinessProfile busi /** * The default URL to redirect customers to when they click on the portal's link to return to * your website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden * when creating the session. */ public Builder setDefaultReturnUrl(String defaultReturnUrl) { @@ -153,7 +153,7 @@ public Builder setDefaultReturnUrl(String defaultReturnUrl) { /** * The default URL to redirect customers to when they click on the portal's link to return to * your website. This can be overriden + * href="https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url">overriden * when creating the session. */ public Builder setDefaultReturnUrl(EmptyParam defaultReturnUrl) { @@ -259,7 +259,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -270,7 +270,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1247,6 +1247,16 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class SubscriptionUpdate { + /** + * Determines the value to use for the billing cycle anchor on subscription updates. Valid + * values are {@code now} or {@code unchanged}, and the default value is {@code unchanged}. + * Setting the value to {@code now} resets the subscription's billing cycle anchor to the + * current time (in UTC). For more information, see the billing cycle documentation. + */ + @SerializedName("billing_cycle_anchor") + BillingCycleAnchor billingCycleAnchor; + /** * The types of subscription updates that are supported. When empty, subscriptions are not * updateable. @@ -1290,6 +1300,7 @@ public static class SubscriptionUpdate { TrialUpdateBehavior trialUpdateBehavior; private SubscriptionUpdate( + BillingCycleAnchor billingCycleAnchor, Object defaultAllowedUpdates, Boolean enabled, Map extraParams, @@ -1297,6 +1308,7 @@ private SubscriptionUpdate( ProrationBehavior prorationBehavior, ScheduleAtPeriodEnd scheduleAtPeriodEnd, TrialUpdateBehavior trialUpdateBehavior) { + this.billingCycleAnchor = billingCycleAnchor; this.defaultAllowedUpdates = defaultAllowedUpdates; this.enabled = enabled; this.extraParams = extraParams; @@ -1311,6 +1323,8 @@ public static Builder builder() { } public static class Builder { + private BillingCycleAnchor billingCycleAnchor; + private Object defaultAllowedUpdates; private Boolean enabled; @@ -1328,6 +1342,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public ConfigurationUpdateParams.Features.SubscriptionUpdate build() { return new ConfigurationUpdateParams.Features.SubscriptionUpdate( + this.billingCycleAnchor, this.defaultAllowedUpdates, this.enabled, this.extraParams, @@ -1337,6 +1352,20 @@ public ConfigurationUpdateParams.Features.SubscriptionUpdate build() { this.trialUpdateBehavior); } + /** + * Determines the value to use for the billing cycle anchor on subscription updates. Valid + * values are {@code now} or {@code unchanged}, and the default value is {@code unchanged}. + * Setting the value to {@code now} resets the subscription's billing cycle anchor to the + * current time (in UTC). For more information, see the billing cycle documentation. + */ + public Builder setBillingCycleAnchor( + ConfigurationUpdateParams.Features.SubscriptionUpdate.BillingCycleAnchor + billingCycleAnchor) { + this.billingCycleAnchor = billingCycleAnchor; + return this; + } + /** * Add an element to `defaultAllowedUpdates` list. A list is initialized for the first * `add/addAll` call, and subsequent calls adds additional elements to the original list. @@ -2000,6 +2029,21 @@ public enum Type implements ApiRequestParams.EnumParam { } } + public enum BillingCycleAnchor implements ApiRequestParams.EnumParam { + @SerializedName("now") + NOW("now"), + + @SerializedName("unchanged") + UNCHANGED("unchanged"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BillingCycleAnchor(String value) { + this.value = value; + } + } + public enum DefaultAllowedUpdate implements ApiRequestParams.EnumParam { @SerializedName("price") PRICE("price"), @@ -2058,7 +2102,7 @@ public enum TrialUpdateBehavior implements ApiRequestParams.EnumParam { public static class LoginPage { /** * Required. Set to {@code true} to generate a shareable URL {@code + * href="https://docs.stripe.com/api/customer_portal/configuration#portal_configuration_object-login_page-url">{@code * login_page.url} that will take your customers to a hosted login page for the customer * portal. * @@ -2097,7 +2141,7 @@ public ConfigurationUpdateParams.LoginPage build() { /** * Required. Set to {@code true} to generate a shareable URL {@code + * href="https://docs.stripe.com/api/customer_portal/configuration#portal_configuration_object-login_page-url">{@code * login_page.url} that will take your customers to a hosted login page for the customer * portal. * diff --git a/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java b/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java index bdd48d26ed0..180dbeb0364 100644 --- a/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/SessionCreateParams.java @@ -15,17 +15,21 @@ public class SessionCreateParams extends ApiRequestParams { /** * The ID of an existing configuration to use for + * href="https://docs.stripe.com/api/customer_portal/configuration">configuration to use for * this session, describing its functionality and features. If not specified, the session uses the * default configuration. */ @SerializedName("configuration") String configuration; - /** Required. The ID of an existing customer. */ + /** The ID of an existing customer. */ @SerializedName("customer") String customer; + /** The ID of an existing account. */ + @SerializedName("customer_account") + String customerAccount; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -41,7 +45,7 @@ public class SessionCreateParams extends ApiRequestParams { /** * Information about a specific flow for the customer to go through. See the docs to learn more + * href="https://docs.stripe.com/customer-management/portal-deep-links">docs to learn more * about using customer portal deep links and flows. */ @SerializedName("flow_data") @@ -58,9 +62,9 @@ public class SessionCreateParams extends ApiRequestParams { * The {@code on_behalf_of} account to use for this session. When specified, only subscriptions * and invoices with this {@code on_behalf_of} account appear in the portal. For more information, * see the docs. + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#settlement-merchant">docs. * Use the Accounts + * href="https://docs.stripe.com/api/accounts/object#account_object-settings-branding">Accounts * API to modify the {@code on_behalf_of} account's branding settings, which the portal * displays. */ @@ -77,6 +81,7 @@ public class SessionCreateParams extends ApiRequestParams { private SessionCreateParams( String configuration, String customer, + String customerAccount, List expand, Map extraParams, FlowData flowData, @@ -85,6 +90,7 @@ private SessionCreateParams( String returnUrl) { this.configuration = configuration; this.customer = customer; + this.customerAccount = customerAccount; this.expand = expand; this.extraParams = extraParams; this.flowData = flowData; @@ -102,6 +108,8 @@ public static class Builder { private String customer; + private String customerAccount; + private List expand; private Map extraParams; @@ -119,6 +127,7 @@ public SessionCreateParams build() { return new SessionCreateParams( this.configuration, this.customer, + this.customerAccount, this.expand, this.extraParams, this.flowData, @@ -129,7 +138,7 @@ public SessionCreateParams build() { /** * The ID of an existing configuration to use for + * href="https://docs.stripe.com/api/customer_portal/configuration">configuration to use for * this session, describing its functionality and features. If not specified, the session uses * the default configuration. */ @@ -138,12 +147,18 @@ public Builder setConfiguration(String configuration) { return this; } - /** Required. The ID of an existing customer. */ + /** The ID of an existing customer. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of an existing account. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -198,7 +213,7 @@ public Builder putAllExtraParam(Map map) { /** * Information about a specific flow for the customer to go through. See the docs to learn more + * href="https://docs.stripe.com/customer-management/portal-deep-links">docs to learn more * about using customer portal deep links and flows. */ public Builder setFlowData(SessionCreateParams.FlowData flowData) { @@ -219,9 +234,9 @@ public Builder setLocale(SessionCreateParams.Locale locale) { * The {@code on_behalf_of} account to use for this session. When specified, only subscriptions * and invoices with this {@code on_behalf_of} account appear in the portal. For more * information, see the docs. + * href="https://docs.stripe.com/connect/separate-charges-and-transfers#settlement-merchant">docs. * Use the Accounts + * href="https://docs.stripe.com/api/accounts/object#account_object-settings-branding">Accounts * API to modify the {@code on_behalf_of} account's branding settings, which the portal * displays. */ @@ -1003,7 +1018,7 @@ public static class SubscriptionUpdateConfirm { /** * Required. The subscription item to be updated + * href="https://docs.stripe.com/api/subscription_items">subscription item to be updated * through this flow. Currently, only up to one may be specified and subscriptions with * multiple items are not updatable. */ @@ -1242,7 +1257,7 @@ public static class Item { /** * Required. The ID of the subscription + * href="https://docs.stripe.com/api/subscriptions/object#subscription_object-items-data-id">subscription * item to be updated. */ @SerializedName("id") @@ -1251,14 +1266,14 @@ public static class Item { /** * The price the customer should subscribe to through this flow. The price must also be * included in the configuration's {@code + * href="https://docs.stripe.com/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products">{@code * features.subscription_update.products}. */ @SerializedName("price") String price; /** - * Quantity for this item + * Quantity for this item * that the customer should subscribe to through this flow. */ @SerializedName("quantity") @@ -1322,7 +1337,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The ID of the subscription + * href="https://docs.stripe.com/api/subscriptions/object#subscription_object-items-data-id">subscription * item to be updated. */ public Builder setId(String id) { @@ -1333,7 +1348,7 @@ public Builder setId(String id) { /** * The price the customer should subscribe to through this flow. The price must also be * included in the configuration's {@code + * href="https://docs.stripe.com/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products">{@code * features.subscription_update.products}. */ public Builder setPrice(String price) { @@ -1342,7 +1357,7 @@ public Builder setPrice(String price) { } /** - * Quantity for this item + * Quantity for this item * that the customer should subscribe to through this flow. */ public Builder setQuantity(Long quantity) { diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 338a542d7fb..49d3c528142 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -93,13 +93,13 @@ public class SessionCreateParams extends ApiRequestParams { * ID of an existing Customer, if one exists. In {@code payment} mode, the customer’s most * recently saved card payment method will be used to prefill the email, name, card details, and * billing address on the Checkout page. In {@code subscription} mode, the customer’s default + * href="https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method">default * payment method will be used if it’s a card, otherwise the most recently saved card will be * used. A valid billing address, billing name and billing email are required on the payment * method for Checkout to prefill the customer's card details. * *

If the Customer already has a valid email set, the + * href="https://docs.stripe.com/api/customers/object#customer_object-email">email set, the * email will be prefilled and not editable in Checkout. If the Customer does not have a valid * {@code email}, Checkout will set the email entered during the session on the Customer. * @@ -108,23 +108,27 @@ public class SessionCreateParams extends ApiRequestParams { * Customer object based on information provided during the payment flow. * *

You can set {@code + * href="https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage">{@code * payment_intent_data.setup_future_usage} to have Checkout automatically attach the payment * method to the Customer you pass in for future reuse. */ @SerializedName("customer") String customer; + /** ID of an existing Account, if one exists. Has the same behavior as {@code customer}. */ + @SerializedName("customer_account") + String customerAccount; + /** * Configure whether a Checkout Session creates a Customer during Session confirmation. + * href="https://docs.stripe.com/api/customers">Customer during Session confirmation. * *

When a Customer is not created, you can still retrieve email, address, and other customer * data entered in Checkout with customer_details. + * href="https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-customer_details">customer_details. * *

Sessions that don't create Customers instead are grouped by guest customers in the + * href="https://docs.stripe.com/payments/checkout/guest-customers">guest customers in the * Dashboard. Promotion codes limited to first time customers will return invalid for these * Sessions. * @@ -192,7 +196,7 @@ public class SessionCreateParams extends ApiRequestParams { /** * A list of items the customer is purchasing. Use this parameter to pass one-time or recurring Prices. The parameter is required for {@code + * href="https://docs.stripe.com/api/prices">Prices. The parameter is required for {@code * payment} and {@code subscription} mode. * *

For {@code payment} mode, there is a maximum of 100 line items, however it is recommended to @@ -213,7 +217,7 @@ public class SessionCreateParams extends ApiRequestParams { Locale locale; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -234,7 +238,7 @@ public class SessionCreateParams extends ApiRequestParams { *

You can configure Checkout to collect your customers' business names, individual names, or * both. Each name field can be either required or optional. * - *

If a Customer is created or provided, + *

If a Customer is created or provided, * the names can be saved to the Customer object as well. */ @SerializedName("name_collection") @@ -242,7 +246,7 @@ public class SessionCreateParams extends ApiRequestParams { /** * A list of optional items the customer can add to their order at checkout. Use this parameter to - * pass one-time or recurring Prices. + * pass one-time or recurring Prices. * *

There is a maximum of 10 optional items allowed on a Checkout Session, and the existing * limits on the number of line items allowed on a Checkout Session apply to the combined number @@ -279,7 +283,7 @@ public class SessionCreateParams extends ApiRequestParams { * *

If you'd like information on how to collect a payment method outside of Checkout, read the * guide on configuring subscriptions with a free + * href="https://docs.stripe.com/payments/checkout/free-trials">subscriptions with a free * trial. */ @SerializedName("payment_method_collection") @@ -305,7 +309,7 @@ public class SessionCreateParams extends ApiRequestParams { * *

You can omit this attribute to manage your payment methods from the Stripe Dashboard. See Dynamic + * href="https://docs.stripe.com/payments/payment-methods/integration-options#using-dynamic-payment-methods">Dynamic * Payment Methods for more details. * *

Read more about the supported payment methods and their requirements in our We recommend that you review your privacy policy and check with your legal contacts before * using this feature. Learn more about collecting phone numbers with + * href="https://docs.stripe.com/payments/checkout/phone-numbers">collecting phone numbers with * Checkout. */ @SerializedName("phone_number_collection") @@ -342,7 +346,7 @@ public class SessionCreateParams extends ApiRequestParams { /** * This parameter applies to {@code ui_mode: embedded}. Learn more about the redirect + * href="https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form">redirect * behavior of embedded sessions. Defaults to {@code always}. */ @SerializedName("redirect_on_completion") @@ -400,7 +404,7 @@ public class SessionCreateParams extends ApiRequestParams { * The URL to which Stripe should send customers when payment or setup is complete. This parameter * is not allowed if ui_mode is {@code embedded} or {@code custom}. If you'd like to use * information from the successful Checkout Session on your page, read the guide on customizing your success + * href="https://docs.stripe.com/payments/checkout/custom-success-page">customizing your success * page. */ @SerializedName("success_url") @@ -432,6 +436,7 @@ private SessionCreateParams( List customFields, CustomText customText, String customer, + String customerAccount, CustomerCreation customerCreation, String customerEmail, CustomerUpdate customerUpdate, @@ -481,6 +486,7 @@ private SessionCreateParams( this.customFields = customFields; this.customText = customText; this.customer = customer; + this.customerAccount = customerAccount; this.customerCreation = customerCreation; this.customerEmail = customerEmail; this.customerUpdate = customerUpdate; @@ -550,6 +556,8 @@ public static class Builder { private String customer; + private String customerAccount; + private CustomerCreation customerCreation; private String customerEmail; @@ -638,6 +646,7 @@ public SessionCreateParams build() { this.customFields, this.customText, this.customer, + this.customerAccount, this.customerCreation, this.customerEmail, this.customerUpdate, @@ -796,13 +805,13 @@ public Builder setCustomText(SessionCreateParams.CustomText customText) { * ID of an existing Customer, if one exists. In {@code payment} mode, the customer’s most * recently saved card payment method will be used to prefill the email, name, card details, and * billing address on the Checkout page. In {@code subscription} mode, the customer’s default + * href="https://docs.stripe.com/api/customers/update#update_customer-invoice_settings-default_payment_method">default * payment method will be used if it’s a card, otherwise the most recently saved card will * be used. A valid billing address, billing name and billing email are required on the payment * method for Checkout to prefill the customer's card details. * *

If the Customer already has a valid email set, the + * href="https://docs.stripe.com/api/customers/object#customer_object-email">email set, the * email will be prefilled and not editable in Checkout. If the Customer does not have a valid * {@code email}, Checkout will set the email entered during the session on the Customer. * @@ -811,7 +820,7 @@ public Builder setCustomText(SessionCreateParams.CustomText customText) { * Customer object based on information provided during the payment flow. * *

You can set {@code + * href="https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage">{@code * payment_intent_data.setup_future_usage} to have Checkout automatically attach the payment * method to the Customer you pass in for future reuse. */ @@ -820,16 +829,22 @@ public Builder setCustomer(String customer) { return this; } + /** ID of an existing Account, if one exists. Has the same behavior as {@code customer}. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Configure whether a Checkout Session creates a Customer during Session confirmation. + * href="https://docs.stripe.com/api/customers">Customer during Session confirmation. * *

When a Customer is not created, you can still retrieve email, address, and other customer * data entered in Checkout with customer_details. + * href="https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-customer_details">customer_details. * *

Sessions that don't create Customers instead are grouped by guest customers in the + * href="https://docs.stripe.com/payments/checkout/guest-customers">guest customers in the * Dashboard. Promotion codes limited to first time customers will return invalid for these * Sessions. * @@ -1058,7 +1073,7 @@ public Builder setMode(SessionCreateParams.Mode mode) { *

You can configure Checkout to collect your customers' business names, individual names, or * both. Each name field can be either required or optional. * - *

If a Customer is created or provided, + *

If a Customer is created or provided, * the names can be saved to the Customer object as well. */ public Builder setNameCollection(SessionCreateParams.NameCollection nameCollection) { @@ -1119,7 +1134,7 @@ public Builder setPaymentIntentData(SessionCreateParams.PaymentIntentData paymen * *

If you'd like information on how to collect a payment method outside of Checkout, read the * guide on configuring subscriptions with a free + * href="https://docs.stripe.com/payments/checkout/free-trials">subscriptions with a free * trial. */ public Builder setPaymentMethodCollection( @@ -1194,7 +1209,7 @@ public Builder setPermissions(SessionCreateParams.Permissions permissions) { * *

We recommend that you review your privacy policy and check with your legal contacts before * using this feature. Learn more about collecting phone numbers with + * href="https://docs.stripe.com/payments/checkout/phone-numbers">collecting phone numbers with * Checkout. */ public Builder setPhoneNumberCollection( @@ -1205,7 +1220,7 @@ public Builder setPhoneNumberCollection( /** * This parameter applies to {@code ui_mode: embedded}. Learn more about the redirect + * href="https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form">redirect * behavior of embedded sessions. Defaults to {@code always}. */ public Builder setRedirectOnCompletion( @@ -1302,7 +1317,7 @@ public Builder setSubscriptionData(SessionCreateParams.SubscriptionData subscrip * The URL to which Stripe should send customers when payment or setup is complete. This * parameter is not allowed if ui_mode is {@code embedded} or {@code custom}. If you'd like to * use information from the successful Checkout Session on your page, read the guide on customizing your success + * href="https://docs.stripe.com/payments/checkout/custom-success-page">customizing your success * page. */ public Builder setSuccessUrl(String successUrl) { @@ -4149,7 +4164,7 @@ public static class InvoiceData { Issuer issuer; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -4740,7 +4755,7 @@ public static class LineItem { AdjustableQuantity adjustableQuantity; /** - * The tax rates that will be applied to + * The tax rates that will be applied to * this line item depending on the customer's billing/shipping address. We currently support the * following countries: US, GB, AU, and all countries in the EU. */ @@ -4757,15 +4772,24 @@ public static class LineItem { Map extraParams; /** - * The ID of the Price or Plan object. One of {@code price} or {@code + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Map metadata; + + /** + * The ID of the Price or Plan object. One of {@code price} or {@code * price_data} is required. */ @SerializedName("price") String price; /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ @SerializedName("price_data") @@ -4779,7 +4803,7 @@ public static class LineItem { Long quantity; /** - * The tax rates which apply to this line + * The tax rates which apply to this line * item. */ @SerializedName("tax_rates") @@ -4789,6 +4813,7 @@ private LineItem( AdjustableQuantity adjustableQuantity, List dynamicTaxRates, Map extraParams, + Map metadata, String price, PriceData priceData, Long quantity, @@ -4796,6 +4821,7 @@ private LineItem( this.adjustableQuantity = adjustableQuantity; this.dynamicTaxRates = dynamicTaxRates; this.extraParams = extraParams; + this.metadata = metadata; this.price = price; this.priceData = priceData; this.quantity = quantity; @@ -4813,6 +4839,8 @@ public static class Builder { private Map extraParams; + private Map metadata; + private String price; private PriceData priceData; @@ -4827,6 +4855,7 @@ public SessionCreateParams.LineItem build() { this.adjustableQuantity, this.dynamicTaxRates, this.extraParams, + this.metadata, this.price, this.priceData, this.quantity, @@ -4896,8 +4925,34 @@ public Builder putAllExtraParam(Map map) { } /** - * The ID of the Price or Plan object. One of {@code price} or {@code + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionCreateParams.LineItem#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionCreateParams.LineItem#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * The ID of the Price or Plan object. One of {@code price} or {@code * price_data} is required. */ public Builder setPrice(String price) { @@ -4906,7 +4961,7 @@ public Builder setPrice(String price) { } /** - * Data used to generate a new Price object + * Data used to generate a new Price object * inline. One of {@code price} or {@code price_data} is required. */ public Builder setPriceData(SessionCreateParams.LineItem.PriceData priceData) { @@ -5110,7 +5165,7 @@ public static class PriceData { /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -5255,7 +5310,7 @@ public Builder setRecurring(SessionCreateParams.LineItem.PriceData.Recurring rec /** * Only required if a default + * href="https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)">default * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code @@ -5316,7 +5371,7 @@ public static class ProductData { List images; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the * object in a structured format. Individual keys can be unset by posting an empty value to * them. All keys can be unset by posting an empty value to {@code metadata}. @@ -5330,7 +5385,7 @@ public static class ProductData { @SerializedName("name") String name; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String taxCode; @@ -5489,7 +5544,7 @@ public Builder setName(String name) { return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; @@ -5947,8 +6002,8 @@ public static class OptionalItem { /** * Required. The ID of the Price or Plan object. + * href="https://docs.stripe.com/api/prices">Price or Plan object. */ @SerializedName("price") String price; @@ -6028,8 +6083,8 @@ public Builder putAllExtraParam(Map map) { /** * Required. The ID of the Price or Plan object. + * href="https://docs.stripe.com/api/prices">Price or Plan object. */ public Builder setPrice(String price) { this.price = price; @@ -6175,7 +6230,7 @@ public static class PaymentIntentData { * The amount of the application fee (if any) that will be requested to be applied to the * payment and transferred to the application owner's Stripe account. The amount of the * application fee collected will be capped at the total amount captured. For more information, - * see the PaymentIntents use case + * see the PaymentIntents use case * for connected accounts. */ @SerializedName("application_fee_amount") @@ -6199,7 +6254,7 @@ public static class PaymentIntentData { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -6225,7 +6280,7 @@ public static class PaymentIntentData { /** * Indicates that you intend to make future payments + * href="https://docs.stripe.com/payments/payment-intents#future-usage">make future payments * with the payment method collected by this Checkout Session. * *

When setting this to {@code on_session}, Checkout will show a notice to the customer that @@ -6277,7 +6332,7 @@ public static class PaymentIntentData { /** * The parameters used to automatically create a Transfer when the payment succeeds. For more * information, see the PaymentIntents use case for connected + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected * accounts. */ @SerializedName("transfer_data") @@ -6285,7 +6340,7 @@ public static class PaymentIntentData { /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents use case for connected + * href="https://docs.stripe.com/connect/separate-charges-and-transfers">use case for connected * accounts for details. */ @SerializedName("transfer_group") @@ -6374,7 +6429,7 @@ public SessionCreateParams.PaymentIntentData build() { * payment and transferred to the application owner's Stripe account. The amount of the * application fee collected will be capped at the total amount captured. For more * information, see the PaymentIntents use case for connected + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected * accounts. */ public Builder setApplicationFeeAmount(Long applicationFeeAmount) { @@ -6469,7 +6524,7 @@ public Builder setReceiptEmail(String receiptEmail) { /** * Indicates that you intend to make future + * href="https://docs.stripe.com/payments/payment-intents#future-usage">make future * payments with the payment method collected by this Checkout Session. * *

When setting this to {@code on_session}, Checkout will show a notice to the customer @@ -6531,7 +6586,7 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { /** * The parameters used to automatically create a Transfer when the payment succeeds. For more * information, see the PaymentIntents use case for connected + * href="https://docs.stripe.com/payments/connected-accounts">use case for connected * accounts. */ public Builder setTransferData( @@ -6542,7 +6597,7 @@ public Builder setTransferData( /** * A string that identifies the resulting payment as part of a group. See the PaymentIntents - * use case for + * use case for * connected accounts for details. */ public Builder setTransferGroup(String transferGroup) { @@ -6730,7 +6785,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -6845,7 +6903,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -7227,6 +7288,10 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Paypal paypal; + /** contains details about the PayTo payment method options. */ + @SerializedName("payto") + Payto payto; + /** contains details about the Pix payment method options. */ @SerializedName("pix") Pix pix; @@ -7303,6 +7368,7 @@ private PaymentMethodOptions( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, RevolutPay revolutPay, SamsungPay samsungPay, @@ -7348,6 +7414,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.revolutPay = revolutPay; this.samsungPay = samsungPay; @@ -7435,6 +7502,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private RevolutPay revolutPay; @@ -7493,6 +7562,7 @@ public SessionCreateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.revolutPay, this.samsungPay, @@ -7739,6 +7809,12 @@ public Builder setPaypal(SessionCreateParams.PaymentMethodOptions.Paypal paypal) return this; } + /** contains details about the PayTo payment method options. */ + public Builder setPayto(SessionCreateParams.PaymentMethodOptions.Payto payto) { + this.payto = payto; + return this; + } + /** contains details about the Pix payment method options. */ public Builder setPix(SessionCreateParams.PaymentMethodOptions.Pix pix) { this.pix = pix; @@ -9774,11 +9850,11 @@ public static class Card { /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -9995,11 +10071,11 @@ public Builder setRequestOvercapture( /** * We strongly recommend that you rely on our SCA Engine to automatically prompt your * customers for authentication based on risk level and other requirements. + * href="https://docs.stripe.com/strong-customer-authentication">other requirements. * However, if you wish to request 3D Secure based on logic from your own fraud engine, * provide this option. If not provided, this value defaults to {@code automatic}. Read our * guide on manually + * href="https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds">manually * requesting 3D Secure for more information on how this configuration interacts with * Radar and our SCA Engine. */ @@ -13834,7 +13910,7 @@ public static class Paypal { Map extraParams; /** - * Preferred locale of + * Preferred locale of * the PayPal checkout page that the customer is redirected to. */ @SerializedName("preferred_locale") @@ -13963,7 +14039,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Preferred locale + * Preferred locale * of the PayPal checkout page that the customer is redirected to. */ public Builder setPreferredLocale( @@ -14150,6 +14226,511 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payto { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to the + * Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe creates + * and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you comply + * with regional legislation and network rules, such as SCA. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Payto( + Map extraParams, + MandateOptions mandateOptions, + SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Payto build() { + return new SessionCreateParams.PaymentMethodOptions.Payto( + this.extraParams, this.mandateOptions, this.setupFutureUsage); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Payto#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Payto#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment + * method. + * + *

If you provide a Customer with the PaymentIntent, you can use this parameter to attach the payment method to + * the Customer after the PaymentIntent is confirmed and the customer completes any required + * actions. If you don't provide a Customer, you can still attach the payment method to a + * Customer after the transaction completes. + * + *

If the payment method is {@code card_present} and isn't a digital wallet, Stripe + * creates and attaches a generated_card + * payment method representing the card to the Customer instead. + * + *

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.Payto.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. + */ + @SerializedName("amount") + Object amount; + + /** + * The type of amount that will be collected. The amount charged must be exact or up to the + * value of {@code amount} param for {@code fixed} or {@code maximum} type respectively. + * Defaults to {@code maximum}. + */ + @SerializedName("amount_type") + ApiRequestParams.EnumParam amountType; + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + @SerializedName("end_date") + Object endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + @SerializedName("payment_schedule") + ApiRequestParams.EnumParam paymentSchedule; + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + @SerializedName("payments_per_period") + Object paymentsPerPeriod; + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + @SerializedName("purpose") + ApiRequestParams.EnumParam purpose; + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + @SerializedName("start_date") + Object startDate; + + private MandateOptions( + Object amount, + ApiRequestParams.EnumParam amountType, + Object endDate, + Map extraParams, + ApiRequestParams.EnumParam paymentSchedule, + Object paymentsPerPeriod, + ApiRequestParams.EnumParam purpose, + Object startDate) { + this.amount = amount; + this.amountType = amountType; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + this.paymentsPerPeriod = paymentsPerPeriod; + this.purpose = purpose; + this.startDate = startDate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private ApiRequestParams.EnumParam amountType; + + private Object endDate; + + private Map extraParams; + + private ApiRequestParams.EnumParam paymentSchedule; + + private Object paymentsPerPeriod; + + private ApiRequestParams.EnumParam purpose; + + private Object startDate; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions build() { + return new SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions( + this.amount, + this.amountType, + this.endDate, + this.extraParams, + this.paymentSchedule, + this.paymentsPerPeriod, + this.purpose, + this.startDate); + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Amount that will be collected. It is required when {@code amount_type} is {@code + * fixed}. + */ + public Builder setAmount(EmptyParam amount) { + this.amount = amount; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType( + SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions.AmountType amountType) { + this.amountType = amountType; + return this; + } + + /** + * The type of amount that will be collected. The amount charged must be exact or up to + * the value of {@code amount} param for {@code fixed} or {@code maximum} type + * respectively. Defaults to {@code maximum}. + */ + public Builder setAmountType(EmptyParam amountType) { + this.amountType = amountType; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no + * end date. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule( + SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions.PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule(EmptyParam paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(Long paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The number of payments that will be made during a payment period. Defaults to 1 except + * for when {@code payment_schedule} is {@code adhoc}. In that case, it defaults to no + * limit. + */ + public Builder setPaymentsPerPeriod(EmptyParam paymentsPerPeriod) { + this.paymentsPerPeriod = paymentsPerPeriod; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose( + SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** + * The purpose for which payments are made. Has a default value based on your merchant + * category code. + */ + public Builder setPurpose(EmptyParam purpose) { + this.purpose = purpose; + return this; + } + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + public Builder setStartDate(String startDate) { + this.startDate = startDate; + return this; + } + + /** + * Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to + * confirmation time. + */ + public Builder setStartDate(EmptyParam startDate) { + this.startDate = startDate; + return this; + } + } + + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), + + @SerializedName("maximum") + MAXIMUM("maximum"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), + + @SerializedName("annual") + ANNUAL("annual"), + + @SerializedName("daily") + DAILY("daily"), + + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("semi_annual") + SEMI_ANNUAL("semi_annual"), + + @SerializedName("weekly") + WEEKLY("weekly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), + + @SerializedName("government") + GOVERNMENT("government"), + + @SerializedName("loan") + LOAN("loan"), + + @SerializedName("mortgage") + MORTGAGE("mortgage"), + + @SerializedName("other") + OTHER("other"), + + @SerializedName("pension") + PENSION("pension"), + + @SerializedName("personal") + PERSONAL("personal"), + + @SerializedName("retail") + RETAIL("retail"), + + @SerializedName("salary") + SALARY("salary"), + + @SerializedName("tax") + TAX("tax"), + + @SerializedName("utility") + UTILITY("utility"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Pix { @@ -16211,7 +16792,7 @@ public static class SetupIntentData { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -17260,7 +17841,7 @@ public static class ShippingRateData { FixedAmount fixedAmount; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -17276,7 +17857,7 @@ public static class ShippingRateData { TaxBehavior taxBehavior; /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ @SerializedName("tax_code") @@ -17435,7 +18016,7 @@ public Builder setTaxBehavior( } /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ public Builder setTaxCode(String taxCode) { @@ -18130,7 +18711,7 @@ public static class SubscriptionData { /** * The subscription's description, meant to be displayable to the customer. Use this field to * optionally store an explanation of the subscription for rendering in the customer portal. + * href="https://docs.stripe.com/customer-management">customer portal. */ @SerializedName("description") String description; @@ -18149,7 +18730,7 @@ public static class SubscriptionData { InvoiceSettings invoiceSettings; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -18330,7 +18911,7 @@ public Builder addAllDefaultTaxRate(List elements) { /** * The subscription's description, meant to be displayable to the customer. Use this field to * optionally store an explanation of the subscription for rendering in the customer portal. + * href="https://docs.stripe.com/customer-management">customer portal. */ public Builder setDescription(String description) { this.description = description; @@ -19529,6 +20110,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -19865,6 +20449,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), diff --git a/src/main/java/com/stripe/param/checkout/SessionListParams.java b/src/main/java/com/stripe/param/checkout/SessionListParams.java index f2485ca7a43..4c10f1502b8 100644 --- a/src/main/java/com/stripe/param/checkout/SessionListParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionListParams.java @@ -21,6 +21,10 @@ public class SessionListParams extends ApiRequestParams { @SerializedName("customer") String customer; + /** Only return the Checkout Sessions for the Account specified. */ + @SerializedName("customer_account") + String customerAccount; + /** Only return the Checkout Sessions for the Customer details specified. */ @SerializedName("customer_details") CustomerDetails customerDetails; @@ -82,6 +86,7 @@ public class SessionListParams extends ApiRequestParams { private SessionListParams( Object created, String customer, + String customerAccount, CustomerDetails customerDetails, String endingBefore, List expand, @@ -94,6 +99,7 @@ private SessionListParams( String subscription) { this.created = created; this.customer = customer; + this.customerAccount = customerAccount; this.customerDetails = customerDetails; this.endingBefore = endingBefore; this.expand = expand; @@ -115,6 +121,8 @@ public static class Builder { private String customer; + private String customerAccount; + private CustomerDetails customerDetails; private String endingBefore; @@ -140,6 +148,7 @@ public SessionListParams build() { return new SessionListParams( this.created, this.customer, + this.customerAccount, this.customerDetails, this.endingBefore, this.expand, @@ -170,6 +179,12 @@ public Builder setCustomer(String customer) { return this; } + /** Only return the Checkout Sessions for the Account specified. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** Only return the Checkout Sessions for the Customer details specified. */ public Builder setCustomerDetails(SessionListParams.CustomerDetails customerDetails) { this.customerDetails = customerDetails; diff --git a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java index 1cbccc6b6e0..bba2ac6fdad 100644 --- a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -35,7 +36,27 @@ public class SessionUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * A list of items the customer is purchasing. + * + *

When updating line items, you must retransmit the entire array of line items. + * + *

To retain an existing line item, specify its {@code id}. + * + *

To update an existing line item, specify its {@code id} along with the new values of the + * fields to update. + * + *

To add a new line item, specify one of {@code price} or {@code price_data} and {@code + * quantity}. + * + *

To remove an existing line item, omit the line item's ID from the retransmitted array. + * + *

To reorder a line item, specify it at the desired position in the retransmitted array. + */ + @SerializedName("line_items") + List lineItems; + + /** + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -51,11 +72,13 @@ private SessionUpdateParams( CollectedInformation collectedInformation, List expand, Map extraParams, + List lineItems, Object metadata, Object shippingOptions) { this.collectedInformation = collectedInformation; this.expand = expand; this.extraParams = extraParams; + this.lineItems = lineItems; this.metadata = metadata; this.shippingOptions = shippingOptions; } @@ -71,6 +94,8 @@ public static class Builder { private Map extraParams; + private List lineItems; + private Object metadata; private Object shippingOptions; @@ -81,6 +106,7 @@ public SessionUpdateParams build() { this.collectedInformation, this.expand, this.extraParams, + this.lineItems, this.metadata, this.shippingOptions); } @@ -147,6 +173,32 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * SessionUpdateParams#lineItems} for the field documentation. + */ + public Builder addLineItem(SessionUpdateParams.LineItem element) { + if (this.lineItems == null) { + this.lineItems = new ArrayList<>(); + } + this.lineItems.add(element); + return this; + } + + /** + * Add all elements to `lineItems` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * SessionUpdateParams#lineItems} for the field documentation. + */ + public Builder addAllLineItem(List elements) { + if (this.lineItems == null) { + this.lineItems = new ArrayList<>(); + } + this.lineItems.addAll(elements); + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -176,7 +228,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -187,7 +239,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -437,7 +489,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") Object state; @@ -589,13 +644,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -605,6 +666,1062 @@ public Builder setState(EmptyParam state) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LineItem { + /** + * When set, provides configuration for this item’s quantity to be adjusted by the customer + * during Checkout. + */ + @SerializedName("adjustable_quantity") + AdjustableQuantity adjustableQuantity; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** ID of an existing line item. */ + @SerializedName("id") + Object id; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + /** + * The ID of the Price. One of {@code price} or + * {@code price_data} is required when creating a new line item. + */ + @SerializedName("price") + Object price; + + /** + * Data used to generate a new Price object + * inline. One of {@code price} or {@code price_data} is required when creating a new line item. + */ + @SerializedName("price_data") + PriceData priceData; + + /** + * The quantity of the line item being purchased. Quantity should not be defined when {@code + * recurring.usage_type=metered}. + */ + @SerializedName("quantity") + Long quantity; + + /** + * The tax rates which apply to this line + * item. + */ + @SerializedName("tax_rates") + Object taxRates; + + private LineItem( + AdjustableQuantity adjustableQuantity, + Map extraParams, + Object id, + Object metadata, + Object price, + PriceData priceData, + Long quantity, + Object taxRates) { + this.adjustableQuantity = adjustableQuantity; + this.extraParams = extraParams; + this.id = id; + this.metadata = metadata; + this.price = price; + this.priceData = priceData; + this.quantity = quantity; + this.taxRates = taxRates; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AdjustableQuantity adjustableQuantity; + + private Map extraParams; + + private Object id; + + private Object metadata; + + private Object price; + + private PriceData priceData; + + private Long quantity; + + private Object taxRates; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.LineItem build() { + return new SessionUpdateParams.LineItem( + this.adjustableQuantity, + this.extraParams, + this.id, + this.metadata, + this.price, + this.priceData, + this.quantity, + this.taxRates); + } + + /** + * When set, provides configuration for this item’s quantity to be adjusted by the customer + * during Checkout. + */ + public Builder setAdjustableQuantity( + SessionUpdateParams.LineItem.AdjustableQuantity adjustableQuantity) { + this.adjustableQuantity = adjustableQuantity; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionUpdateParams.LineItem#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionUpdateParams.LineItem#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** ID of an existing line item. */ + public Builder setId(String id) { + this.id = id; + return this; + } + + /** ID of an existing line item. */ + public Builder setId(EmptyParam id) { + this.id = id; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionUpdateParams.LineItem#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionUpdateParams.LineItem#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can + * attach to an object. This can be useful for storing additional information about the object + * in a structured format. Individual keys can be unset by posting an empty value to them. All + * keys can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can + * attach to an object. This can be useful for storing additional information about the object + * in a structured format. Individual keys can be unset by posting an empty value to them. All + * keys can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * The ID of the Price. One of {@code price} + * or {@code price_data} is required when creating a new line item. + */ + public Builder setPrice(String price) { + this.price = price; + return this; + } + + /** + * The ID of the Price. One of {@code price} + * or {@code price_data} is required when creating a new line item. + */ + public Builder setPrice(EmptyParam price) { + this.price = price; + return this; + } + + /** + * Data used to generate a new Price object + * inline. One of {@code price} or {@code price_data} is required when creating a new line + * item. + */ + public Builder setPriceData(SessionUpdateParams.LineItem.PriceData priceData) { + this.priceData = priceData; + return this; + } + + /** + * The quantity of the line item being purchased. Quantity should not be defined when {@code + * recurring.usage_type=metered}. + */ + public Builder setQuantity(Long quantity) { + this.quantity = quantity; + return this; + } + + /** + * Add an element to `taxRates` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * SessionUpdateParams.LineItem#taxRates} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addTaxRate(String element) { + if (this.taxRates == null || this.taxRates instanceof EmptyParam) { + this.taxRates = new ArrayList(); + } + ((List) this.taxRates).add(element); + return this; + } + + /** + * Add all elements to `taxRates` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * SessionUpdateParams.LineItem#taxRates} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllTaxRate(List elements) { + if (this.taxRates == null || this.taxRates instanceof EmptyParam) { + this.taxRates = new ArrayList(); + } + ((List) this.taxRates).addAll(elements); + return this; + } + + /** + * The tax rates which apply to this line + * item. + */ + public Builder setTaxRates(EmptyParam taxRates) { + this.taxRates = taxRates; + return this; + } + + /** + * The tax rates which apply to this line + * item. + */ + public Builder setTaxRates(List taxRates) { + this.taxRates = taxRates; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdjustableQuantity { + /** + * Required. Set to true if the quantity can be adjusted to any positive + * integer. Setting to false will remove any previously specified constraints on quantity. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The maximum quantity the customer can purchase for the Checkout Session. By default this + * value is 99. You can specify a value up to 999999. + */ + @SerializedName("maximum") + Long maximum; + + /** + * The minimum quantity the customer must purchase for the Checkout Session. By default this + * value is 0. + */ + @SerializedName("minimum") + Long minimum; + + private AdjustableQuantity( + Boolean enabled, Map extraParams, Long maximum, Long minimum) { + this.enabled = enabled; + this.extraParams = extraParams; + this.maximum = maximum; + this.minimum = minimum; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Long maximum; + + private Long minimum; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.LineItem.AdjustableQuantity build() { + return new SessionUpdateParams.LineItem.AdjustableQuantity( + this.enabled, this.extraParams, this.maximum, this.minimum); + } + + /** + * Required. Set to true if the quantity can be adjusted to any positive + * integer. Setting to false will remove any previously specified constraints on quantity. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.LineItem.AdjustableQuantity#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.LineItem.AdjustableQuantity#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The maximum quantity the customer can purchase for the Checkout Session. By default this + * value is 99. You can specify a value up to 999999. + */ + public Builder setMaximum(Long maximum) { + this.maximum = maximum; + return this; + } + + /** + * The minimum quantity the customer must purchase for the Checkout Session. By default this + * value is 0. + */ + public Builder setMinimum(Long minimum) { + this.minimum = minimum; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PriceData { + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The ID of the Product that this Price will belong to. One of {@code product} + * or {@code product_data} is required. + */ + @SerializedName("product") + Object product; + + /** + * Data used to generate a new Product + * object inline. One of {@code product} or {@code product_data} is required. + */ + @SerializedName("product_data") + ProductData productData; + + /** + * The recurring components of a price such as {@code interval} and {@code interval_count}. + */ + @SerializedName("recurring") + Recurring recurring; + + /** + * Only required if a default + * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price + * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code + * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code + * exclusive}, it cannot be changed. + */ + @SerializedName("tax_behavior") + TaxBehavior taxBehavior; + + /** + * A non-negative integer in cents (or local equivalent) representing how much to charge. One + * of {@code unit_amount} or {@code unit_amount_decimal} is required. + */ + @SerializedName("unit_amount") + Long unitAmount; + + /** + * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent) + * with at most 12 decimal places. Only one of {@code unit_amount} and {@code + * unit_amount_decimal} can be set. + */ + @SerializedName("unit_amount_decimal") + Object unitAmountDecimal; + + private PriceData( + Object currency, + Map extraParams, + Object product, + ProductData productData, + Recurring recurring, + TaxBehavior taxBehavior, + Long unitAmount, + Object unitAmountDecimal) { + this.currency = currency; + this.extraParams = extraParams; + this.product = product; + this.productData = productData; + this.recurring = recurring; + this.taxBehavior = taxBehavior; + this.unitAmount = unitAmount; + this.unitAmountDecimal = unitAmountDecimal; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Object product; + + private ProductData productData; + + private Recurring recurring; + + private TaxBehavior taxBehavior; + + private Long unitAmount; + + private Object unitAmountDecimal; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.LineItem.PriceData build() { + return new SessionUpdateParams.LineItem.PriceData( + this.currency, + this.extraParams, + this.product, + this.productData, + this.recurring, + this.taxBehavior, + this.unitAmount, + this.unitAmountDecimal); + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.LineItem.PriceData#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.LineItem.PriceData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The ID of the Product that this Price will belong to. One of {@code + * product} or {@code product_data} is required. + */ + public Builder setProduct(String product) { + this.product = product; + return this; + } + + /** + * The ID of the Product that this Price will belong to. One of {@code + * product} or {@code product_data} is required. + */ + public Builder setProduct(EmptyParam product) { + this.product = product; + return this; + } + + /** + * Data used to generate a new Product + * object inline. One of {@code product} or {@code product_data} is required. + */ + public Builder setProductData( + SessionUpdateParams.LineItem.PriceData.ProductData productData) { + this.productData = productData; + return this; + } + + /** + * The recurring components of a price such as {@code interval} and {@code interval_count}. + */ + public Builder setRecurring(SessionUpdateParams.LineItem.PriceData.Recurring recurring) { + this.recurring = recurring; + return this; + } + + /** + * Only required if a default + * tax behavior was not provided in the Stripe Tax settings. Specifies whether the price + * is considered inclusive of taxes or exclusive of taxes. One of {@code inclusive}, {@code + * exclusive}, or {@code unspecified}. Once specified as either {@code inclusive} or {@code + * exclusive}, it cannot be changed. + */ + public Builder setTaxBehavior( + SessionUpdateParams.LineItem.PriceData.TaxBehavior taxBehavior) { + this.taxBehavior = taxBehavior; + return this; + } + + /** + * A non-negative integer in cents (or local equivalent) representing how much to charge. + * One of {@code unit_amount} or {@code unit_amount_decimal} is required. + */ + public Builder setUnitAmount(Long unitAmount) { + this.unitAmount = unitAmount; + return this; + } + + /** + * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent) + * with at most 12 decimal places. Only one of {@code unit_amount} and {@code + * unit_amount_decimal} can be set. + */ + public Builder setUnitAmountDecimal(BigDecimal unitAmountDecimal) { + this.unitAmountDecimal = unitAmountDecimal; + return this; + } + + /** + * Same as {@code unit_amount}, but accepts a decimal value in cents (or local equivalent) + * with at most 12 decimal places. Only one of {@code unit_amount} and {@code + * unit_amount_decimal} can be set. + */ + public Builder setUnitAmountDecimal(EmptyParam unitAmountDecimal) { + this.unitAmountDecimal = unitAmountDecimal; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProductData { + /** + * The product's description, meant to be displayable to the customer. Use this field to + * optionally store a long form explanation of the product being sold for your own rendering + * purposes. + */ + @SerializedName("description") + Object description; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A list of up to 8 URLs of images for this product, meant to be displayable to the + * customer. + */ + @SerializedName("images") + List images; + + /** + * Set of key-value pairs that you can + * attach to an object. This can be useful for storing additional information about the + * object in a structured format. Individual keys can be unset by posting an empty value to + * them. All keys can be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Map metadata; + + /** + * Required. The product's name, meant to be displayable to the customer. + */ + @SerializedName("name") + Object name; + + /** A tax code ID. */ + @SerializedName("tax_code") + Object taxCode; + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + Object unitLabel; + + private ProductData( + Object description, + Map extraParams, + List images, + Map metadata, + Object name, + Object taxCode, + Object unitLabel) { + this.description = description; + this.extraParams = extraParams; + this.images = images; + this.metadata = metadata; + this.name = name; + this.taxCode = taxCode; + this.unitLabel = unitLabel; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object description; + + private Map extraParams; + + private List images; + + private Map metadata; + + private Object name; + + private Object taxCode; + + private Object unitLabel; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.LineItem.PriceData.ProductData build() { + return new SessionUpdateParams.LineItem.PriceData.ProductData( + this.description, + this.extraParams, + this.images, + this.metadata, + this.name, + this.taxCode, + this.unitLabel); + } + + /** + * The product's description, meant to be displayable to the customer. Use this field to + * optionally store a long form explanation of the product being sold for your own + * rendering purposes. + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * The product's description, meant to be displayable to the customer. Use this field to + * optionally store a long form explanation of the product being sold for your own + * rendering purposes. + */ + public Builder setDescription(EmptyParam description) { + this.description = description; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.LineItem.PriceData.ProductData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.LineItem.PriceData.ProductData#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `images` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * SessionUpdateParams.LineItem.PriceData.ProductData#images} for the field documentation. + */ + public Builder addImage(String element) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.add(element); + return this; + } + + /** + * Add all elements to `images` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SessionUpdateParams.LineItem.PriceData.ProductData#images} for the field documentation. + */ + public Builder addAllImage(List elements) { + if (this.images == null) { + this.images = new ArrayList<>(); + } + this.images.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See + * {@link SessionUpdateParams.LineItem.PriceData.ProductData#metadata} for the field + * documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.LineItem.PriceData.ProductData#metadata} for the + * field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Required. The product's name, meant to be displayable to the customer. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The product's name, meant to be displayable to the customer. + */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** A tax code ID. */ + public Builder setTaxCode(String taxCode) { + this.taxCode = taxCode; + return this; + } + + /** A tax code ID. */ + public Builder setTaxCode(EmptyParam taxCode) { + this.taxCode = taxCode; + return this; + } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(EmptyParam unitLabel) { + this.unitLabel = unitLabel; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recurring { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Specifies billing frequency. Either {@code day}, {@code week}, + * {@code month} or {@code year}. + */ + @SerializedName("interval") + Interval interval; + + /** + * The number of intervals between subscription billings. For example, {@code + * interval=month} and {@code interval_count=3} bills every 3 months. Maximum of three years + * interval allowed (3 years, 36 months, or 156 weeks). + */ + @SerializedName("interval_count") + Long intervalCount; + + private Recurring(Map extraParams, Interval interval, Long intervalCount) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.LineItem.PriceData.Recurring build() { + return new SessionUpdateParams.LineItem.PriceData.Recurring( + this.extraParams, this.interval, this.intervalCount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.LineItem.PriceData.Recurring#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.LineItem.PriceData.Recurring#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Specifies billing frequency. Either {@code day}, {@code + * week}, {@code month} or {@code year}. + */ + public Builder setInterval( + SessionUpdateParams.LineItem.PriceData.Recurring.Interval interval) { + this.interval = interval; + return this; + } + + /** + * The number of intervals between subscription billings. For example, {@code + * interval=month} and {@code interval_count=3} bills every 3 months. Maximum of three + * years interval allowed (3 years, 36 months, or 156 weeks). + */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum TaxBehavior implements ApiRequestParams.EnumParam { + @SerializedName("exclusive") + EXCLUSIVE("exclusive"), + + @SerializedName("inclusive") + INCLUSIVE("inclusive"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TaxBehavior(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ShippingOption { @@ -729,7 +1846,7 @@ public static class ShippingRateData { FixedAmount fixedAmount; /** - * Set of key-value pairs that you can + * Set of key-value pairs that you can * attach to an object. This can be useful for storing additional information about the object * in a structured format. Individual keys can be unset by posting an empty value to them. All * keys can be unset by posting an empty value to {@code metadata}. @@ -745,7 +1862,7 @@ public static class ShippingRateData { TaxBehavior taxBehavior; /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ @SerializedName("tax_code") @@ -913,7 +2030,7 @@ public Builder setTaxBehavior( } /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ public Builder setTaxCode(String taxCode) { @@ -922,7 +2039,7 @@ public Builder setTaxCode(String taxCode) { } /** - * A tax code ID. The Shipping tax + * A tax code ID. The Shipping tax * code is {@code txcd_92010001}. */ public Builder setTaxCode(EmptyParam taxCode) { diff --git a/src/main/java/com/stripe/param/climate/OrderCreateParams.java b/src/main/java/com/stripe/param/climate/OrderCreateParams.java index 77e203eff6a..ba7b162a77f 100644 --- a/src/main/java/com/stripe/param/climate/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/climate/OrderCreateParams.java @@ -50,7 +50,7 @@ public class OrderCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/climate/OrderUpdateParams.java b/src/main/java/com/stripe/param/climate/OrderUpdateParams.java index 47ffe619a24..47e010125db 100644 --- a/src/main/java/com/stripe/param/climate/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/climate/OrderUpdateParams.java @@ -35,7 +35,7 @@ public class OrderUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/financialconnections/AccountListParams.java b/src/main/java/com/stripe/param/financialconnections/AccountListParams.java index 55655ee575d..a4c9f4a9a3c 100644 --- a/src/main/java/com/stripe/param/financialconnections/AccountListParams.java +++ b/src/main/java/com/stripe/param/financialconnections/AccountListParams.java @@ -212,14 +212,18 @@ public Builder setStartingAfter(String startingAfter) { @Getter @EqualsAndHashCode(callSuper = false) public static class AccountHolder { - /** The ID of the Stripe account whose accounts will be retrieved. */ + /** The ID of the Stripe account whose accounts you will retrieve. */ @SerializedName("account") String account; - /** The ID of the Stripe customer whose accounts will be retrieved. */ + /** The ID of the Stripe customer whose accounts you will retrieve. */ @SerializedName("customer") String customer; + /** The ID of the Account representing a customer whose accounts you will retrieve. */ + @SerializedName("customer_account") + String customerAccount; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -229,9 +233,11 @@ public static class AccountHolder { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AccountHolder(String account, String customer, Map extraParams) { + private AccountHolder( + String account, String customer, String customerAccount, Map extraParams) { this.account = account; this.customer = customer; + this.customerAccount = customerAccount; this.extraParams = extraParams; } @@ -244,25 +250,34 @@ public static class Builder { private String customer; + private String customerAccount; + private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ public AccountListParams.AccountHolder build() { - return new AccountListParams.AccountHolder(this.account, this.customer, this.extraParams); + return new AccountListParams.AccountHolder( + this.account, this.customer, this.customerAccount, this.extraParams); } - /** The ID of the Stripe account whose accounts will be retrieved. */ + /** The ID of the Stripe account whose accounts you will retrieve. */ public Builder setAccount(String account) { this.account = account; return this; } - /** The ID of the Stripe customer whose accounts will be retrieved. */ + /** The ID of the Stripe customer whose accounts you will retrieve. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** The ID of the Account representing a customer whose accounts you will retrieve. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link diff --git a/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java b/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java index 788f2056bb7..93a0f6ad260 100644 --- a/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java @@ -232,19 +232,26 @@ public Builder setReturnUrl(String returnUrl) { @EqualsAndHashCode(callSuper = false) public static class AccountHolder { /** - * The ID of the Stripe account whose accounts will be retrieved. Should only be present if - * {@code type} is {@code account}. + * The ID of the Stripe account whose accounts you will retrieve. Only available when {@code + * type} is {@code account}. */ @SerializedName("account") String account; /** - * The ID of the Stripe customer whose accounts will be retrieved. Should only be present if - * {@code type} is {@code customer}. + * The ID of the Stripe customer whose accounts you will retrieve. Only available when {@code + * type} is {@code customer}. */ @SerializedName("customer") String customer; + /** + * The ID of Account representing a customer whose accounts you will retrieve. Only available + * when {@code type} is {@code customer}. + */ + @SerializedName("customer_account") + String customerAccount; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -259,9 +266,14 @@ public static class AccountHolder { Type type; private AccountHolder( - String account, String customer, Map extraParams, Type type) { + String account, + String customer, + String customerAccount, + Map extraParams, + Type type) { this.account = account; this.customer = customer; + this.customerAccount = customerAccount; this.extraParams = extraParams; this.type = type; } @@ -275,6 +287,8 @@ public static class Builder { private String customer; + private String customerAccount; + private Map extraParams; private Type type; @@ -282,12 +296,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.AccountHolder build() { return new SessionCreateParams.AccountHolder( - this.account, this.customer, this.extraParams, this.type); + this.account, this.customer, this.customerAccount, this.extraParams, this.type); } /** - * The ID of the Stripe account whose accounts will be retrieved. Should only be present if - * {@code type} is {@code account}. + * The ID of the Stripe account whose accounts you will retrieve. Only available when {@code + * type} is {@code account}. */ public Builder setAccount(String account) { this.account = account; @@ -295,14 +309,23 @@ public Builder setAccount(String account) { } /** - * The ID of the Stripe customer whose accounts will be retrieved. Should only be present if - * {@code type} is {@code customer}. + * The ID of the Stripe customer whose accounts you will retrieve. Only available when {@code + * type} is {@code customer}. */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** + * The ID of Account representing a customer whose accounts you will retrieve. Only available + * when {@code type} is {@code customer}. + */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link diff --git a/src/main/java/com/stripe/param/forwarding/RequestCreateParams.java b/src/main/java/com/stripe/param/forwarding/RequestCreateParams.java index 141d46193af..3690946956a 100644 --- a/src/main/java/com/stripe/param/forwarding/RequestCreateParams.java +++ b/src/main/java/com/stripe/param/forwarding/RequestCreateParams.java @@ -27,7 +27,7 @@ public class RequestCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java index bcbedb1d0a5..8840bb767d9 100644 --- a/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java +++ b/src/main/java/com/stripe/param/identity/VerificationSessionCreateParams.java @@ -35,7 +35,7 @@ public class VerificationSessionCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -55,6 +55,10 @@ public class VerificationSessionCreateParams extends ApiRequestParams { @SerializedName("related_customer") String relatedCustomer; + /** The ID of the Account representing a customer. */ + @SerializedName("related_customer_account") + String relatedCustomerAccount; + /** Tokens referencing a Person resource and it's associated account. */ @SerializedName("related_person") RelatedPerson relatedPerson; @@ -64,7 +68,7 @@ public class VerificationSessionCreateParams extends ApiRequestParams { String returnUrl; /** - * The type of verification + * The type of verification * check to be performed. You must provide a {@code type} if not passing {@code * verification_flow}. */ @@ -86,6 +90,7 @@ private VerificationSessionCreateParams( Options options, ProvidedDetails providedDetails, String relatedCustomer, + String relatedCustomerAccount, RelatedPerson relatedPerson, String returnUrl, Type type, @@ -97,6 +102,7 @@ private VerificationSessionCreateParams( this.options = options; this.providedDetails = providedDetails; this.relatedCustomer = relatedCustomer; + this.relatedCustomerAccount = relatedCustomerAccount; this.relatedPerson = relatedPerson; this.returnUrl = returnUrl; this.type = type; @@ -122,6 +128,8 @@ public static class Builder { private String relatedCustomer; + private String relatedCustomerAccount; + private RelatedPerson relatedPerson; private String returnUrl; @@ -140,6 +148,7 @@ public VerificationSessionCreateParams build() { this.options, this.providedDetails, this.relatedCustomer, + this.relatedCustomerAccount, this.relatedPerson, this.returnUrl, this.type, @@ -252,6 +261,12 @@ public Builder setRelatedCustomer(String relatedCustomer) { return this; } + /** The ID of the Account representing a customer. */ + public Builder setRelatedCustomerAccount(String relatedCustomerAccount) { + this.relatedCustomerAccount = relatedCustomerAccount; + return this; + } + /** Tokens referencing a Person resource and it's associated account. */ public Builder setRelatedPerson(VerificationSessionCreateParams.RelatedPerson relatedPerson) { this.relatedPerson = relatedPerson; @@ -265,7 +280,7 @@ public Builder setReturnUrl(String returnUrl) { } /** - * The type of verification + * The type of verification * check to be performed. You must provide a {@code type} if not passing {@code * verification_flow}. */ @@ -289,7 +304,7 @@ public Builder setVerificationFlow(String verificationFlow) { public static class Options { /** * Options that apply to the document check. + * href="https://docs.stripe.com/identity/verification-checks?type=document">document check. */ @SerializedName("document") Object document; @@ -324,7 +339,7 @@ public VerificationSessionCreateParams.Options build() { /** * Options that apply to the document + * href="https://docs.stripe.com/identity/verification-checks?type=document">document * check. */ public Builder setDocument(VerificationSessionCreateParams.Options.Document document) { @@ -334,7 +349,7 @@ public Builder setDocument(VerificationSessionCreateParams.Options.Document docu /** * Options that apply to the document + * href="https://docs.stripe.com/identity/verification-checks?type=document">document * check. */ public Builder setDocument(EmptyParam document) { @@ -392,7 +407,7 @@ public static class Document { /** * Collect an ID number and perform an ID number + * href="https://docs.stripe.com/identity/verification-checks?type=id-number">ID number * check with the document’s extracted name and date of birth. */ @SerializedName("require_id_number") @@ -407,9 +422,9 @@ public static class Document { /** * Capture a face image and perform a selfie check + * href="https://docs.stripe.com/identity/verification-checks?type=selfie">selfie check * comparing a photo ID and a picture of your user’s face. Learn more. + * href="https://docs.stripe.com/identity/selfie">Learn more. */ @SerializedName("require_matching_selfie") Boolean requireMatchingSelfie; @@ -512,7 +527,7 @@ public Builder putAllExtraParam(Map map) { /** * Collect an ID number and perform an ID number + * href="https://docs.stripe.com/identity/verification-checks?type=id-number">ID number * check with the document’s extracted name and date of birth. */ public Builder setRequireIdNumber(Boolean requireIdNumber) { @@ -531,9 +546,9 @@ public Builder setRequireLiveCapture(Boolean requireLiveCapture) { /** * Capture a face image and perform a selfie check + * href="https://docs.stripe.com/identity/verification-checks?type=selfie">selfie check * comparing a photo ID and a picture of your user’s face. Learn more. + * href="https://docs.stripe.com/identity/selfie">Learn more. */ public Builder setRequireMatchingSelfie(Boolean requireMatchingSelfie) { this.requireMatchingSelfie = requireMatchingSelfie; diff --git a/src/main/java/com/stripe/param/identity/VerificationSessionListParams.java b/src/main/java/com/stripe/param/identity/VerificationSessionListParams.java index c2ae0ab5c44..a7c17008fa8 100644 --- a/src/main/java/com/stripe/param/identity/VerificationSessionListParams.java +++ b/src/main/java/com/stripe/param/identity/VerificationSessionListParams.java @@ -53,9 +53,14 @@ public class VerificationSessionListParams extends ApiRequestParams { @SerializedName("limit") Long limit; + /** Customer ID. */ @SerializedName("related_customer") String relatedCustomer; + /** The ID of the Account representing a customer. */ + @SerializedName("related_customer_account") + String relatedCustomerAccount; + /** * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place * in the list. For instance, if you make a list request and receive 100 objects, ending with @@ -67,7 +72,7 @@ public class VerificationSessionListParams extends ApiRequestParams { /** * Only return VerificationSessions with this status. Learn more about the lifecycle of + * href="https://docs.stripe.com/identity/how-sessions-work">Learn more about the lifecycle of * sessions. */ @SerializedName("status") @@ -81,6 +86,7 @@ private VerificationSessionListParams( Map extraParams, Long limit, String relatedCustomer, + String relatedCustomerAccount, String startingAfter, Status status) { this.clientReferenceId = clientReferenceId; @@ -90,6 +96,7 @@ private VerificationSessionListParams( this.extraParams = extraParams; this.limit = limit; this.relatedCustomer = relatedCustomer; + this.relatedCustomerAccount = relatedCustomerAccount; this.startingAfter = startingAfter; this.status = status; } @@ -113,6 +120,8 @@ public static class Builder { private String relatedCustomer; + private String relatedCustomerAccount; + private String startingAfter; private Status status; @@ -127,6 +136,7 @@ public VerificationSessionListParams build() { this.extraParams, this.limit, this.relatedCustomer, + this.relatedCustomerAccount, this.startingAfter, this.status); } @@ -224,11 +234,18 @@ public Builder setLimit(Long limit) { return this; } + /** Customer ID. */ public Builder setRelatedCustomer(String relatedCustomer) { this.relatedCustomer = relatedCustomer; return this; } + /** The ID of the Account representing a customer. */ + public Builder setRelatedCustomerAccount(String relatedCustomerAccount) { + this.relatedCustomerAccount = relatedCustomerAccount; + return this; + } + /** * A cursor for use in pagination. {@code starting_after} is an object ID that defines your * place in the list. For instance, if you make a list request and receive 100 objects, ending @@ -242,7 +259,7 @@ public Builder setStartingAfter(String startingAfter) { /** * Only return VerificationSessions with this status. Learn more about the lifecycle of + * href="https://docs.stripe.com/identity/how-sessions-work">Learn more about the lifecycle of * sessions. */ public Builder setStatus(VerificationSessionListParams.Status status) { diff --git a/src/main/java/com/stripe/param/identity/VerificationSessionUpdateParams.java b/src/main/java/com/stripe/param/identity/VerificationSessionUpdateParams.java index bf07c171f90..7566d74d641 100644 --- a/src/main/java/com/stripe/param/identity/VerificationSessionUpdateParams.java +++ b/src/main/java/com/stripe/param/identity/VerificationSessionUpdateParams.java @@ -28,7 +28,7 @@ public class VerificationSessionUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -45,7 +45,7 @@ public class VerificationSessionUpdateParams extends ApiRequestParams { ProvidedDetails providedDetails; /** - * The type of verification + * The type of verification * check to be performed. */ @SerializedName("type") @@ -186,7 +186,7 @@ public Builder setProvidedDetails( } /** - * The type of verification + * The type of verification * check to be performed. */ public Builder setType(VerificationSessionUpdateParams.Type type) { @@ -200,7 +200,7 @@ public Builder setType(VerificationSessionUpdateParams.Type type) { public static class Options { /** * Options that apply to the document check. + * href="https://docs.stripe.com/identity/verification-checks?type=document">document check. */ @SerializedName("document") Object document; @@ -235,7 +235,7 @@ public VerificationSessionUpdateParams.Options build() { /** * Options that apply to the document + * href="https://docs.stripe.com/identity/verification-checks?type=document">document * check. */ public Builder setDocument(VerificationSessionUpdateParams.Options.Document document) { @@ -245,7 +245,7 @@ public Builder setDocument(VerificationSessionUpdateParams.Options.Document docu /** * Options that apply to the document + * href="https://docs.stripe.com/identity/verification-checks?type=document">document * check. */ public Builder setDocument(EmptyParam document) { @@ -303,7 +303,7 @@ public static class Document { /** * Collect an ID number and perform an ID number + * href="https://docs.stripe.com/identity/verification-checks?type=id-number">ID number * check with the document’s extracted name and date of birth. */ @SerializedName("require_id_number") @@ -318,9 +318,9 @@ public static class Document { /** * Capture a face image and perform a selfie check + * href="https://docs.stripe.com/identity/verification-checks?type=selfie">selfie check * comparing a photo ID and a picture of your user’s face. Learn more. + * href="https://docs.stripe.com/identity/selfie">Learn more. */ @SerializedName("require_matching_selfie") Boolean requireMatchingSelfie; @@ -423,7 +423,7 @@ public Builder putAllExtraParam(Map map) { /** * Collect an ID number and perform an ID number + * href="https://docs.stripe.com/identity/verification-checks?type=id-number">ID number * check with the document’s extracted name and date of birth. */ public Builder setRequireIdNumber(Boolean requireIdNumber) { @@ -442,9 +442,9 @@ public Builder setRequireLiveCapture(Boolean requireLiveCapture) { /** * Capture a face image and perform a selfie check + * href="https://docs.stripe.com/identity/verification-checks?type=selfie">selfie check * comparing a photo ID and a picture of your user’s face. Learn more. + * href="https://docs.stripe.com/identity/selfie">Learn more. */ public Builder setRequireMatchingSelfie(Boolean requireMatchingSelfie) { this.requireMatchingSelfie = requireMatchingSelfie; diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationApproveParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationApproveParams.java index aad1ac8a431..95f801d7fc7 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationApproveParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationApproveParams.java @@ -17,7 +17,7 @@ public class AuthorizationApproveParams extends ApiRequestParams { /** * If the authorization's {@code pending_request.is_amount_controllable} property is {@code true}, * you may provide this value to control how much to hold for the authorization. Must be positive - * (use {@code decline} + * (use {@code decline} * to decline an authorization request). */ @SerializedName("amount") @@ -37,7 +37,7 @@ public class AuthorizationApproveParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -75,7 +75,7 @@ public AuthorizationApproveParams build() { /** * If the authorization's {@code pending_request.is_amount_controllable} property is {@code * true}, you may provide this value to control how much to hold for the authorization. Must be - * positive (use {@code + * positive (use {@code * decline} to decline an authorization request). */ public Builder setAmount(Long amount) { @@ -164,7 +164,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -175,7 +175,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationCaptureParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationCaptureParams.java index b214a479047..1d32b5e97d3 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationCaptureParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationCaptureParams.java @@ -17,7 +17,7 @@ public class AuthorizationCaptureParams extends ApiRequestParams { /** * The amount to capture from the authorization. If not provided, the full amount of the * authorization will be captured. This amount is in the authorization currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("capture_amount") Long captureAmount; @@ -87,7 +87,7 @@ public AuthorizationCaptureParams build() { /** * The amount to capture from the authorization. If not provided, the full amount of the * authorization will be captured. This amount is in the authorization currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setCaptureAmount(Long captureAmount) { this.captureAmount = captureAmount; diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java index 38a837693dc..79c47fc21cd 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java @@ -17,14 +17,14 @@ public class AuthorizationCreateParams extends ApiRequestParams { /** * The total amount to attempt to authorize. This amount is in the provided currency, or defaults * to the card's currency, and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount") Long amount; /** * Detailed breakdown of amount components. These amounts are denominated in {@code currency} and - * in the smallest currency unit. + * in the smallest currency unit. */ @SerializedName("amount_details") AmountDetails amountDetails; @@ -75,7 +75,7 @@ public class AuthorizationCreateParams extends ApiRequestParams { /** * If set {@code true}, you may provide amount + * href="https://docs.stripe.com/api/issuing/authorizations/approve#approve_issuing_authorization-amount">amount * to control how much to hold for the authorization. */ @SerializedName("is_amount_controllable") @@ -83,7 +83,7 @@ public class AuthorizationCreateParams extends ApiRequestParams { /** * The total amount to attempt to authorize. This amount is in the provided merchant currency, and - * in the smallest currency unit. + * in the smallest currency unit. */ @SerializedName("merchant_amount") Long merchantAmount; @@ -231,7 +231,7 @@ public AuthorizationCreateParams build() { /** * The total amount to attempt to authorize. This amount is in the provided currency, or * defaults to the card's currency, and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setAmount(Long amount) { this.amount = amount; @@ -240,7 +240,7 @@ public Builder setAmount(Long amount) { /** * Detailed breakdown of amount components. These amounts are denominated in {@code currency} - * and in the smallest currency + * and in the smallest currency * unit. */ public Builder setAmountDetails(AuthorizationCreateParams.AmountDetails amountDetails) { @@ -348,7 +348,7 @@ public Builder setFuel(AuthorizationCreateParams.Fuel fuel) { /** * If set {@code true}, you may provide amount + * href="https://docs.stripe.com/api/issuing/authorizations/approve#approve_issuing_authorization-amount">amount * to control how much to hold for the authorization. */ public Builder setIsAmountControllable(Boolean isAmountControllable) { @@ -358,7 +358,7 @@ public Builder setIsAmountControllable(Boolean isAmountControllable) { /** * The total amount to attempt to authorize. This amount is in the provided merchant currency, - * and in the smallest currency + * and in the smallest currency * unit. */ public Builder setMerchantAmount(Long merchantAmount) { @@ -1411,7 +1411,7 @@ public enum Unit implements ApiRequestParams.EnumParam { public static class MerchantData { /** * A categorization of the seller's type of business. See our merchant categories guide for + * href="https://docs.stripe.com/issuing/merchant-categories">merchant categories guide for * a list of possible values. */ @SerializedName("category") @@ -1526,7 +1526,7 @@ public AuthorizationCreateParams.MerchantData build() { /** * A categorization of the seller's type of business. See our merchant categories guide + * href="https://docs.stripe.com/issuing/merchant-categories">merchant categories guide * for a list of possible values. */ public Builder setCategory(AuthorizationCreateParams.MerchantData.Category category) { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationDeclineParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationDeclineParams.java index 1be5284e117..c08f085ebe5 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationDeclineParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationDeclineParams.java @@ -28,7 +28,7 @@ public class AuthorizationDeclineParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -140,7 +140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationFinalizeAmountParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationFinalizeAmountParams.java index 5dc5ce45511..6d95c153c42 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationFinalizeAmountParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationFinalizeAmountParams.java @@ -30,7 +30,7 @@ public class AuthorizationFinalizeAmountParams extends ApiRequestParams { /** * Required. The final authorization amount that will be captured by the * merchant. This amount is in the authorization currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("final_amount") Long finalAmount; @@ -132,7 +132,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The final authorization amount that will be captured by the * merchant. This amount is in the authorization currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setFinalAmount(Long finalAmount) { this.finalAmount = finalAmount; diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationIncrementParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationIncrementParams.java index a5f080905e5..b3d21e29cd6 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationIncrementParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationIncrementParams.java @@ -29,14 +29,14 @@ public class AuthorizationIncrementParams extends ApiRequestParams { /** * Required. The amount to increment the authorization by. This amount is in the * authorization currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("increment_amount") Long incrementAmount; /** * If set {@code true}, you may provide amount + * href="https://docs.stripe.com/api/issuing/authorizations/approve#approve_issuing_authorization-amount">amount * to control how much to hold for the authorization. */ @SerializedName("is_amount_controllable") @@ -127,7 +127,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. The amount to increment the authorization by. This amount is in * the authorization currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setIncrementAmount(Long incrementAmount) { this.incrementAmount = incrementAmount; @@ -136,7 +136,7 @@ public Builder setIncrementAmount(Long incrementAmount) { /** * If set {@code true}, you may provide amount + * href="https://docs.stripe.com/api/issuing/authorizations/approve#approve_issuing_authorization-amount">amount * to control how much to hold for the authorization. */ public Builder setIsAmountControllable(Boolean isAmountControllable) { diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationReverseParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationReverseParams.java index a06f0ac03ed..61eb702baf1 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationReverseParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationReverseParams.java @@ -29,7 +29,7 @@ public class AuthorizationReverseParams extends ApiRequestParams { /** * The amount to reverse from the authorization. If not provided, the full amount of the * authorization will be reversed. This amount is in the authorization currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("reverse_amount") Long reverseAmount; @@ -112,7 +112,7 @@ public Builder putAllExtraParam(Map map) { /** * The amount to reverse from the authorization. If not provided, the full amount of the * authorization will be reversed. This amount is in the authorization currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setReverseAmount(Long reverseAmount) { this.reverseAmount = reverseAmount; diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationUpdateParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationUpdateParams.java index affaee8bc1b..453a80b5d50 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationUpdateParams.java @@ -28,7 +28,7 @@ public class AuthorizationUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -140,7 +140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java index f78c4070975..d7679ef3dd1 100644 --- a/src/main/java/com/stripe/param/issuing/CardCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardCreateParams.java @@ -15,7 +15,7 @@ @EqualsAndHashCode(callSuper = false) public class CardCreateParams extends ApiRequestParams { /** - * The Cardholder object with + * The Cardholder object with * which the card will be associated. */ @SerializedName("cardholder") @@ -62,7 +62,7 @@ public class CardCreateParams extends ApiRequestParams { String financialAccount; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -98,7 +98,7 @@ public class CardCreateParams extends ApiRequestParams { /** * Rules that control spending for this card. Refer to our documentation for more + * href="https://docs.stripe.com/issuing/controls/spending-controls">documentation for more * details. */ @SerializedName("spending_controls") @@ -217,7 +217,7 @@ public CardCreateParams build() { } /** - * The Cardholder object + * The Cardholder object * with which the card will be associated. */ public Builder setCardholder(String cardholder) { @@ -385,7 +385,7 @@ public Builder setShipping(CardCreateParams.Shipping shipping) { /** * Rules that control spending for this card. Refer to our documentation for more + * href="https://docs.stripe.com/issuing/controls/spending-controls">documentation for more * details. */ public Builder setSpendingControls(CardCreateParams.SpendingControls spendingControls) { @@ -696,7 +696,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -811,7 +814,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1024,7 +1030,7 @@ public enum Type implements ApiRequestParams.EnumParam { public static class SpendingControls { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to allow. All other categories will be blocked. Cannot be set with {@code * blocked_categories}. */ @@ -1042,7 +1048,7 @@ public static class SpendingControls { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to decline. All other categories will be allowed. Cannot be set with {@code * allowed_categories}. */ @@ -1290,7 +1296,7 @@ public static class SpendingLimit { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * this limit applies to. Omitting this field will apply the limit to all categories. */ @SerializedName("categories") diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index 93be37b2f14..6c584cec1bf 100644 --- a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java @@ -32,7 +32,7 @@ public class CardUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -53,7 +53,7 @@ public class CardUpdateParams extends ApiRequestParams { /** * Rules that control spending for this card. Refer to our documentation for more + * href="https://docs.stripe.com/issuing/controls/spending-controls">documentation for more * details. */ @SerializedName("spending_controls") @@ -213,7 +213,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -224,7 +224,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -258,7 +258,7 @@ public Builder setShipping(CardUpdateParams.Shipping shipping) { /** * Rules that control spending for this card. Refer to our documentation for more + * href="https://docs.stripe.com/issuing/controls/spending-controls">documentation for more * details. */ public Builder setSpendingControls(CardUpdateParams.SpendingControls spendingControls) { @@ -582,7 +582,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -732,13 +735,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -960,7 +969,7 @@ public enum Type implements ApiRequestParams.EnumParam { public static class SpendingControls { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to allow. All other categories will be blocked. Cannot be set with {@code * blocked_categories}. */ @@ -978,7 +987,7 @@ public static class SpendingControls { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to decline. All other categories will be allowed. Cannot be set with {@code * allowed_categories}. */ @@ -1226,7 +1235,7 @@ public static class SpendingLimit { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * this limit applies to. Omitting this field will apply the limit to all categories. */ @SerializedName("categories") diff --git a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java index c3d7f2fd302..fc6c59a68e3 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java @@ -44,7 +44,7 @@ public class CardholderCreateParams extends ApiRequestParams { Individual individual; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -64,7 +64,7 @@ public class CardholderCreateParams extends ApiRequestParams { * The cardholder's phone number. This will be transformed to E.164 if it is not provided in that format * already. This is required for all cardholders who will be creating EU cards. See the 3D Secure + * href="https://docs.stripe.com/issuing/3d-secure#when-is-3d-secure-applied">3D Secure * documentation for more details. */ @SerializedName("phone_number") @@ -73,7 +73,7 @@ public class CardholderCreateParams extends ApiRequestParams { /** * The cardholder’s preferred locales (languages), ordered by preference. Locales can be {@code * de}, {@code en}, {@code es}, {@code fr}, or {@code it}. This changes the language of the 3D Secure flow and one-time password + * href="https://docs.stripe.com/issuing/3d-secure">3D Secure flow and one-time password * messages sent to the cardholder. */ @SerializedName("preferred_locales") @@ -81,7 +81,7 @@ public class CardholderCreateParams extends ApiRequestParams { /** * Rules that control spending across this cardholder's cards. Refer to our documentation for more + * href="https://docs.stripe.com/issuing/controls/spending-controls">documentation for more * details. */ @SerializedName("spending_controls") @@ -96,7 +96,7 @@ public class CardholderCreateParams extends ApiRequestParams { /** * One of {@code individual} or {@code company}. See Choose a cardholder type for + * href="https://docs.stripe.com/issuing/other/choose-cardholder">Choose a cardholder type for * more details. */ @SerializedName("type") @@ -296,7 +296,7 @@ public Builder setName(String name) { * The cardholder's phone number. This will be transformed to E.164 if it is not provided in that format * already. This is required for all cardholders who will be creating EU cards. See the 3D Secure + * href="https://docs.stripe.com/issuing/3d-secure#when-is-3d-secure-applied">3D Secure * documentation for more details. */ public Builder setPhoneNumber(String phoneNumber) { @@ -332,7 +332,7 @@ public Builder addAllPreferredLocale(Listdocumentation for more + * href="https://docs.stripe.com/issuing/controls/spending-controls">documentation for more * details. */ public Builder setSpendingControls(CardholderCreateParams.SpendingControls spendingControls) { @@ -351,7 +351,7 @@ public Builder setStatus(CardholderCreateParams.Status status) { /** * One of {@code individual} or {@code company}. See Choose a cardholder type + * href="https://docs.stripe.com/issuing/other/choose-cardholder">Choose a cardholder type * for more details. */ public Builder setType(CardholderCreateParams.Type type) { @@ -463,7 +463,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -578,7 +581,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1189,7 +1195,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("back") @@ -1206,7 +1212,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("front") @@ -1236,7 +1242,7 @@ public CardholderCreateParams.Individual.Verification.Document build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ public Builder setBack(String back) { @@ -1273,7 +1279,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ public Builder setFront(String front) { @@ -1290,7 +1296,7 @@ public Builder setFront(String front) { public static class SpendingControls { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to allow. All other categories will be blocked. Cannot be set with {@code * blocked_categories}. */ @@ -1308,7 +1314,7 @@ public static class SpendingControls { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to decline. All other categories will be allowed. Cannot be set with {@code * allowed_categories}. */ @@ -1581,7 +1587,7 @@ public static class SpendingLimit { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * this limit applies to. Omitting this field will apply the limit to all categories. */ @SerializedName("categories") diff --git a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java index a4717d2427f..ce9031c30c7 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java @@ -44,7 +44,7 @@ public class CardholderUpdateParams extends ApiRequestParams { Individual individual; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -54,7 +54,7 @@ public class CardholderUpdateParams extends ApiRequestParams { /** * The cardholder's phone number. This is required for all cardholders who will be creating EU - * cards. See the 3D Secure documentation + * cards. See the 3D Secure documentation * for more details. */ @SerializedName("phone_number") @@ -63,7 +63,7 @@ public class CardholderUpdateParams extends ApiRequestParams { /** * The cardholder’s preferred locales (languages), ordered by preference. Locales can be {@code * de}, {@code en}, {@code es}, {@code fr}, or {@code it}. This changes the language of the 3D Secure flow and one-time password + * href="https://docs.stripe.com/issuing/3d-secure">3D Secure flow and one-time password * messages sent to the cardholder. */ @SerializedName("preferred_locales") @@ -71,7 +71,7 @@ public class CardholderUpdateParams extends ApiRequestParams { /** * Rules that control spending across this cardholder's cards. Refer to our documentation for more + * href="https://docs.stripe.com/issuing/controls/spending-controls">documentation for more * details. */ @SerializedName("spending_controls") @@ -259,7 +259,7 @@ public Builder putAllMetadata(Map map) { /** * The cardholder's phone number. This is required for all cardholders who will be creating EU - * cards. See the 3D Secure + * cards. See the 3D Secure * documentation for more details. */ public Builder setPhoneNumber(String phoneNumber) { @@ -269,7 +269,7 @@ public Builder setPhoneNumber(String phoneNumber) { /** * The cardholder's phone number. This is required for all cardholders who will be creating EU - * cards. See the 3D Secure + * cards. See the 3D Secure * documentation for more details. */ public Builder setPhoneNumber(EmptyParam phoneNumber) { @@ -305,7 +305,7 @@ public Builder addAllPreferredLocale(Listdocumentation for more + * href="https://docs.stripe.com/issuing/controls/spending-controls">documentation for more * details. */ public Builder setSpendingControls(CardholderUpdateParams.SpendingControls spendingControls) { @@ -423,7 +423,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -573,13 +576,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; @@ -1225,7 +1234,7 @@ public Builder putAllExtraParam(Map map) { @EqualsAndHashCode(callSuper = false) public static class Document { /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("back") @@ -1242,7 +1251,7 @@ public static class Document { Map extraParams; /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ @SerializedName("front") @@ -1272,7 +1281,7 @@ public CardholderUpdateParams.Individual.Verification.Document build() { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ public Builder setBack(String back) { @@ -1281,7 +1290,7 @@ public Builder setBack(String back) { } /** - * The back of an ID returned by a file + * The back of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ public Builder setBack(EmptyParam back) { @@ -1318,7 +1327,7 @@ public Builder putAllExtraParam(Map map) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ public Builder setFront(String front) { @@ -1327,7 +1336,7 @@ public Builder setFront(String front) { } /** - * The front of an ID returned by a file + * The front of an ID returned by a file * upload with a {@code purpose} value of {@code identity_document}. */ public Builder setFront(EmptyParam front) { @@ -1344,7 +1353,7 @@ public Builder setFront(EmptyParam front) { public static class SpendingControls { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to allow. All other categories will be blocked. Cannot be set with {@code * blocked_categories}. */ @@ -1362,7 +1371,7 @@ public static class SpendingControls { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * of authorizations to decline. All other categories will be allowed. Cannot be set with {@code * allowed_categories}. */ @@ -1644,7 +1653,7 @@ public static class SpendingLimit { /** * Array of strings containing categories + * href="https://docs.stripe.com/api#issuing_authorization_object-merchant_data-category">categories * this limit applies to. Omitting this field will apply the limit to all categories. */ @SerializedName("categories") diff --git a/src/main/java/com/stripe/param/issuing/DisputeCreateParams.java b/src/main/java/com/stripe/param/issuing/DisputeCreateParams.java index aeaf893610a..cb24788db75 100644 --- a/src/main/java/com/stripe/param/issuing/DisputeCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/DisputeCreateParams.java @@ -16,7 +16,7 @@ public class DisputeCreateParams extends ApiRequestParams { /** * The dispute amount in the card's currency and in the smallest currency unit. If not set, + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. If not set, * defaults to the full transaction amount. */ @SerializedName("amount") @@ -40,7 +40,7 @@ public class DisputeCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -109,7 +109,7 @@ public DisputeCreateParams build() { /** * The dispute amount in the card's currency and in the smallest currency unit. If not + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. If not * set, defaults to the full transaction amount. */ public Builder setAmount(Long amount) { diff --git a/src/main/java/com/stripe/param/issuing/DisputeSubmitParams.java b/src/main/java/com/stripe/param/issuing/DisputeSubmitParams.java index 5b8477283fb..43ff46854e7 100644 --- a/src/main/java/com/stripe/param/issuing/DisputeSubmitParams.java +++ b/src/main/java/com/stripe/param/issuing/DisputeSubmitParams.java @@ -28,7 +28,7 @@ public class DisputeSubmitParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -140,7 +140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/issuing/DisputeUpdateParams.java b/src/main/java/com/stripe/param/issuing/DisputeUpdateParams.java index cf10bae0c5c..a4558e5088a 100644 --- a/src/main/java/com/stripe/param/issuing/DisputeUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/DisputeUpdateParams.java @@ -16,7 +16,7 @@ public class DisputeUpdateParams extends ApiRequestParams { /** * The dispute amount in the card's currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount") Long amount; @@ -39,7 +39,7 @@ public class DisputeUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -83,7 +83,7 @@ public DisputeUpdateParams build() { /** * The dispute amount in the card's currency and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setAmount(Long amount) { this.amount = amount; @@ -177,7 +177,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -188,7 +188,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/issuing/PersonalizationDesignCreateParams.java b/src/main/java/com/stripe/param/issuing/PersonalizationDesignCreateParams.java index d22389bf3f4..b01b33da6ed 100644 --- a/src/main/java/com/stripe/param/issuing/PersonalizationDesignCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/PersonalizationDesignCreateParams.java @@ -46,7 +46,7 @@ public class PersonalizationDesignCreateParams extends ApiRequestParams { String lookupKey; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/issuing/PersonalizationDesignUpdateParams.java b/src/main/java/com/stripe/param/issuing/PersonalizationDesignUpdateParams.java index 72bcf080269..f60f1743518 100644 --- a/src/main/java/com/stripe/param/issuing/PersonalizationDesignUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/PersonalizationDesignUpdateParams.java @@ -46,7 +46,7 @@ public class PersonalizationDesignUpdateParams extends ApiRequestParams { Object lookupKey; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/issuing/TransactionCreateForceCaptureParams.java b/src/main/java/com/stripe/param/issuing/TransactionCreateForceCaptureParams.java index 6cbe0105eec..89744cea041 100644 --- a/src/main/java/com/stripe/param/issuing/TransactionCreateForceCaptureParams.java +++ b/src/main/java/com/stripe/param/issuing/TransactionCreateForceCaptureParams.java @@ -17,7 +17,7 @@ public class TransactionCreateForceCaptureParams extends ApiRequestParams { /** * Required. The total amount to attempt to capture. This amount is in the * provided currency, or defaults to the cards currency, and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount") Long amount; @@ -109,7 +109,7 @@ public TransactionCreateForceCaptureParams build() { /** * Required. The total amount to attempt to capture. This amount is in the * provided currency, or defaults to the cards currency, and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setAmount(Long amount) { this.amount = amount; @@ -207,7 +207,7 @@ public Builder setPurchaseDetails( public static class MerchantData { /** * A categorization of the seller's type of business. See our merchant categories guide for + * href="https://docs.stripe.com/issuing/merchant-categories">merchant categories guide for * a list of possible values. */ @SerializedName("category") @@ -322,7 +322,7 @@ public TransactionCreateForceCaptureParams.MerchantData build() { /** * A categorization of the seller's type of business. See our merchant categories guide + * href="https://docs.stripe.com/issuing/merchant-categories">merchant categories guide * for a list of possible values. */ public Builder setCategory( diff --git a/src/main/java/com/stripe/param/issuing/TransactionCreateUnlinkedRefundParams.java b/src/main/java/com/stripe/param/issuing/TransactionCreateUnlinkedRefundParams.java index 661623918f6..3927c4f1dfc 100644 --- a/src/main/java/com/stripe/param/issuing/TransactionCreateUnlinkedRefundParams.java +++ b/src/main/java/com/stripe/param/issuing/TransactionCreateUnlinkedRefundParams.java @@ -17,7 +17,7 @@ public class TransactionCreateUnlinkedRefundParams extends ApiRequestParams { /** * Required. The total amount to attempt to refund. This amount is in the * provided currency, or defaults to the cards currency, and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount") Long amount; @@ -109,7 +109,7 @@ public TransactionCreateUnlinkedRefundParams build() { /** * Required. The total amount to attempt to refund. This amount is in the * provided currency, or defaults to the cards currency, and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setAmount(Long amount) { this.amount = amount; @@ -208,7 +208,7 @@ public Builder setPurchaseDetails( public static class MerchantData { /** * A categorization of the seller's type of business. See our merchant categories guide for + * href="https://docs.stripe.com/issuing/merchant-categories">merchant categories guide for * a list of possible values. */ @SerializedName("category") @@ -323,7 +323,7 @@ public TransactionCreateUnlinkedRefundParams.MerchantData build() { /** * A categorization of the seller's type of business. See our merchant categories guide + * href="https://docs.stripe.com/issuing/merchant-categories">merchant categories guide * for a list of possible values. */ public Builder setCategory( diff --git a/src/main/java/com/stripe/param/issuing/TransactionRefundParams.java b/src/main/java/com/stripe/param/issuing/TransactionRefundParams.java index 6b23d687ce1..496ca0ae69d 100644 --- a/src/main/java/com/stripe/param/issuing/TransactionRefundParams.java +++ b/src/main/java/com/stripe/param/issuing/TransactionRefundParams.java @@ -29,7 +29,7 @@ public class TransactionRefundParams extends ApiRequestParams { /** * The total amount to attempt to refund. This amount is in the provided currency, or defaults to * the cards currency, and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("refund_amount") Long refundAmount; @@ -112,7 +112,7 @@ public Builder putAllExtraParam(Map map) { /** * The total amount to attempt to refund. This amount is in the provided currency, or defaults * to the cards currency, and in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setRefundAmount(Long refundAmount) { this.refundAmount = refundAmount; diff --git a/src/main/java/com/stripe/param/issuing/TransactionUpdateParams.java b/src/main/java/com/stripe/param/issuing/TransactionUpdateParams.java index 499daf657e7..dfd00860058 100644 --- a/src/main/java/com/stripe/param/issuing/TransactionUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/TransactionUpdateParams.java @@ -28,7 +28,7 @@ public class TransactionUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -140,7 +140,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -151,7 +151,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/radar/ValueListCreateParams.java b/src/main/java/com/stripe/param/radar/ValueListCreateParams.java index 2d5324dcde4..9e056deef5d 100644 --- a/src/main/java/com/stripe/param/radar/ValueListCreateParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListCreateParams.java @@ -40,7 +40,7 @@ public class ValueListCreateParams extends ApiRequestParams { ItemType itemType; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/radar/ValueListUpdateParams.java b/src/main/java/com/stripe/param/radar/ValueListUpdateParams.java index 0a4488796e4..29b56a14e5a 100644 --- a/src/main/java/com/stripe/param/radar/ValueListUpdateParams.java +++ b/src/main/java/com/stripe/param/radar/ValueListUpdateParams.java @@ -32,7 +32,7 @@ public class ValueListUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/reporting/ReportRunCreateParams.java b/src/main/java/com/stripe/param/reporting/ReportRunCreateParams.java index ff66424a18b..86b36ad3099 100644 --- a/src/main/java/com/stripe/param/reporting/ReportRunCreateParams.java +++ b/src/main/java/com/stripe/param/reporting/ReportRunCreateParams.java @@ -29,7 +29,7 @@ public class ReportRunCreateParams extends ApiRequestParams { /** * Parameters specifying how the report should be run. Different Report Types have different * required and optional parameters, listed in the API Access to Reports + * href="https://docs.stripe.com/reporting/statements/api">API Access to Reports * documentation. */ @SerializedName("parameters") @@ -37,7 +37,7 @@ public class ReportRunCreateParams extends ApiRequestParams { /** * Required. The ID of the report type to run, + * href="https://docs.stripe.com/reporting/statements/api#report-types">report type to run, * such as {@code "balance.summary.1"}. */ @SerializedName("report_type") @@ -128,7 +128,7 @@ public Builder putAllExtraParam(Map map) { /** * Parameters specifying how the report should be run. Different Report Types have different * required and optional parameters, listed in the API Access to Reports + * href="https://docs.stripe.com/reporting/statements/api">API Access to Reports * documentation. */ public Builder setParameters(ReportRunCreateParams.Parameters parameters) { @@ -138,7 +138,7 @@ public Builder setParameters(ReportRunCreateParams.Parameters parameters) { /** * Required. The ID of the report type to run, + * href="https://docs.stripe.com/reporting/statements/api#report-types">report type to run, * such as {@code "balance.summary.1"}. */ public Builder setReportType(String reportType) { diff --git a/src/main/java/com/stripe/param/tax/AssociationFindParams.java b/src/main/java/com/stripe/param/tax/AssociationFindParams.java index 772b96a0c5d..4986e4489c2 100644 --- a/src/main/java/com/stripe/param/tax/AssociationFindParams.java +++ b/src/main/java/com/stripe/param/tax/AssociationFindParams.java @@ -28,7 +28,7 @@ public class AssociationFindParams extends ApiRequestParams { /** * Required. Valid PaymentIntent id + * href="https://docs.stripe.com/api/payment_intents/object">PaymentIntent id */ @SerializedName("payment_intent") String paymentIntent; @@ -110,7 +110,7 @@ public Builder putAllExtraParam(Map map) { /** * Required. Valid PaymentIntent id + * href="https://docs.stripe.com/api/payment_intents/object">PaymentIntent id */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index 81ca112fc49..10433a7db45 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -1125,7 +1125,7 @@ public enum TaxabilityOverride implements ApiRequestParams.EnumParam { public static class LineItem { /** * Required. A positive integer representing the line item's total price in the - * smallest currency unit. If + * smallest currency unit. If * {@code tax_behavior=inclusive}, then this amount includes taxes. Otherwise, taxes are * calculated on top of this amount. */ @@ -1142,7 +1142,7 @@ public static class LineItem { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -1166,7 +1166,7 @@ public static class LineItem { /** * A custom identifier for this line item, which must be unique across the line items in the * calculation. The reference helps identify each line item in exported tax reports. + * href="https://docs.stripe.com/tax/reports">tax reports. */ @SerializedName("reference") String reference; @@ -1176,7 +1176,7 @@ public static class LineItem { TaxBehavior taxBehavior; /** - * A tax code ID to use for this line + * A tax code ID to use for this line * item. If not provided, we will use the tax code from the provided {@code product} param. If * neither {@code tax_code} nor {@code product} is provided, we will use the default tax code * from your Tax Settings. @@ -1239,7 +1239,7 @@ public CalculationCreateParams.LineItem build() { /** * Required. A positive integer representing the line item's total price in - * the smallest currency unit. + * the smallest currency unit. * If {@code tax_behavior=inclusive}, then this amount includes taxes. Otherwise, taxes are * calculated on top of this amount. */ @@ -1322,7 +1322,7 @@ public Builder setQuantity(Long quantity) { /** * A custom identifier for this line item, which must be unique across the line items in the * calculation. The reference helps identify each line item in exported tax reports. + * href="https://docs.stripe.com/tax/reports">tax reports. */ public Builder setReference(String reference) { this.reference = reference; @@ -1336,7 +1336,7 @@ public Builder setTaxBehavior(CalculationCreateParams.LineItem.TaxBehavior taxBe } /** - * A tax code ID to use for this line + * A tax code ID to use for this line * item. If not provided, we will use the tax code from the provided {@code product} param. If * neither {@code tax_code} nor {@code product} is provided, we will use the default tax code * from your Tax Settings. @@ -1632,7 +1632,7 @@ public Builder setState(EmptyParam state) { @EqualsAndHashCode(callSuper = false) public static class ShippingCost { /** - * A positive integer in the smallest + * A positive integer in the smallest * currency unit representing the shipping charge. If {@code tax_behavior=inclusive}, then * this amount includes taxes. Otherwise, taxes are calculated on top of this amount. */ @@ -1649,7 +1649,7 @@ public static class ShippingCost { Map extraParams; /** - * If provided, the shipping + * If provided, the shipping * rate's {@code amount}, {@code tax_code} and {@code tax_behavior} are used. If you provide * a shipping rate, then you cannot pass the {@code amount}, {@code tax_code}, or {@code * tax_behavior} parameters. @@ -1665,7 +1665,7 @@ public static class ShippingCost { TaxBehavior taxBehavior; /** - * The tax code used to calculate tax + * The tax code used to calculate tax * on shipping. If not provided, the default shipping tax code from your Tax Settings is used. */ @@ -1708,7 +1708,7 @@ public CalculationCreateParams.ShippingCost build() { /** * A positive integer in the smallest currency unit + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit * representing the shipping charge. If {@code tax_behavior=inclusive}, then this amount * includes taxes. Otherwise, taxes are calculated on top of this amount. */ @@ -1744,7 +1744,7 @@ public Builder putAllExtraParam(Map map) { } /** - * If provided, the shipping + * If provided, the shipping * rate's {@code amount}, {@code tax_code} and {@code tax_behavior} are used. If you * provide a shipping rate, then you cannot pass the {@code amount}, {@code tax_code}, or * {@code tax_behavior} parameters. @@ -1764,7 +1764,7 @@ public Builder setTaxBehavior(CalculationCreateParams.ShippingCost.TaxBehavior t } /** - * The tax code used to calculate tax + * The tax code used to calculate tax * on shipping. If not provided, the default shipping tax code from your Tax Settings is used. */ diff --git a/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java b/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java index b107e321fc2..4085c17c6f1 100644 --- a/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java +++ b/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java @@ -151,7 +151,7 @@ public static class Defaults { @SerializedName("tax_behavior") TaxBehavior taxBehavior; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") Object taxCode; @@ -215,13 +215,13 @@ public Builder setTaxBehavior(SettingsUpdateParams.Defaults.TaxBehavior taxBehav return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } - /** A tax code ID. */ + /** A tax code ID. */ public Builder setTaxCode(EmptyParam taxCode) { this.taxCode = taxCode; return this; diff --git a/src/main/java/com/stripe/param/tax/TransactionCreateFromCalculationParams.java b/src/main/java/com/stripe/param/tax/TransactionCreateFromCalculationParams.java index 771bb7fff18..d9bd62ac24a 100644 --- a/src/main/java/com/stripe/param/tax/TransactionCreateFromCalculationParams.java +++ b/src/main/java/com/stripe/param/tax/TransactionCreateFromCalculationParams.java @@ -34,7 +34,7 @@ public class TransactionCreateFromCalculationParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/tax/TransactionCreateReversalParams.java b/src/main/java/com/stripe/param/tax/TransactionCreateReversalParams.java index 7106a6f9816..7f345739fb4 100644 --- a/src/main/java/com/stripe/param/tax/TransactionCreateReversalParams.java +++ b/src/main/java/com/stripe/param/tax/TransactionCreateReversalParams.java @@ -28,7 +28,7 @@ public class TransactionCreateReversalParams extends ApiRequestParams { /** * A flat amount to reverse across the entire transaction, in the smallest currency unit in negative. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in negative. * This value represents the total amount to refund from the transaction, including taxes. */ @SerializedName("flat_amount") @@ -39,7 +39,7 @@ public class TransactionCreateReversalParams extends ApiRequestParams { List lineItems; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -62,7 +62,7 @@ public class TransactionCreateReversalParams extends ApiRequestParams { * Required. A custom identifier for this reversal, such as {@code * myOrder_123-refund_1}, which must be unique across all transactions. The reference helps * identify this reversal transaction in exported tax reports. + * href="https://docs.stripe.com/tax/reports">tax reports. */ @SerializedName("reference") String reference; @@ -183,7 +183,7 @@ public Builder putAllExtraParam(Map map) { /** * A flat amount to reverse across the entire transaction, in the smallest currency unit in + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in * negative. This value represents the total amount to refund from the transaction, including * taxes. */ @@ -263,7 +263,7 @@ public Builder setOriginalTransaction(String originalTransaction) { * Required. A custom identifier for this reversal, such as {@code * myOrder_123-refund_1}, which must be unique across all transactions. The reference helps * identify this reversal transaction in exported tax reports. + * href="https://docs.stripe.com/tax/reports">tax reports. */ public Builder setReference(String reference) { this.reference = reference; @@ -282,7 +282,7 @@ public Builder setShippingCost(TransactionCreateReversalParams.ShippingCost ship public static class LineItem { /** * Required. The amount to reverse, in the smallest currency unit in + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in * negative. */ @SerializedName("amount") @@ -290,7 +290,7 @@ public static class LineItem { /** * Required. The amount of tax to reverse, in the smallest currency unit in + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in * negative. */ @SerializedName("amount_tax") @@ -306,7 +306,7 @@ public static class LineItem { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. */ @@ -321,7 +321,7 @@ public static class LineItem { String originalLineItem; /** - * The quantity reversed. Appears in tax + * The quantity reversed. Appears in tax * exports, but does not affect the amount of tax reversed. */ @SerializedName("quantity") @@ -384,7 +384,7 @@ public TransactionCreateReversalParams.LineItem build() { /** * Required. The amount to reverse, in the smallest currency unit in + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in * negative. */ public Builder setAmount(Long amount) { @@ -394,7 +394,7 @@ public Builder setAmount(Long amount) { /** * Required. The amount of tax to reverse, in the smallest currency unit in + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in * negative. */ public Builder setAmountTax(Long amountTax) { @@ -465,7 +465,7 @@ public Builder setOriginalLineItem(String originalLineItem) { } /** - * The quantity reversed. Appears in tax + * The quantity reversed. Appears in tax * exports, but does not affect the amount of tax reversed. */ public Builder setQuantity(Long quantity) { @@ -489,7 +489,7 @@ public Builder setReference(String reference) { public static class ShippingCost { /** * Required. The amount to reverse, in the smallest currency unit in + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in * negative. */ @SerializedName("amount") @@ -497,7 +497,7 @@ public static class ShippingCost { /** * Required. The amount of tax to reverse, in the smallest currency unit in + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in * negative. */ @SerializedName("amount_tax") @@ -537,7 +537,7 @@ public TransactionCreateReversalParams.ShippingCost build() { /** * Required. The amount to reverse, in the smallest currency unit in + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in * negative. */ public Builder setAmount(Long amount) { @@ -547,7 +547,7 @@ public Builder setAmount(Long amount) { /** * Required. The amount of tax to reverse, in the smallest currency unit in + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit in * negative. */ public Builder setAmountTax(Long amountTax) { diff --git a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java index 307c21a8586..e44555a6f0c 100644 --- a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java @@ -62,7 +62,7 @@ public class LocationCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -271,7 +271,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -282,7 +282,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -334,7 +334,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") String state; @@ -445,7 +448,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java b/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java index 9ec35e22bca..dd39f624d90 100644 --- a/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java @@ -60,7 +60,7 @@ public class LocationUpdateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -291,7 +291,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -302,7 +302,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -360,7 +360,10 @@ public static class Address { @SerializedName("postal_code") Object postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ @SerializedName("state") Object state; @@ -504,13 +507,19 @@ public Builder setPostalCode(EmptyParam postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO + * 3166-2). + */ public Builder setState(EmptyParam state) { this.state = state; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java b/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java index e7bcf72ca73..2360aef69a2 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java @@ -34,7 +34,7 @@ public class ReaderCollectInputsParams extends ApiRequestParams { List inputs; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/terminal/ReaderCreateParams.java b/src/main/java/com/stripe/param/terminal/ReaderCreateParams.java index 5135c31eac2..c29901a86a8 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCreateParams.java @@ -39,7 +39,7 @@ public class ReaderCreateParams extends ApiRequestParams { String location; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -192,7 +192,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -203,7 +203,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java b/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java index dbfd525ecb1..06334f7ac1a 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java @@ -37,7 +37,7 @@ public class ReaderRefundPaymentParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java b/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java index aa22daaa933..0ab5354728d 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java @@ -158,7 +158,7 @@ public static class Cart { List lineItems; /** - * The amount of tax in the smallest + * The amount of tax in the smallest * currency unit. */ @SerializedName("tax") @@ -166,7 +166,7 @@ public static class Cart { /** * Required. Total balance of cart due in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("total") Long total; @@ -268,7 +268,7 @@ public Builder addAllLineItem(List e } /** - * The amount of tax in the smallest + * The amount of tax in the smallest * currency unit. */ public Builder setTax(Long tax) { @@ -278,7 +278,7 @@ public Builder setTax(Long tax) { /** * Required. Total balance of cart due in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setTotal(Long total) { this.total = total; @@ -291,7 +291,7 @@ public Builder setTotal(Long total) { public static class LineItem { /** * Required. The price of the item in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ @SerializedName("amount") Long amount; @@ -342,7 +342,7 @@ public ReaderSetReaderDisplayParams.Cart.LineItem build() { /** * Required. The price of the item in the smallest currency unit. + * href="https://docs.stripe.com/currencies#zero-decimal">smallest currency unit. */ public Builder setAmount(Long amount) { this.amount = amount; diff --git a/src/main/java/com/stripe/param/terminal/ReaderUpdateParams.java b/src/main/java/com/stripe/param/terminal/ReaderUpdateParams.java index 31151e0f8dd..0d1d1ecd7e6 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderUpdateParams.java @@ -32,7 +32,7 @@ public class ReaderUpdateParams extends ApiRequestParams { Object label; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -159,7 +159,7 @@ public Builder putAllMetadata(Map map) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -170,7 +170,7 @@ public Builder setMetadata(EmptyParam metadata) { } /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/treasury/CreditReversalCreateParams.java b/src/main/java/com/stripe/param/treasury/CreditReversalCreateParams.java index 9b6464fbc0c..a66e02d1f6f 100644 --- a/src/main/java/com/stripe/param/treasury/CreditReversalCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/CreditReversalCreateParams.java @@ -27,7 +27,7 @@ public class CreditReversalCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/treasury/DebitReversalCreateParams.java b/src/main/java/com/stripe/param/treasury/DebitReversalCreateParams.java index 14d891c2186..7505d27ee8a 100644 --- a/src/main/java/com/stripe/param/treasury/DebitReversalCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/DebitReversalCreateParams.java @@ -27,7 +27,7 @@ public class DebitReversalCreateParams extends ApiRequestParams { Map extraParams; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/treasury/FinancialAccountCreateParams.java b/src/main/java/com/stripe/param/treasury/FinancialAccountCreateParams.java index b6ef0b17f6e..42c86e59377 100644 --- a/src/main/java/com/stripe/param/treasury/FinancialAccountCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/FinancialAccountCreateParams.java @@ -35,7 +35,7 @@ public class FinancialAccountCreateParams extends ApiRequestParams { Features features; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/treasury/FinancialAccountUpdateParams.java b/src/main/java/com/stripe/param/treasury/FinancialAccountUpdateParams.java index aca814b3987..2fc447d3185 100644 --- a/src/main/java/com/stripe/param/treasury/FinancialAccountUpdateParams.java +++ b/src/main/java/com/stripe/param/treasury/FinancialAccountUpdateParams.java @@ -43,7 +43,7 @@ public class FinancialAccountUpdateParams extends ApiRequestParams { ForwardingSettings forwardingSettings; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. diff --git a/src/main/java/com/stripe/param/treasury/InboundTransferCreateParams.java b/src/main/java/com/stripe/param/treasury/InboundTransferCreateParams.java index 9e15d5e2f07..65841aca18d 100644 --- a/src/main/java/com/stripe/param/treasury/InboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/InboundTransferCreateParams.java @@ -47,7 +47,7 @@ public class InboundTransferCreateParams extends ApiRequestParams { String financialAccount; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -59,7 +59,10 @@ public class InboundTransferCreateParams extends ApiRequestParams { @SerializedName("origin_payment_method") String originPaymentMethod; - /** The complete description that appears on your customers' statements. Maximum 10 characters. */ + /** + * The complete description that appears on your customers' statements. Maximum 10 characters. Can + * only include -#.$&*, spaces, and alphanumeric characters. + */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -237,6 +240,7 @@ public Builder setOriginPaymentMethod(String originPaymentMethod) { /** * The complete description that appears on your customers' statements. Maximum 10 characters. + * Can only include -#.$&*, spaces, and alphanumeric characters. */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; diff --git a/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java b/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java index 7c73e4431d7..4217d8c020c 100644 --- a/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java @@ -77,7 +77,7 @@ public class OutboundPaymentCreateParams extends ApiRequestParams { String financialAccount; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -89,7 +89,8 @@ public class OutboundPaymentCreateParams extends ApiRequestParams { * The description that appears on the receiving end for this OutboundPayment (for example, bank * statement for external bank transfer). Maximum 10 characters for {@code ach} payments, 140 * characters for {@code us_domestic_wire} payments, or 500 characters for {@code stripe} network - * transfers. The default value is "payment". + * transfers. Can only include -#.$&*, spaces, and alphanumeric characters. The default value + * is "payment". */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -324,7 +325,8 @@ public Builder putAllMetadata(Map map) { * The description that appears on the receiving end for this OutboundPayment (for example, bank * statement for external bank transfer). Maximum 10 characters for {@code ach} payments, 140 * characters for {@code us_domestic_wire} payments, or 500 characters for {@code stripe} - * network transfers. The default value is "payment". + * network transfers. Can only include -#.$&*, spaces, and alphanumeric characters. The + * default value is "payment". */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; @@ -359,7 +361,7 @@ public static class DestinationPaymentMethodData { String financialAccount; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -694,7 +696,10 @@ public static class Address { @SerializedName("postal_code") String postalCode; - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ @SerializedName("state") String state; @@ -811,7 +816,10 @@ public Builder setPostalCode(String postalCode) { return this; } - /** State, county, province, or region. */ + /** + * State, county, province, or region (ISO 3166-2). + */ public Builder setState(String state) { this.state = state; return this; @@ -1100,7 +1108,7 @@ public static class UsBankAccount { /** * Specifies the network rails to be used. If not set, will default to the PaymentMethod's * preferred network. See the docs to learn more + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more * about money movement timelines for each network type. */ @SerializedName("network") @@ -1159,7 +1167,7 @@ public Builder putAllExtraParam(Map map) { /** * Specifies the network rails to be used. If not set, will default to the PaymentMethod's * preferred network. See the docs to learn more + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more * about money movement timelines for each network type. */ public Builder setNetwork( diff --git a/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java b/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java index 6fcac86dd1d..8b3761d8fcb 100644 --- a/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/OutboundTransferCreateParams.java @@ -63,7 +63,7 @@ public class OutboundTransferCreateParams extends ApiRequestParams { String financialAccount; /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -74,7 +74,8 @@ public class OutboundTransferCreateParams extends ApiRequestParams { /** * Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 * characters for {@code ach} transfers or 140 characters for {@code us_domestic_wire} transfers. - * The default value is "transfer". + * The default value is "transfer". Can only include -#.$&*, spaces, and + * alphanumeric characters. */ @SerializedName("statement_descriptor") String statementDescriptor; @@ -280,7 +281,8 @@ public Builder putAllMetadata(Map map) { /** * Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 * characters for {@code ach} transfers or 140 characters for {@code us_domestic_wire} - * transfers. The default value is "transfer". + * transfers. The default value is "transfer". Can only include -#.$&*, spaces, + * and alphanumeric characters. */ public Builder setStatementDescriptor(String statementDescriptor) { this.statementDescriptor = statementDescriptor; @@ -486,7 +488,7 @@ public static class UsBankAccount { /** * Specifies the network rails to be used. If not set, will default to the PaymentMethod's * preferred network. See the docs to learn more + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more * about money movement timelines for each network type. */ @SerializedName("network") @@ -545,7 +547,7 @@ public Builder putAllExtraParam(Map map) { /** * Specifies the network rails to be used. If not set, will default to the PaymentMethod's * preferred network. See the docs to learn more + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more * about money movement timelines for each network type. */ public Builder setNetwork( diff --git a/src/main/java/com/stripe/param/treasury/ReceivedCreditCreateParams.java b/src/main/java/com/stripe/param/treasury/ReceivedCreditCreateParams.java index be408ba070d..037a3c741ff 100644 --- a/src/main/java/com/stripe/param/treasury/ReceivedCreditCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/ReceivedCreditCreateParams.java @@ -53,7 +53,7 @@ public class ReceivedCreditCreateParams extends ApiRequestParams { /** * Required. Specifies the network rails to be used. If not set, will default to * the PaymentMethod's preferred network. See the docs to learn more about + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more about * money movement timelines for each network type. */ @SerializedName("network") @@ -202,7 +202,7 @@ public Builder setInitiatingPaymentMethodDetails( /** * Required. Specifies the network rails to be used. If not set, will default * to the PaymentMethod's preferred network. See the docs to learn more about + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more about * money movement timelines for each network type. */ public Builder setNetwork(ReceivedCreditCreateParams.Network network) { diff --git a/src/main/java/com/stripe/param/treasury/ReceivedDebitCreateParams.java b/src/main/java/com/stripe/param/treasury/ReceivedDebitCreateParams.java index 1b84ac85969..315995f55cb 100644 --- a/src/main/java/com/stripe/param/treasury/ReceivedDebitCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/ReceivedDebitCreateParams.java @@ -53,7 +53,7 @@ public class ReceivedDebitCreateParams extends ApiRequestParams { /** * Required. Specifies the network rails to be used. If not set, will default to * the PaymentMethod's preferred network. See the docs to learn more about + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more about * money movement timelines for each network type. */ @SerializedName("network") @@ -202,7 +202,7 @@ public Builder setInitiatingPaymentMethodDetails( /** * Required. Specifies the network rails to be used. If not set, will default * to the PaymentMethod's preferred network. See the docs to learn more about + * href="https://docs.stripe.com/treasury/money-movement/timelines">docs to learn more about * money movement timelines for each network type. */ public Builder setNetwork(ReceivedDebitCreateParams.Network network) { diff --git a/src/main/java/com/stripe/param/v2/core/AccountCloseParams.java b/src/main/java/com/stripe/param/v2/core/AccountCloseParams.java new file mode 100644 index 00000000000..8b82d55e2e5 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountCloseParams.java @@ -0,0 +1,124 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AccountCloseParams extends ApiRequestParams { + /** + * Configurations on the Account to be closed. All configurations on the Account must be passed in + * for this request to succeed. + */ + @SerializedName("applied_configurations") + List appliedConfigurations; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private AccountCloseParams( + List appliedConfigurations, + Map extraParams) { + this.appliedConfigurations = appliedConfigurations; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List appliedConfigurations; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCloseParams build() { + return new AccountCloseParams(this.appliedConfigurations, this.extraParams); + } + + /** + * Add an element to `appliedConfigurations` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link AccountCloseParams#appliedConfigurations} for the field documentation. + */ + public Builder addAppliedConfiguration(AccountCloseParams.AppliedConfiguration element) { + if (this.appliedConfigurations == null) { + this.appliedConfigurations = new ArrayList<>(); + } + this.appliedConfigurations.add(element); + return this; + } + + /** + * Add all elements to `appliedConfigurations` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link AccountCloseParams#appliedConfigurations} for the field documentation. + */ + public Builder addAllAppliedConfiguration( + List elements) { + if (this.appliedConfigurations == null) { + this.appliedConfigurations = new ArrayList<>(); + } + this.appliedConfigurations.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountCloseParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountCloseParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AppliedConfiguration implements ApiRequestParams.EnumParam { + @SerializedName("customer") + CUSTOMER("customer"), + + @SerializedName("merchant") + MERCHANT("merchant"), + + @SerializedName("recipient") + RECIPIENT("recipient"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AppliedConfiguration(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java new file mode 100644 index 00000000000..3ad20c561f6 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -0,0 +1,16643 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AccountCreateParams extends ApiRequestParams { + /** The account token generated by the account token api. */ + @SerializedName("account_token") + String accountToken; + + /** + * An Account Configuration which allows the Account to take on a key persona across Stripe + * products. + */ + @SerializedName("configuration") + Configuration configuration; + + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + @SerializedName("contact_email") + String contactEmail; + + /** + * A value indicating the Stripe dashboard this Account has access to. This will depend on which + * configurations are enabled for this account. + */ + @SerializedName("dashboard") + Dashboard dashboard; + + /** Default values to be used on Account Configurations. */ + @SerializedName("defaults") + Defaults defaults; + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + @SerializedName("display_name") + String displayName; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Information about the company, individual, and business represented by the Account. */ + @SerializedName("identity") + Identity identity; + + /** Additional fields to include in the response. */ + @SerializedName("include") + List include; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + private AccountCreateParams( + String accountToken, + Configuration configuration, + String contactEmail, + Dashboard dashboard, + Defaults defaults, + String displayName, + Map extraParams, + Identity identity, + List include, + Map metadata) { + this.accountToken = accountToken; + this.configuration = configuration; + this.contactEmail = contactEmail; + this.dashboard = dashboard; + this.defaults = defaults; + this.displayName = displayName; + this.extraParams = extraParams; + this.identity = identity; + this.include = include; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountToken; + + private Configuration configuration; + + private String contactEmail; + + private Dashboard dashboard; + + private Defaults defaults; + + private String displayName; + + private Map extraParams; + + private Identity identity; + + private List include; + + private Map metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams build() { + return new AccountCreateParams( + this.accountToken, + this.configuration, + this.contactEmail, + this.dashboard, + this.defaults, + this.displayName, + this.extraParams, + this.identity, + this.include, + this.metadata); + } + + /** The account token generated by the account token api. */ + public Builder setAccountToken(String accountToken) { + this.accountToken = accountToken; + return this; + } + + /** + * An Account Configuration which allows the Account to take on a key persona across Stripe + * products. + */ + public Builder setConfiguration(AccountCreateParams.Configuration configuration) { + this.configuration = configuration; + return this; + } + + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + public Builder setContactEmail(String contactEmail) { + this.contactEmail = contactEmail; + return this; + } + + /** + * A value indicating the Stripe dashboard this Account has access to. This will depend on which + * configurations are enabled for this account. + */ + public Builder setDashboard(AccountCreateParams.Dashboard dashboard) { + this.dashboard = dashboard; + return this; + } + + /** Default values to be used on Account Configurations. */ + public Builder setDefaults(AccountCreateParams.Defaults defaults) { + this.defaults = defaults; + return this; + } + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Information about the company, individual, and business represented by the Account. */ + public Builder setIdentity(AccountCreateParams.Identity identity) { + this.identity = identity; + return this; + } + + /** + * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams#include} for the field documentation. + */ + public Builder addInclude(AccountCreateParams.Include element) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(element); + return this; + } + + /** + * Add all elements to `include` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams#include} for the field documentation. + */ + public Builder addAllInclude(List elements) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountCreateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountCreateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Configuration { + /** The Customer Configuration allows the Account to be used in inbound payment flows. */ + @SerializedName("customer") + Customer customer; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Enables the Account to act as a connected account and collect payments facilitated by a + * Connect platform. You must onboard your platform to Connect before you can add this + * configuration to your connected accounts. Utilize this configuration when the Account will be + * the Merchant of Record, like with Direct charges or Destination Charges with on_behalf_of + * set. + */ + @SerializedName("merchant") + Merchant merchant; + + /** + * The Recipient Configuration allows the Account to receive funds. Utilize this configuration + * if the Account will not be the Merchant of Record, like with Separate Charges & + * Transfers, or Destination Charges without on_behalf_of set. + */ + @SerializedName("recipient") + Recipient recipient; + + private Configuration( + Customer customer, + Map extraParams, + Merchant merchant, + Recipient recipient) { + this.customer = customer; + this.extraParams = extraParams; + this.merchant = merchant; + this.recipient = recipient; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Customer customer; + + private Map extraParams; + + private Merchant merchant; + + private Recipient recipient; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration build() { + return new AccountCreateParams.Configuration( + this.customer, this.extraParams, this.merchant, this.recipient); + } + + /** The Customer Configuration allows the Account to be used in inbound payment flows. */ + public Builder setCustomer(AccountCreateParams.Configuration.Customer customer) { + this.customer = customer; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountCreateParams.Configuration#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountCreateParams.Configuration#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Enables the Account to act as a connected account and collect payments facilitated by a + * Connect platform. You must onboard your platform to Connect before you can add this + * configuration to your connected accounts. Utilize this configuration when the Account will + * be the Merchant of Record, like with Direct charges or Destination Charges with + * on_behalf_of set. + */ + public Builder setMerchant(AccountCreateParams.Configuration.Merchant merchant) { + this.merchant = merchant; + return this; + } + + /** + * The Recipient Configuration allows the Account to receive funds. Utilize this configuration + * if the Account will not be the Merchant of Record, like with Separate Charges & + * Transfers, or Destination Charges without on_behalf_of set. + */ + public Builder setRecipient(AccountCreateParams.Configuration.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Customer { + /** + * Automatic indirect tax settings to be used when automatic tax calculation is enabled on the + * customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if + * automatic tax calculation is possible given the current customer location information. + */ + @SerializedName("automatic_indirect_tax") + AutomaticIndirectTax automaticIndirectTax; + + /** + * Billing settings - default settings used for this customer in Billing flows such as + * Invoices and Subscriptions. + */ + @SerializedName("billing") + Billing billing; + + /** Capabilities that have been requested on the Customer Configuration. */ + @SerializedName("capabilities") + Capabilities capabilities; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + @SerializedName("shipping") + Shipping shipping; + + /** + * ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and + * when the Customer Configuration is first set on an Account. + */ + @SerializedName("test_clock") + String testClock; + + private Customer( + AutomaticIndirectTax automaticIndirectTax, + Billing billing, + Capabilities capabilities, + Map extraParams, + Shipping shipping, + String testClock) { + this.automaticIndirectTax = automaticIndirectTax; + this.billing = billing; + this.capabilities = capabilities; + this.extraParams = extraParams; + this.shipping = shipping; + this.testClock = testClock; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AutomaticIndirectTax automaticIndirectTax; + + private Billing billing; + + private Capabilities capabilities; + + private Map extraParams; + + private Shipping shipping; + + private String testClock; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer build() { + return new AccountCreateParams.Configuration.Customer( + this.automaticIndirectTax, + this.billing, + this.capabilities, + this.extraParams, + this.shipping, + this.testClock); + } + + /** + * Automatic indirect tax settings to be used when automatic tax calculation is enabled on + * the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if + * automatic tax calculation is possible given the current customer location information. + */ + public Builder setAutomaticIndirectTax( + AccountCreateParams.Configuration.Customer.AutomaticIndirectTax automaticIndirectTax) { + this.automaticIndirectTax = automaticIndirectTax; + return this; + } + + /** + * Billing settings - default settings used for this customer in Billing flows such as + * Invoices and Subscriptions. + */ + public Builder setBilling(AccountCreateParams.Configuration.Customer.Billing billing) { + this.billing = billing; + return this; + } + + /** Capabilities that have been requested on the Customer Configuration. */ + public Builder setCapabilities( + AccountCreateParams.Configuration.Customer.Capabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Customer#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Customer#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + public Builder setShipping(AccountCreateParams.Configuration.Customer.Shipping shipping) { + this.shipping = shipping; + return this; + } + + /** + * ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and + * when the Customer Configuration is first set on an Account. + */ + public Builder setTestClock(String testClock) { + this.testClock = testClock; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AutomaticIndirectTax { + /** + * Describes the customer's tax exemption status, which is {@code none}, {@code exempt}, or + * {@code reverse}. When set to reverse, invoice and receipt PDFs include the following + * text: “Reverse charge”. + */ + @SerializedName("exempt") + Exempt exempt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ + @SerializedName("ip_address") + String ipAddress; + + private AutomaticIndirectTax( + Exempt exempt, Map extraParams, String ipAddress) { + this.exempt = exempt; + this.extraParams = extraParams; + this.ipAddress = ipAddress; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Exempt exempt; + + private Map extraParams; + + private String ipAddress; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer.AutomaticIndirectTax build() { + return new AccountCreateParams.Configuration.Customer.AutomaticIndirectTax( + this.exempt, this.extraParams, this.ipAddress); + } + + /** + * Describes the customer's tax exemption status, which is {@code none}, {@code exempt}, + * or {@code reverse}. When set to reverse, invoice and receipt PDFs include the following + * text: “Reverse charge”. + */ + public Builder setExempt( + AccountCreateParams.Configuration.Customer.AutomaticIndirectTax.Exempt exempt) { + this.exempt = exempt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Customer.AutomaticIndirectTax#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Customer.AutomaticIndirectTax#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ + public Builder setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + } + + public enum Exempt implements ApiRequestParams.EnumParam { + @SerializedName("exempt") + EXEMPT("exempt"), + + @SerializedName("none") + NONE("none"), + + @SerializedName("reverse") + REVERSE("reverse"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Exempt(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billing { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Default invoice settings for the customer account. */ + @SerializedName("invoice") + Invoice invoice; + + private Billing(Map extraParams, Invoice invoice) { + this.extraParams = extraParams; + this.invoice = invoice; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Invoice invoice; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer.Billing build() { + return new AccountCreateParams.Configuration.Customer.Billing( + this.extraParams, this.invoice); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Customer.Billing#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Customer.Billing#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Default invoice settings for the customer account. */ + public Builder setInvoice( + AccountCreateParams.Configuration.Customer.Billing.Invoice invoice) { + this.invoice = invoice; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Invoice { + /** + * The list of up to 4 default custom fields to be displayed on invoices for this + * customer. + */ + @SerializedName("custom_fields") + List customFields; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Default invoice footer. */ + @SerializedName("footer") + String footer; + + /** Sequence number to use on the customer account's next invoice. Defaults to 1. */ + @SerializedName("next_sequence") + Long nextSequence; + + /** + * Prefix used to generate unique invoice numbers. Must be 3-12 uppercase letters or + * numbers. + */ + @SerializedName("prefix") + String prefix; + + /** Default invoice PDF rendering options. */ + @SerializedName("rendering") + Rendering rendering; + + private Invoice( + List + customFields, + Map extraParams, + String footer, + Long nextSequence, + String prefix, + Rendering rendering) { + this.customFields = customFields; + this.extraParams = extraParams; + this.footer = footer; + this.nextSequence = nextSequence; + this.prefix = prefix; + this.rendering = rendering; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List + customFields; + + private Map extraParams; + + private String footer; + + private Long nextSequence; + + private String prefix; + + private Rendering rendering; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer.Billing.Invoice build() { + return new AccountCreateParams.Configuration.Customer.Billing.Invoice( + this.customFields, + this.extraParams, + this.footer, + this.nextSequence, + this.prefix, + this.rendering); + } + + /** + * Add an element to `customFields` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * AccountCreateParams.Configuration.Customer.Billing.Invoice#customFields} for the + * field documentation. + */ + public Builder addCustomField( + AccountCreateParams.Configuration.Customer.Billing.Invoice.CustomField element) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * AccountCreateParams.Configuration.Customer.Billing.Invoice#customFields} for the + * field documentation. + */ + public Builder addAllCustomField( + List + elements) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Billing.Invoice#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Billing.Invoice#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Default invoice footer. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Sequence number to use on the customer account's next invoice. Defaults to 1. */ + public Builder setNextSequence(Long nextSequence) { + this.nextSequence = nextSequence; + return this; + } + + /** + * Prefix used to generate unique invoice numbers. Must be 3-12 uppercase letters or + * numbers. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** Default invoice PDF rendering options. */ + public Builder setRendering( + AccountCreateParams.Configuration.Customer.Billing.Invoice.Rendering rendering) { + this.rendering = rendering; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The name of the custom field. This may be up to 40 + * characters. + */ + @SerializedName("name") + String name; + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. When updating, pass an empty string to remove previously-defined values. + */ + @SerializedName("value") + String value; + + private CustomField(Map extraParams, String name, String value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String name; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer.Billing.Invoice.CustomField + build() { + return new AccountCreateParams.Configuration.Customer.Billing.Invoice.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Billing.Invoice.CustomField#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Billing.Invoice.CustomField#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. When updating, pass an empty string to remove previously-defined + * values. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Rendering { + /** + * Indicates whether displayed line item prices and amounts on invoice PDFs include + * inclusive tax amounts. Must be either {@code include_inclusive_tax} or {@code + * exclude_tax}. + */ + @SerializedName("amount_tax_display") + AmountTaxDisplay amountTaxDisplay; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** ID of the invoice rendering template to use for future invoices. */ + @SerializedName("template") + String template; + + private Rendering( + AmountTaxDisplay amountTaxDisplay, + Map extraParams, + String template) { + this.amountTaxDisplay = amountTaxDisplay; + this.extraParams = extraParams; + this.template = template; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmountTaxDisplay amountTaxDisplay; + + private Map extraParams; + + private String template; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer.Billing.Invoice.Rendering build() { + return new AccountCreateParams.Configuration.Customer.Billing.Invoice.Rendering( + this.amountTaxDisplay, this.extraParams, this.template); + } + + /** + * Indicates whether displayed line item prices and amounts on invoice PDFs include + * inclusive tax amounts. Must be either {@code include_inclusive_tax} or {@code + * exclude_tax}. + */ + public Builder setAmountTaxDisplay( + AccountCreateParams.Configuration.Customer.Billing.Invoice.Rendering + .AmountTaxDisplay + amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Billing.Invoice.Rendering#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Billing.Invoice.Rendering#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** ID of the invoice rendering template to use for future invoices. */ + public Builder setTemplate(String template) { + this.template = template; + return this; + } + } + + public enum AmountTaxDisplay implements ApiRequestParams.EnumParam { + @SerializedName("exclude_tax") + EXCLUDE_TAX("exclude_tax"), + + @SerializedName("include_inclusive_tax") + INCLUDE_INCLUSIVE_TAX("include_inclusive_tax"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountTaxDisplay(String value) { + this.value = value; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Capabilities { + /** + * Generates requirements for enabling automatic indirect tax calculation on this customer's + * invoices or subscriptions. Recommended to request this capability if planning to enable + * automatic tax calculation on this customer's invoices or subscriptions. + */ + @SerializedName("automatic_indirect_tax") + AutomaticIndirectTax automaticIndirectTax; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Capabilities( + AutomaticIndirectTax automaticIndirectTax, Map extraParams) { + this.automaticIndirectTax = automaticIndirectTax; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AutomaticIndirectTax automaticIndirectTax; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer.Capabilities build() { + return new AccountCreateParams.Configuration.Customer.Capabilities( + this.automaticIndirectTax, this.extraParams); + } + + /** + * Generates requirements for enabling automatic indirect tax calculation on this + * customer's invoices or subscriptions. Recommended to request this capability if + * planning to enable automatic tax calculation on this customer's invoices or + * subscriptions. + */ + public Builder setAutomaticIndirectTax( + AccountCreateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax + automaticIndirectTax) { + this.automaticIndirectTax = automaticIndirectTax; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Customer.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Customer.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AutomaticIndirectTax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AutomaticIndirectTax(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax + build() { + return new AccountCreateParams.Configuration.Customer.Capabilities + .AutomaticIndirectTax(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shipping { + /** Customer shipping address. */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Customer name. */ + @SerializedName("name") + String name; + + /** Customer phone (including extension). */ + @SerializedName("phone") + String phone; + + private Shipping( + Address address, Map extraParams, String name, String phone) { + this.address = address; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer.Shipping build() { + return new AccountCreateParams.Configuration.Customer.Shipping( + this.address, this.extraParams, this.name, this.phone); + } + + /** Customer shipping address. */ + public Builder setAddress( + AccountCreateParams.Configuration.Customer.Shipping.Address address) { + this.address = address; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Customer.Shipping#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Customer.Shipping#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Customer name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Customer phone (including extension). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Customer.Shipping.Address build() { + return new AccountCreateParams.Configuration.Customer.Shipping.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Shipping.Address#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Customer.Shipping.Address#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Merchant { + /** Settings used for Bacs debit payments. */ + @SerializedName("bacs_debit_payments") + BacsDebitPayments bacsDebitPayments; + + /** + * Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and + * other products. + */ + @SerializedName("branding") + Branding branding; + + /** Capabilities to request on the Merchant Configuration. */ + @SerializedName("capabilities") + Capabilities capabilities; + + /** Card payments settings. */ + @SerializedName("card_payments") + CardPayments cardPayments; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Settings specific to Konbini payments on the account. */ + @SerializedName("konbini_payments") + KonbiniPayments konbiniPayments; + + /** + * The Merchant Category Code (MCC) for the Merchant Configuration. MCCs classify businesses + * based on the goods or services they provide. + */ + @SerializedName("mcc") + String mcc; + + /** Settings for the default text that appears on statements for language variations. */ + @SerializedName("script_statement_descriptor") + ScriptStatementDescriptor scriptStatementDescriptor; + + /** Statement descriptor. */ + @SerializedName("statement_descriptor") + StatementDescriptor statementDescriptor; + + /** Publicly available contact information for sending support issues to. */ + @SerializedName("support") + Support support; + + private Merchant( + BacsDebitPayments bacsDebitPayments, + Branding branding, + Capabilities capabilities, + CardPayments cardPayments, + Map extraParams, + KonbiniPayments konbiniPayments, + String mcc, + ScriptStatementDescriptor scriptStatementDescriptor, + StatementDescriptor statementDescriptor, + Support support) { + this.bacsDebitPayments = bacsDebitPayments; + this.branding = branding; + this.capabilities = capabilities; + this.cardPayments = cardPayments; + this.extraParams = extraParams; + this.konbiniPayments = konbiniPayments; + this.mcc = mcc; + this.scriptStatementDescriptor = scriptStatementDescriptor; + this.statementDescriptor = statementDescriptor; + this.support = support; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BacsDebitPayments bacsDebitPayments; + + private Branding branding; + + private Capabilities capabilities; + + private CardPayments cardPayments; + + private Map extraParams; + + private KonbiniPayments konbiniPayments; + + private String mcc; + + private ScriptStatementDescriptor scriptStatementDescriptor; + + private StatementDescriptor statementDescriptor; + + private Support support; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant build() { + return new AccountCreateParams.Configuration.Merchant( + this.bacsDebitPayments, + this.branding, + this.capabilities, + this.cardPayments, + this.extraParams, + this.konbiniPayments, + this.mcc, + this.scriptStatementDescriptor, + this.statementDescriptor, + this.support); + } + + /** Settings used for Bacs debit payments. */ + public Builder setBacsDebitPayments( + AccountCreateParams.Configuration.Merchant.BacsDebitPayments bacsDebitPayments) { + this.bacsDebitPayments = bacsDebitPayments; + return this; + } + + /** + * Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and + * other products. + */ + public Builder setBranding(AccountCreateParams.Configuration.Merchant.Branding branding) { + this.branding = branding; + return this; + } + + /** Capabilities to request on the Merchant Configuration. */ + public Builder setCapabilities( + AccountCreateParams.Configuration.Merchant.Capabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** Card payments settings. */ + public Builder setCardPayments( + AccountCreateParams.Configuration.Merchant.CardPayments cardPayments) { + this.cardPayments = cardPayments; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Settings specific to Konbini payments on the account. */ + public Builder setKonbiniPayments( + AccountCreateParams.Configuration.Merchant.KonbiniPayments konbiniPayments) { + this.konbiniPayments = konbiniPayments; + return this; + } + + /** + * The Merchant Category Code (MCC) for the Merchant Configuration. MCCs classify businesses + * based on the goods or services they provide. + */ + public Builder setMcc(String mcc) { + this.mcc = mcc; + return this; + } + + /** Settings for the default text that appears on statements for language variations. */ + public Builder setScriptStatementDescriptor( + AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor + scriptStatementDescriptor) { + this.scriptStatementDescriptor = scriptStatementDescriptor; + return this; + } + + /** Statement descriptor. */ + public Builder setStatementDescriptor( + AccountCreateParams.Configuration.Merchant.StatementDescriptor statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** Publicly available contact information for sending support issues to. */ + public Builder setSupport(AccountCreateParams.Configuration.Merchant.Support support) { + this.support = support; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebitPayments { + /** Display name for Bacs Direct Debit payments. */ + @SerializedName("display_name") + String displayName; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private BacsDebitPayments(String displayName, Map extraParams) { + this.displayName = displayName; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String displayName; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.BacsDebitPayments build() { + return new AccountCreateParams.Configuration.Merchant.BacsDebitPayments( + this.displayName, this.extraParams); + } + + /** Display name for Bacs Direct Debit payments. */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.BacsDebitPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.BacsDebitPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Branding { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * ID of a file upload: + * An icon for the merchant. Must be square and at least 128px x 128px. + */ + @SerializedName("icon") + String icon; + + /** + * ID of a file upload: + * A logo for the merchant that will be used in Checkout instead of the icon and without the + * merchant's name next to it if provided. Must be at least 128px x 128px. + */ + @SerializedName("logo") + String logo; + + /** A CSS hex color value representing the primary branding color for the merchant. */ + @SerializedName("primary_color") + String primaryColor; + + /** A CSS hex color value representing the secondary branding color for the merchant. */ + @SerializedName("secondary_color") + String secondaryColor; + + private Branding( + Map extraParams, + String icon, + String logo, + String primaryColor, + String secondaryColor) { + this.extraParams = extraParams; + this.icon = icon; + this.logo = logo; + this.primaryColor = primaryColor; + this.secondaryColor = secondaryColor; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String icon; + + private String logo; + + private String primaryColor; + + private String secondaryColor; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Branding build() { + return new AccountCreateParams.Configuration.Merchant.Branding( + this.extraParams, this.icon, this.logo, this.primaryColor, this.secondaryColor); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.Branding#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.Branding#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * ID of a file + * upload: An icon for the merchant. Must be square and at least 128px x 128px. + */ + public Builder setIcon(String icon) { + this.icon = icon; + return this; + } + + /** + * ID of a file + * upload: A logo for the merchant that will be used in Checkout instead of the icon + * and without the merchant's name next to it if provided. Must be at least 128px x 128px. + */ + public Builder setLogo(String logo) { + this.logo = logo; + return this; + } + + /** A CSS hex color value representing the primary branding color for the merchant. */ + public Builder setPrimaryColor(String primaryColor) { + this.primaryColor = primaryColor; + return this; + } + + /** A CSS hex color value representing the secondary branding color for the merchant. */ + public Builder setSecondaryColor(String secondaryColor) { + this.secondaryColor = secondaryColor; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Capabilities { + /** Allow the merchant to process ACH debit payments. */ + @SerializedName("ach_debit_payments") + AchDebitPayments achDebitPayments; + + /** Allow the merchant to process ACSS debit payments. */ + @SerializedName("acss_debit_payments") + AcssDebitPayments acssDebitPayments; + + /** Allow the merchant to process Affirm payments. */ + @SerializedName("affirm_payments") + AffirmPayments affirmPayments; + + /** Allow the merchant to process Afterpay/Clearpay payments. */ + @SerializedName("afterpay_clearpay_payments") + AfterpayClearpayPayments afterpayClearpayPayments; + + /** Allow the merchant to process Alma payments. */ + @SerializedName("alma_payments") + AlmaPayments almaPayments; + + /** Allow the merchant to process Amazon Pay payments. */ + @SerializedName("amazon_pay_payments") + AmazonPayPayments amazonPayPayments; + + /** Allow the merchant to process Australian BECS Direct Debit payments. */ + @SerializedName("au_becs_debit_payments") + AuBecsDebitPayments auBecsDebitPayments; + + /** Allow the merchant to process BACS Direct Debit payments. */ + @SerializedName("bacs_debit_payments") + BacsDebitPayments bacsDebitPayments; + + /** Allow the merchant to process Bancontact payments. */ + @SerializedName("bancontact_payments") + BancontactPayments bancontactPayments; + + /** Allow the merchant to process BLIK payments. */ + @SerializedName("blik_payments") + BlikPayments blikPayments; + + /** Allow the merchant to process Boleto payments. */ + @SerializedName("boleto_payments") + BoletoPayments boletoPayments; + + /** Allow the merchant to collect card payments. */ + @SerializedName("card_payments") + CardPayments cardPayments; + + /** Allow the merchant to process Cartes Bancaires payments. */ + @SerializedName("cartes_bancaires_payments") + CartesBancairesPayments cartesBancairesPayments; + + /** Allow the merchant to process Cash App payments. */ + @SerializedName("cashapp_payments") + CashappPayments cashappPayments; + + /** Allow the merchant to process EPS payments. */ + @SerializedName("eps_payments") + EpsPayments epsPayments; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Allow the merchant to process FPX payments. */ + @SerializedName("fpx_payments") + FpxPayments fpxPayments; + + /** Allow the merchant to process UK bank transfer payments. */ + @SerializedName("gb_bank_transfer_payments") + GbBankTransferPayments gbBankTransferPayments; + + /** Allow the merchant to process GrabPay payments. */ + @SerializedName("grabpay_payments") + GrabpayPayments grabpayPayments; + + /** Allow the merchant to process iDEAL payments. */ + @SerializedName("ideal_payments") + IdealPayments idealPayments; + + /** Allow the merchant to process JCB card payments. */ + @SerializedName("jcb_payments") + JcbPayments jcbPayments; + + /** Allow the merchant to process Japanese bank transfer payments. */ + @SerializedName("jp_bank_transfer_payments") + JpBankTransferPayments jpBankTransferPayments; + + /** Allow the merchant to process Kakao Pay payments. */ + @SerializedName("kakao_pay_payments") + KakaoPayPayments kakaoPayPayments; + + /** Allow the merchant to process Klarna payments. */ + @SerializedName("klarna_payments") + KlarnaPayments klarnaPayments; + + /** Allow the merchant to process Konbini convenience store payments. */ + @SerializedName("konbini_payments") + KonbiniPayments konbiniPayments; + + /** Allow the merchant to process Korean card payments. */ + @SerializedName("kr_card_payments") + KrCardPayments krCardPayments; + + /** Allow the merchant to process Link payments. */ + @SerializedName("link_payments") + LinkPayments linkPayments; + + /** Allow the merchant to process MobilePay payments. */ + @SerializedName("mobilepay_payments") + MobilepayPayments mobilepayPayments; + + /** Allow the merchant to process Multibanco payments. */ + @SerializedName("multibanco_payments") + MultibancoPayments multibancoPayments; + + /** Allow the merchant to process Mexican bank transfer payments. */ + @SerializedName("mx_bank_transfer_payments") + MxBankTransferPayments mxBankTransferPayments; + + /** Allow the merchant to process Naver Pay payments. */ + @SerializedName("naver_pay_payments") + NaverPayPayments naverPayPayments; + + /** Allow the merchant to process OXXO payments. */ + @SerializedName("oxxo_payments") + OxxoPayments oxxoPayments; + + /** Allow the merchant to process Przelewy24 (P24) payments. */ + @SerializedName("p24_payments") + P24Payments p24Payments; + + /** Allow the merchant to process Pay by Bank payments. */ + @SerializedName("pay_by_bank_payments") + PayByBankPayments payByBankPayments; + + /** Allow the merchant to process PAYCO payments. */ + @SerializedName("payco_payments") + PaycoPayments paycoPayments; + + /** Allow the merchant to process PayNow payments. */ + @SerializedName("paynow_payments") + PaynowPayments paynowPayments; + + /** Allow the merchant to process PromptPay payments. */ + @SerializedName("promptpay_payments") + PromptpayPayments promptpayPayments; + + /** Allow the merchant to process Revolut Pay payments. */ + @SerializedName("revolut_pay_payments") + RevolutPayPayments revolutPayPayments; + + /** Allow the merchant to process Samsung Pay payments. */ + @SerializedName("samsung_pay_payments") + SamsungPayPayments samsungPayPayments; + + /** Allow the merchant to process SEPA bank transfer payments. */ + @SerializedName("sepa_bank_transfer_payments") + SepaBankTransferPayments sepaBankTransferPayments; + + /** Allow the merchant to process SEPA Direct Debit payments. */ + @SerializedName("sepa_debit_payments") + SepaDebitPayments sepaDebitPayments; + + /** Allow the merchant to process Swish payments. */ + @SerializedName("swish_payments") + SwishPayments swishPayments; + + /** Allow the merchant to process TWINT payments. */ + @SerializedName("twint_payments") + TwintPayments twintPayments; + + /** Allow the merchant to process US bank transfer payments. */ + @SerializedName("us_bank_transfer_payments") + UsBankTransferPayments usBankTransferPayments; + + /** Allow the merchant to process Zip payments. */ + @SerializedName("zip_payments") + ZipPayments zipPayments; + + private Capabilities( + AchDebitPayments achDebitPayments, + AcssDebitPayments acssDebitPayments, + AffirmPayments affirmPayments, + AfterpayClearpayPayments afterpayClearpayPayments, + AlmaPayments almaPayments, + AmazonPayPayments amazonPayPayments, + AuBecsDebitPayments auBecsDebitPayments, + BacsDebitPayments bacsDebitPayments, + BancontactPayments bancontactPayments, + BlikPayments blikPayments, + BoletoPayments boletoPayments, + CardPayments cardPayments, + CartesBancairesPayments cartesBancairesPayments, + CashappPayments cashappPayments, + EpsPayments epsPayments, + Map extraParams, + FpxPayments fpxPayments, + GbBankTransferPayments gbBankTransferPayments, + GrabpayPayments grabpayPayments, + IdealPayments idealPayments, + JcbPayments jcbPayments, + JpBankTransferPayments jpBankTransferPayments, + KakaoPayPayments kakaoPayPayments, + KlarnaPayments klarnaPayments, + KonbiniPayments konbiniPayments, + KrCardPayments krCardPayments, + LinkPayments linkPayments, + MobilepayPayments mobilepayPayments, + MultibancoPayments multibancoPayments, + MxBankTransferPayments mxBankTransferPayments, + NaverPayPayments naverPayPayments, + OxxoPayments oxxoPayments, + P24Payments p24Payments, + PayByBankPayments payByBankPayments, + PaycoPayments paycoPayments, + PaynowPayments paynowPayments, + PromptpayPayments promptpayPayments, + RevolutPayPayments revolutPayPayments, + SamsungPayPayments samsungPayPayments, + SepaBankTransferPayments sepaBankTransferPayments, + SepaDebitPayments sepaDebitPayments, + SwishPayments swishPayments, + TwintPayments twintPayments, + UsBankTransferPayments usBankTransferPayments, + ZipPayments zipPayments) { + this.achDebitPayments = achDebitPayments; + this.acssDebitPayments = acssDebitPayments; + this.affirmPayments = affirmPayments; + this.afterpayClearpayPayments = afterpayClearpayPayments; + this.almaPayments = almaPayments; + this.amazonPayPayments = amazonPayPayments; + this.auBecsDebitPayments = auBecsDebitPayments; + this.bacsDebitPayments = bacsDebitPayments; + this.bancontactPayments = bancontactPayments; + this.blikPayments = blikPayments; + this.boletoPayments = boletoPayments; + this.cardPayments = cardPayments; + this.cartesBancairesPayments = cartesBancairesPayments; + this.cashappPayments = cashappPayments; + this.epsPayments = epsPayments; + this.extraParams = extraParams; + this.fpxPayments = fpxPayments; + this.gbBankTransferPayments = gbBankTransferPayments; + this.grabpayPayments = grabpayPayments; + this.idealPayments = idealPayments; + this.jcbPayments = jcbPayments; + this.jpBankTransferPayments = jpBankTransferPayments; + this.kakaoPayPayments = kakaoPayPayments; + this.klarnaPayments = klarnaPayments; + this.konbiniPayments = konbiniPayments; + this.krCardPayments = krCardPayments; + this.linkPayments = linkPayments; + this.mobilepayPayments = mobilepayPayments; + this.multibancoPayments = multibancoPayments; + this.mxBankTransferPayments = mxBankTransferPayments; + this.naverPayPayments = naverPayPayments; + this.oxxoPayments = oxxoPayments; + this.p24Payments = p24Payments; + this.payByBankPayments = payByBankPayments; + this.paycoPayments = paycoPayments; + this.paynowPayments = paynowPayments; + this.promptpayPayments = promptpayPayments; + this.revolutPayPayments = revolutPayPayments; + this.samsungPayPayments = samsungPayPayments; + this.sepaBankTransferPayments = sepaBankTransferPayments; + this.sepaDebitPayments = sepaDebitPayments; + this.swishPayments = swishPayments; + this.twintPayments = twintPayments; + this.usBankTransferPayments = usBankTransferPayments; + this.zipPayments = zipPayments; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AchDebitPayments achDebitPayments; + + private AcssDebitPayments acssDebitPayments; + + private AffirmPayments affirmPayments; + + private AfterpayClearpayPayments afterpayClearpayPayments; + + private AlmaPayments almaPayments; + + private AmazonPayPayments amazonPayPayments; + + private AuBecsDebitPayments auBecsDebitPayments; + + private BacsDebitPayments bacsDebitPayments; + + private BancontactPayments bancontactPayments; + + private BlikPayments blikPayments; + + private BoletoPayments boletoPayments; + + private CardPayments cardPayments; + + private CartesBancairesPayments cartesBancairesPayments; + + private CashappPayments cashappPayments; + + private EpsPayments epsPayments; + + private Map extraParams; + + private FpxPayments fpxPayments; + + private GbBankTransferPayments gbBankTransferPayments; + + private GrabpayPayments grabpayPayments; + + private IdealPayments idealPayments; + + private JcbPayments jcbPayments; + + private JpBankTransferPayments jpBankTransferPayments; + + private KakaoPayPayments kakaoPayPayments; + + private KlarnaPayments klarnaPayments; + + private KonbiniPayments konbiniPayments; + + private KrCardPayments krCardPayments; + + private LinkPayments linkPayments; + + private MobilepayPayments mobilepayPayments; + + private MultibancoPayments multibancoPayments; + + private MxBankTransferPayments mxBankTransferPayments; + + private NaverPayPayments naverPayPayments; + + private OxxoPayments oxxoPayments; + + private P24Payments p24Payments; + + private PayByBankPayments payByBankPayments; + + private PaycoPayments paycoPayments; + + private PaynowPayments paynowPayments; + + private PromptpayPayments promptpayPayments; + + private RevolutPayPayments revolutPayPayments; + + private SamsungPayPayments samsungPayPayments; + + private SepaBankTransferPayments sepaBankTransferPayments; + + private SepaDebitPayments sepaDebitPayments; + + private SwishPayments swishPayments; + + private TwintPayments twintPayments; + + private UsBankTransferPayments usBankTransferPayments; + + private ZipPayments zipPayments; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities( + this.achDebitPayments, + this.acssDebitPayments, + this.affirmPayments, + this.afterpayClearpayPayments, + this.almaPayments, + this.amazonPayPayments, + this.auBecsDebitPayments, + this.bacsDebitPayments, + this.bancontactPayments, + this.blikPayments, + this.boletoPayments, + this.cardPayments, + this.cartesBancairesPayments, + this.cashappPayments, + this.epsPayments, + this.extraParams, + this.fpxPayments, + this.gbBankTransferPayments, + this.grabpayPayments, + this.idealPayments, + this.jcbPayments, + this.jpBankTransferPayments, + this.kakaoPayPayments, + this.klarnaPayments, + this.konbiniPayments, + this.krCardPayments, + this.linkPayments, + this.mobilepayPayments, + this.multibancoPayments, + this.mxBankTransferPayments, + this.naverPayPayments, + this.oxxoPayments, + this.p24Payments, + this.payByBankPayments, + this.paycoPayments, + this.paynowPayments, + this.promptpayPayments, + this.revolutPayPayments, + this.samsungPayPayments, + this.sepaBankTransferPayments, + this.sepaDebitPayments, + this.swishPayments, + this.twintPayments, + this.usBankTransferPayments, + this.zipPayments); + } + + /** Allow the merchant to process ACH debit payments. */ + public Builder setAchDebitPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.AchDebitPayments + achDebitPayments) { + this.achDebitPayments = achDebitPayments; + return this; + } + + /** Allow the merchant to process ACSS debit payments. */ + public Builder setAcssDebitPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.AcssDebitPayments + acssDebitPayments) { + this.acssDebitPayments = acssDebitPayments; + return this; + } + + /** Allow the merchant to process Affirm payments. */ + public Builder setAffirmPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.AffirmPayments + affirmPayments) { + this.affirmPayments = affirmPayments; + return this; + } + + /** Allow the merchant to process Afterpay/Clearpay payments. */ + public Builder setAfterpayClearpayPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.AfterpayClearpayPayments + afterpayClearpayPayments) { + this.afterpayClearpayPayments = afterpayClearpayPayments; + return this; + } + + /** Allow the merchant to process Alma payments. */ + public Builder setAlmaPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.AlmaPayments almaPayments) { + this.almaPayments = almaPayments; + return this; + } + + /** Allow the merchant to process Amazon Pay payments. */ + public Builder setAmazonPayPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.AmazonPayPayments + amazonPayPayments) { + this.amazonPayPayments = amazonPayPayments; + return this; + } + + /** Allow the merchant to process Australian BECS Direct Debit payments. */ + public Builder setAuBecsDebitPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.AuBecsDebitPayments + auBecsDebitPayments) { + this.auBecsDebitPayments = auBecsDebitPayments; + return this; + } + + /** Allow the merchant to process BACS Direct Debit payments. */ + public Builder setBacsDebitPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.BacsDebitPayments + bacsDebitPayments) { + this.bacsDebitPayments = bacsDebitPayments; + return this; + } + + /** Allow the merchant to process Bancontact payments. */ + public Builder setBancontactPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.BancontactPayments + bancontactPayments) { + this.bancontactPayments = bancontactPayments; + return this; + } + + /** Allow the merchant to process BLIK payments. */ + public Builder setBlikPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.BlikPayments blikPayments) { + this.blikPayments = blikPayments; + return this; + } + + /** Allow the merchant to process Boleto payments. */ + public Builder setBoletoPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.BoletoPayments + boletoPayments) { + this.boletoPayments = boletoPayments; + return this; + } + + /** Allow the merchant to collect card payments. */ + public Builder setCardPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.CardPayments cardPayments) { + this.cardPayments = cardPayments; + return this; + } + + /** Allow the merchant to process Cartes Bancaires payments. */ + public Builder setCartesBancairesPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.CartesBancairesPayments + cartesBancairesPayments) { + this.cartesBancairesPayments = cartesBancairesPayments; + return this; + } + + /** Allow the merchant to process Cash App payments. */ + public Builder setCashappPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.CashappPayments + cashappPayments) { + this.cashappPayments = cashappPayments; + return this; + } + + /** Allow the merchant to process EPS payments. */ + public Builder setEpsPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.EpsPayments epsPayments) { + this.epsPayments = epsPayments; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Allow the merchant to process FPX payments. */ + public Builder setFpxPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.FpxPayments fpxPayments) { + this.fpxPayments = fpxPayments; + return this; + } + + /** Allow the merchant to process UK bank transfer payments. */ + public Builder setGbBankTransferPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.GbBankTransferPayments + gbBankTransferPayments) { + this.gbBankTransferPayments = gbBankTransferPayments; + return this; + } + + /** Allow the merchant to process GrabPay payments. */ + public Builder setGrabpayPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.GrabpayPayments + grabpayPayments) { + this.grabpayPayments = grabpayPayments; + return this; + } + + /** Allow the merchant to process iDEAL payments. */ + public Builder setIdealPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.IdealPayments idealPayments) { + this.idealPayments = idealPayments; + return this; + } + + /** Allow the merchant to process JCB card payments. */ + public Builder setJcbPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.JcbPayments jcbPayments) { + this.jcbPayments = jcbPayments; + return this; + } + + /** Allow the merchant to process Japanese bank transfer payments. */ + public Builder setJpBankTransferPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.JpBankTransferPayments + jpBankTransferPayments) { + this.jpBankTransferPayments = jpBankTransferPayments; + return this; + } + + /** Allow the merchant to process Kakao Pay payments. */ + public Builder setKakaoPayPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.KakaoPayPayments + kakaoPayPayments) { + this.kakaoPayPayments = kakaoPayPayments; + return this; + } + + /** Allow the merchant to process Klarna payments. */ + public Builder setKlarnaPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.KlarnaPayments + klarnaPayments) { + this.klarnaPayments = klarnaPayments; + return this; + } + + /** Allow the merchant to process Konbini convenience store payments. */ + public Builder setKonbiniPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.KonbiniPayments + konbiniPayments) { + this.konbiniPayments = konbiniPayments; + return this; + } + + /** Allow the merchant to process Korean card payments. */ + public Builder setKrCardPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.KrCardPayments + krCardPayments) { + this.krCardPayments = krCardPayments; + return this; + } + + /** Allow the merchant to process Link payments. */ + public Builder setLinkPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.LinkPayments linkPayments) { + this.linkPayments = linkPayments; + return this; + } + + /** Allow the merchant to process MobilePay payments. */ + public Builder setMobilepayPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.MobilepayPayments + mobilepayPayments) { + this.mobilepayPayments = mobilepayPayments; + return this; + } + + /** Allow the merchant to process Multibanco payments. */ + public Builder setMultibancoPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.MultibancoPayments + multibancoPayments) { + this.multibancoPayments = multibancoPayments; + return this; + } + + /** Allow the merchant to process Mexican bank transfer payments. */ + public Builder setMxBankTransferPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.MxBankTransferPayments + mxBankTransferPayments) { + this.mxBankTransferPayments = mxBankTransferPayments; + return this; + } + + /** Allow the merchant to process Naver Pay payments. */ + public Builder setNaverPayPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.NaverPayPayments + naverPayPayments) { + this.naverPayPayments = naverPayPayments; + return this; + } + + /** Allow the merchant to process OXXO payments. */ + public Builder setOxxoPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.OxxoPayments oxxoPayments) { + this.oxxoPayments = oxxoPayments; + return this; + } + + /** Allow the merchant to process Przelewy24 (P24) payments. */ + public Builder setP24Payments( + AccountCreateParams.Configuration.Merchant.Capabilities.P24Payments p24Payments) { + this.p24Payments = p24Payments; + return this; + } + + /** Allow the merchant to process Pay by Bank payments. */ + public Builder setPayByBankPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.PayByBankPayments + payByBankPayments) { + this.payByBankPayments = payByBankPayments; + return this; + } + + /** Allow the merchant to process PAYCO payments. */ + public Builder setPaycoPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.PaycoPayments paycoPayments) { + this.paycoPayments = paycoPayments; + return this; + } + + /** Allow the merchant to process PayNow payments. */ + public Builder setPaynowPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.PaynowPayments + paynowPayments) { + this.paynowPayments = paynowPayments; + return this; + } + + /** Allow the merchant to process PromptPay payments. */ + public Builder setPromptpayPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.PromptpayPayments + promptpayPayments) { + this.promptpayPayments = promptpayPayments; + return this; + } + + /** Allow the merchant to process Revolut Pay payments. */ + public Builder setRevolutPayPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.RevolutPayPayments + revolutPayPayments) { + this.revolutPayPayments = revolutPayPayments; + return this; + } + + /** Allow the merchant to process Samsung Pay payments. */ + public Builder setSamsungPayPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.SamsungPayPayments + samsungPayPayments) { + this.samsungPayPayments = samsungPayPayments; + return this; + } + + /** Allow the merchant to process SEPA bank transfer payments. */ + public Builder setSepaBankTransferPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.SepaBankTransferPayments + sepaBankTransferPayments) { + this.sepaBankTransferPayments = sepaBankTransferPayments; + return this; + } + + /** Allow the merchant to process SEPA Direct Debit payments. */ + public Builder setSepaDebitPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.SepaDebitPayments + sepaDebitPayments) { + this.sepaDebitPayments = sepaDebitPayments; + return this; + } + + /** Allow the merchant to process Swish payments. */ + public Builder setSwishPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.SwishPayments swishPayments) { + this.swishPayments = swishPayments; + return this; + } + + /** Allow the merchant to process TWINT payments. */ + public Builder setTwintPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.TwintPayments twintPayments) { + this.twintPayments = twintPayments; + return this; + } + + /** Allow the merchant to process US bank transfer payments. */ + public Builder setUsBankTransferPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.UsBankTransferPayments + usBankTransferPayments) { + this.usBankTransferPayments = usBankTransferPayments; + return this; + } + + /** Allow the merchant to process Zip payments. */ + public Builder setZipPayments( + AccountCreateParams.Configuration.Merchant.Capabilities.ZipPayments zipPayments) { + this.zipPayments = zipPayments; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AchDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AchDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.AchDebitPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.AchDebitPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AchDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AchDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AcssDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.AcssDebitPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.AcssDebitPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AcssDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AcssDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AffirmPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AffirmPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.AffirmPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.AffirmPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AffirmPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AffirmPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AfterpayClearpayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.AfterpayClearpayPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities + .AfterpayClearpayPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AfterpayClearpayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AfterpayClearpayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AlmaPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AlmaPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.AlmaPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.AlmaPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AlmaPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AlmaPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AmazonPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.AmazonPayPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.AmazonPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AmazonPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AmazonPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AuBecsDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.AuBecsDebitPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities + .AuBecsDebitPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AuBecsDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.AuBecsDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private BacsDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.BacsDebitPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.BacsDebitPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.BacsDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.BacsDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BancontactPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private BancontactPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.BancontactPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.BancontactPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.BancontactPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.BancontactPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BlikPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private BlikPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.BlikPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.BlikPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.BlikPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.BlikPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BoletoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private BoletoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.BoletoPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.BoletoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.BoletoPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.BoletoPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CardPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.CardPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.CardPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.CardPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.CardPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CartesBancairesPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CartesBancairesPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.CartesBancairesPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities + .CartesBancairesPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.CartesBancairesPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.CartesBancairesPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CashappPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CashappPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.CashappPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.CashappPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.CashappPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.CashappPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EpsPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private EpsPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.EpsPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.EpsPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.EpsPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.EpsPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FpxPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private FpxPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.FpxPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.FpxPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.FpxPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.FpxPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class GbBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private GbBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.GbBankTransferPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities + .GbBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.GbBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.GbBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class GrabpayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private GrabpayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.GrabpayPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.GrabpayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.GrabpayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.GrabpayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdealPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private IdealPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.IdealPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.IdealPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.IdealPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.IdealPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class JcbPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private JcbPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.JcbPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.JcbPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.JcbPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.JcbPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class JpBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private JpBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.JpBankTransferPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities + .JpBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.JpBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.JpBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private KakaoPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.KakaoPayPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.KakaoPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.KakaoPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.KakaoPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KlarnaPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private KlarnaPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.KlarnaPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.KlarnaPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.KlarnaPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.KlarnaPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KonbiniPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private KonbiniPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.KonbiniPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.KonbiniPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KrCardPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private KrCardPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.KrCardPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.KrCardPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.KrCardPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.KrCardPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LinkPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private LinkPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.LinkPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.LinkPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.LinkPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.LinkPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MobilepayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private MobilepayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.MobilepayPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.MobilepayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.MobilepayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.MobilepayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MultibancoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private MultibancoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.MultibancoPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.MultibancoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.MultibancoPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.MultibancoPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MxBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private MxBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.MxBankTransferPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities + .MxBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.MxBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.MxBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NaverPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private NaverPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.NaverPayPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.NaverPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.NaverPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.NaverPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OxxoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private OxxoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.OxxoPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.OxxoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.OxxoPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.OxxoPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class P24Payments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private P24Payments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.P24Payments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.P24Payments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.P24Payments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.P24Payments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayByBankPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private PayByBankPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.PayByBankPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.PayByBankPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.PayByBankPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.PayByBankPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaycoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private PaycoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.PaycoPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.PaycoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.PaycoPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.PaycoPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaynowPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private PaynowPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.PaynowPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.PaynowPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.PaynowPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.PaynowPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PromptpayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private PromptpayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.PromptpayPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.PromptpayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.PromptpayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.PromptpayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private RevolutPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.RevolutPayPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.RevolutPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.RevolutPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.RevolutPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private SamsungPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.SamsungPayPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.SamsungPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.SamsungPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.SamsungPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private SepaBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.SepaBankTransferPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities + .SepaBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.SepaBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.SepaBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private SepaDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.SepaDebitPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.SepaDebitPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.SepaDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.SepaDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SwishPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private SwishPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.SwishPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.SwishPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.SwishPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.SwishPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TwintPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private TwintPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.TwintPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.TwintPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.TwintPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.TwintPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class UsBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private UsBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.UsBankTransferPayments + build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities + .UsBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.UsBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.UsBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ZipPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private ZipPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Capabilities.ZipPayments build() { + return new AccountCreateParams.Configuration.Merchant.Capabilities.ZipPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.ZipPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Capabilities.ZipPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPayments { + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + @SerializedName("decline_on") + DeclineOn declineOn; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CardPayments(DeclineOn declineOn, Map extraParams) { + this.declineOn = declineOn; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DeclineOn declineOn; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.CardPayments build() { + return new AccountCreateParams.Configuration.Merchant.CardPayments( + this.declineOn, this.extraParams); + } + + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + public Builder setDeclineOn( + AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn declineOn) { + this.declineOn = declineOn; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.CardPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.CardPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DeclineOn { + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. + * This setting only applies when a ZIP or postal code is provided and they fail bank + * verification. + */ + @SerializedName("avs_failure") + Boolean avsFailure; + + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting only + * applies when a CVC is provided and it fails bank verification. + */ + @SerializedName("cvc_failure") + Boolean cvcFailure; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private DeclineOn( + Boolean avsFailure, Boolean cvcFailure, Map extraParams) { + this.avsFailure = avsFailure; + this.cvcFailure = cvcFailure; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean avsFailure; + + private Boolean cvcFailure; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn build() { + return new AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn( + this.avsFailure, this.cvcFailure, this.extraParams); + } + + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. + * This setting only applies when a ZIP or postal code is provided and they fail bank + * verification. + */ + public Builder setAvsFailure(Boolean avsFailure) { + this.avsFailure = avsFailure; + return this; + } + + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting + * only applies when a CVC is provided and it fails bank verification. + */ + public Builder setCvcFailure(Boolean cvcFailure) { + this.cvcFailure = cvcFailure; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.CardPayments.DeclineOn#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KonbiniPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Support for Konbini payments. */ + @SerializedName("support") + Support support; + + private KonbiniPayments(Map extraParams, Support support) { + this.extraParams = extraParams; + this.support = support; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Support support; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.KonbiniPayments build() { + return new AccountCreateParams.Configuration.Merchant.KonbiniPayments( + this.extraParams, this.support); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Support for Konbini payments. */ + public Builder setSupport( + AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support support) { + this.support = support; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Support { + /** Support email address for Konbini payments. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Support hours for Konbini payments. */ + @SerializedName("hours") + Hours hours; + + /** Support phone number for Konbini payments. */ + @SerializedName("phone") + String phone; + + private Support( + String email, Map extraParams, Hours hours, String phone) { + this.email = email; + this.extraParams = extraParams; + this.hours = hours; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String email; + + private Map extraParams; + + private Hours hours; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support build() { + return new AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support( + this.email, this.extraParams, this.hours, this.phone); + } + + /** Support email address for Konbini payments. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Support hours for Konbini payments. */ + public Builder setHours( + AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours hours) { + this.hours = hours; + return this; + } + + /** Support phone number for Konbini payments. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hours { + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("end_time") + String endTime; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("start_time") + String startTime; + + private Hours(String endTime, Map extraParams, String startTime) { + this.endTime = endTime; + this.extraParams = extraParams; + this.startTime = startTime; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String endTime; + + private Map extraParams; + + private String startTime; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours + build() { + return new AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours( + this.endTime, this.extraParams, this.startTime); + } + + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + public Builder setEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.KonbiniPayments.Support.Hours#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + public Builder setStartTime(String startTime) { + this.startTime = startTime; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptStatementDescriptor { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The Kana variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kana") + Kana kana; + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptStatementDescriptor(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor build() { + return new AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The Kana variation of statement_descriptor used for charges in Japan. Japanese + * statement descriptors have special + * requirements. + */ + public Builder setKana( + AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana kana) { + this.kana = kana; + return this; + } + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese + * statement descriptors have special + * requirements. + */ + public Builder setKanji( + AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + + private Kana(String descriptor, Map extraParams, String prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String descriptor; + + private Map extraParams; + + private String prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana + build() { + return new AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + + private Kanji(String descriptor, Map extraParams, String prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String descriptor; + + private Map extraParams; + + private String prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji + build() { + return new AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StatementDescriptor { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement descriptor + * suffix causes the combined statement descriptor to exceed 22 characters, we truncate the + * statement_descriptor text to limit the full descriptor to 22 characters. For more + * information about statement descriptors and their requirements, see the Merchant + * Configuration settings documentation. + */ + @SerializedName("descriptor") + String descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing any + * dynamic statement_descriptor_suffix specified on the charge. To maximize space for the + * dynamic part of the descriptor, keep this text short. If you don’t specify this value, + * statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + String prefix; + + private StatementDescriptor( + String descriptor, Map extraParams, String prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String descriptor; + + private Map extraParams; + + private String prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.StatementDescriptor build() { + return new AccountCreateParams.Configuration.Merchant.StatementDescriptor( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Support { + /** A publicly available mailing address for sending support issues to. */ + @SerializedName("address") + Address address; + + /** A publicly available email address for sending support issues to. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A publicly available phone number to call with support issues. */ + @SerializedName("phone") + String phone; + + /** A publicly available website for handling support issues. */ + @SerializedName("url") + String url; + + private Support( + Address address, + String email, + Map extraParams, + String phone, + String url) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.phone = phone; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String email; + + private Map extraParams; + + private String phone; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Support build() { + return new AccountCreateParams.Configuration.Merchant.Support( + this.address, this.email, this.extraParams, this.phone, this.url); + } + + /** A publicly available mailing address for sending support issues to. */ + public Builder setAddress( + AccountCreateParams.Configuration.Merchant.Support.Address address) { + this.address = address; + return this; + } + + /** A publicly available email address for sending support issues to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.Support#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Merchant.Support#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A publicly available phone number to call with support issues. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** A publicly available website for handling support issues. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.Support.Address build() { + return new AccountCreateParams.Configuration.Merchant.Support.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Support.Address#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Merchant.Support.Address#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** Capabilities to be requested on the Recipient Configuration. */ + @SerializedName("capabilities") + Capabilities capabilities; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Recipient(Capabilities capabilities, Map extraParams) { + this.capabilities = capabilities; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Capabilities capabilities; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient build() { + return new AccountCreateParams.Configuration.Recipient( + this.capabilities, this.extraParams); + } + + /** Capabilities to be requested on the Recipient Configuration. */ + public Builder setCapabilities( + AccountCreateParams.Configuration.Recipient.Capabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Recipient#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Recipient#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Capabilities { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). */ + @SerializedName("stripe_balance") + StripeBalance stripeBalance; + + private Capabilities(Map extraParams, StripeBalance stripeBalance) { + this.extraParams = extraParams; + this.stripeBalance = stripeBalance; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private StripeBalance stripeBalance; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities( + this.extraParams, this.stripeBalance); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Recipient.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Configuration.Recipient.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + */ + public Builder setStripeBalance( + AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance + stripeBalance) { + this.stripeBalance = stripeBalance; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeBalance { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + */ + @SerializedName("stripe_transfers") + StripeTransfers stripeTransfers; + + private StripeBalance(Map extraParams, StripeTransfers stripeTransfers) { + this.extraParams = extraParams; + this.stripeTransfers = stripeTransfers; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private StripeTransfers stripeTransfers; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance( + this.extraParams, this.stripeTransfers); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Enables this Account to receive /v1/transfers into their Stripe Balance + * (/v1/balance). + */ + public Builder setStripeTransfers( + AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance + .StripeTransfers + stripeTransfers) { + this.stripeTransfers = stripeTransfers; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeTransfers { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private StripeTransfers(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance + .StripeTransfers + build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance + .StripeTransfers(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance.StripeTransfers#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Recipient.Capabilities.StripeBalance.StripeTransfers#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Defaults { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The Account's preferred locales (languages), ordered by preference. */ + @SerializedName("locales") + List locales; + + /** Account profile information. */ + @SerializedName("profile") + Profile profile; + + /** Default responsibilities held by either Stripe or the platform. */ + @SerializedName("responsibilities") + Responsibilities responsibilities; + + private Defaults( + String currency, + Map extraParams, + List locales, + Profile profile, + Responsibilities responsibilities) { + this.currency = currency; + this.extraParams = extraParams; + this.locales = locales; + this.profile = profile; + this.responsibilities = responsibilities; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private List locales; + + private Profile profile; + + private Responsibilities responsibilities; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Defaults build() { + return new AccountCreateParams.Defaults( + this.currency, this.extraParams, this.locales, this.profile, this.responsibilities); + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountCreateParams.Defaults#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountCreateParams.Defaults#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `locales` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Defaults#locales} for the field documentation. + */ + public Builder addLocale(AccountCreateParams.Defaults.Locale element) { + if (this.locales == null) { + this.locales = new ArrayList<>(); + } + this.locales.add(element); + return this; + } + + /** + * Add all elements to `locales` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Defaults#locales} for the field documentation. + */ + public Builder addAllLocale(List elements) { + if (this.locales == null) { + this.locales = new ArrayList<>(); + } + this.locales.addAll(elements); + return this; + } + + /** Account profile information. */ + public Builder setProfile(AccountCreateParams.Defaults.Profile profile) { + this.profile = profile; + return this; + } + + /** Default responsibilities held by either Stripe or the platform. */ + public Builder setResponsibilities( + AccountCreateParams.Defaults.Responsibilities responsibilities) { + this.responsibilities = responsibilities; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Profile { + /** The business's publicly-available website. */ + @SerializedName("business_url") + String businessUrl; + + /** The name which is used by the business. */ + @SerializedName("doing_business_as") + String doingBusinessAs; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + @SerializedName("product_description") + String productDescription; + + private Profile( + String businessUrl, + String doingBusinessAs, + Map extraParams, + String productDescription) { + this.businessUrl = businessUrl; + this.doingBusinessAs = doingBusinessAs; + this.extraParams = extraParams; + this.productDescription = productDescription; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String businessUrl; + + private String doingBusinessAs; + + private Map extraParams; + + private String productDescription; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Defaults.Profile build() { + return new AccountCreateParams.Defaults.Profile( + this.businessUrl, this.doingBusinessAs, this.extraParams, this.productDescription); + } + + /** The business's publicly-available website. */ + public Builder setBusinessUrl(String businessUrl) { + this.businessUrl = businessUrl; + return this; + } + + /** The name which is used by the business. */ + public Builder setDoingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Defaults.Profile#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Defaults.Profile#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + public Builder setProductDescription(String productDescription) { + this.productDescription = productDescription; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Responsibilities { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A value indicating the party responsible for collecting fees + * from this account. + */ + @SerializedName("fees_collector") + FeesCollector feesCollector; + + /** + * Required. A value indicating who is responsible for losses when this + * Account can’t pay back negative balances from payments. + */ + @SerializedName("losses_collector") + LossesCollector lossesCollector; + + private Responsibilities( + Map extraParams, + FeesCollector feesCollector, + LossesCollector lossesCollector) { + this.extraParams = extraParams; + this.feesCollector = feesCollector; + this.lossesCollector = lossesCollector; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FeesCollector feesCollector; + + private LossesCollector lossesCollector; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Defaults.Responsibilities build() { + return new AccountCreateParams.Defaults.Responsibilities( + this.extraParams, this.feesCollector, this.lossesCollector); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Defaults.Responsibilities#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Defaults.Responsibilities#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A value indicating the party responsible for collecting fees + * from this account. + */ + public Builder setFeesCollector( + AccountCreateParams.Defaults.Responsibilities.FeesCollector feesCollector) { + this.feesCollector = feesCollector; + return this; + } + + /** + * Required. A value indicating who is responsible for losses when this + * Account can’t pay back negative balances from payments. + */ + public Builder setLossesCollector( + AccountCreateParams.Defaults.Responsibilities.LossesCollector lossesCollector) { + this.lossesCollector = lossesCollector; + return this; + } + } + + public enum FeesCollector implements ApiRequestParams.EnumParam { + @SerializedName("application") + APPLICATION("application"), + + @SerializedName("application_custom") + APPLICATION_CUSTOM("application_custom"), + + @SerializedName("application_express") + APPLICATION_EXPRESS("application_express"), + + @SerializedName("stripe") + STRIPE("stripe"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FeesCollector(String value) { + this.value = value; + } + } + + public enum LossesCollector implements ApiRequestParams.EnumParam { + @SerializedName("application") + APPLICATION("application"), + + @SerializedName("stripe") + STRIPE("stripe"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LossesCollector(String value) { + this.value = value; + } + } + } + + public enum Locale implements ApiRequestParams.EnumParam { + @SerializedName("ar-SA") + AR_SA("ar-SA"), + + @SerializedName("bg") + BG("bg"), + + @SerializedName("bg-BG") + BG_BG("bg-BG"), + + @SerializedName("cs") + CS("cs"), + + @SerializedName("cs-CZ") + CS_CZ("cs-CZ"), + + @SerializedName("da") + DA("da"), + + @SerializedName("da-DK") + DA_DK("da-DK"), + + @SerializedName("de") + DE("de"), + + @SerializedName("de-DE") + DE_DE("de-DE"), + + @SerializedName("el") + EL("el"), + + @SerializedName("el-GR") + EL_GR("el-GR"), + + @SerializedName("en") + EN("en"), + + @SerializedName("en-AU") + EN_AU("en-AU"), + + @SerializedName("en-CA") + EN_CA("en-CA"), + + @SerializedName("en-GB") + EN_GB("en-GB"), + + @SerializedName("en-IE") + EN_IE("en-IE"), + + @SerializedName("en-IN") + EN_IN("en-IN"), + + @SerializedName("en-NZ") + EN_NZ("en-NZ"), + + @SerializedName("en-SG") + EN_SG("en-SG"), + + @SerializedName("en-US") + EN_US("en-US"), + + @SerializedName("es") + ES("es"), + + @SerializedName("es-419") + ES_419("es-419"), + + @SerializedName("es-ES") + ES_ES("es-ES"), + + @SerializedName("et") + ET("et"), + + @SerializedName("et-EE") + ET_EE("et-EE"), + + @SerializedName("fi") + FI("fi"), + + @SerializedName("fil") + FIL("fil"), + + @SerializedName("fil-PH") + FIL_PH("fil-PH"), + + @SerializedName("fi-FI") + FI_FI("fi-FI"), + + @SerializedName("fr") + FR("fr"), + + @SerializedName("fr-CA") + FR_CA("fr-CA"), + + @SerializedName("fr-FR") + FR_FR("fr-FR"), + + @SerializedName("he-IL") + HE_IL("he-IL"), + + @SerializedName("hr") + HR("hr"), + + @SerializedName("hr-HR") + HR_HR("hr-HR"), + + @SerializedName("hu") + HU("hu"), + + @SerializedName("hu-HU") + HU_HU("hu-HU"), + + @SerializedName("id") + ID("id"), + + @SerializedName("id-ID") + ID_ID("id-ID"), + + @SerializedName("it") + IT("it"), + + @SerializedName("it-IT") + IT_IT("it-IT"), + + @SerializedName("ja") + JA("ja"), + + @SerializedName("ja-JP") + JA_JP("ja-JP"), + + @SerializedName("ko") + KO("ko"), + + @SerializedName("ko-KR") + KO_KR("ko-KR"), + + @SerializedName("lt") + LT("lt"), + + @SerializedName("lt-LT") + LT_LT("lt-LT"), + + @SerializedName("lv") + LV("lv"), + + @SerializedName("lv-LV") + LV_LV("lv-LV"), + + @SerializedName("ms") + MS("ms"), + + @SerializedName("ms-MY") + MS_MY("ms-MY"), + + @SerializedName("mt") + MT("mt"), + + @SerializedName("mt-MT") + MT_MT("mt-MT"), + + @SerializedName("nb") + NB("nb"), + + @SerializedName("nb-NO") + NB_NO("nb-NO"), + + @SerializedName("nl") + NL("nl"), + + @SerializedName("nl-NL") + NL_NL("nl-NL"), + + @SerializedName("pl") + PL("pl"), + + @SerializedName("pl-PL") + PL_PL("pl-PL"), + + @SerializedName("pt") + PT("pt"), + + @SerializedName("pt-BR") + PT_BR("pt-BR"), + + @SerializedName("pt-PT") + PT_PT("pt-PT"), + + @SerializedName("ro") + RO("ro"), + + @SerializedName("ro-RO") + RO_RO("ro-RO"), + + @SerializedName("ru") + RU("ru"), + + @SerializedName("ru-RU") + RU_RU("ru-RU"), + + @SerializedName("sk") + SK("sk"), + + @SerializedName("sk-SK") + SK_SK("sk-SK"), + + @SerializedName("sl") + SL("sl"), + + @SerializedName("sl-SI") + SL_SI("sl-SI"), + + @SerializedName("sv") + SV("sv"), + + @SerializedName("sv-SE") + SV_SE("sv-SE"), + + @SerializedName("th") + TH("th"), + + @SerializedName("th-TH") + TH_TH("th-TH"), + + @SerializedName("tr") + TR("tr"), + + @SerializedName("tr-TR") + TR_TR("tr-TR"), + + @SerializedName("vi") + VI("vi"), + + @SerializedName("vi-VN") + VI_VN("vi-VN"), + + @SerializedName("zh") + ZH("zh"), + + @SerializedName("zh-Hans") + ZH_HANS("zh-Hans"), + + @SerializedName("zh-Hant-HK") + ZH_HANT_HK("zh-Hant-HK"), + + @SerializedName("zh-Hant-TW") + ZH_HANT_TW("zh-Hant-TW"), + + @SerializedName("zh-HK") + ZH_HK("zh-HK"), + + @SerializedName("zh-TW") + ZH_TW("zh-TW"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Locale(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Identity { + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + @SerializedName("attestations") + Attestations attestations; + + /** Information about the company or business. */ + @SerializedName("business_details") + BusinessDetails businessDetails; + + /** + * The country in which the account holder resides, or in which the business is legally + * established. This should be an ISO + * 3166-1 alpha-2 country code. + */ + @SerializedName("country") + String country; + + /** The entity type. */ + @SerializedName("entity_type") + EntityType entityType; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Information about the person represented by the account. */ + @SerializedName("individual") + Individual individual; + + private Identity( + Attestations attestations, + BusinessDetails businessDetails, + String country, + EntityType entityType, + Map extraParams, + Individual individual) { + this.attestations = attestations; + this.businessDetails = businessDetails; + this.country = country; + this.entityType = entityType; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Attestations attestations; + + private BusinessDetails businessDetails; + + private String country; + + private EntityType entityType; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity build() { + return new AccountCreateParams.Identity( + this.attestations, + this.businessDetails, + this.country, + this.entityType, + this.extraParams, + this.individual); + } + + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + public Builder setAttestations(AccountCreateParams.Identity.Attestations attestations) { + this.attestations = attestations; + return this; + } + + /** Information about the company or business. */ + public Builder setBusinessDetails( + AccountCreateParams.Identity.BusinessDetails businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** + * The country in which the account holder resides, or in which the business is legally + * established. This should be an ISO 3166-1 alpha-2 country + * code. + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** The entity type. */ + public Builder setEntityType(AccountCreateParams.Identity.EntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountCreateParams.Identity#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountCreateParams.Identity#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Information about the person represented by the account. */ + public Builder setIndividual(AccountCreateParams.Identity.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Attestations { + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct. + */ + @SerializedName("ownership_declaration") + OwnershipDeclaration ownershipDeclaration; + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + @SerializedName("persons_provided") + PersonsProvided personsProvided; + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + @SerializedName("representative_declaration") + RepresentativeDeclaration representativeDeclaration; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("terms_of_service") + TermsOfService termsOfService; + + private Attestations( + DirectorshipDeclaration directorshipDeclaration, + Map extraParams, + OwnershipDeclaration ownershipDeclaration, + PersonsProvided personsProvided, + RepresentativeDeclaration representativeDeclaration, + TermsOfService termsOfService) { + this.directorshipDeclaration = directorshipDeclaration; + this.extraParams = extraParams; + this.ownershipDeclaration = ownershipDeclaration; + this.personsProvided = personsProvided; + this.representativeDeclaration = representativeDeclaration; + this.termsOfService = termsOfService; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DirectorshipDeclaration directorshipDeclaration; + + private Map extraParams; + + private OwnershipDeclaration ownershipDeclaration; + + private PersonsProvided personsProvided; + + private RepresentativeDeclaration representativeDeclaration; + + private TermsOfService termsOfService; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Attestations build() { + return new AccountCreateParams.Identity.Attestations( + this.directorshipDeclaration, + this.extraParams, + this.ownershipDeclaration, + this.personsProvided, + this.representativeDeclaration, + this.termsOfService); + } + + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + public Builder setDirectorshipDeclaration( + AccountCreateParams.Identity.Attestations.DirectorshipDeclaration + directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Attestations#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Attestations#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct. + */ + public Builder setOwnershipDeclaration( + AccountCreateParams.Identity.Attestations.OwnershipDeclaration ownershipDeclaration) { + this.ownershipDeclaration = ownershipDeclaration; + return this; + } + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + public Builder setPersonsProvided( + AccountCreateParams.Identity.Attestations.PersonsProvided personsProvided) { + this.personsProvided = personsProvided; + return this; + } + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + public Builder setRepresentativeDeclaration( + AccountCreateParams.Identity.Attestations.RepresentativeDeclaration + representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + + /** Attestations of accepted terms of service agreements. */ + public Builder setTermsOfService( + AccountCreateParams.Identity.Attestations.TermsOfService termsOfService) { + this.termsOfService = termsOfService; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DirectorshipDeclaration { + /** + * The time marking when the director attestation was made. Represented as a RFC 3339 date + * & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The IP address from which the director attestation was made. */ + @SerializedName("ip") + String ip; + + /** The user agent of the browser from which the director attestation was made. */ + @SerializedName("user_agent") + String userAgent; + + private DirectorshipDeclaration( + Instant date, Map extraParams, String ip, String userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Attestations.DirectorshipDeclaration build() { + return new AccountCreateParams.Identity.Attestations.DirectorshipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time marking when the director attestation was made. Represented as a RFC 3339 date + * & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.Attestations.DirectorshipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.Attestations.DirectorshipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the director attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The user agent of the browser from which the director attestation was made. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OwnershipDeclaration { + /** + * The time marking when the beneficial owner attestation was made. Represented as a RFC + * 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The IP address from which the beneficial owner attestation was made. */ + @SerializedName("ip") + String ip; + + /** The user agent of the browser from which the beneficial owner attestation was made. */ + @SerializedName("user_agent") + String userAgent; + + private OwnershipDeclaration( + Instant date, Map extraParams, String ip, String userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Attestations.OwnershipDeclaration build() { + return new AccountCreateParams.Identity.Attestations.OwnershipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time marking when the beneficial owner attestation was made. Represented as a RFC + * 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.Attestations.OwnershipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.Attestations.OwnershipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the beneficial owner attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The user agent of the browser from which the beneficial owner attestation was made. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PersonsProvided { + /** + * Whether the company’s directors have been provided. Set this Boolean to true after + * creating all the company’s directors with the Persons API. + */ + @SerializedName("directors") + Boolean directors; + + /** + * Whether the company’s executives have been provided. Set this Boolean to true after + * creating all the company’s executives with the Persons API. + */ + @SerializedName("executives") + Boolean executives; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Whether the company’s owners have been provided. Set this Boolean to true after creating + * all the company’s owners with the Persons API. + */ + @SerializedName("owners") + Boolean owners; + + /** Reason for why the company is exempt from providing ownership information. */ + @SerializedName("ownership_exemption_reason") + OwnershipExemptionReason ownershipExemptionReason; + + private PersonsProvided( + Boolean directors, + Boolean executives, + Map extraParams, + Boolean owners, + OwnershipExemptionReason ownershipExemptionReason) { + this.directors = directors; + this.executives = executives; + this.extraParams = extraParams; + this.owners = owners; + this.ownershipExemptionReason = ownershipExemptionReason; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean directors; + + private Boolean executives; + + private Map extraParams; + + private Boolean owners; + + private OwnershipExemptionReason ownershipExemptionReason; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Attestations.PersonsProvided build() { + return new AccountCreateParams.Identity.Attestations.PersonsProvided( + this.directors, + this.executives, + this.extraParams, + this.owners, + this.ownershipExemptionReason); + } + + /** + * Whether the company’s directors have been provided. Set this Boolean to true after + * creating all the company’s directors with the Persons API. + */ + public Builder setDirectors(Boolean directors) { + this.directors = directors; + return this; + } + + /** + * Whether the company’s executives have been provided. Set this Boolean to true after + * creating all the company’s executives with the Persons API. + */ + public Builder setExecutives(Boolean executives) { + this.executives = executives; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Attestations.PersonsProvided#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Attestations.PersonsProvided#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the company’s owners have been provided. Set this Boolean to true after + * creating all the company’s owners with the Persons API. + */ + public Builder setOwners(Boolean owners) { + this.owners = owners; + return this; + } + + /** Reason for why the company is exempt from providing ownership information. */ + public Builder setOwnershipExemptionReason( + AccountCreateParams.Identity.Attestations.PersonsProvided.OwnershipExemptionReason + ownershipExemptionReason) { + this.ownershipExemptionReason = ownershipExemptionReason; + return this; + } + } + + public enum OwnershipExemptionReason implements ApiRequestParams.EnumParam { + @SerializedName("qualified_entity_exceeds_ownership_threshold") + QUALIFIED_ENTITY_EXCEEDS_OWNERSHIP_THRESHOLD( + "qualified_entity_exceeds_ownership_threshold"), + + @SerializedName("qualifies_as_financial_institution") + QUALIFIES_AS_FINANCIAL_INSTITUTION("qualifies_as_financial_institution"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + OwnershipExemptionReason(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** + * The time marking when the representative attestation was made. Represented as a RFC 3339 + * date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The IP address from which the representative attestation was made. */ + @SerializedName("ip") + String ip; + + /** The user agent of the browser from which the representative attestation was made. */ + @SerializedName("user_agent") + String userAgent; + + private RepresentativeDeclaration( + Instant date, Map extraParams, String ip, String userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Attestations.RepresentativeDeclaration build() { + return new AccountCreateParams.Identity.Attestations.RepresentativeDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time marking when the representative attestation was made. Represented as a RFC + * 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.Attestations.RepresentativeDeclaration#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.Attestations.RepresentativeDeclaration#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the representative attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The user agent of the browser from which the representative attestation was made. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TermsOfService { + /** + * Details on the Account's acceptance of the Stripe Services + * Agreement. + */ + @SerializedName("account") + Account account; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private TermsOfService(Account account, Map extraParams) { + this.account = account; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Account account; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Attestations.TermsOfService build() { + return new AccountCreateParams.Identity.Attestations.TermsOfService( + this.account, this.extraParams); + } + + /** + * Details on the Account's acceptance of the Stripe Services + * Agreement. + */ + public Builder setAccount( + AccountCreateParams.Identity.Attestations.TermsOfService.Account account) { + this.account = account; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Attestations.TermsOfService#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Attestations.TermsOfService#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Account { + /** + * Required. The time when the Account's representative accepted the + * terms of service. Represented as a RFC 3339 date & time UTC value in millisecond + * precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The IP address from which the Account's representative + * accepted the terms of service. + */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + String userAgent; + + private Account( + Instant date, Map extraParams, String ip, String userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Attestations.TermsOfService.Account build() { + return new AccountCreateParams.Identity.Attestations.TermsOfService.Account( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * Required. The time when the Account's representative accepted the + * terms of service. Represented as a RFC 3339 date & time UTC value in millisecond + * precision, for example: 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Attestations.TermsOfService.Account#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Attestations.TermsOfService.Account#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The IP address from which the Account's representative + * accepted the terms of service. + */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusinessDetails { + /** The business registration address of the business entity. */ + @SerializedName("address") + Address address; + + /** The business gross annual revenue for its preceding fiscal year. */ + @SerializedName("annual_revenue") + AnnualRevenue annualRevenue; + + /** A document verifying the business. */ + @SerializedName("documents") + Documents documents; + + /** + * Estimated maximum number of workers currently engaged by the business (including employees, + * contractors, and vendors). + */ + @SerializedName("estimated_worker_count") + Long estimatedWorkerCount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The ID numbers of a business entity. */ + @SerializedName("id_numbers") + List idNumbers; + + /** An estimate of the monthly revenue of the business. */ + @SerializedName("monthly_estimated_revenue") + MonthlyEstimatedRevenue monthlyEstimatedRevenue; + + /** The phone number of the Business Entity. */ + @SerializedName("phone") + String phone; + + /** The business legal name. */ + @SerializedName("registered_name") + String registeredName; + + /** The business registration address of the business entity in non latin script. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The business legal name in non latin script. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The category identifying the legal structure of the business. */ + @SerializedName("structure") + Structure structure; + + private BusinessDetails( + Address address, + AnnualRevenue annualRevenue, + Documents documents, + Long estimatedWorkerCount, + Map extraParams, + List idNumbers, + MonthlyEstimatedRevenue monthlyEstimatedRevenue, + String phone, + String registeredName, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + Structure structure) { + this.address = address; + this.annualRevenue = annualRevenue; + this.documents = documents; + this.estimatedWorkerCount = estimatedWorkerCount; + this.extraParams = extraParams; + this.idNumbers = idNumbers; + this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; + this.phone = phone; + this.registeredName = registeredName; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.structure = structure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private AnnualRevenue annualRevenue; + + private Documents documents; + + private Long estimatedWorkerCount; + + private Map extraParams; + + private List idNumbers; + + private MonthlyEstimatedRevenue monthlyEstimatedRevenue; + + private String phone; + + private String registeredName; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private Structure structure; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails build() { + return new AccountCreateParams.Identity.BusinessDetails( + this.address, + this.annualRevenue, + this.documents, + this.estimatedWorkerCount, + this.extraParams, + this.idNumbers, + this.monthlyEstimatedRevenue, + this.phone, + this.registeredName, + this.scriptAddresses, + this.scriptNames, + this.structure); + } + + /** The business registration address of the business entity. */ + public Builder setAddress(AccountCreateParams.Identity.BusinessDetails.Address address) { + this.address = address; + return this; + } + + /** The business gross annual revenue for its preceding fiscal year. */ + public Builder setAnnualRevenue( + AccountCreateParams.Identity.BusinessDetails.AnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** A document verifying the business. */ + public Builder setDocuments( + AccountCreateParams.Identity.BusinessDetails.Documents documents) { + this.documents = documents; + return this; + } + + /** + * Estimated maximum number of workers currently engaged by the business (including + * employees, contractors, and vendors). + */ + public Builder setEstimatedWorkerCount(Long estimatedWorkerCount) { + this.estimatedWorkerCount = estimatedWorkerCount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails#idNumbers} for the field documentation. + */ + public Builder addIdNumber(AccountCreateParams.Identity.BusinessDetails.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber( + List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** An estimate of the monthly revenue of the business. */ + public Builder setMonthlyEstimatedRevenue( + AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + monthlyEstimatedRevenue) { + this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; + return this; + } + + /** The phone number of the Business Entity. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The business legal name. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + + /** The business registration address of the business entity in non latin script. */ + public Builder setScriptAddresses( + AccountCreateParams.Identity.BusinessDetails.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The business legal name in non latin script. */ + public Builder setScriptNames( + AccountCreateParams.Identity.BusinessDetails.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The category identifying the legal structure of the business. */ + public Builder setStructure( + AccountCreateParams.Identity.BusinessDetails.Structure structure) { + this.structure = structure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Address build() { + return new AccountCreateParams.Identity.BusinessDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.Address#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.Address#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AnnualRevenue { + /** A non-negative integer representing the amount in the smallest currency unit. */ + @SerializedName("amount") + Amount amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + @SerializedName("fiscal_year_end") + String fiscalYearEnd; + + private AnnualRevenue( + Amount amount, Map extraParams, String fiscalYearEnd) { + this.amount = amount; + this.extraParams = extraParams; + this.fiscalYearEnd = fiscalYearEnd; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private Map extraParams; + + private String fiscalYearEnd; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.AnnualRevenue build() { + return new AccountCreateParams.Identity.BusinessDetails.AnnualRevenue( + this.amount, this.extraParams, this.fiscalYearEnd); + } + + /** A non-negative integer representing the amount in the smallest currency unit. */ + public Builder setAmount( + AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.AnnualRevenue#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.AnnualRevenue#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + public Builder setFiscalYearEnd(String fiscalYearEnd) { + this.fiscalYearEnd = fiscalYearEnd; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { + return new AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that support the bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + @SerializedName("bank_account_ownership_verification") + BankAccountOwnershipVerification bankAccountOwnershipVerification; + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + @SerializedName("company_license") + CompanyLicense companyLicense; + + /** One or more documents showing the company’s Memorandum of Association. */ + @SerializedName("company_memorandum_of_association") + CompanyMemorandumOfAssociation companyMemorandumOfAssociation; + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + @SerializedName("company_ministerial_decree") + CompanyMinisterialDecree companyMinisterialDecree; + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + @SerializedName("company_registration_verification") + CompanyRegistrationVerification companyRegistrationVerification; + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + @SerializedName("company_tax_id_verification") + CompanyTaxIdVerification companyTaxIdVerification; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A document verifying the business. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + @SerializedName("proof_of_registration") + ProofOfRegistration proofOfRegistration; + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @SerializedName("proof_of_ultimate_beneficial_ownership") + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + + private Documents( + BankAccountOwnershipVerification bankAccountOwnershipVerification, + CompanyLicense companyLicense, + CompanyMemorandumOfAssociation companyMemorandumOfAssociation, + CompanyMinisterialDecree companyMinisterialDecree, + CompanyRegistrationVerification companyRegistrationVerification, + CompanyTaxIdVerification companyTaxIdVerification, + Map extraParams, + PrimaryVerification primaryVerification, + ProofOfAddress proofOfAddress, + ProofOfRegistration proofOfRegistration, + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { + this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; + this.companyLicense = companyLicense; + this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; + this.companyMinisterialDecree = companyMinisterialDecree; + this.companyRegistrationVerification = companyRegistrationVerification; + this.companyTaxIdVerification = companyTaxIdVerification; + this.extraParams = extraParams; + this.primaryVerification = primaryVerification; + this.proofOfAddress = proofOfAddress; + this.proofOfRegistration = proofOfRegistration; + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccountOwnershipVerification bankAccountOwnershipVerification; + + private CompanyLicense companyLicense; + + private CompanyMemorandumOfAssociation companyMemorandumOfAssociation; + + private CompanyMinisterialDecree companyMinisterialDecree; + + private CompanyRegistrationVerification companyRegistrationVerification; + + private CompanyTaxIdVerification companyTaxIdVerification; + + private Map extraParams; + + private PrimaryVerification primaryVerification; + + private ProofOfAddress proofOfAddress; + + private ProofOfRegistration proofOfRegistration; + + private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents( + this.bankAccountOwnershipVerification, + this.companyLicense, + this.companyMemorandumOfAssociation, + this.companyMinisterialDecree, + this.companyRegistrationVerification, + this.companyTaxIdVerification, + this.extraParams, + this.primaryVerification, + this.proofOfAddress, + this.proofOfRegistration, + this.proofOfUltimateBeneficialOwnership); + } + + /** + * One or more documents that support the bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + public Builder setBankAccountOwnershipVerification( + AccountCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification + bankAccountOwnershipVerification) { + this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; + return this; + } + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + public Builder setCompanyLicense( + AccountCreateParams.Identity.BusinessDetails.Documents.CompanyLicense + companyLicense) { + this.companyLicense = companyLicense; + return this; + } + + /** One or more documents showing the company’s Memorandum of Association. */ + public Builder setCompanyMemorandumOfAssociation( + AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation + companyMemorandumOfAssociation) { + this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; + return this; + } + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + public Builder setCompanyMinisterialDecree( + AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree + companyMinisterialDecree) { + this.companyMinisterialDecree = companyMinisterialDecree; + return this; + } + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + public Builder setCompanyRegistrationVerification( + AccountCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification + companyRegistrationVerification) { + this.companyRegistrationVerification = companyRegistrationVerification; + return this; + } + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + public Builder setCompanyTaxIdVerification( + AccountCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification + companyTaxIdVerification) { + this.companyTaxIdVerification = companyTaxIdVerification; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.Documents#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.Documents#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A document verifying the business. */ + public Builder setPrimaryVerification( + AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** One or more documents that demonstrate proof of address. */ + public Builder setProofOfAddress( + AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress + proofOfAddress) { + this.proofOfAddress = proofOfAddress; + return this; + } + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + public Builder setProofOfRegistration( + AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration + proofOfRegistration) { + this.proofOfRegistration = proofOfRegistration; + return this; + } + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + public Builder setProofOfUltimateBeneficialOwnership( + AccountCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership + proofOfUltimateBeneficialOwnership) { + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccountOwnershipVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private BankAccountOwnershipVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification + build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyLicense { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyLicense(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents.CompanyLicense build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents.CompanyLicense( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#files} for the + * field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#files} for the + * field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents.CompanyLicense.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMemorandumOfAssociation { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyMemorandumOfAssociation( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation + build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMinisterialDecree { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyMinisterialDecree( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree + build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents + .CompanyMinisterialDecree(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyRegistrationVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyRegistrationVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification + build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyTaxIdVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyTaxIdVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification + build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents + .CompanyTaxIdVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + .FrontBack + build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents + .PrimaryVerification.FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfAddress(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#files} for the + * field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#files} for the + * field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfRegistration { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfRegistration( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration + build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#files} for + * the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#files} for + * the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfUltimateBeneficialOwnership { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfUltimateBeneficialOwnership( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership + build() { + return new AccountCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The registrar of the ID number (Only valid for DE ID number types). */ + @SerializedName("registrar") + String registrar; + + /** Required. Open Enum. The ID number type of a business entity. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + String value; + + private IdNumber( + Map extraParams, String registrar, Type type, String value) { + this.extraParams = extraParams; + this.registrar = registrar; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String registrar; + + private Type type; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.IdNumber build() { + return new AccountCreateParams.Identity.BusinessDetails.IdNumber( + this.extraParams, this.registrar, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.IdNumber#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.IdNumber#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The registrar of the ID number (Only valid for DE ID number types). */ + public Builder setRegistrar(String registrar) { + this.registrar = registrar; + return this; + } + + /** Required. Open Enum. The ID number type of a business entity. */ + public Builder setType(AccountCreateParams.Identity.BusinessDetails.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_crn") + AE_CRN("ae_crn"), + + @SerializedName("ae_vat") + AE_VAT("ae_vat"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuit") + AR_CUIT("ar_cuit"), + + @SerializedName("at_fn") + AT_FN("at_fn"), + + @SerializedName("at_stn") + AT_STN("at_stn"), + + @SerializedName("at_vat") + AT_VAT("at_vat"), + + @SerializedName("au_abn") + AU_ABN("au_abn"), + + @SerializedName("au_acn") + AU_ACN("au_acn"), + + @SerializedName("au_in") + AU_IN("au_in"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("be_cbe") + BE_CBE("be_cbe"), + + @SerializedName("be_vat") + BE_VAT("be_vat"), + + @SerializedName("bg_uic") + BG_UIC("bg_uic"), + + @SerializedName("bg_vat") + BG_VAT("bg_vat"), + + @SerializedName("br_cnpj") + BR_CNPJ("br_cnpj"), + + @SerializedName("ca_cn") + CA_CN("ca_cn"), + + @SerializedName("ca_crarr") + CA_CRARR("ca_crarr"), + + @SerializedName("ca_gst_hst") + CA_GST_HST("ca_gst_hst"), + + @SerializedName("ca_neq") + CA_NEQ("ca_neq"), + + @SerializedName("ca_rid") + CA_RID("ca_rid"), + + @SerializedName("ch_chid") + CH_CHID("ch_chid"), + + @SerializedName("ch_uid") + CH_UID("ch_uid"), + + @SerializedName("cr_cpj") + CR_CPJ("cr_cpj"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_he") + CY_HE("cy_he"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cy_vat") + CY_VAT("cy_vat"), + + @SerializedName("cz_ico") + CZ_ICO("cz_ico"), + + @SerializedName("cz_vat") + CZ_VAT("cz_vat"), + + @SerializedName("de_hrn") + DE_HRN("de_hrn"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("de_vat") + DE_VAT("de_vat"), + + @SerializedName("dk_cvr") + DK_CVR("dk_cvr"), + + @SerializedName("dk_vat") + DK_VAT("dk_vat"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ee_rk") + EE_RK("ee_rk"), + + @SerializedName("ee_vat") + EE_VAT("ee_vat"), + + @SerializedName("es_cif") + ES_CIF("es_cif"), + + @SerializedName("es_vat") + ES_VAT("es_vat"), + + @SerializedName("fi_vat") + FI_VAT("fi_vat"), + + @SerializedName("fi_yt") + FI_YT("fi_yt"), + + @SerializedName("fr_rna") + FR_RNA("fr_rna"), + + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_vat") + FR_VAT("fr_vat"), + + @SerializedName("gb_crn") + GB_CRN("gb_crn"), + + @SerializedName("gi_crn") + GI_CRN("gi_crn"), + + @SerializedName("gr_afm") + GR_AFM("gr_afm"), + + @SerializedName("gr_gemi") + GR_GEMI("gr_gemi"), + + @SerializedName("gr_vat") + GR_VAT("gr_vat"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_br") + HK_BR("hk_br"), + + @SerializedName("hk_cr") + HK_CR("hk_cr"), + + @SerializedName("hr_mbs") + HR_MBS("hr_mbs"), + + @SerializedName("hr_oib") + HR_OIB("hr_oib"), + + @SerializedName("hr_vat") + HR_VAT("hr_vat"), + + @SerializedName("hu_cjs") + HU_CJS("hu_cjs"), + + @SerializedName("hu_tin") + HU_TIN("hu_tin"), + + @SerializedName("hu_vat") + HU_VAT("hu_vat"), + + @SerializedName("ie_crn") + IE_CRN("ie_crn"), + + @SerializedName("ie_trn") + IE_TRN("ie_trn"), + + @SerializedName("ie_vat") + IE_VAT("ie_vat"), + + @SerializedName("it_rea") + IT_REA("it_rea"), + + @SerializedName("it_vat") + IT_VAT("it_vat"), + + @SerializedName("jp_cn") + JP_CN("jp_cn"), + + @SerializedName("kz_bin") + KZ_BIN("kz_bin"), + + @SerializedName("li_uid") + LI_UID("li_uid"), + + @SerializedName("lt_ccrn") + LT_CCRN("lt_ccrn"), + + @SerializedName("lt_vat") + LT_VAT("lt_vat"), + + @SerializedName("lu_nif") + LU_NIF("lu_nif"), + + @SerializedName("lu_rcs") + LU_RCS("lu_rcs"), + + @SerializedName("lu_vat") + LU_VAT("lu_vat"), + + @SerializedName("lv_urn") + LV_URN("lv_urn"), + + @SerializedName("lv_vat") + LV_VAT("lv_vat"), + + @SerializedName("mt_crn") + MT_CRN("mt_crn"), + + @SerializedName("mt_tin") + MT_TIN("mt_tin"), + + @SerializedName("mt_vat") + MT_VAT("mt_vat"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_brn") + MY_BRN("my_brn"), + + @SerializedName("my_coid") + MY_COID("my_coid"), + + @SerializedName("my_itn") + MY_ITN("my_itn"), + + @SerializedName("my_sst") + MY_SST("my_sst"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("nl_kvk") + NL_KVK("nl_kvk"), + + @SerializedName("nl_rsin") + NL_RSIN("nl_rsin"), + + @SerializedName("nl_vat") + NL_VAT("nl_vat"), + + @SerializedName("no_orgnr") + NO_ORGNR("no_orgnr"), + + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + + @SerializedName("nz_ird") + NZ_IRD("nz_ird"), + + @SerializedName("pe_ruc") + PE_RUC("pe_ruc"), + + @SerializedName("pk_ntn") + PK_NTN("pk_ntn"), + + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + + @SerializedName("pl_regon") + PL_REGON("pl_regon"), + + @SerializedName("pl_vat") + PL_VAT("pl_vat"), + + @SerializedName("pt_vat") + PT_VAT("pt_vat"), + + @SerializedName("ro_cui") + RO_CUI("ro_cui"), + + @SerializedName("ro_orc") + RO_ORC("ro_orc"), + + @SerializedName("ro_vat") + RO_VAT("ro_vat"), + + @SerializedName("sa_crn") + SA_CRN("sa_crn"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_orgnr") + SE_ORGNR("se_orgnr"), + + @SerializedName("se_vat") + SE_VAT("se_vat"), + + @SerializedName("sg_uen") + SG_UEN("sg_uen"), + + @SerializedName("si_msp") + SI_MSP("si_msp"), + + @SerializedName("si_tin") + SI_TIN("si_tin"), + + @SerializedName("si_vat") + SI_VAT("si_vat"), + + @SerializedName("sk_dic") + SK_DIC("sk_dic"), + + @SerializedName("sk_ico") + SK_ICO("sk_ico"), + + @SerializedName("sk_vat") + SK_VAT("sk_vat"), + + @SerializedName("th_crn") + TH_CRN("th_crn"), + + @SerializedName("th_prn") + TH_PRN("th_prn"), + + @SerializedName("th_tin") + TH_TIN("th_tin"), + + @SerializedName("us_ein") + US_EIN("us_ein"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MonthlyEstimatedRevenue { + /** A non-negative integer representing the amount in the smallest currency unit. */ + @SerializedName("amount") + Amount amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MonthlyEstimatedRevenue(Amount amount, Map extraParams) { + this.amount = amount; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue build() { + return new AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue( + this.amount, this.extraParams); + } + + /** A non-negative integer representing the amount in the smallest currency unit. */ + public Builder setAmount( + AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount + build() { + return new AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + .Amount(this.currency, this.extraParams, this.value); + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.ScriptAddresses build() { + return new AccountCreateParams.Identity.BusinessDetails.ScriptAddresses( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana( + AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji( + AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana build() { + return new AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji build() { + return new AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana name. */ + @SerializedName("kana") + Kana kana; + + /** Kanji name. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.ScriptNames build() { + return new AccountCreateParams.Identity.BusinessDetails.ScriptNames( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.ScriptNames#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.BusinessDetails.ScriptNames#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana name. */ + public Builder setKana( + AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji name. */ + public Builder setKanji( + AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Registered name of the business. */ + @SerializedName("registered_name") + String registeredName; + + private Kana(Map extraParams, String registeredName) { + this.extraParams = extraParams; + this.registeredName = registeredName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String registeredName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kana build() { + return new AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kana( + this.extraParams, this.registeredName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kana#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kana#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Registered name of the business. */ + @SerializedName("registered_name") + String registeredName; + + private Kanji(Map extraParams, String registeredName) { + this.extraParams = extraParams; + this.registeredName = registeredName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String registeredName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kanji build() { + return new AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kanji( + this.extraParams, this.registeredName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kanji#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.BusinessDetails.ScriptNames.Kanji#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + } + + public enum Structure implements ApiRequestParams.EnumParam { + @SerializedName("cooperative") + COOPERATIVE("cooperative"), + + @SerializedName("free_zone_establishment") + FREE_ZONE_ESTABLISHMENT("free_zone_establishment"), + + @SerializedName("free_zone_llc") + FREE_ZONE_LLC("free_zone_llc"), + + @SerializedName("governmental_unit") + GOVERNMENTAL_UNIT("governmental_unit"), + + @SerializedName("government_instrumentality") + GOVERNMENT_INSTRUMENTALITY("government_instrumentality"), + + @SerializedName("incorporated_association") + INCORPORATED_ASSOCIATION("incorporated_association"), + + @SerializedName("incorporated_non_profit") + INCORPORATED_NON_PROFIT("incorporated_non_profit"), + + @SerializedName("incorporated_partnership") + INCORPORATED_PARTNERSHIP("incorporated_partnership"), + + @SerializedName("limited_liability_partnership") + LIMITED_LIABILITY_PARTNERSHIP("limited_liability_partnership"), + + @SerializedName("llc") + LLC("llc"), + + @SerializedName("multi_member_llc") + MULTI_MEMBER_LLC("multi_member_llc"), + + @SerializedName("private_company") + PRIVATE_COMPANY("private_company"), + + @SerializedName("private_corporation") + PRIVATE_CORPORATION("private_corporation"), + + @SerializedName("private_partnership") + PRIVATE_PARTNERSHIP("private_partnership"), + + @SerializedName("public_company") + PUBLIC_COMPANY("public_company"), + + @SerializedName("public_corporation") + PUBLIC_CORPORATION("public_corporation"), + + @SerializedName("public_listed_corporation") + PUBLIC_LISTED_CORPORATION("public_listed_corporation"), + + @SerializedName("public_partnership") + PUBLIC_PARTNERSHIP("public_partnership"), + + @SerializedName("registered_charity") + REGISTERED_CHARITY("registered_charity"), + + @SerializedName("single_member_llc") + SINGLE_MEMBER_LLC("single_member_llc"), + + @SerializedName("sole_establishment") + SOLE_ESTABLISHMENT("sole_establishment"), + + @SerializedName("sole_proprietorship") + SOLE_PROPRIETORSHIP("sole_proprietorship"), + + @SerializedName("tax_exempt_government_instrumentality") + TAX_EXEMPT_GOVERNMENT_INSTRUMENTALITY("tax_exempt_government_instrumentality"), + + @SerializedName("trust") + TRUST("trust"), + + @SerializedName("unincorporated_association") + UNINCORPORATED_ASSOCIATION("unincorporated_association"), + + @SerializedName("unincorporated_non_profit") + UNINCORPORATED_NON_PROFIT("unincorporated_non_profit"), + + @SerializedName("unincorporated_partnership") + UNINCORPORATED_PARTNERSHIP("unincorporated_partnership"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Structure(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** Additional addresses associated with the individual. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the individual. */ + @SerializedName("additional_names") + List additionalNames; + + /** The individual's residential address. */ + @SerializedName("address") + Address address; + + /** The individual's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** The individual's email address. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The individual's first name. */ + @SerializedName("given_name") + String givenName; + + /** The identification numbers (e.g., SSN) associated with the individual. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The individual's gender (International regulations require either "male" or + * "female"). + */ + @SerializedName("legal_gender") + LegalGender legalGender; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * The countries where the individual is a national. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("nationalities") + List nationalities; + + /** The individual's phone number. */ + @SerializedName("phone") + String phone; + + /** The individual's political exposure. */ + @SerializedName("political_exposure") + PoliticalExposure politicalExposure; + + /** The relationship that this individual has with the account's identity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The individuals primary name in non latin script. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The individual's last name. */ + @SerializedName("surname") + String surname; + + private Individual( + List additionalAddresses, + List additionalNames, + Address address, + DateOfBirth dateOfBirth, + Documents documents, + String email, + Map extraParams, + String givenName, + List idNumbers, + LegalGender legalGender, + Map metadata, + List nationalities, + String phone, + PoliticalExposure politicalExposure, + Relationship relationship, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + String surname) { + this.additionalAddresses = additionalAddresses; + this.additionalNames = additionalNames; + this.address = address; + this.dateOfBirth = dateOfBirth; + this.documents = documents; + this.email = email; + this.extraParams = extraParams; + this.givenName = givenName; + this.idNumbers = idNumbers; + this.legalGender = legalGender; + this.metadata = metadata; + this.nationalities = nationalities; + this.phone = phone; + this.politicalExposure = politicalExposure; + this.relationship = relationship; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List additionalAddresses; + + private List additionalNames; + + private Address address; + + private DateOfBirth dateOfBirth; + + private Documents documents; + + private String email; + + private Map extraParams; + + private String givenName; + + private List idNumbers; + + private LegalGender legalGender; + + private Map metadata; + + private List nationalities; + + private String phone; + + private PoliticalExposure politicalExposure; + + private Relationship relationship; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual build() { + return new AccountCreateParams.Identity.Individual( + this.additionalAddresses, + this.additionalNames, + this.address, + this.dateOfBirth, + this.documents, + this.email, + this.extraParams, + this.givenName, + this.idNumbers, + this.legalGender, + this.metadata, + this.nationalities, + this.phone, + this.politicalExposure, + this.relationship, + this.scriptAddresses, + this.scriptNames, + this.surname); + } + + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Identity.Individual#additionalAddresses} for the field + * documentation. + */ + public Builder addAdditionalAddress( + AccountCreateParams.Identity.Individual.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Identity.Individual#additionalAddresses} for the field + * documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + + /** + * Add an element to `additionalNames` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Identity.Individual#additionalNames} for the field + * documentation. + */ + public Builder addAdditionalName( + AccountCreateParams.Identity.Individual.AdditionalName element) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.add(element); + return this; + } + + /** + * Add all elements to `additionalNames` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Identity.Individual#additionalNames} for the field + * documentation. + */ + public Builder addAllAdditionalName( + List elements) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.addAll(elements); + return this; + } + + /** The individual's residential address. */ + public Builder setAddress(AccountCreateParams.Identity.Individual.Address address) { + this.address = address; + return this; + } + + /** The individual's date of birth. */ + public Builder setDateOfBirth( + AccountCreateParams.Identity.Individual.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + public Builder setDocuments(AccountCreateParams.Identity.Individual.Documents documents) { + this.documents = documents; + return this; + } + + /** The individual's email address. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The individual's first name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.Individual#idNumbers} for the field documentation. + */ + public Builder addIdNumber(AccountCreateParams.Identity.Individual.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.Individual#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber( + List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** + * The individual's gender (International regulations require either "male" or + * "female"). + */ + public Builder setLegalGender( + AccountCreateParams.Identity.Individual.LegalGender legalGender) { + this.legalGender = legalGender; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountCreateParams.Identity.Individual#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual#metadata} for the field + * documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Add an element to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.Individual#nationalities} for the field documentation. + */ + public Builder addNationality(String element) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.add(element); + return this; + } + + /** + * Add all elements to `nationalities` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountCreateParams.Identity.Individual#nationalities} for the field + * documentation. + */ + public Builder addAllNationality(List elements) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.addAll(elements); + return this; + } + + /** The individual's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The individual's political exposure. */ + public Builder setPoliticalExposure( + AccountCreateParams.Identity.Individual.PoliticalExposure politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** The relationship that this individual has with the account's identity. */ + public Builder setRelationship( + AccountCreateParams.Identity.Individual.Relationship relationship) { + this.relationship = relationship; + return this; + } + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + public Builder setScriptAddresses( + AccountCreateParams.Identity.Individual.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The individuals primary name in non latin script. */ + public Builder setScriptNames( + AccountCreateParams.Identity.Individual.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The individual's last name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private AdditionalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + Purpose purpose, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private Purpose purpose; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.AdditionalAddress build() { + return new AccountCreateParams.Identity.Individual.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.AdditionalAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.AdditionalAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose( + AccountCreateParams.Identity.Individual.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("registered") + REGISTERED("registered"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's full name. */ + @SerializedName("full_name") + String fullName; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** Required. The purpose or type of the additional name. */ + @SerializedName("purpose") + Purpose purpose; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private AdditionalName( + Map extraParams, + String fullName, + String givenName, + Purpose purpose, + String surname) { + this.extraParams = extraParams; + this.fullName = fullName; + this.givenName = givenName; + this.purpose = purpose; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String fullName; + + private String givenName; + + private Purpose purpose; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.AdditionalName build() { + return new AccountCreateParams.Identity.Individual.AdditionalName( + this.extraParams, this.fullName, this.givenName, this.purpose, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.AdditionalName#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.AdditionalName#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's full name. */ + public Builder setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** Required. The purpose or type of the additional name. */ + public Builder setPurpose( + AccountCreateParams.Identity.Individual.AdditionalName.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("alias") + ALIAS("alias"), + + @SerializedName("maiden") + MAIDEN("maiden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Address build() { + return new AccountCreateParams.Identity.Individual.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.Address#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.Address#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth { + /** Required. The day of birth. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth. */ + @SerializedName("month") + Long month; + + /** Required. The year of birth. */ + @SerializedName("year") + Long year; + + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.DateOfBirth build() { + return new AccountCreateParams.Identity.Individual.DateOfBirth( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of birth. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.DateOfBirth#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.DateOfBirth#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + @SerializedName("passport") + Passport passport; + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + @SerializedName("visa") + Visa visa; + + private Documents( + CompanyAuthorization companyAuthorization, + Map extraParams, + Passport passport, + PrimaryVerification primaryVerification, + SecondaryVerification secondaryVerification, + Visa visa) { + this.companyAuthorization = companyAuthorization; + this.extraParams = extraParams; + this.passport = passport; + this.primaryVerification = primaryVerification; + this.secondaryVerification = secondaryVerification; + this.visa = visa; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CompanyAuthorization companyAuthorization; + + private Map extraParams; + + private Passport passport; + + private PrimaryVerification primaryVerification; + + private SecondaryVerification secondaryVerification; + + private Visa visa; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Documents build() { + return new AccountCreateParams.Identity.Individual.Documents( + this.companyAuthorization, + this.extraParams, + this.passport, + this.primaryVerification, + this.secondaryVerification, + this.visa); + } + + /** + * One or more documents that demonstrate proof that this person is authorized to + * represent the company. + */ + public Builder setCompanyAuthorization( + AccountCreateParams.Identity.Individual.Documents.CompanyAuthorization + companyAuthorization) { + this.companyAuthorization = companyAuthorization; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.Documents#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.Documents#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + public Builder setPassport( + AccountCreateParams.Identity.Individual.Documents.Passport passport) { + this.passport = passport; + return this; + } + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + public Builder setPrimaryVerification( + AccountCreateParams.Identity.Individual.Documents.PrimaryVerification + primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + public Builder setSecondaryVerification( + AccountCreateParams.Identity.Individual.Documents.SecondaryVerification + secondaryVerification) { + this.secondaryVerification = secondaryVerification; + return this; + } + + /** + * One or more documents showing the person’s visa required for living in the country + * where they are residing. + */ + public Builder setVisa(AccountCreateParams.Identity.Individual.Documents.Visa visa) { + this.visa = visa; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyAuthorization( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Documents.CompanyAuthorization build() { + return new AccountCreateParams.Identity.Individual.Documents.CompanyAuthorization( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.CompanyAuthorization#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.CompanyAuthorization#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.Individual.Documents.CompanyAuthorization#files} for the + * field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.Individual.Documents.CompanyAuthorization#files} for the + * field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.Individual.Documents.CompanyAuthorization.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passport { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Passport(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Documents.Passport build() { + return new AccountCreateParams.Identity.Individual.Documents.Passport( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.Individual.Documents.Passport#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.Individual.Documents.Passport#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.Individual.Documents.Passport.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Documents.PrimaryVerification build() { + return new AccountCreateParams.Identity.Individual.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountCreateParams.Identity.Individual.Documents.PrimaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack + build() { + return new AccountCreateParams.Identity.Individual.Documents.PrimaryVerification + .FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private SecondaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Documents.SecondaryVerification build() { + return new AccountCreateParams.Identity.Individual.Documents.SecondaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.SecondaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.SecondaryVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountCreateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountCreateParams.Identity.Individual.Documents.SecondaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Documents.SecondaryVerification + .FrontBack + build() { + return new AccountCreateParams.Identity.Individual.Documents.SecondaryVerification + .FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB + * in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Visa { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Visa(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Documents.Visa build() { + return new AccountCreateParams.Identity.Individual.Documents.Visa( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.Individual.Documents.Visa#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountCreateParams.Identity.Individual.Documents.Visa#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountCreateParams.Identity.Individual.Documents.Visa.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The ID number type of an individual. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + String value; + + private IdNumber(Map extraParams, Type type, String value) { + this.extraParams = extraParams; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.IdNumber build() { + return new AccountCreateParams.Identity.Individual.IdNumber( + this.extraParams, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.IdNumber#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.IdNumber#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The ID number type of an individual. */ + public Builder setType(AccountCreateParams.Identity.Individual.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_eid") + AE_EID("ae_eid"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuil") + AR_CUIL("ar_cuil"), + + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + + @SerializedName("at_stn") + AT_STN("at_stn"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_brc") + BD_BRC("bd_brc"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("bd_nid") + BD_NID("bd_nid"), + + @SerializedName("be_nrn") + BE_NRN("be_nrn"), + + @SerializedName("bg_ucn") + BG_UCN("bg_ucn"), + + @SerializedName("bn_nric") + BN_NRIC("bn_nric"), + + @SerializedName("br_cpf") + BR_CPF("br_cpf"), + + @SerializedName("ca_sin") + CA_SIN("ca_sin"), + + @SerializedName("ch_oasi") + CH_OASI("ch_oasi"), + + @SerializedName("cl_rut") + CL_RUT("cl_rut"), + + @SerializedName("cn_pp") + CN_PP("cn_pp"), + + @SerializedName("co_nuip") + CO_NUIP("co_nuip"), + + @SerializedName("cr_ci") + CR_CI("cr_ci"), + + @SerializedName("cr_cpf") + CR_CPF("cr_cpf"), + + @SerializedName("cr_dimex") + CR_DIMEX("cr_dimex"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cz_rc") + CZ_RC("cz_rc"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("dk_cpr") + DK_CPR("dk_cpr"), + + @SerializedName("do_cie") + DO_CIE("do_cie"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ec_ci") + EC_CI("ec_ci"), + + @SerializedName("ee_ik") + EE_IK("ee_ik"), + + @SerializedName("es_nif") + ES_NIF("es_nif"), + + @SerializedName("fi_hetu") + FI_HETU("fi_hetu"), + + @SerializedName("fr_nir") + FR_NIR("fr_nir"), + + @SerializedName("gb_nino") + GB_NINO("gb_nino"), + + @SerializedName("gr_afm") + GR_AFM("gr_afm"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_id") + HK_ID("hk_id"), + + @SerializedName("hr_oib") + HR_OIB("hr_oib"), + + @SerializedName("hu_ad") + HU_AD("hu_ad"), + + @SerializedName("id_nik") + ID_NIK("id_nik"), + + @SerializedName("ie_ppsn") + IE_PPSN("ie_ppsn"), + + @SerializedName("is_kt") + IS_KT("is_kt"), + + @SerializedName("it_cf") + IT_CF("it_cf"), + + @SerializedName("jp_inc") + JP_INC("jp_inc"), + + @SerializedName("ke_pin") + KE_PIN("ke_pin"), + + @SerializedName("kz_iin") + KZ_IIN("kz_iin"), + + @SerializedName("li_peid") + LI_PEID("li_peid"), + + @SerializedName("lt_ak") + LT_AK("lt_ak"), + + @SerializedName("lu_nif") + LU_NIF("lu_nif"), + + @SerializedName("lv_pk") + LV_PK("lv_pk"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_nric") + MY_NRIC("my_nric"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("ng_nin") + NG_NIN("ng_nin"), + + @SerializedName("nl_bsn") + NL_BSN("nl_bsn"), + + @SerializedName("no_nin") + NO_NIN("no_nin"), + + @SerializedName("nz_ird") + NZ_IRD("nz_ird"), + + @SerializedName("pe_dni") + PE_DNI("pe_dni"), + + @SerializedName("pk_cnic") + PK_CNIC("pk_cnic"), + + @SerializedName("pk_snic") + PK_SNIC("pk_snic"), + + @SerializedName("pl_pesel") + PL_PESEL("pl_pesel"), + + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + + @SerializedName("ro_cnp") + RO_CNP("ro_cnp"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_pin") + SE_PIN("se_pin"), + + @SerializedName("sg_fin") + SG_FIN("sg_fin"), + + @SerializedName("sg_nric") + SG_NRIC("sg_nric"), + + @SerializedName("sk_dic") + SK_DIC("sk_dic"), + + @SerializedName("th_lc") + TH_LC("th_lc"), + + @SerializedName("th_pin") + TH_PIN("th_pin"), + + @SerializedName("tr_tin") + TR_TIN("tr_tin"), + + @SerializedName("us_itin") + US_ITIN("us_itin"), + + @SerializedName("us_itin_last_4") + US_ITIN_LAST_4("us_itin_last_4"), + + @SerializedName("us_ssn") + US_SSN("us_ssn"), + + @SerializedName("us_ssn_last_4") + US_SSN_LAST_4("us_ssn_last_4"), + + @SerializedName("uy_dni") + UY_DNI("uy_dni"), + + @SerializedName("za_id") + ZA_ID("za_id"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Relationship { + /** + * Whether the person is a director of the account's identity. Directors are typically + * members of the governing board of the company, or responsible for ensuring the company + * meets its regulatory obligations. + */ + @SerializedName("director") + Boolean director; + + /** + * Whether the person has significant responsibility to control, manage, or direct the + * organization. + */ + @SerializedName("executive") + Boolean executive; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether the person is an owner of the account’s identity. */ + @SerializedName("owner") + Boolean owner; + + /** The percent owned by the person of the account's legal entity. */ + @SerializedName("percent_ownership") + String percentOwnership; + + /** The person's title (e.g., CEO, Support Engineer). */ + @SerializedName("title") + String title; + + private Relationship( + Boolean director, + Boolean executive, + Map extraParams, + Boolean owner, + String percentOwnership, + String title) { + this.director = director; + this.executive = executive; + this.extraParams = extraParams; + this.owner = owner; + this.percentOwnership = percentOwnership; + this.title = title; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean director; + + private Boolean executive; + + private Map extraParams; + + private Boolean owner; + + private String percentOwnership; + + private String title; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.Relationship build() { + return new AccountCreateParams.Identity.Individual.Relationship( + this.director, + this.executive, + this.extraParams, + this.owner, + this.percentOwnership, + this.title); + } + + /** + * Whether the person is a director of the account's identity. Directors are typically + * members of the governing board of the company, or responsible for ensuring the company + * meets its regulatory obligations. + */ + public Builder setDirector(Boolean director) { + this.director = director; + return this; + } + + /** + * Whether the person has significant responsibility to control, manage, or direct the + * organization. + */ + public Builder setExecutive(Boolean executive) { + this.executive = executive; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.Relationship#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.Relationship#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether the person is an owner of the account’s identity. */ + public Builder setOwner(Boolean owner) { + this.owner = owner; + return this; + } + + /** The percent owned by the person of the account's legal entity. */ + public Builder setPercentOwnership(String percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** The person's title (e.g., CEO, Support Engineer). */ + public Builder setTitle(String title) { + this.title = title; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.ScriptAddresses build() { + return new AccountCreateParams.Identity.Individual.ScriptAddresses( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.ScriptAddresses#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.ScriptAddresses#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana( + AccountCreateParams.Identity.Individual.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji( + AccountCreateParams.Identity.Individual.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.ScriptAddresses.Kana build() { + return new AccountCreateParams.Identity.Individual.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.ScriptAddresses.Kana#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.ScriptAddresses.Kana#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.ScriptAddresses.Kanji build() { + return new AccountCreateParams.Identity.Individual.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.ScriptAddresses.Kanji#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.ScriptAddresses.Kanji#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.ScriptNames build() { + return new AccountCreateParams.Identity.Individual.ScriptNames( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.ScriptNames#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Identity.Individual.ScriptNames#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Persons name in kana script. */ + public Builder setKana(AccountCreateParams.Identity.Individual.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Persons name in kanji script. */ + public Builder setKanji(AccountCreateParams.Identity.Individual.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kana(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.ScriptNames.Kana build() { + return new AccountCreateParams.Identity.Individual.ScriptNames.Kana( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kanji(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Identity.Individual.ScriptNames.Kanji build() { + return new AccountCreateParams.Identity.Individual.ScriptNames.Kanji( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Identity.Individual.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + } + + public enum LegalGender implements ApiRequestParams.EnumParam { + @SerializedName("female") + FEMALE("female"), + + @SerializedName("male") + MALE("male"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LegalGender(String value) { + this.value = value; + } + } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } + } + + public enum EntityType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("government_entity") + GOVERNMENT_ENTITY("government_entity"), + + @SerializedName("individual") + INDIVIDUAL("individual"), + + @SerializedName("non_profit") + NON_PROFIT("non_profit"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EntityType(String value) { + this.value = value; + } + } + } + + public enum Dashboard implements ApiRequestParams.EnumParam { + @SerializedName("express") + EXPRESS("express"), + + @SerializedName("full") + FULL("full"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Dashboard(String value) { + this.value = value; + } + } + + public enum Include implements ApiRequestParams.EnumParam { + @SerializedName("configuration.customer") + CONFIGURATION__CUSTOMER("configuration.customer"), + + @SerializedName("configuration.merchant") + CONFIGURATION__MERCHANT("configuration.merchant"), + + @SerializedName("configuration.recipient") + CONFIGURATION__RECIPIENT("configuration.recipient"), + + @SerializedName("defaults") + DEFAULTS("defaults"), + + @SerializedName("future_requirements") + FUTURE_REQUIREMENTS("future_requirements"), + + @SerializedName("identity") + IDENTITY("identity"), + + @SerializedName("requirements") + REQUIREMENTS("requirements"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Include(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/AccountLinkCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountLinkCreateParams.java new file mode 100644 index 00000000000..0c3ab0493c3 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountLinkCreateParams.java @@ -0,0 +1,872 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AccountLinkCreateParams extends ApiRequestParams { + /** Required. The ID of the Account to create link for. */ + @SerializedName("account") + String account; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The use case of the AccountLink. */ + @SerializedName("use_case") + UseCase useCase; + + private AccountLinkCreateParams( + String account, Map extraParams, UseCase useCase) { + this.account = account; + this.extraParams = extraParams; + this.useCase = useCase; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String account; + + private Map extraParams; + + private UseCase useCase; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountLinkCreateParams build() { + return new AccountLinkCreateParams(this.account, this.extraParams, this.useCase); + } + + /** Required. The ID of the Account to create link for. */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountLinkCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountLinkCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The use case of the AccountLink. */ + public Builder setUseCase(AccountLinkCreateParams.UseCase useCase) { + this.useCase = useCase; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class UseCase { + /** + * Hash containing configuration options for an Account Link object that onboards a new account. + */ + @SerializedName("account_onboarding") + AccountOnboarding accountOnboarding; + + /** + * Hash containing configuration options for an Account Link that updates an existing account. + */ + @SerializedName("account_update") + AccountUpdate accountUpdate; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Open Enum. The type of Account Link the user is requesting. */ + @SerializedName("type") + Type type; + + private UseCase( + AccountOnboarding accountOnboarding, + AccountUpdate accountUpdate, + Map extraParams, + Type type) { + this.accountOnboarding = accountOnboarding; + this.accountUpdate = accountUpdate; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AccountOnboarding accountOnboarding; + + private AccountUpdate accountUpdate; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountLinkCreateParams.UseCase build() { + return new AccountLinkCreateParams.UseCase( + this.accountOnboarding, this.accountUpdate, this.extraParams, this.type); + } + + /** + * Hash containing configuration options for an Account Link object that onboards a new + * account. + */ + public Builder setAccountOnboarding( + AccountLinkCreateParams.UseCase.AccountOnboarding accountOnboarding) { + this.accountOnboarding = accountOnboarding; + return this; + } + + /** + * Hash containing configuration options for an Account Link that updates an existing account. + */ + public Builder setAccountUpdate(AccountLinkCreateParams.UseCase.AccountUpdate accountUpdate) { + this.accountUpdate = accountUpdate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountLinkCreateParams.UseCase#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountLinkCreateParams.UseCase#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Open Enum. The type of Account Link the user is requesting. */ + public Builder setType(AccountLinkCreateParams.UseCase.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AccountOnboarding { + /** + * Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding + * flow. + */ + @SerializedName("collection_options") + CollectionOptions collectionOptions; + + /** + * Required. Open Enum. A v2/core/account can be configured to enable certain + * functionality. The configuration param targets the v2/core/account_link to collect + * information for the specified v2/core/account configuration/s. + */ + @SerializedName("configurations") + List configurations; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The URL the user will be redirected to if the AccountLink is + * expired, has been used, or is otherwise invalid. The URL you specify should attempt to + * generate a new AccountLink with the same parameters used to create the original + * AccountLink, then redirect the user to the new AccountLink’s URL so they can continue the + * flow. If a new AccountLink cannot be generated or the redirect fails you should display a + * useful error to the user. Please make sure to implement authentication before redirecting + * the user in case this URL is leaked to a third party. + */ + @SerializedName("refresh_url") + String refreshUrl; + + /** The URL that the user will be redirected to upon completing the linked flow. */ + @SerializedName("return_url") + String returnUrl; + + private AccountOnboarding( + CollectionOptions collectionOptions, + List configurations, + Map extraParams, + String refreshUrl, + String returnUrl) { + this.collectionOptions = collectionOptions; + this.configurations = configurations; + this.extraParams = extraParams; + this.refreshUrl = refreshUrl; + this.returnUrl = returnUrl; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CollectionOptions collectionOptions; + + private List + configurations; + + private Map extraParams; + + private String refreshUrl; + + private String returnUrl; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountLinkCreateParams.UseCase.AccountOnboarding build() { + return new AccountLinkCreateParams.UseCase.AccountOnboarding( + this.collectionOptions, + this.configurations, + this.extraParams, + this.refreshUrl, + this.returnUrl); + } + + /** + * Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding + * flow. + */ + public Builder setCollectionOptions( + AccountLinkCreateParams.UseCase.AccountOnboarding.CollectionOptions collectionOptions) { + this.collectionOptions = collectionOptions; + return this; + } + + /** + * Add an element to `configurations` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountLinkCreateParams.UseCase.AccountOnboarding#configurations} for the field + * documentation. + */ + public Builder addConfiguration( + AccountLinkCreateParams.UseCase.AccountOnboarding.Configuration element) { + if (this.configurations == null) { + this.configurations = new ArrayList<>(); + } + this.configurations.add(element); + return this; + } + + /** + * Add all elements to `configurations` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountLinkCreateParams.UseCase.AccountOnboarding#configurations} for the + * field documentation. + */ + public Builder addAllConfiguration( + List elements) { + if (this.configurations == null) { + this.configurations = new ArrayList<>(); + } + this.configurations.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountLinkCreateParams.UseCase.AccountOnboarding#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountLinkCreateParams.UseCase.AccountOnboarding#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The URL the user will be redirected to if the AccountLink is + * expired, has been used, or is otherwise invalid. The URL you specify should attempt to + * generate a new AccountLink with the same parameters used to create the original + * AccountLink, then redirect the user to the new AccountLink’s URL so they can continue the + * flow. If a new AccountLink cannot be generated or the redirect fails you should display a + * useful error to the user. Please make sure to implement authentication before redirecting + * the user in case this URL is leaked to a third party. + */ + public Builder setRefreshUrl(String refreshUrl) { + this.refreshUrl = refreshUrl; + return this; + } + + /** The URL that the user will be redirected to upon completing the linked flow. */ + public Builder setReturnUrl(String returnUrl) { + this.returnUrl = returnUrl; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CollectionOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Specifies whether the platform collects only currently_due requirements ({@code + * currently_due}) or both currently_due and eventually_due requirements ({@code + * eventually_due}). If you don’t specify collection_options, the default value is + * currently_due. + */ + @SerializedName("fields") + Fields fields; + + /** + * Specifies whether the platform collects future_requirements in addition to requirements + * in Connect Onboarding. The default value is {@code omit}. + */ + @SerializedName("future_requirements") + FutureRequirements futureRequirements; + + private CollectionOptions( + Map extraParams, Fields fields, FutureRequirements futureRequirements) { + this.extraParams = extraParams; + this.fields = fields; + this.futureRequirements = futureRequirements; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Fields fields; + + private FutureRequirements futureRequirements; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountLinkCreateParams.UseCase.AccountOnboarding.CollectionOptions build() { + return new AccountLinkCreateParams.UseCase.AccountOnboarding.CollectionOptions( + this.extraParams, this.fields, this.futureRequirements); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountLinkCreateParams.UseCase.AccountOnboarding.CollectionOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountLinkCreateParams.UseCase.AccountOnboarding.CollectionOptions#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Specifies whether the platform collects only currently_due requirements ({@code + * currently_due}) or both currently_due and eventually_due requirements ({@code + * eventually_due}). If you don’t specify collection_options, the default value is + * currently_due. + */ + public Builder setFields( + AccountLinkCreateParams.UseCase.AccountOnboarding.CollectionOptions.Fields fields) { + this.fields = fields; + return this; + } + + /** + * Specifies whether the platform collects future_requirements in addition to requirements + * in Connect Onboarding. The default value is {@code omit}. + */ + public Builder setFutureRequirements( + AccountLinkCreateParams.UseCase.AccountOnboarding.CollectionOptions.FutureRequirements + futureRequirements) { + this.futureRequirements = futureRequirements; + return this; + } + } + + public enum Fields implements ApiRequestParams.EnumParam { + @SerializedName("currently_due") + CURRENTLY_DUE("currently_due"), + + @SerializedName("eventually_due") + EVENTUALLY_DUE("eventually_due"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Fields(String value) { + this.value = value; + } + } + + public enum FutureRequirements implements ApiRequestParams.EnumParam { + @SerializedName("include") + INCLUDE("include"), + + @SerializedName("omit") + OMIT("omit"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FutureRequirements(String value) { + this.value = value; + } + } + } + + public enum Configuration implements ApiRequestParams.EnumParam { + @SerializedName("customer") + CUSTOMER("customer"), + + @SerializedName("merchant") + MERCHANT("merchant"), + + @SerializedName("recipient") + RECIPIENT("recipient"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Configuration(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AccountUpdate { + /** + * Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding + * flow. + */ + @SerializedName("collection_options") + CollectionOptions collectionOptions; + + /** + * Required. Open Enum. A v2/account can be configured to enable certain + * functionality. The configuration param targets the v2/account_link to collect information + * for the specified v2/account configuration/s. + */ + @SerializedName("configurations") + List configurations; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The URL the user will be redirected to if the Account Link is + * expired, has been used, or is otherwise invalid. The URL you specify should attempt to + * generate a new Account Link with the same parameters used to create the original Account + * Link, then redirect the user to the new Account Link URL so they can continue the flow. + * Make sure to authenticate the user before redirecting to the new Account Link, in case the + * URL leaks to a third party. If a new Account Link can't be generated, or if the redirect + * fails, you should display a useful error to the user. + */ + @SerializedName("refresh_url") + String refreshUrl; + + /** The URL that the user will be redirected to upon completing the linked flow. */ + @SerializedName("return_url") + String returnUrl; + + private AccountUpdate( + CollectionOptions collectionOptions, + List configurations, + Map extraParams, + String refreshUrl, + String returnUrl) { + this.collectionOptions = collectionOptions; + this.configurations = configurations; + this.extraParams = extraParams; + this.refreshUrl = refreshUrl; + this.returnUrl = returnUrl; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CollectionOptions collectionOptions; + + private List configurations; + + private Map extraParams; + + private String refreshUrl; + + private String returnUrl; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountLinkCreateParams.UseCase.AccountUpdate build() { + return new AccountLinkCreateParams.UseCase.AccountUpdate( + this.collectionOptions, + this.configurations, + this.extraParams, + this.refreshUrl, + this.returnUrl); + } + + /** + * Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding + * flow. + */ + public Builder setCollectionOptions( + AccountLinkCreateParams.UseCase.AccountUpdate.CollectionOptions collectionOptions) { + this.collectionOptions = collectionOptions; + return this; + } + + /** + * Add an element to `configurations` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountLinkCreateParams.UseCase.AccountUpdate#configurations} for the field + * documentation. + */ + public Builder addConfiguration( + AccountLinkCreateParams.UseCase.AccountUpdate.Configuration element) { + if (this.configurations == null) { + this.configurations = new ArrayList<>(); + } + this.configurations.add(element); + return this; + } + + /** + * Add all elements to `configurations` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountLinkCreateParams.UseCase.AccountUpdate#configurations} for the field + * documentation. + */ + public Builder addAllConfiguration( + List elements) { + if (this.configurations == null) { + this.configurations = new ArrayList<>(); + } + this.configurations.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountLinkCreateParams.UseCase.AccountUpdate#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountLinkCreateParams.UseCase.AccountUpdate#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The URL the user will be redirected to if the Account Link is + * expired, has been used, or is otherwise invalid. The URL you specify should attempt to + * generate a new Account Link with the same parameters used to create the original Account + * Link, then redirect the user to the new Account Link URL so they can continue the flow. + * Make sure to authenticate the user before redirecting to the new Account Link, in case + * the URL leaks to a third party. If a new Account Link can't be generated, or if the + * redirect fails, you should display a useful error to the user. + */ + public Builder setRefreshUrl(String refreshUrl) { + this.refreshUrl = refreshUrl; + return this; + } + + /** The URL that the user will be redirected to upon completing the linked flow. */ + public Builder setReturnUrl(String returnUrl) { + this.returnUrl = returnUrl; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CollectionOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Specifies whether the platform collects only currently_due requirements ({@code + * currently_due}) or both currently_due and eventually_due requirements ({@code + * eventually_due}). The default value is {@code currently_due}. + */ + @SerializedName("fields") + Fields fields; + + /** + * Specifies whether the platform collects future_requirements in addition to requirements + * in Connect Onboarding. The default value is {@code omit}. + */ + @SerializedName("future_requirements") + FutureRequirements futureRequirements; + + private CollectionOptions( + Map extraParams, Fields fields, FutureRequirements futureRequirements) { + this.extraParams = extraParams; + this.fields = fields; + this.futureRequirements = futureRequirements; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Fields fields; + + private FutureRequirements futureRequirements; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountLinkCreateParams.UseCase.AccountUpdate.CollectionOptions build() { + return new AccountLinkCreateParams.UseCase.AccountUpdate.CollectionOptions( + this.extraParams, this.fields, this.futureRequirements); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountLinkCreateParams.UseCase.AccountUpdate.CollectionOptions#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountLinkCreateParams.UseCase.AccountUpdate.CollectionOptions#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Specifies whether the platform collects only currently_due requirements ({@code + * currently_due}) or both currently_due and eventually_due requirements ({@code + * eventually_due}). The default value is {@code currently_due}. + */ + public Builder setFields( + AccountLinkCreateParams.UseCase.AccountUpdate.CollectionOptions.Fields fields) { + this.fields = fields; + return this; + } + + /** + * Specifies whether the platform collects future_requirements in addition to requirements + * in Connect Onboarding. The default value is {@code omit}. + */ + public Builder setFutureRequirements( + AccountLinkCreateParams.UseCase.AccountUpdate.CollectionOptions.FutureRequirements + futureRequirements) { + this.futureRequirements = futureRequirements; + return this; + } + } + + public enum Fields implements ApiRequestParams.EnumParam { + @SerializedName("currently_due") + CURRENTLY_DUE("currently_due"), + + @SerializedName("eventually_due") + EVENTUALLY_DUE("eventually_due"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Fields(String value) { + this.value = value; + } + } + + public enum FutureRequirements implements ApiRequestParams.EnumParam { + @SerializedName("include") + INCLUDE("include"), + + @SerializedName("omit") + OMIT("omit"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FutureRequirements(String value) { + this.value = value; + } + } + } + + public enum Configuration implements ApiRequestParams.EnumParam { + @SerializedName("customer") + CUSTOMER("customer"), + + @SerializedName("merchant") + MERCHANT("merchant"), + + @SerializedName("recipient") + RECIPIENT("recipient"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Configuration(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("account_onboarding") + ACCOUNT_ONBOARDING("account_onboarding"), + + @SerializedName("account_update") + ACCOUNT_UPDATE("account_update"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/AccountListParams.java b/src/main/java/com/stripe/param/v2/core/AccountListParams.java new file mode 100644 index 00000000000..a040186f6c4 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountListParams.java @@ -0,0 +1,158 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AccountListParams extends ApiRequestParams { + /** + * Filter only accounts that have all of the configurations specified. If omitted, returns all + * accounts regardless of which configurations they have. + */ + @SerializedName("applied_configurations") + List appliedConfigurations; + + /** + * Filter by whether the account is closed. If omitted, returns only Accounts that are not closed. + */ + @SerializedName("closed") + Boolean closed; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The upper limit on the number of accounts returned by the List Account request. */ + @SerializedName("limit") + Long limit; + + private AccountListParams( + List appliedConfigurations, + Boolean closed, + Map extraParams, + Long limit) { + this.appliedConfigurations = appliedConfigurations; + this.closed = closed; + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List appliedConfigurations; + + private Boolean closed; + + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountListParams build() { + return new AccountListParams( + this.appliedConfigurations, this.closed, this.extraParams, this.limit); + } + + /** + * Add an element to `appliedConfigurations` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link AccountListParams#appliedConfigurations} for the field documentation. + */ + public Builder addAppliedConfiguration(AccountListParams.AppliedConfiguration element) { + if (this.appliedConfigurations == null) { + this.appliedConfigurations = new ArrayList<>(); + } + this.appliedConfigurations.add(element); + return this; + } + + /** + * Add all elements to `appliedConfigurations` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link AccountListParams#appliedConfigurations} for the field documentation. + */ + public Builder addAllAppliedConfiguration( + List elements) { + if (this.appliedConfigurations == null) { + this.appliedConfigurations = new ArrayList<>(); + } + this.appliedConfigurations.addAll(elements); + return this; + } + + /** + * Filter by whether the account is closed. If omitted, returns only Accounts that are not + * closed. + */ + public Builder setClosed(Boolean closed) { + this.closed = closed; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountListParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The upper limit on the number of accounts returned by the List Account request. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } + + public enum AppliedConfiguration implements ApiRequestParams.EnumParam { + @SerializedName("customer") + CUSTOMER("customer"), + + @SerializedName("merchant") + MERCHANT("merchant"), + + @SerializedName("recipient") + RECIPIENT("recipient"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AppliedConfiguration(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/AccountRetrieveParams.java b/src/main/java/com/stripe/param/v2/core/AccountRetrieveParams.java new file mode 100644 index 00000000000..c864ae53ff6 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountRetrieveParams.java @@ -0,0 +1,131 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AccountRetrieveParams extends ApiRequestParams { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Additional fields to include in the response. */ + @SerializedName("include") + List include; + + private AccountRetrieveParams( + Map extraParams, List include) { + this.extraParams = extraParams; + this.include = include; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List include; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountRetrieveParams build() { + return new AccountRetrieveParams(this.extraParams, this.include); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountRetrieveParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountRetrieveParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * AccountRetrieveParams#include} for the field documentation. + */ + public Builder addInclude(AccountRetrieveParams.Include element) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(element); + return this; + } + + /** + * Add all elements to `include` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountRetrieveParams#include} for the field documentation. + */ + public Builder addAllInclude(List elements) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.addAll(elements); + return this; + } + } + + public enum Include implements ApiRequestParams.EnumParam { + @SerializedName("configuration.customer") + CONFIGURATION__CUSTOMER("configuration.customer"), + + @SerializedName("configuration.merchant") + CONFIGURATION__MERCHANT("configuration.merchant"), + + @SerializedName("configuration.recipient") + CONFIGURATION__RECIPIENT("configuration.recipient"), + + @SerializedName("defaults") + DEFAULTS("defaults"), + + @SerializedName("future_requirements") + FUTURE_REQUIREMENTS("future_requirements"), + + @SerializedName("identity") + IDENTITY("identity"), + + @SerializedName("requirements") + REQUIREMENTS("requirements"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Include(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java new file mode 100644 index 00000000000..8c7eec1925b --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -0,0 +1,8066 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AccountTokenCreateParams extends ApiRequestParams { + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + @SerializedName("contact_email") + String contactEmail; + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + @SerializedName("display_name") + String displayName; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Information about the company, individual, and business represented by the Account. */ + @SerializedName("identity") + Identity identity; + + private AccountTokenCreateParams( + String contactEmail, String displayName, Map extraParams, Identity identity) { + this.contactEmail = contactEmail; + this.displayName = displayName; + this.extraParams = extraParams; + this.identity = identity; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String contactEmail; + + private String displayName; + + private Map extraParams; + + private Identity identity; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams build() { + return new AccountTokenCreateParams( + this.contactEmail, this.displayName, this.extraParams, this.identity); + } + + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + public Builder setContactEmail(String contactEmail) { + this.contactEmail = contactEmail; + return this; + } + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountTokenCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountTokenCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Information about the company, individual, and business represented by the Account. */ + public Builder setIdentity(AccountTokenCreateParams.Identity identity) { + this.identity = identity; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Identity { + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + @SerializedName("attestations") + Attestations attestations; + + /** Information about the company or business. */ + @SerializedName("business_details") + BusinessDetails businessDetails; + + /** The entity type. */ + @SerializedName("entity_type") + EntityType entityType; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Information about the person represented by the account. */ + @SerializedName("individual") + Individual individual; + + private Identity( + Attestations attestations, + BusinessDetails businessDetails, + EntityType entityType, + Map extraParams, + Individual individual) { + this.attestations = attestations; + this.businessDetails = businessDetails; + this.entityType = entityType; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Attestations attestations; + + private BusinessDetails businessDetails; + + private EntityType entityType; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity build() { + return new AccountTokenCreateParams.Identity( + this.attestations, + this.businessDetails, + this.entityType, + this.extraParams, + this.individual); + } + + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + public Builder setAttestations(AccountTokenCreateParams.Identity.Attestations attestations) { + this.attestations = attestations; + return this; + } + + /** Information about the company or business. */ + public Builder setBusinessDetails( + AccountTokenCreateParams.Identity.BusinessDetails businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** The entity type. */ + public Builder setEntityType(AccountTokenCreateParams.Identity.EntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountTokenCreateParams.Identity#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountTokenCreateParams.Identity#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Information about the person represented by the account. */ + public Builder setIndividual(AccountTokenCreateParams.Identity.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Attestations { + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct; IP, date, and User Agent are expanded by Stripe. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct; IP, date, and User Agent are expanded by Stripe. + */ + @SerializedName("ownership_declaration") + OwnershipDeclaration ownershipDeclaration; + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + @SerializedName("persons_provided") + PersonsProvided personsProvided; + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity; IP, date, and User Agent are expanded by Stripe. + */ + @SerializedName("representative_declaration") + RepresentativeDeclaration representativeDeclaration; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("terms_of_service") + TermsOfService termsOfService; + + private Attestations( + DirectorshipDeclaration directorshipDeclaration, + Map extraParams, + OwnershipDeclaration ownershipDeclaration, + PersonsProvided personsProvided, + RepresentativeDeclaration representativeDeclaration, + TermsOfService termsOfService) { + this.directorshipDeclaration = directorshipDeclaration; + this.extraParams = extraParams; + this.ownershipDeclaration = ownershipDeclaration; + this.personsProvided = personsProvided; + this.representativeDeclaration = representativeDeclaration; + this.termsOfService = termsOfService; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DirectorshipDeclaration directorshipDeclaration; + + private Map extraParams; + + private OwnershipDeclaration ownershipDeclaration; + + private PersonsProvided personsProvided; + + private RepresentativeDeclaration representativeDeclaration; + + private TermsOfService termsOfService; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations build() { + return new AccountTokenCreateParams.Identity.Attestations( + this.directorshipDeclaration, + this.extraParams, + this.ownershipDeclaration, + this.personsProvided, + this.representativeDeclaration, + this.termsOfService); + } + + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct; IP, date, and User Agent are expanded by Stripe. + */ + public Builder setDirectorshipDeclaration( + AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration + directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Attestations#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Attestations#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct; IP, date, and User Agent are expanded by Stripe. + */ + public Builder setOwnershipDeclaration( + AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration + ownershipDeclaration) { + this.ownershipDeclaration = ownershipDeclaration; + return this; + } + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + public Builder setPersonsProvided( + AccountTokenCreateParams.Identity.Attestations.PersonsProvided personsProvided) { + this.personsProvided = personsProvided; + return this; + } + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity; IP, date, and User Agent are expanded by Stripe. + */ + public Builder setRepresentativeDeclaration( + AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration + representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + + /** Attestations of accepted terms of service agreements. */ + public Builder setTermsOfService( + AccountTokenCreateParams.Identity.Attestations.TermsOfService termsOfService) { + this.termsOfService = termsOfService; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DirectorshipDeclaration { + /** A boolean indicating if the directors information has been attested. */ + @SerializedName("attested") + Boolean attested; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private DirectorshipDeclaration(Boolean attested, Map extraParams) { + this.attested = attested; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean attested; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration build() { + return new AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration( + this.attested, this.extraParams); + } + + /** A boolean indicating if the directors information has been attested. */ + public Builder setAttested(Boolean attested) { + this.attested = attested; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.DirectorshipDeclaration#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OwnershipDeclaration { + /** A boolean indicating if the beneficial owner information has been attested. */ + @SerializedName("attested") + Boolean attested; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private OwnershipDeclaration(Boolean attested, Map extraParams) { + this.attested = attested; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean attested; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration build() { + return new AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration( + this.attested, this.extraParams); + } + + /** A boolean indicating if the beneficial owner information has been attested. */ + public Builder setAttested(Boolean attested) { + this.attested = attested; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.OwnershipDeclaration#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PersonsProvided { + /** + * Whether the company’s directors have been provided. Set this Boolean to true after + * creating all the company’s directors with the Persons API. + */ + @SerializedName("directors") + Boolean directors; + + /** + * Whether the company’s executives have been provided. Set this Boolean to true after + * creating all the company’s executives with the Persons API. + */ + @SerializedName("executives") + Boolean executives; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Whether the company’s owners have been provided. Set this Boolean to true after creating + * all the company’s owners with the Persons API. + */ + @SerializedName("owners") + Boolean owners; + + /** Reason for why the company is exempt from providing ownership information. */ + @SerializedName("ownership_exemption_reason") + OwnershipExemptionReason ownershipExemptionReason; + + private PersonsProvided( + Boolean directors, + Boolean executives, + Map extraParams, + Boolean owners, + OwnershipExemptionReason ownershipExemptionReason) { + this.directors = directors; + this.executives = executives; + this.extraParams = extraParams; + this.owners = owners; + this.ownershipExemptionReason = ownershipExemptionReason; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean directors; + + private Boolean executives; + + private Map extraParams; + + private Boolean owners; + + private OwnershipExemptionReason ownershipExemptionReason; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.PersonsProvided build() { + return new AccountTokenCreateParams.Identity.Attestations.PersonsProvided( + this.directors, + this.executives, + this.extraParams, + this.owners, + this.ownershipExemptionReason); + } + + /** + * Whether the company’s directors have been provided. Set this Boolean to true after + * creating all the company’s directors with the Persons API. + */ + public Builder setDirectors(Boolean directors) { + this.directors = directors; + return this; + } + + /** + * Whether the company’s executives have been provided. Set this Boolean to true after + * creating all the company’s executives with the Persons API. + */ + public Builder setExecutives(Boolean executives) { + this.executives = executives; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.PersonsProvided#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.PersonsProvided#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the company’s owners have been provided. Set this Boolean to true after + * creating all the company’s owners with the Persons API. + */ + public Builder setOwners(Boolean owners) { + this.owners = owners; + return this; + } + + /** Reason for why the company is exempt from providing ownership information. */ + public Builder setOwnershipExemptionReason( + AccountTokenCreateParams.Identity.Attestations.PersonsProvided + .OwnershipExemptionReason + ownershipExemptionReason) { + this.ownershipExemptionReason = ownershipExemptionReason; + return this; + } + } + + public enum OwnershipExemptionReason implements ApiRequestParams.EnumParam { + @SerializedName("qualified_entity_exceeds_ownership_threshold") + QUALIFIED_ENTITY_EXCEEDS_OWNERSHIP_THRESHOLD( + "qualified_entity_exceeds_ownership_threshold"), + + @SerializedName("qualifies_as_financial_institution") + QUALIFIES_AS_FINANCIAL_INSTITUTION("qualifies_as_financial_institution"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + OwnershipExemptionReason(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** + * A boolean indicating if the representative is authorized to act as the representative of + * their legal entity. + */ + @SerializedName("attested") + Boolean attested; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private RepresentativeDeclaration(Boolean attested, Map extraParams) { + this.attested = attested; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean attested; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration build() { + return new AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration( + this.attested, this.extraParams); + } + + /** + * A boolean indicating if the representative is authorized to act as the representative + * of their legal entity. + */ + public Builder setAttested(Boolean attested) { + this.attested = attested; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.RepresentativeDeclaration#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TermsOfService { + /** + * Details on the Account's acceptance of the [Stripe Services Agreement]; IP, date, and + * User Agent are expanded by Stripe. + */ + @SerializedName("account") + Account account; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private TermsOfService(Account account, Map extraParams) { + this.account = account; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Account account; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.TermsOfService build() { + return new AccountTokenCreateParams.Identity.Attestations.TermsOfService( + this.account, this.extraParams); + } + + /** + * Details on the Account's acceptance of the [Stripe Services Agreement]; IP, date, and + * User Agent are expanded by Stripe. + */ + public Builder setAccount( + AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account account) { + this.account = account; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.TermsOfService#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Attestations.TermsOfService#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Account { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The boolean value indicating if the terms of service have been accepted. */ + @SerializedName("shown_and_accepted") + Boolean shownAndAccepted; + + private Account(Map extraParams, Boolean shownAndAccepted) { + this.extraParams = extraParams; + this.shownAndAccepted = shownAndAccepted; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean shownAndAccepted; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account build() { + return new AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account( + this.extraParams, this.shownAndAccepted); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Attestations.TermsOfService.Account#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The boolean value indicating if the terms of service have been accepted. */ + public Builder setShownAndAccepted(Boolean shownAndAccepted) { + this.shownAndAccepted = shownAndAccepted; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusinessDetails { + /** The business registration address of the business entity. */ + @SerializedName("address") + Address address; + + /** The business gross annual revenue for its preceding fiscal year. */ + @SerializedName("annual_revenue") + AnnualRevenue annualRevenue; + + /** A document verifying the business. */ + @SerializedName("documents") + Documents documents; + + /** + * Estimated maximum number of workers currently engaged by the business (including employees, + * contractors, and vendors). + */ + @SerializedName("estimated_worker_count") + Long estimatedWorkerCount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The ID numbers of a business entity. */ + @SerializedName("id_numbers") + List idNumbers; + + /** An estimate of the monthly revenue of the business. */ + @SerializedName("monthly_estimated_revenue") + MonthlyEstimatedRevenue monthlyEstimatedRevenue; + + /** The phone number of the Business Entity. */ + @SerializedName("phone") + String phone; + + /** The business legal name. */ + @SerializedName("registered_name") + String registeredName; + + /** The business registration address of the business entity in non latin script. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The business legal name in non latin script. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The category identifying the legal structure of the business. */ + @SerializedName("structure") + Structure structure; + + private BusinessDetails( + Address address, + AnnualRevenue annualRevenue, + Documents documents, + Long estimatedWorkerCount, + Map extraParams, + List idNumbers, + MonthlyEstimatedRevenue monthlyEstimatedRevenue, + String phone, + String registeredName, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + Structure structure) { + this.address = address; + this.annualRevenue = annualRevenue; + this.documents = documents; + this.estimatedWorkerCount = estimatedWorkerCount; + this.extraParams = extraParams; + this.idNumbers = idNumbers; + this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; + this.phone = phone; + this.registeredName = registeredName; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.structure = structure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private AnnualRevenue annualRevenue; + + private Documents documents; + + private Long estimatedWorkerCount; + + private Map extraParams; + + private List idNumbers; + + private MonthlyEstimatedRevenue monthlyEstimatedRevenue; + + private String phone; + + private String registeredName; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private Structure structure; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails build() { + return new AccountTokenCreateParams.Identity.BusinessDetails( + this.address, + this.annualRevenue, + this.documents, + this.estimatedWorkerCount, + this.extraParams, + this.idNumbers, + this.monthlyEstimatedRevenue, + this.phone, + this.registeredName, + this.scriptAddresses, + this.scriptNames, + this.structure); + } + + /** The business registration address of the business entity. */ + public Builder setAddress( + AccountTokenCreateParams.Identity.BusinessDetails.Address address) { + this.address = address; + return this; + } + + /** The business gross annual revenue for its preceding fiscal year. */ + public Builder setAnnualRevenue( + AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** A document verifying the business. */ + public Builder setDocuments( + AccountTokenCreateParams.Identity.BusinessDetails.Documents documents) { + this.documents = documents; + return this; + } + + /** + * Estimated maximum number of workers currently engaged by the business (including + * employees, contractors, and vendors). + */ + public Builder setEstimatedWorkerCount(Long estimatedWorkerCount) { + this.estimatedWorkerCount = estimatedWorkerCount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.BusinessDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.BusinessDetails#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails#idNumbers} for the field documentation. + */ + public Builder addIdNumber( + AccountTokenCreateParams.Identity.BusinessDetails.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber( + List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** An estimate of the monthly revenue of the business. */ + public Builder setMonthlyEstimatedRevenue( + AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + monthlyEstimatedRevenue) { + this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; + return this; + } + + /** The phone number of the Business Entity. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The business legal name. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + + /** The business registration address of the business entity in non latin script. */ + public Builder setScriptAddresses( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The business legal name in non latin script. */ + public Builder setScriptNames( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The category identifying the legal structure of the business. */ + public Builder setStructure( + AccountTokenCreateParams.Identity.BusinessDetails.Structure structure) { + this.structure = structure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Address build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.BusinessDetails.Address#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.BusinessDetails.Address#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AnnualRevenue { + /** A non-negative integer representing the amount in the smallest currency unit. */ + @SerializedName("amount") + Amount amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + @SerializedName("fiscal_year_end") + String fiscalYearEnd; + + private AnnualRevenue( + Amount amount, Map extraParams, String fiscalYearEnd) { + this.amount = amount; + this.extraParams = extraParams; + this.fiscalYearEnd = fiscalYearEnd; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private Map extraParams; + + private String fiscalYearEnd; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue( + this.amount, this.extraParams, this.fiscalYearEnd); + } + + /** A non-negative integer representing the amount in the smallest currency unit. */ + public Builder setAmount( + AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + public Builder setFiscalYearEnd(String fiscalYearEnd) { + this.fiscalYearEnd = fiscalYearEnd; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that support the bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + @SerializedName("bank_account_ownership_verification") + BankAccountOwnershipVerification bankAccountOwnershipVerification; + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + @SerializedName("company_license") + CompanyLicense companyLicense; + + /** One or more documents showing the company’s Memorandum of Association. */ + @SerializedName("company_memorandum_of_association") + CompanyMemorandumOfAssociation companyMemorandumOfAssociation; + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + @SerializedName("company_ministerial_decree") + CompanyMinisterialDecree companyMinisterialDecree; + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + @SerializedName("company_registration_verification") + CompanyRegistrationVerification companyRegistrationVerification; + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + @SerializedName("company_tax_id_verification") + CompanyTaxIdVerification companyTaxIdVerification; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A document verifying the business. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + @SerializedName("proof_of_registration") + ProofOfRegistration proofOfRegistration; + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @SerializedName("proof_of_ultimate_beneficial_ownership") + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + + private Documents( + BankAccountOwnershipVerification bankAccountOwnershipVerification, + CompanyLicense companyLicense, + CompanyMemorandumOfAssociation companyMemorandumOfAssociation, + CompanyMinisterialDecree companyMinisterialDecree, + CompanyRegistrationVerification companyRegistrationVerification, + CompanyTaxIdVerification companyTaxIdVerification, + Map extraParams, + PrimaryVerification primaryVerification, + ProofOfAddress proofOfAddress, + ProofOfRegistration proofOfRegistration, + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { + this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; + this.companyLicense = companyLicense; + this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; + this.companyMinisterialDecree = companyMinisterialDecree; + this.companyRegistrationVerification = companyRegistrationVerification; + this.companyTaxIdVerification = companyTaxIdVerification; + this.extraParams = extraParams; + this.primaryVerification = primaryVerification; + this.proofOfAddress = proofOfAddress; + this.proofOfRegistration = proofOfRegistration; + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccountOwnershipVerification bankAccountOwnershipVerification; + + private CompanyLicense companyLicense; + + private CompanyMemorandumOfAssociation companyMemorandumOfAssociation; + + private CompanyMinisterialDecree companyMinisterialDecree; + + private CompanyRegistrationVerification companyRegistrationVerification; + + private CompanyTaxIdVerification companyTaxIdVerification; + + private Map extraParams; + + private PrimaryVerification primaryVerification; + + private ProofOfAddress proofOfAddress; + + private ProofOfRegistration proofOfRegistration; + + private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents( + this.bankAccountOwnershipVerification, + this.companyLicense, + this.companyMemorandumOfAssociation, + this.companyMinisterialDecree, + this.companyRegistrationVerification, + this.companyTaxIdVerification, + this.extraParams, + this.primaryVerification, + this.proofOfAddress, + this.proofOfRegistration, + this.proofOfUltimateBeneficialOwnership); + } + + /** + * One or more documents that support the bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + public Builder setBankAccountOwnershipVerification( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification + bankAccountOwnershipVerification) { + this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; + return this; + } + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + public Builder setCompanyLicense( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense + companyLicense) { + this.companyLicense = companyLicense; + return this; + } + + /** One or more documents showing the company’s Memorandum of Association. */ + public Builder setCompanyMemorandumOfAssociation( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation + companyMemorandumOfAssociation) { + this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; + return this; + } + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + public Builder setCompanyMinisterialDecree( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree + companyMinisterialDecree) { + this.companyMinisterialDecree = companyMinisterialDecree; + return this; + } + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + public Builder setCompanyRegistrationVerification( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification + companyRegistrationVerification) { + this.companyRegistrationVerification = companyRegistrationVerification; + return this; + } + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + public Builder setCompanyTaxIdVerification( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification + companyTaxIdVerification) { + this.companyTaxIdVerification = companyTaxIdVerification; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A document verifying the business. */ + public Builder setPrimaryVerification( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** One or more documents that demonstrate proof of address. */ + public Builder setProofOfAddress( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress + proofOfAddress) { + this.proofOfAddress = proofOfAddress; + return this; + } + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + public Builder setProofOfRegistration( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration + proofOfRegistration) { + this.proofOfRegistration = proofOfRegistration; + return this; + } + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + public Builder setProofOfUltimateBeneficialOwnership( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership + proofOfUltimateBeneficialOwnership) { + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccountOwnershipVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private BankAccountOwnershipVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyLicense { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyLicense(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#files} for + * the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense#files} for + * the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyLicense.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMemorandumOfAssociation { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyMemorandumOfAssociation( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMinisterialDecree { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyMinisterialDecree( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMinisterialDecree + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyMinisterialDecree(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree + .Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyRegistrationVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyRegistrationVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyTaxIdVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyTaxIdVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyTaxIdVerification + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .CompanyTaxIdVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification + .Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .PrimaryVerification(this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + .FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification + .FrontBack + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .PrimaryVerification.FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfAddress(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#files} for + * the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress#files} for + * the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfAddress.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfRegistration { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfRegistration( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfRegistration(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfRegistration.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfUltimateBeneficialOwnership { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfUltimateBeneficialOwnership( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The registrar of the ID number (Only valid for DE ID number types). */ + @SerializedName("registrar") + String registrar; + + /** Required. Open Enum. The ID number type of a business entity. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + String value; + + private IdNumber( + Map extraParams, String registrar, Type type, String value) { + this.extraParams = extraParams; + this.registrar = registrar; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String registrar; + + private Type type; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.IdNumber build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.IdNumber( + this.extraParams, this.registrar, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.BusinessDetails.IdNumber#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.BusinessDetails.IdNumber#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The registrar of the ID number (Only valid for DE ID number types). */ + public Builder setRegistrar(String registrar) { + this.registrar = registrar; + return this; + } + + /** Required. Open Enum. The ID number type of a business entity. */ + public Builder setType( + AccountTokenCreateParams.Identity.BusinessDetails.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_crn") + AE_CRN("ae_crn"), + + @SerializedName("ae_vat") + AE_VAT("ae_vat"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuit") + AR_CUIT("ar_cuit"), + + @SerializedName("at_fn") + AT_FN("at_fn"), + + @SerializedName("at_stn") + AT_STN("at_stn"), + + @SerializedName("at_vat") + AT_VAT("at_vat"), + + @SerializedName("au_abn") + AU_ABN("au_abn"), + + @SerializedName("au_acn") + AU_ACN("au_acn"), + + @SerializedName("au_in") + AU_IN("au_in"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("be_cbe") + BE_CBE("be_cbe"), + + @SerializedName("be_vat") + BE_VAT("be_vat"), + + @SerializedName("bg_uic") + BG_UIC("bg_uic"), + + @SerializedName("bg_vat") + BG_VAT("bg_vat"), + + @SerializedName("br_cnpj") + BR_CNPJ("br_cnpj"), + + @SerializedName("ca_cn") + CA_CN("ca_cn"), + + @SerializedName("ca_crarr") + CA_CRARR("ca_crarr"), + + @SerializedName("ca_gst_hst") + CA_GST_HST("ca_gst_hst"), + + @SerializedName("ca_neq") + CA_NEQ("ca_neq"), + + @SerializedName("ca_rid") + CA_RID("ca_rid"), + + @SerializedName("ch_chid") + CH_CHID("ch_chid"), + + @SerializedName("ch_uid") + CH_UID("ch_uid"), + + @SerializedName("cr_cpj") + CR_CPJ("cr_cpj"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_he") + CY_HE("cy_he"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cy_vat") + CY_VAT("cy_vat"), + + @SerializedName("cz_ico") + CZ_ICO("cz_ico"), + + @SerializedName("cz_vat") + CZ_VAT("cz_vat"), + + @SerializedName("de_hrn") + DE_HRN("de_hrn"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("de_vat") + DE_VAT("de_vat"), + + @SerializedName("dk_cvr") + DK_CVR("dk_cvr"), + + @SerializedName("dk_vat") + DK_VAT("dk_vat"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ee_rk") + EE_RK("ee_rk"), + + @SerializedName("ee_vat") + EE_VAT("ee_vat"), + + @SerializedName("es_cif") + ES_CIF("es_cif"), + + @SerializedName("es_vat") + ES_VAT("es_vat"), + + @SerializedName("fi_vat") + FI_VAT("fi_vat"), + + @SerializedName("fi_yt") + FI_YT("fi_yt"), + + @SerializedName("fr_rna") + FR_RNA("fr_rna"), + + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_vat") + FR_VAT("fr_vat"), + + @SerializedName("gb_crn") + GB_CRN("gb_crn"), + + @SerializedName("gi_crn") + GI_CRN("gi_crn"), + + @SerializedName("gr_afm") + GR_AFM("gr_afm"), + + @SerializedName("gr_gemi") + GR_GEMI("gr_gemi"), + + @SerializedName("gr_vat") + GR_VAT("gr_vat"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_br") + HK_BR("hk_br"), + + @SerializedName("hk_cr") + HK_CR("hk_cr"), + + @SerializedName("hr_mbs") + HR_MBS("hr_mbs"), + + @SerializedName("hr_oib") + HR_OIB("hr_oib"), + + @SerializedName("hr_vat") + HR_VAT("hr_vat"), + + @SerializedName("hu_cjs") + HU_CJS("hu_cjs"), + + @SerializedName("hu_tin") + HU_TIN("hu_tin"), + + @SerializedName("hu_vat") + HU_VAT("hu_vat"), + + @SerializedName("ie_crn") + IE_CRN("ie_crn"), + + @SerializedName("ie_trn") + IE_TRN("ie_trn"), + + @SerializedName("ie_vat") + IE_VAT("ie_vat"), + + @SerializedName("it_rea") + IT_REA("it_rea"), + + @SerializedName("it_vat") + IT_VAT("it_vat"), + + @SerializedName("jp_cn") + JP_CN("jp_cn"), + + @SerializedName("kz_bin") + KZ_BIN("kz_bin"), + + @SerializedName("li_uid") + LI_UID("li_uid"), + + @SerializedName("lt_ccrn") + LT_CCRN("lt_ccrn"), + + @SerializedName("lt_vat") + LT_VAT("lt_vat"), + + @SerializedName("lu_nif") + LU_NIF("lu_nif"), + + @SerializedName("lu_rcs") + LU_RCS("lu_rcs"), + + @SerializedName("lu_vat") + LU_VAT("lu_vat"), + + @SerializedName("lv_urn") + LV_URN("lv_urn"), + + @SerializedName("lv_vat") + LV_VAT("lv_vat"), + + @SerializedName("mt_crn") + MT_CRN("mt_crn"), + + @SerializedName("mt_tin") + MT_TIN("mt_tin"), + + @SerializedName("mt_vat") + MT_VAT("mt_vat"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_brn") + MY_BRN("my_brn"), + + @SerializedName("my_coid") + MY_COID("my_coid"), + + @SerializedName("my_itn") + MY_ITN("my_itn"), + + @SerializedName("my_sst") + MY_SST("my_sst"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("nl_kvk") + NL_KVK("nl_kvk"), + + @SerializedName("nl_rsin") + NL_RSIN("nl_rsin"), + + @SerializedName("nl_vat") + NL_VAT("nl_vat"), + + @SerializedName("no_orgnr") + NO_ORGNR("no_orgnr"), + + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + + @SerializedName("nz_ird") + NZ_IRD("nz_ird"), + + @SerializedName("pe_ruc") + PE_RUC("pe_ruc"), + + @SerializedName("pk_ntn") + PK_NTN("pk_ntn"), + + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + + @SerializedName("pl_regon") + PL_REGON("pl_regon"), + + @SerializedName("pl_vat") + PL_VAT("pl_vat"), + + @SerializedName("pt_vat") + PT_VAT("pt_vat"), + + @SerializedName("ro_cui") + RO_CUI("ro_cui"), + + @SerializedName("ro_orc") + RO_ORC("ro_orc"), + + @SerializedName("ro_vat") + RO_VAT("ro_vat"), + + @SerializedName("sa_crn") + SA_CRN("sa_crn"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_orgnr") + SE_ORGNR("se_orgnr"), + + @SerializedName("se_vat") + SE_VAT("se_vat"), + + @SerializedName("sg_uen") + SG_UEN("sg_uen"), + + @SerializedName("si_msp") + SI_MSP("si_msp"), + + @SerializedName("si_tin") + SI_TIN("si_tin"), + + @SerializedName("si_vat") + SI_VAT("si_vat"), + + @SerializedName("sk_dic") + SK_DIC("sk_dic"), + + @SerializedName("sk_ico") + SK_ICO("sk_ico"), + + @SerializedName("sk_vat") + SK_VAT("sk_vat"), + + @SerializedName("th_crn") + TH_CRN("th_crn"), + + @SerializedName("th_prn") + TH_PRN("th_prn"), + + @SerializedName("th_tin") + TH_TIN("th_tin"), + + @SerializedName("us_ein") + US_EIN("us_ein"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MonthlyEstimatedRevenue { + /** A non-negative integer representing the amount in the smallest currency unit. */ + @SerializedName("amount") + Amount amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MonthlyEstimatedRevenue(Amount amount, Map extraParams) { + this.amount = amount; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue( + this.amount, this.extraParams); + } + + /** A non-negative integer representing the amount in the smallest currency unit. */ + public Builder setAmount( + AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount + amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(String currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount + build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + .Amount(this.currency, this.extraParams, this.value); + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kana#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptAddresses.Kanji#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana name. */ + @SerializedName("kana") + Kana kana; + + /** Kanji name. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana name. */ + public Builder setKana( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji name. */ + public Builder setKanji( + AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Registered name of the business. */ + @SerializedName("registered_name") + String registeredName; + + private Kana(Map extraParams, String registeredName) { + this.extraParams = extraParams; + this.registeredName = registeredName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String registeredName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana( + this.extraParams, this.registeredName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kana#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Registered name of the business. */ + @SerializedName("registered_name") + String registeredName; + + private Kanji(Map extraParams, String registeredName) { + this.extraParams = extraParams; + this.registeredName = registeredName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String registeredName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji( + this.extraParams, this.registeredName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.BusinessDetails.ScriptNames.Kanji#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + } + + public enum Structure implements ApiRequestParams.EnumParam { + @SerializedName("cooperative") + COOPERATIVE("cooperative"), + + @SerializedName("free_zone_establishment") + FREE_ZONE_ESTABLISHMENT("free_zone_establishment"), + + @SerializedName("free_zone_llc") + FREE_ZONE_LLC("free_zone_llc"), + + @SerializedName("governmental_unit") + GOVERNMENTAL_UNIT("governmental_unit"), + + @SerializedName("government_instrumentality") + GOVERNMENT_INSTRUMENTALITY("government_instrumentality"), + + @SerializedName("incorporated_association") + INCORPORATED_ASSOCIATION("incorporated_association"), + + @SerializedName("incorporated_non_profit") + INCORPORATED_NON_PROFIT("incorporated_non_profit"), + + @SerializedName("incorporated_partnership") + INCORPORATED_PARTNERSHIP("incorporated_partnership"), + + @SerializedName("limited_liability_partnership") + LIMITED_LIABILITY_PARTNERSHIP("limited_liability_partnership"), + + @SerializedName("llc") + LLC("llc"), + + @SerializedName("multi_member_llc") + MULTI_MEMBER_LLC("multi_member_llc"), + + @SerializedName("private_company") + PRIVATE_COMPANY("private_company"), + + @SerializedName("private_corporation") + PRIVATE_CORPORATION("private_corporation"), + + @SerializedName("private_partnership") + PRIVATE_PARTNERSHIP("private_partnership"), + + @SerializedName("public_company") + PUBLIC_COMPANY("public_company"), + + @SerializedName("public_corporation") + PUBLIC_CORPORATION("public_corporation"), + + @SerializedName("public_listed_corporation") + PUBLIC_LISTED_CORPORATION("public_listed_corporation"), + + @SerializedName("public_partnership") + PUBLIC_PARTNERSHIP("public_partnership"), + + @SerializedName("registered_charity") + REGISTERED_CHARITY("registered_charity"), + + @SerializedName("single_member_llc") + SINGLE_MEMBER_LLC("single_member_llc"), + + @SerializedName("sole_establishment") + SOLE_ESTABLISHMENT("sole_establishment"), + + @SerializedName("sole_proprietorship") + SOLE_PROPRIETORSHIP("sole_proprietorship"), + + @SerializedName("tax_exempt_government_instrumentality") + TAX_EXEMPT_GOVERNMENT_INSTRUMENTALITY("tax_exempt_government_instrumentality"), + + @SerializedName("trust") + TRUST("trust"), + + @SerializedName("unincorporated_association") + UNINCORPORATED_ASSOCIATION("unincorporated_association"), + + @SerializedName("unincorporated_non_profit") + UNINCORPORATED_NON_PROFIT("unincorporated_non_profit"), + + @SerializedName("unincorporated_partnership") + UNINCORPORATED_PARTNERSHIP("unincorporated_partnership"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Structure(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** Additional addresses associated with the individual. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the individual. */ + @SerializedName("additional_names") + List additionalNames; + + /** The individual's residential address. */ + @SerializedName("address") + Address address; + + /** The individual's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** The individual's email address. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The individual's first name. */ + @SerializedName("given_name") + String givenName; + + /** The identification numbers (e.g., SSN) associated with the individual. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The individual's gender (International regulations require either "male" or + * "female"). + */ + @SerializedName("legal_gender") + LegalGender legalGender; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * The countries where the individual is a national. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("nationalities") + List nationalities; + + /** The individual's phone number. */ + @SerializedName("phone") + String phone; + + /** The individual's political exposure. */ + @SerializedName("political_exposure") + PoliticalExposure politicalExposure; + + /** The relationship that this individual has with the account's identity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The individuals primary name in non latin script. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The individual's last name. */ + @SerializedName("surname") + String surname; + + private Individual( + List additionalAddresses, + List additionalNames, + Address address, + DateOfBirth dateOfBirth, + Documents documents, + String email, + Map extraParams, + String givenName, + List idNumbers, + LegalGender legalGender, + Map metadata, + List nationalities, + String phone, + PoliticalExposure politicalExposure, + Relationship relationship, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + String surname) { + this.additionalAddresses = additionalAddresses; + this.additionalNames = additionalNames; + this.address = address; + this.dateOfBirth = dateOfBirth; + this.documents = documents; + this.email = email; + this.extraParams = extraParams; + this.givenName = givenName; + this.idNumbers = idNumbers; + this.legalGender = legalGender; + this.metadata = metadata; + this.nationalities = nationalities; + this.phone = phone; + this.politicalExposure = politicalExposure; + this.relationship = relationship; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List + additionalAddresses; + + private List additionalNames; + + private Address address; + + private DateOfBirth dateOfBirth; + + private Documents documents; + + private String email; + + private Map extraParams; + + private String givenName; + + private List idNumbers; + + private LegalGender legalGender; + + private Map metadata; + + private List nationalities; + + private String phone; + + private PoliticalExposure politicalExposure; + + private Relationship relationship; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual build() { + return new AccountTokenCreateParams.Identity.Individual( + this.additionalAddresses, + this.additionalNames, + this.address, + this.dateOfBirth, + this.documents, + this.email, + this.extraParams, + this.givenName, + this.idNumbers, + this.legalGender, + this.metadata, + this.nationalities, + this.phone, + this.politicalExposure, + this.relationship, + this.scriptAddresses, + this.scriptNames, + this.surname); + } + + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#additionalAddresses} for the + * field documentation. + */ + public Builder addAdditionalAddress( + AccountTokenCreateParams.Identity.Individual.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#additionalAddresses} for the + * field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + + /** + * Add an element to `additionalNames` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#additionalNames} for the field + * documentation. + */ + public Builder addAdditionalName( + AccountTokenCreateParams.Identity.Individual.AdditionalName element) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.add(element); + return this; + } + + /** + * Add all elements to `additionalNames` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#additionalNames} for the field + * documentation. + */ + public Builder addAllAdditionalName( + List elements) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.addAll(elements); + return this; + } + + /** The individual's residential address. */ + public Builder setAddress(AccountTokenCreateParams.Identity.Individual.Address address) { + this.address = address; + return this; + } + + /** The individual's date of birth. */ + public Builder setDateOfBirth( + AccountTokenCreateParams.Identity.Individual.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + public Builder setDocuments( + AccountTokenCreateParams.Identity.Individual.Documents documents) { + this.documents = documents; + return this; + } + + /** The individual's email address. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The individual's first name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual#idNumbers} for the field documentation. + */ + public Builder addIdNumber(AccountTokenCreateParams.Identity.Individual.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber( + List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** + * The individual's gender (International regulations require either "male" or + * "female"). + */ + public Builder setLegalGender( + AccountTokenCreateParams.Identity.Individual.LegalGender legalGender) { + this.legalGender = legalGender; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountTokenCreateParams.Identity.Individual#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountTokenCreateParams.Identity.Individual#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. Map values can only be one of the following types: `String`, `EmptyParam`. See + * {@link AccountTokenCreateParams.Identity.Individual#metadata} for the field + * documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream() + .allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Add an element to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual#nationalities} for the field documentation. + */ + public Builder addNationality(String element) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.add(element); + return this; + } + + /** + * Add all elements to `nationalities` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountTokenCreateParams.Identity.Individual#nationalities} for the field + * documentation. + */ + public Builder addAllNationality(List elements) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.addAll(elements); + return this; + } + + /** The individual's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The individual's political exposure. */ + public Builder setPoliticalExposure( + AccountTokenCreateParams.Identity.Individual.PoliticalExposure politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** The relationship that this individual has with the account's identity. */ + public Builder setRelationship( + AccountTokenCreateParams.Identity.Individual.Relationship relationship) { + this.relationship = relationship; + return this; + } + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + public Builder setScriptAddresses( + AccountTokenCreateParams.Identity.Individual.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The individuals primary name in non latin script. */ + public Builder setScriptNames( + AccountTokenCreateParams.Identity.Individual.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The individual's last name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private AdditionalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + Purpose purpose, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private Purpose purpose; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.AdditionalAddress build() { + return new AccountTokenCreateParams.Identity.Individual.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.AdditionalAddress#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.AdditionalAddress#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose( + AccountTokenCreateParams.Identity.Individual.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("registered") + REGISTERED("registered"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's full name. */ + @SerializedName("full_name") + String fullName; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** Required. The purpose or type of the additional name. */ + @SerializedName("purpose") + Purpose purpose; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private AdditionalName( + Map extraParams, + String fullName, + String givenName, + Purpose purpose, + String surname) { + this.extraParams = extraParams; + this.fullName = fullName; + this.givenName = givenName; + this.purpose = purpose; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String fullName; + + private String givenName; + + private Purpose purpose; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.AdditionalName build() { + return new AccountTokenCreateParams.Identity.Individual.AdditionalName( + this.extraParams, this.fullName, this.givenName, this.purpose, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.AdditionalName#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.AdditionalName#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's full name. */ + public Builder setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** Required. The purpose or type of the additional name. */ + public Builder setPurpose( + AccountTokenCreateParams.Identity.Individual.AdditionalName.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("alias") + ALIAS("alias"), + + @SerializedName("maiden") + MAIDEN("maiden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Address build() { + return new AccountTokenCreateParams.Identity.Individual.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.Address#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.Address#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth { + /** Required. The day of the birth. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth. */ + @SerializedName("month") + Long month; + + /** Required. The year of birth. */ + @SerializedName("year") + Long year; + + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.DateOfBirth build() { + return new AccountTokenCreateParams.Identity.Individual.DateOfBirth( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of the birth. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.DateOfBirth#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.DateOfBirth#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + @SerializedName("passport") + Passport passport; + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + @SerializedName("visa") + Visa visa; + + private Documents( + CompanyAuthorization companyAuthorization, + Map extraParams, + Passport passport, + PrimaryVerification primaryVerification, + SecondaryVerification secondaryVerification, + Visa visa) { + this.companyAuthorization = companyAuthorization; + this.extraParams = extraParams; + this.passport = passport; + this.primaryVerification = primaryVerification; + this.secondaryVerification = secondaryVerification; + this.visa = visa; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CompanyAuthorization companyAuthorization; + + private Map extraParams; + + private Passport passport; + + private PrimaryVerification primaryVerification; + + private SecondaryVerification secondaryVerification; + + private Visa visa; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents build() { + return new AccountTokenCreateParams.Identity.Individual.Documents( + this.companyAuthorization, + this.extraParams, + this.passport, + this.primaryVerification, + this.secondaryVerification, + this.visa); + } + + /** + * One or more documents that demonstrate proof that this person is authorized to + * represent the company. + */ + public Builder setCompanyAuthorization( + AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization + companyAuthorization) { + this.companyAuthorization = companyAuthorization; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.Documents#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.Documents#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + public Builder setPassport( + AccountTokenCreateParams.Identity.Individual.Documents.Passport passport) { + this.passport = passport; + return this; + } + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + public Builder setPrimaryVerification( + AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification + primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + public Builder setSecondaryVerification( + AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification + secondaryVerification) { + this.secondaryVerification = secondaryVerification; + return this; + } + + /** + * One or more documents showing the person’s visa required for living in the country + * where they are residing. + */ + public Builder setVisa(AccountTokenCreateParams.Identity.Individual.Documents.Visa visa) { + this.visa = visa; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyAuthorization( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents + .CompanyAuthorization(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.CompanyAuthorization.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passport { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Passport(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.Passport build() { + return new AccountTokenCreateParams.Identity.Individual.Documents.Passport( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Passport#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Passport#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Passport#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Passport#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.Passport.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification + .FrontBack + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents + .PrimaryVerification.FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private SecondaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents + .SecondaryVerification(this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification + .FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification + .FrontBack + build() { + return new AccountTokenCreateParams.Identity.Individual.Documents + .SecondaryVerification.FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Visa { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Visa(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Documents.Visa build() { + return new AccountTokenCreateParams.Identity.Individual.Documents.Visa( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Visa#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Visa#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Visa#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountTokenCreateParams.Identity.Individual.Documents.Visa#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountTokenCreateParams.Identity.Individual.Documents.Visa.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The ID number type of an individual. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + String value; + + private IdNumber(Map extraParams, Type type, String value) { + this.extraParams = extraParams; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.IdNumber build() { + return new AccountTokenCreateParams.Identity.Individual.IdNumber( + this.extraParams, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.IdNumber#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.IdNumber#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The ID number type of an individual. */ + public Builder setType(AccountTokenCreateParams.Identity.Individual.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_eid") + AE_EID("ae_eid"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuil") + AR_CUIL("ar_cuil"), + + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + + @SerializedName("at_stn") + AT_STN("at_stn"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_brc") + BD_BRC("bd_brc"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("bd_nid") + BD_NID("bd_nid"), + + @SerializedName("be_nrn") + BE_NRN("be_nrn"), + + @SerializedName("bg_ucn") + BG_UCN("bg_ucn"), + + @SerializedName("bn_nric") + BN_NRIC("bn_nric"), + + @SerializedName("br_cpf") + BR_CPF("br_cpf"), + + @SerializedName("ca_sin") + CA_SIN("ca_sin"), + + @SerializedName("ch_oasi") + CH_OASI("ch_oasi"), + + @SerializedName("cl_rut") + CL_RUT("cl_rut"), + + @SerializedName("cn_pp") + CN_PP("cn_pp"), + + @SerializedName("co_nuip") + CO_NUIP("co_nuip"), + + @SerializedName("cr_ci") + CR_CI("cr_ci"), + + @SerializedName("cr_cpf") + CR_CPF("cr_cpf"), + + @SerializedName("cr_dimex") + CR_DIMEX("cr_dimex"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cz_rc") + CZ_RC("cz_rc"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("dk_cpr") + DK_CPR("dk_cpr"), + + @SerializedName("do_cie") + DO_CIE("do_cie"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ec_ci") + EC_CI("ec_ci"), + + @SerializedName("ee_ik") + EE_IK("ee_ik"), + + @SerializedName("es_nif") + ES_NIF("es_nif"), + + @SerializedName("fi_hetu") + FI_HETU("fi_hetu"), + + @SerializedName("fr_nir") + FR_NIR("fr_nir"), + + @SerializedName("gb_nino") + GB_NINO("gb_nino"), + + @SerializedName("gr_afm") + GR_AFM("gr_afm"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_id") + HK_ID("hk_id"), + + @SerializedName("hr_oib") + HR_OIB("hr_oib"), + + @SerializedName("hu_ad") + HU_AD("hu_ad"), + + @SerializedName("id_nik") + ID_NIK("id_nik"), + + @SerializedName("ie_ppsn") + IE_PPSN("ie_ppsn"), + + @SerializedName("is_kt") + IS_KT("is_kt"), + + @SerializedName("it_cf") + IT_CF("it_cf"), + + @SerializedName("jp_inc") + JP_INC("jp_inc"), + + @SerializedName("ke_pin") + KE_PIN("ke_pin"), + + @SerializedName("kz_iin") + KZ_IIN("kz_iin"), + + @SerializedName("li_peid") + LI_PEID("li_peid"), + + @SerializedName("lt_ak") + LT_AK("lt_ak"), + + @SerializedName("lu_nif") + LU_NIF("lu_nif"), + + @SerializedName("lv_pk") + LV_PK("lv_pk"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_nric") + MY_NRIC("my_nric"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("ng_nin") + NG_NIN("ng_nin"), + + @SerializedName("nl_bsn") + NL_BSN("nl_bsn"), + + @SerializedName("no_nin") + NO_NIN("no_nin"), + + @SerializedName("nz_ird") + NZ_IRD("nz_ird"), + + @SerializedName("pe_dni") + PE_DNI("pe_dni"), + + @SerializedName("pk_cnic") + PK_CNIC("pk_cnic"), + + @SerializedName("pk_snic") + PK_SNIC("pk_snic"), + + @SerializedName("pl_pesel") + PL_PESEL("pl_pesel"), + + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + + @SerializedName("ro_cnp") + RO_CNP("ro_cnp"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_pin") + SE_PIN("se_pin"), + + @SerializedName("sg_fin") + SG_FIN("sg_fin"), + + @SerializedName("sg_nric") + SG_NRIC("sg_nric"), + + @SerializedName("sk_dic") + SK_DIC("sk_dic"), + + @SerializedName("th_lc") + TH_LC("th_lc"), + + @SerializedName("th_pin") + TH_PIN("th_pin"), + + @SerializedName("tr_tin") + TR_TIN("tr_tin"), + + @SerializedName("us_itin") + US_ITIN("us_itin"), + + @SerializedName("us_itin_last_4") + US_ITIN_LAST_4("us_itin_last_4"), + + @SerializedName("us_ssn") + US_SSN("us_ssn"), + + @SerializedName("us_ssn_last_4") + US_SSN_LAST_4("us_ssn_last_4"), + + @SerializedName("uy_dni") + UY_DNI("uy_dni"), + + @SerializedName("za_id") + ZA_ID("za_id"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Relationship { + /** + * Whether the person is a director of the account's identity. Directors are typically + * members of the governing board of the company, or responsible for ensuring the company + * meets its regulatory obligations. + */ + @SerializedName("director") + Boolean director; + + /** + * Whether the person has significant responsibility to control, manage, or direct the + * organization. + */ + @SerializedName("executive") + Boolean executive; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether the person is an owner of the account’s identity. */ + @SerializedName("owner") + Boolean owner; + + /** The percent owned by the person of the account's legal entity. */ + @SerializedName("percent_ownership") + String percentOwnership; + + /** The person's title (e.g., CEO, Support Engineer). */ + @SerializedName("title") + String title; + + private Relationship( + Boolean director, + Boolean executive, + Map extraParams, + Boolean owner, + String percentOwnership, + String title) { + this.director = director; + this.executive = executive; + this.extraParams = extraParams; + this.owner = owner; + this.percentOwnership = percentOwnership; + this.title = title; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean director; + + private Boolean executive; + + private Map extraParams; + + private Boolean owner; + + private String percentOwnership; + + private String title; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.Relationship build() { + return new AccountTokenCreateParams.Identity.Individual.Relationship( + this.director, + this.executive, + this.extraParams, + this.owner, + this.percentOwnership, + this.title); + } + + /** + * Whether the person is a director of the account's identity. Directors are typically + * members of the governing board of the company, or responsible for ensuring the company + * meets its regulatory obligations. + */ + public Builder setDirector(Boolean director) { + this.director = director; + return this; + } + + /** + * Whether the person has significant responsibility to control, manage, or direct the + * organization. + */ + public Builder setExecutive(Boolean executive) { + this.executive = executive; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.Relationship#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.Relationship#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether the person is an owner of the account’s identity. */ + public Builder setOwner(Boolean owner) { + this.owner = owner; + return this; + } + + /** The percent owned by the person of the account's legal entity. */ + public Builder setPercentOwnership(String percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** The person's title (e.g., CEO, Support Engineer). */ + public Builder setTitle(String title) { + this.title = title; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptAddresses build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptAddresses( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana( + AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji( + AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kana#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptAddresses.Kanji#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptNames build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptNames( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.ScriptNames#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountTokenCreateParams.Identity.Individual.ScriptNames#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Persons name in kana script. */ + public Builder setKana( + AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Persons name in kanji script. */ + public Builder setKanji( + AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kana(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptNames.Kana#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kanji(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji build() { + return new AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountTokenCreateParams.Identity.Individual.ScriptNames.Kanji#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + } + + public enum LegalGender implements ApiRequestParams.EnumParam { + @SerializedName("female") + FEMALE("female"), + + @SerializedName("male") + MALE("male"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LegalGender(String value) { + this.value = value; + } + } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } + } + + public enum EntityType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("government_entity") + GOVERNMENT_ENTITY("government_entity"), + + @SerializedName("individual") + INDIVIDUAL("individual"), + + @SerializedName("non_profit") + NON_PROFIT("non_profit"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EntityType(String value) { + this.value = value; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java new file mode 100644 index 00000000000..2f56b622cbf --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -0,0 +1,18103 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.time.Instant; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AccountUpdateParams extends ApiRequestParams { + /** The account token generated by the account token api. */ + @SerializedName("account_token") + Object accountToken; + + /** + * An Account Configuration which allows the Account to take on a key persona across Stripe + * products. + */ + @SerializedName("configuration") + Configuration configuration; + + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + @SerializedName("contact_email") + Object contactEmail; + + /** + * A value indicating the Stripe dashboard this Account has access to. This will depend on which + * configurations are enabled for this account. + */ + @SerializedName("dashboard") + Dashboard dashboard; + + /** Default values to be used on Account Configurations. */ + @SerializedName("defaults") + Defaults defaults; + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + @SerializedName("display_name") + Object displayName; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Information about the company, individual, and business represented by the Account. */ + @SerializedName("identity") + Identity identity; + + /** Additional fields to include in the response. */ + @SerializedName("include") + List include; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + private AccountUpdateParams( + Object accountToken, + Configuration configuration, + Object contactEmail, + Dashboard dashboard, + Defaults defaults, + Object displayName, + Map extraParams, + Identity identity, + List include, + Map metadata) { + this.accountToken = accountToken; + this.configuration = configuration; + this.contactEmail = contactEmail; + this.dashboard = dashboard; + this.defaults = defaults; + this.displayName = displayName; + this.extraParams = extraParams; + this.identity = identity; + this.include = include; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object accountToken; + + private Configuration configuration; + + private Object contactEmail; + + private Dashboard dashboard; + + private Defaults defaults; + + private Object displayName; + + private Map extraParams; + + private Identity identity; + + private List include; + + private Map metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams build() { + return new AccountUpdateParams( + this.accountToken, + this.configuration, + this.contactEmail, + this.dashboard, + this.defaults, + this.displayName, + this.extraParams, + this.identity, + this.include, + this.metadata); + } + + /** The account token generated by the account token api. */ + public Builder setAccountToken(String accountToken) { + this.accountToken = accountToken; + return this; + } + + /** The account token generated by the account token api. */ + public Builder setAccountToken(EmptyParam accountToken) { + this.accountToken = accountToken; + return this; + } + + /** + * An Account Configuration which allows the Account to take on a key persona across Stripe + * products. + */ + public Builder setConfiguration(AccountUpdateParams.Configuration configuration) { + this.configuration = configuration; + return this; + } + + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + public Builder setContactEmail(String contactEmail) { + this.contactEmail = contactEmail; + return this; + } + + /** + * The default contact email address for the Account. Required when configuring the account as a + * merchant or recipient. + */ + public Builder setContactEmail(EmptyParam contactEmail) { + this.contactEmail = contactEmail; + return this; + } + + /** + * A value indicating the Stripe dashboard this Account has access to. This will depend on which + * configurations are enabled for this account. + */ + public Builder setDashboard(AccountUpdateParams.Dashboard dashboard) { + this.dashboard = dashboard; + return this; + } + + /** Default values to be used on Account Configurations. */ + public Builder setDefaults(AccountUpdateParams.Defaults defaults) { + this.defaults = defaults; + return this; + } + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on + * any invoices sent to the Account. + */ + public Builder setDisplayName(EmptyParam displayName) { + this.displayName = displayName; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountUpdateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Information about the company, individual, and business represented by the Account. */ + public Builder setIdentity(AccountUpdateParams.Identity identity) { + this.identity = identity; + return this; + } + + /** + * Add an element to `include` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams#include} for the field documentation. + */ + public Builder addInclude(AccountUpdateParams.Include element) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.add(element); + return this; + } + + /** + * Add all elements to `include` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams#include} for the field documentation. + */ + public Builder addAllInclude(List elements) { + if (this.include == null) { + this.include = new ArrayList<>(); + } + this.include.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * Map values can only be one of the following types: `String`, `EmptyParam`. See {@link + * AccountUpdateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Configuration { + /** The Customer Configuration allows the Account to be charged. */ + @SerializedName("customer") + Customer customer; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Enables the Account to act as a connected account and collect payments facilitated by a + * Connect platform. You must onboard your platform to Connect before you can add this + * configuration to your connected accounts. Utilize this configuration when the Account will be + * the Merchant of Record, like with Direct charges or Destination Charges with on_behalf_of + * set. + */ + @SerializedName("merchant") + Merchant merchant; + + /** + * The Recipient Configuration allows the Account to receive funds. Utilize this configuration + * if the Account will not be the Merchant of Record, like with Separate Charges & + * Transfers, or Destination Charges without on_behalf_of set. + */ + @SerializedName("recipient") + Recipient recipient; + + private Configuration( + Customer customer, + Map extraParams, + Merchant merchant, + Recipient recipient) { + this.customer = customer; + this.extraParams = extraParams; + this.merchant = merchant; + this.recipient = recipient; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Customer customer; + + private Map extraParams; + + private Merchant merchant; + + private Recipient recipient; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration build() { + return new AccountUpdateParams.Configuration( + this.customer, this.extraParams, this.merchant, this.recipient); + } + + /** The Customer Configuration allows the Account to be charged. */ + public Builder setCustomer(AccountUpdateParams.Configuration.Customer customer) { + this.customer = customer; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountUpdateParams.Configuration#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountUpdateParams.Configuration#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Enables the Account to act as a connected account and collect payments facilitated by a + * Connect platform. You must onboard your platform to Connect before you can add this + * configuration to your connected accounts. Utilize this configuration when the Account will + * be the Merchant of Record, like with Direct charges or Destination Charges with + * on_behalf_of set. + */ + public Builder setMerchant(AccountUpdateParams.Configuration.Merchant merchant) { + this.merchant = merchant; + return this; + } + + /** + * The Recipient Configuration allows the Account to receive funds. Utilize this configuration + * if the Account will not be the Merchant of Record, like with Separate Charges & + * Transfers, or Destination Charges without on_behalf_of set. + */ + public Builder setRecipient(AccountUpdateParams.Configuration.Recipient recipient) { + this.recipient = recipient; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Customer { + /** + * Represents the state of the configuration, and can be updated to deactivate or re-apply a + * configuration. + */ + @SerializedName("applied") + Boolean applied; + + /** + * Automatic indirect tax settings to be used when automatic tax calculation is enabled on the + * customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if + * automatic tax calculation is possible given the current customer location information. + */ + @SerializedName("automatic_indirect_tax") + AutomaticIndirectTax automaticIndirectTax; + + /** + * Billing settings - default settings used for this customer in Billing flows such as + * Invoices and Subscriptions. + */ + @SerializedName("billing") + Billing billing; + + /** Capabilities that have been requested on the Customer Configuration. */ + @SerializedName("capabilities") + Capabilities capabilities; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + @SerializedName("shipping") + Shipping shipping; + + /** + * ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and + * when the Customer Configuration is first set on an Account. + */ + @SerializedName("test_clock") + Object testClock; + + private Customer( + Boolean applied, + AutomaticIndirectTax automaticIndirectTax, + Billing billing, + Capabilities capabilities, + Map extraParams, + Shipping shipping, + Object testClock) { + this.applied = applied; + this.automaticIndirectTax = automaticIndirectTax; + this.billing = billing; + this.capabilities = capabilities; + this.extraParams = extraParams; + this.shipping = shipping; + this.testClock = testClock; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean applied; + + private AutomaticIndirectTax automaticIndirectTax; + + private Billing billing; + + private Capabilities capabilities; + + private Map extraParams; + + private Shipping shipping; + + private Object testClock; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer build() { + return new AccountUpdateParams.Configuration.Customer( + this.applied, + this.automaticIndirectTax, + this.billing, + this.capabilities, + this.extraParams, + this.shipping, + this.testClock); + } + + /** + * Represents the state of the configuration, and can be updated to deactivate or re-apply a + * configuration. + */ + public Builder setApplied(Boolean applied) { + this.applied = applied; + return this; + } + + /** + * Automatic indirect tax settings to be used when automatic tax calculation is enabled on + * the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if + * automatic tax calculation is possible given the current customer location information. + */ + public Builder setAutomaticIndirectTax( + AccountUpdateParams.Configuration.Customer.AutomaticIndirectTax automaticIndirectTax) { + this.automaticIndirectTax = automaticIndirectTax; + return this; + } + + /** + * Billing settings - default settings used for this customer in Billing flows such as + * Invoices and Subscriptions. + */ + public Builder setBilling(AccountUpdateParams.Configuration.Customer.Billing billing) { + this.billing = billing; + return this; + } + + /** Capabilities that have been requested on the Customer Configuration. */ + public Builder setCapabilities( + AccountUpdateParams.Configuration.Customer.Capabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Customer#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Customer#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The customer's shipping information. Appears on invoices emailed to this customer. */ + public Builder setShipping(AccountUpdateParams.Configuration.Customer.Shipping shipping) { + this.shipping = shipping; + return this; + } + + /** + * ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and + * when the Customer Configuration is first set on an Account. + */ + public Builder setTestClock(String testClock) { + this.testClock = testClock; + return this; + } + + /** + * ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and + * when the Customer Configuration is first set on an Account. + */ + public Builder setTestClock(EmptyParam testClock) { + this.testClock = testClock; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AutomaticIndirectTax { + /** + * The customer account's tax exemption status: {@code none}, {@code exempt}, or {@code + * reverse}. When {@code reverse}, invoice and receipt PDFs include "Reverse + * charge". + */ + @SerializedName("exempt") + Exempt exempt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ + @SerializedName("ip_address") + Object ipAddress; + + /** + * A per-request flag that indicates when Stripe should validate the customer tax location - + * defaults to {@code auto}. + */ + @SerializedName("validate_location") + ValidateLocation validateLocation; + + private AutomaticIndirectTax( + Exempt exempt, + Map extraParams, + Object ipAddress, + ValidateLocation validateLocation) { + this.exempt = exempt; + this.extraParams = extraParams; + this.ipAddress = ipAddress; + this.validateLocation = validateLocation; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Exempt exempt; + + private Map extraParams; + + private Object ipAddress; + + private ValidateLocation validateLocation; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer.AutomaticIndirectTax build() { + return new AccountUpdateParams.Configuration.Customer.AutomaticIndirectTax( + this.exempt, this.extraParams, this.ipAddress, this.validateLocation); + } + + /** + * The customer account's tax exemption status: {@code none}, {@code exempt}, or {@code + * reverse}. When {@code reverse}, invoice and receipt PDFs include "Reverse + * charge". + */ + public Builder setExempt( + AccountUpdateParams.Configuration.Customer.AutomaticIndirectTax.Exempt exempt) { + this.exempt = exempt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Customer.AutomaticIndirectTax#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Customer.AutomaticIndirectTax#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ + public Builder setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * A recent IP address of the customer used for tax reporting and tax location inference. + */ + public Builder setIpAddress(EmptyParam ipAddress) { + this.ipAddress = ipAddress; + return this; + } + + /** + * A per-request flag that indicates when Stripe should validate the customer tax location + * - defaults to {@code auto}. + */ + public Builder setValidateLocation( + AccountUpdateParams.Configuration.Customer.AutomaticIndirectTax.ValidateLocation + validateLocation) { + this.validateLocation = validateLocation; + return this; + } + } + + public enum Exempt implements ApiRequestParams.EnumParam { + @SerializedName("exempt") + EXEMPT("exempt"), + + @SerializedName("none") + NONE("none"), + + @SerializedName("reverse") + REVERSE("reverse"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Exempt(String value) { + this.value = value; + } + } + + public enum ValidateLocation implements ApiRequestParams.EnumParam { + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("deferred") + DEFERRED("deferred"), + + @SerializedName("immediately") + IMMEDIATELY("immediately"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ValidateLocation(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billing { + /** + * ID of a PaymentMethod attached to the customer account to use as the default for invoices + * and subscriptions. + */ + @SerializedName("default_payment_method") + Object defaultPaymentMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Default invoice settings for the customer account. */ + @SerializedName("invoice") + Invoice invoice; + + private Billing( + Object defaultPaymentMethod, Map extraParams, Invoice invoice) { + this.defaultPaymentMethod = defaultPaymentMethod; + this.extraParams = extraParams; + this.invoice = invoice; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object defaultPaymentMethod; + + private Map extraParams; + + private Invoice invoice; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer.Billing build() { + return new AccountUpdateParams.Configuration.Customer.Billing( + this.defaultPaymentMethod, this.extraParams, this.invoice); + } + + /** + * ID of a PaymentMethod attached to the customer account to use as the default for + * invoices and subscriptions. + */ + public Builder setDefaultPaymentMethod(String defaultPaymentMethod) { + this.defaultPaymentMethod = defaultPaymentMethod; + return this; + } + + /** + * ID of a PaymentMethod attached to the customer account to use as the default for + * invoices and subscriptions. + */ + public Builder setDefaultPaymentMethod(EmptyParam defaultPaymentMethod) { + this.defaultPaymentMethod = defaultPaymentMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Customer.Billing#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Customer.Billing#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Default invoice settings for the customer account. */ + public Builder setInvoice( + AccountUpdateParams.Configuration.Customer.Billing.Invoice invoice) { + this.invoice = invoice; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Invoice { + /** + * The list of up to 4 default custom fields to be displayed on invoices for this + * customer. + */ + @SerializedName("custom_fields") + List customFields; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Default invoice footer. */ + @SerializedName("footer") + Object footer; + + /** Sequence number to use on the customer account's next invoice. Defaults to 1. */ + @SerializedName("next_sequence") + Long nextSequence; + + /** + * Prefix used to generate unique invoice numbers. Must be 3-12 uppercase letters or + * numbers. + */ + @SerializedName("prefix") + Object prefix; + + /** Default invoice PDF rendering options. */ + @SerializedName("rendering") + Rendering rendering; + + private Invoice( + List + customFields, + Map extraParams, + Object footer, + Long nextSequence, + Object prefix, + Rendering rendering) { + this.customFields = customFields; + this.extraParams = extraParams; + this.footer = footer; + this.nextSequence = nextSequence; + this.prefix = prefix; + this.rendering = rendering; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List + customFields; + + private Map extraParams; + + private Object footer; + + private Long nextSequence; + + private Object prefix; + + private Rendering rendering; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer.Billing.Invoice build() { + return new AccountUpdateParams.Configuration.Customer.Billing.Invoice( + this.customFields, + this.extraParams, + this.footer, + this.nextSequence, + this.prefix, + this.rendering); + } + + /** + * Add an element to `customFields` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * AccountUpdateParams.Configuration.Customer.Billing.Invoice#customFields} for the + * field documentation. + */ + public Builder addCustomField( + AccountUpdateParams.Configuration.Customer.Billing.Invoice.CustomField element) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(element); + return this; + } + + /** + * Add all elements to `customFields` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * AccountUpdateParams.Configuration.Customer.Billing.Invoice#customFields} for the + * field documentation. + */ + public Builder addAllCustomField( + List + elements) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Billing.Invoice#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Billing.Invoice#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Default invoice footer. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Default invoice footer. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + + /** Sequence number to use on the customer account's next invoice. Defaults to 1. */ + public Builder setNextSequence(Long nextSequence) { + this.nextSequence = nextSequence; + return this; + } + + /** + * Prefix used to generate unique invoice numbers. Must be 3-12 uppercase letters or + * numbers. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Prefix used to generate unique invoice numbers. Must be 3-12 uppercase letters or + * numbers. + */ + public Builder setPrefix(EmptyParam prefix) { + this.prefix = prefix; + return this; + } + + /** Default invoice PDF rendering options. */ + public Builder setRendering( + AccountUpdateParams.Configuration.Customer.Billing.Invoice.Rendering rendering) { + this.rendering = rendering; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The name of the custom field. This may be up to 40 + * characters. + */ + @SerializedName("name") + Object name; + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. When updating, pass an empty string to remove previously-defined values. + */ + @SerializedName("value") + Object value; + + private CustomField(Map extraParams, Object name, Object value) { + this.extraParams = extraParams; + this.name = name; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + private Object value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer.Billing.Invoice.CustomField + build() { + return new AccountUpdateParams.Configuration.Customer.Billing.Invoice.CustomField( + this.extraParams, this.name, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Billing.Invoice.CustomField#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Billing.Invoice.CustomField#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** + * Required. The name of the custom field. This may be up to 40 + * characters. + */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. When updating, pass an empty string to remove previously-defined + * values. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. When updating, pass an empty string to remove previously-defined + * values. + */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Rendering { + /** + * Indicates whether displayed line item prices and amounts on invoice PDFs include + * inclusive tax amounts. Must be either {@code include_inclusive_tax} or {@code + * exclude_tax}. + */ + @SerializedName("amount_tax_display") + AmountTaxDisplay amountTaxDisplay; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** ID of the invoice rendering template to use for future invoices. */ + @SerializedName("template") + Object template; + + private Rendering( + AmountTaxDisplay amountTaxDisplay, + Map extraParams, + Object template) { + this.amountTaxDisplay = amountTaxDisplay; + this.extraParams = extraParams; + this.template = template; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmountTaxDisplay amountTaxDisplay; + + private Map extraParams; + + private Object template; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer.Billing.Invoice.Rendering build() { + return new AccountUpdateParams.Configuration.Customer.Billing.Invoice.Rendering( + this.amountTaxDisplay, this.extraParams, this.template); + } + + /** + * Indicates whether displayed line item prices and amounts on invoice PDFs include + * inclusive tax amounts. Must be either {@code include_inclusive_tax} or {@code + * exclude_tax}. + */ + public Builder setAmountTaxDisplay( + AccountUpdateParams.Configuration.Customer.Billing.Invoice.Rendering + .AmountTaxDisplay + amountTaxDisplay) { + this.amountTaxDisplay = amountTaxDisplay; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Billing.Invoice.Rendering#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Billing.Invoice.Rendering#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** ID of the invoice rendering template to use for future invoices. */ + public Builder setTemplate(String template) { + this.template = template; + return this; + } + + /** ID of the invoice rendering template to use for future invoices. */ + public Builder setTemplate(EmptyParam template) { + this.template = template; + return this; + } + } + + public enum AmountTaxDisplay implements ApiRequestParams.EnumParam { + @SerializedName("exclude_tax") + EXCLUDE_TAX("exclude_tax"), + + @SerializedName("include_inclusive_tax") + INCLUDE_INCLUSIVE_TAX("include_inclusive_tax"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountTaxDisplay(String value) { + this.value = value; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Capabilities { + /** + * Generates requirements for enabling automatic indirect tax calculation on this customer's + * invoices or subscriptions. Recommended to request this capability if planning to enable + * automatic tax calculation on this customer's invoices or subscriptions. + */ + @SerializedName("automatic_indirect_tax") + AutomaticIndirectTax automaticIndirectTax; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Capabilities( + AutomaticIndirectTax automaticIndirectTax, Map extraParams) { + this.automaticIndirectTax = automaticIndirectTax; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AutomaticIndirectTax automaticIndirectTax; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer.Capabilities build() { + return new AccountUpdateParams.Configuration.Customer.Capabilities( + this.automaticIndirectTax, this.extraParams); + } + + /** + * Generates requirements for enabling automatic indirect tax calculation on this + * customer's invoices or subscriptions. Recommended to request this capability if + * planning to enable automatic tax calculation on this customer's invoices or + * subscriptions. + */ + public Builder setAutomaticIndirectTax( + AccountUpdateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax + automaticIndirectTax) { + this.automaticIndirectTax = automaticIndirectTax; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Customer.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Customer.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AutomaticIndirectTax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AutomaticIndirectTax(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax + build() { + return new AccountUpdateParams.Configuration.Customer.Capabilities + .AutomaticIndirectTax(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Capabilities.AutomaticIndirectTax#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shipping { + /** Customer shipping address. */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Customer name. */ + @SerializedName("name") + Object name; + + /** Customer phone (including extension). */ + @SerializedName("phone") + Object phone; + + private Shipping( + Address address, Map extraParams, Object name, Object phone) { + this.address = address; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private Object name; + + private Object phone; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer.Shipping build() { + return new AccountUpdateParams.Configuration.Customer.Shipping( + this.address, this.extraParams, this.name, this.phone); + } + + /** Customer shipping address. */ + public Builder setAddress( + AccountUpdateParams.Configuration.Customer.Shipping.Address address) { + this.address = address; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Customer.Shipping#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Customer.Shipping#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Customer name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Customer name. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + + /** Customer phone (including extension). */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** Customer phone (including extension). */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Customer.Shipping.Address build() { + return new AccountUpdateParams.Configuration.Customer.Shipping.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Shipping.Address#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Customer.Shipping.Address#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Merchant { + /** + * Represents the state of the configuration, and can be updated to deactivate or re-apply a + * configuration. + */ + @SerializedName("applied") + Boolean applied; + + /** Settings for Bacs Direct Debit payments. */ + @SerializedName("bacs_debit_payments") + BacsDebitPayments bacsDebitPayments; + + /** + * Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and + * other products. + */ + @SerializedName("branding") + Branding branding; + + /** Capabilities to request on the Merchant Configuration. */ + @SerializedName("capabilities") + Capabilities capabilities; + + /** Card payments settings. */ + @SerializedName("card_payments") + CardPayments cardPayments; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Settings specific to Konbini payments on the account. */ + @SerializedName("konbini_payments") + KonbiniPayments konbiniPayments; + + /** + * The Merchant Category Code (MCC) for the merchant. MCCs classify businesses based on the + * goods or services they provide. + */ + @SerializedName("mcc") + Object mcc; + + /** Settings for the default text that appears on statements for language variations. */ + @SerializedName("script_statement_descriptor") + ScriptStatementDescriptor scriptStatementDescriptor; + + /** + * Settings for the default statement descriptor text. + */ + @SerializedName("statement_descriptor") + StatementDescriptor statementDescriptor; + + /** Publicly available contact information for sending support issues to. */ + @SerializedName("support") + Support support; + + private Merchant( + Boolean applied, + BacsDebitPayments bacsDebitPayments, + Branding branding, + Capabilities capabilities, + CardPayments cardPayments, + Map extraParams, + KonbiniPayments konbiniPayments, + Object mcc, + ScriptStatementDescriptor scriptStatementDescriptor, + StatementDescriptor statementDescriptor, + Support support) { + this.applied = applied; + this.bacsDebitPayments = bacsDebitPayments; + this.branding = branding; + this.capabilities = capabilities; + this.cardPayments = cardPayments; + this.extraParams = extraParams; + this.konbiniPayments = konbiniPayments; + this.mcc = mcc; + this.scriptStatementDescriptor = scriptStatementDescriptor; + this.statementDescriptor = statementDescriptor; + this.support = support; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean applied; + + private BacsDebitPayments bacsDebitPayments; + + private Branding branding; + + private Capabilities capabilities; + + private CardPayments cardPayments; + + private Map extraParams; + + private KonbiniPayments konbiniPayments; + + private Object mcc; + + private ScriptStatementDescriptor scriptStatementDescriptor; + + private StatementDescriptor statementDescriptor; + + private Support support; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant build() { + return new AccountUpdateParams.Configuration.Merchant( + this.applied, + this.bacsDebitPayments, + this.branding, + this.capabilities, + this.cardPayments, + this.extraParams, + this.konbiniPayments, + this.mcc, + this.scriptStatementDescriptor, + this.statementDescriptor, + this.support); + } + + /** + * Represents the state of the configuration, and can be updated to deactivate or re-apply a + * configuration. + */ + public Builder setApplied(Boolean applied) { + this.applied = applied; + return this; + } + + /** Settings for Bacs Direct Debit payments. */ + public Builder setBacsDebitPayments( + AccountUpdateParams.Configuration.Merchant.BacsDebitPayments bacsDebitPayments) { + this.bacsDebitPayments = bacsDebitPayments; + return this; + } + + /** + * Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and + * other products. + */ + public Builder setBranding(AccountUpdateParams.Configuration.Merchant.Branding branding) { + this.branding = branding; + return this; + } + + /** Capabilities to request on the Merchant Configuration. */ + public Builder setCapabilities( + AccountUpdateParams.Configuration.Merchant.Capabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** Card payments settings. */ + public Builder setCardPayments( + AccountUpdateParams.Configuration.Merchant.CardPayments cardPayments) { + this.cardPayments = cardPayments; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Settings specific to Konbini payments on the account. */ + public Builder setKonbiniPayments( + AccountUpdateParams.Configuration.Merchant.KonbiniPayments konbiniPayments) { + this.konbiniPayments = konbiniPayments; + return this; + } + + /** + * The Merchant Category Code (MCC) for the merchant. MCCs classify businesses based on the + * goods or services they provide. + */ + public Builder setMcc(String mcc) { + this.mcc = mcc; + return this; + } + + /** + * The Merchant Category Code (MCC) for the merchant. MCCs classify businesses based on the + * goods or services they provide. + */ + public Builder setMcc(EmptyParam mcc) { + this.mcc = mcc; + return this; + } + + /** Settings for the default text that appears on statements for language variations. */ + public Builder setScriptStatementDescriptor( + AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor + scriptStatementDescriptor) { + this.scriptStatementDescriptor = scriptStatementDescriptor; + return this; + } + + /** + * Settings for the default statement descriptor text. + */ + public Builder setStatementDescriptor( + AccountUpdateParams.Configuration.Merchant.StatementDescriptor statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** Publicly available contact information for sending support issues to. */ + public Builder setSupport(AccountUpdateParams.Configuration.Merchant.Support support) { + this.support = support; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebitPayments { + /** Display name for Bacs Direct Debit payments. */ + @SerializedName("display_name") + Object displayName; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private BacsDebitPayments(Object displayName, Map extraParams) { + this.displayName = displayName; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object displayName; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.BacsDebitPayments build() { + return new AccountUpdateParams.Configuration.Merchant.BacsDebitPayments( + this.displayName, this.extraParams); + } + + /** Display name for Bacs Direct Debit payments. */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** Display name for Bacs Direct Debit payments. */ + public Builder setDisplayName(EmptyParam displayName) { + this.displayName = displayName; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.BacsDebitPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.BacsDebitPayments#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Branding { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * ID of a file upload: + * An icon for the merchant. Must be square and at least 128px x 128px. + */ + @SerializedName("icon") + Object icon; + + /** + * ID of a file upload: + * A logo for the merchant that will be used in Checkout instead of the icon and without the + * merchant's name next to it if provided. Must be at least 128px x 128px. + */ + @SerializedName("logo") + Object logo; + + /** A CSS hex color value representing the primary branding color for the merchant. */ + @SerializedName("primary_color") + Object primaryColor; + + /** A CSS hex color value representing the secondary branding color for the merchant. */ + @SerializedName("secondary_color") + Object secondaryColor; + + private Branding( + Map extraParams, + Object icon, + Object logo, + Object primaryColor, + Object secondaryColor) { + this.extraParams = extraParams; + this.icon = icon; + this.logo = logo; + this.primaryColor = primaryColor; + this.secondaryColor = secondaryColor; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object icon; + + private Object logo; + + private Object primaryColor; + + private Object secondaryColor; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Branding build() { + return new AccountUpdateParams.Configuration.Merchant.Branding( + this.extraParams, this.icon, this.logo, this.primaryColor, this.secondaryColor); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.Branding#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.Branding#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * ID of a file + * upload: An icon for the merchant. Must be square and at least 128px x 128px. + */ + public Builder setIcon(String icon) { + this.icon = icon; + return this; + } + + /** + * ID of a file + * upload: An icon for the merchant. Must be square and at least 128px x 128px. + */ + public Builder setIcon(EmptyParam icon) { + this.icon = icon; + return this; + } + + /** + * ID of a file + * upload: A logo for the merchant that will be used in Checkout instead of the icon + * and without the merchant's name next to it if provided. Must be at least 128px x 128px. + */ + public Builder setLogo(String logo) { + this.logo = logo; + return this; + } + + /** + * ID of a file + * upload: A logo for the merchant that will be used in Checkout instead of the icon + * and without the merchant's name next to it if provided. Must be at least 128px x 128px. + */ + public Builder setLogo(EmptyParam logo) { + this.logo = logo; + return this; + } + + /** A CSS hex color value representing the primary branding color for the merchant. */ + public Builder setPrimaryColor(String primaryColor) { + this.primaryColor = primaryColor; + return this; + } + + /** A CSS hex color value representing the primary branding color for the merchant. */ + public Builder setPrimaryColor(EmptyParam primaryColor) { + this.primaryColor = primaryColor; + return this; + } + + /** A CSS hex color value representing the secondary branding color for the merchant. */ + public Builder setSecondaryColor(String secondaryColor) { + this.secondaryColor = secondaryColor; + return this; + } + + /** A CSS hex color value representing the secondary branding color for the merchant. */ + public Builder setSecondaryColor(EmptyParam secondaryColor) { + this.secondaryColor = secondaryColor; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Capabilities { + /** Allow the merchant to process ACH debit payments. */ + @SerializedName("ach_debit_payments") + AchDebitPayments achDebitPayments; + + /** Allow the merchant to process ACSS debit payments. */ + @SerializedName("acss_debit_payments") + AcssDebitPayments acssDebitPayments; + + /** Allow the merchant to process Affirm payments. */ + @SerializedName("affirm_payments") + AffirmPayments affirmPayments; + + /** Allow the merchant to process Afterpay/Clearpay payments. */ + @SerializedName("afterpay_clearpay_payments") + AfterpayClearpayPayments afterpayClearpayPayments; + + /** Allow the merchant to process Alma payments. */ + @SerializedName("alma_payments") + AlmaPayments almaPayments; + + /** Allow the merchant to process Amazon Pay payments. */ + @SerializedName("amazon_pay_payments") + AmazonPayPayments amazonPayPayments; + + /** Allow the merchant to process Australian BECS Direct Debit payments. */ + @SerializedName("au_becs_debit_payments") + AuBecsDebitPayments auBecsDebitPayments; + + /** Allow the merchant to process BACS Direct Debit payments. */ + @SerializedName("bacs_debit_payments") + BacsDebitPayments bacsDebitPayments; + + /** Allow the merchant to process Bancontact payments. */ + @SerializedName("bancontact_payments") + BancontactPayments bancontactPayments; + + /** Allow the merchant to process BLIK payments. */ + @SerializedName("blik_payments") + BlikPayments blikPayments; + + /** Allow the merchant to process Boleto payments. */ + @SerializedName("boleto_payments") + BoletoPayments boletoPayments; + + /** Allow the merchant to collect card payments. */ + @SerializedName("card_payments") + CardPayments cardPayments; + + /** Allow the merchant to process Cartes Bancaires payments. */ + @SerializedName("cartes_bancaires_payments") + CartesBancairesPayments cartesBancairesPayments; + + /** Allow the merchant to process Cash App payments. */ + @SerializedName("cashapp_payments") + CashappPayments cashappPayments; + + /** Allow the merchant to process EPS payments. */ + @SerializedName("eps_payments") + EpsPayments epsPayments; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Allow the merchant to process FPX payments. */ + @SerializedName("fpx_payments") + FpxPayments fpxPayments; + + /** Allow the merchant to process UK bank transfer payments. */ + @SerializedName("gb_bank_transfer_payments") + GbBankTransferPayments gbBankTransferPayments; + + /** Allow the merchant to process GrabPay payments. */ + @SerializedName("grabpay_payments") + GrabpayPayments grabpayPayments; + + /** Allow the merchant to process iDEAL payments. */ + @SerializedName("ideal_payments") + IdealPayments idealPayments; + + /** Allow the merchant to process JCB card payments. */ + @SerializedName("jcb_payments") + JcbPayments jcbPayments; + + /** Allow the merchant to process Japanese bank transfer payments. */ + @SerializedName("jp_bank_transfer_payments") + JpBankTransferPayments jpBankTransferPayments; + + /** Allow the merchant to process Kakao Pay payments. */ + @SerializedName("kakao_pay_payments") + KakaoPayPayments kakaoPayPayments; + + /** Allow the merchant to process Klarna payments. */ + @SerializedName("klarna_payments") + KlarnaPayments klarnaPayments; + + /** Allow the merchant to process Konbini convenience store payments. */ + @SerializedName("konbini_payments") + KonbiniPayments konbiniPayments; + + /** Allow the merchant to process Korean card payments. */ + @SerializedName("kr_card_payments") + KrCardPayments krCardPayments; + + /** Allow the merchant to process Link payments. */ + @SerializedName("link_payments") + LinkPayments linkPayments; + + /** Allow the merchant to process MobilePay payments. */ + @SerializedName("mobilepay_payments") + MobilepayPayments mobilepayPayments; + + /** Allow the merchant to process Multibanco payments. */ + @SerializedName("multibanco_payments") + MultibancoPayments multibancoPayments; + + /** Allow the merchant to process Mexican bank transfer payments. */ + @SerializedName("mx_bank_transfer_payments") + MxBankTransferPayments mxBankTransferPayments; + + /** Allow the merchant to process Naver Pay payments. */ + @SerializedName("naver_pay_payments") + NaverPayPayments naverPayPayments; + + /** Allow the merchant to process OXXO payments. */ + @SerializedName("oxxo_payments") + OxxoPayments oxxoPayments; + + /** Allow the merchant to process Przelewy24 (P24) payments. */ + @SerializedName("p24_payments") + P24Payments p24Payments; + + /** Allow the merchant to process Pay by Bank payments. */ + @SerializedName("pay_by_bank_payments") + PayByBankPayments payByBankPayments; + + /** Allow the merchant to process PAYCO payments. */ + @SerializedName("payco_payments") + PaycoPayments paycoPayments; + + /** Allow the merchant to process PayNow payments. */ + @SerializedName("paynow_payments") + PaynowPayments paynowPayments; + + /** Allow the merchant to process PromptPay payments. */ + @SerializedName("promptpay_payments") + PromptpayPayments promptpayPayments; + + /** Allow the merchant to process Revolut Pay payments. */ + @SerializedName("revolut_pay_payments") + RevolutPayPayments revolutPayPayments; + + /** Allow the merchant to process Samsung Pay payments. */ + @SerializedName("samsung_pay_payments") + SamsungPayPayments samsungPayPayments; + + /** Allow the merchant to process SEPA bank transfer payments. */ + @SerializedName("sepa_bank_transfer_payments") + SepaBankTransferPayments sepaBankTransferPayments; + + /** Allow the merchant to process SEPA Direct Debit payments. */ + @SerializedName("sepa_debit_payments") + SepaDebitPayments sepaDebitPayments; + + /** Allow the merchant to process Swish payments. */ + @SerializedName("swish_payments") + SwishPayments swishPayments; + + /** Allow the merchant to process TWINT payments. */ + @SerializedName("twint_payments") + TwintPayments twintPayments; + + /** Allow the merchant to process US bank transfer payments. */ + @SerializedName("us_bank_transfer_payments") + UsBankTransferPayments usBankTransferPayments; + + /** Allow the merchant to process Zip payments. */ + @SerializedName("zip_payments") + ZipPayments zipPayments; + + private Capabilities( + AchDebitPayments achDebitPayments, + AcssDebitPayments acssDebitPayments, + AffirmPayments affirmPayments, + AfterpayClearpayPayments afterpayClearpayPayments, + AlmaPayments almaPayments, + AmazonPayPayments amazonPayPayments, + AuBecsDebitPayments auBecsDebitPayments, + BacsDebitPayments bacsDebitPayments, + BancontactPayments bancontactPayments, + BlikPayments blikPayments, + BoletoPayments boletoPayments, + CardPayments cardPayments, + CartesBancairesPayments cartesBancairesPayments, + CashappPayments cashappPayments, + EpsPayments epsPayments, + Map extraParams, + FpxPayments fpxPayments, + GbBankTransferPayments gbBankTransferPayments, + GrabpayPayments grabpayPayments, + IdealPayments idealPayments, + JcbPayments jcbPayments, + JpBankTransferPayments jpBankTransferPayments, + KakaoPayPayments kakaoPayPayments, + KlarnaPayments klarnaPayments, + KonbiniPayments konbiniPayments, + KrCardPayments krCardPayments, + LinkPayments linkPayments, + MobilepayPayments mobilepayPayments, + MultibancoPayments multibancoPayments, + MxBankTransferPayments mxBankTransferPayments, + NaverPayPayments naverPayPayments, + OxxoPayments oxxoPayments, + P24Payments p24Payments, + PayByBankPayments payByBankPayments, + PaycoPayments paycoPayments, + PaynowPayments paynowPayments, + PromptpayPayments promptpayPayments, + RevolutPayPayments revolutPayPayments, + SamsungPayPayments samsungPayPayments, + SepaBankTransferPayments sepaBankTransferPayments, + SepaDebitPayments sepaDebitPayments, + SwishPayments swishPayments, + TwintPayments twintPayments, + UsBankTransferPayments usBankTransferPayments, + ZipPayments zipPayments) { + this.achDebitPayments = achDebitPayments; + this.acssDebitPayments = acssDebitPayments; + this.affirmPayments = affirmPayments; + this.afterpayClearpayPayments = afterpayClearpayPayments; + this.almaPayments = almaPayments; + this.amazonPayPayments = amazonPayPayments; + this.auBecsDebitPayments = auBecsDebitPayments; + this.bacsDebitPayments = bacsDebitPayments; + this.bancontactPayments = bancontactPayments; + this.blikPayments = blikPayments; + this.boletoPayments = boletoPayments; + this.cardPayments = cardPayments; + this.cartesBancairesPayments = cartesBancairesPayments; + this.cashappPayments = cashappPayments; + this.epsPayments = epsPayments; + this.extraParams = extraParams; + this.fpxPayments = fpxPayments; + this.gbBankTransferPayments = gbBankTransferPayments; + this.grabpayPayments = grabpayPayments; + this.idealPayments = idealPayments; + this.jcbPayments = jcbPayments; + this.jpBankTransferPayments = jpBankTransferPayments; + this.kakaoPayPayments = kakaoPayPayments; + this.klarnaPayments = klarnaPayments; + this.konbiniPayments = konbiniPayments; + this.krCardPayments = krCardPayments; + this.linkPayments = linkPayments; + this.mobilepayPayments = mobilepayPayments; + this.multibancoPayments = multibancoPayments; + this.mxBankTransferPayments = mxBankTransferPayments; + this.naverPayPayments = naverPayPayments; + this.oxxoPayments = oxxoPayments; + this.p24Payments = p24Payments; + this.payByBankPayments = payByBankPayments; + this.paycoPayments = paycoPayments; + this.paynowPayments = paynowPayments; + this.promptpayPayments = promptpayPayments; + this.revolutPayPayments = revolutPayPayments; + this.samsungPayPayments = samsungPayPayments; + this.sepaBankTransferPayments = sepaBankTransferPayments; + this.sepaDebitPayments = sepaDebitPayments; + this.swishPayments = swishPayments; + this.twintPayments = twintPayments; + this.usBankTransferPayments = usBankTransferPayments; + this.zipPayments = zipPayments; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AchDebitPayments achDebitPayments; + + private AcssDebitPayments acssDebitPayments; + + private AffirmPayments affirmPayments; + + private AfterpayClearpayPayments afterpayClearpayPayments; + + private AlmaPayments almaPayments; + + private AmazonPayPayments amazonPayPayments; + + private AuBecsDebitPayments auBecsDebitPayments; + + private BacsDebitPayments bacsDebitPayments; + + private BancontactPayments bancontactPayments; + + private BlikPayments blikPayments; + + private BoletoPayments boletoPayments; + + private CardPayments cardPayments; + + private CartesBancairesPayments cartesBancairesPayments; + + private CashappPayments cashappPayments; + + private EpsPayments epsPayments; + + private Map extraParams; + + private FpxPayments fpxPayments; + + private GbBankTransferPayments gbBankTransferPayments; + + private GrabpayPayments grabpayPayments; + + private IdealPayments idealPayments; + + private JcbPayments jcbPayments; + + private JpBankTransferPayments jpBankTransferPayments; + + private KakaoPayPayments kakaoPayPayments; + + private KlarnaPayments klarnaPayments; + + private KonbiniPayments konbiniPayments; + + private KrCardPayments krCardPayments; + + private LinkPayments linkPayments; + + private MobilepayPayments mobilepayPayments; + + private MultibancoPayments multibancoPayments; + + private MxBankTransferPayments mxBankTransferPayments; + + private NaverPayPayments naverPayPayments; + + private OxxoPayments oxxoPayments; + + private P24Payments p24Payments; + + private PayByBankPayments payByBankPayments; + + private PaycoPayments paycoPayments; + + private PaynowPayments paynowPayments; + + private PromptpayPayments promptpayPayments; + + private RevolutPayPayments revolutPayPayments; + + private SamsungPayPayments samsungPayPayments; + + private SepaBankTransferPayments sepaBankTransferPayments; + + private SepaDebitPayments sepaDebitPayments; + + private SwishPayments swishPayments; + + private TwintPayments twintPayments; + + private UsBankTransferPayments usBankTransferPayments; + + private ZipPayments zipPayments; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities( + this.achDebitPayments, + this.acssDebitPayments, + this.affirmPayments, + this.afterpayClearpayPayments, + this.almaPayments, + this.amazonPayPayments, + this.auBecsDebitPayments, + this.bacsDebitPayments, + this.bancontactPayments, + this.blikPayments, + this.boletoPayments, + this.cardPayments, + this.cartesBancairesPayments, + this.cashappPayments, + this.epsPayments, + this.extraParams, + this.fpxPayments, + this.gbBankTransferPayments, + this.grabpayPayments, + this.idealPayments, + this.jcbPayments, + this.jpBankTransferPayments, + this.kakaoPayPayments, + this.klarnaPayments, + this.konbiniPayments, + this.krCardPayments, + this.linkPayments, + this.mobilepayPayments, + this.multibancoPayments, + this.mxBankTransferPayments, + this.naverPayPayments, + this.oxxoPayments, + this.p24Payments, + this.payByBankPayments, + this.paycoPayments, + this.paynowPayments, + this.promptpayPayments, + this.revolutPayPayments, + this.samsungPayPayments, + this.sepaBankTransferPayments, + this.sepaDebitPayments, + this.swishPayments, + this.twintPayments, + this.usBankTransferPayments, + this.zipPayments); + } + + /** Allow the merchant to process ACH debit payments. */ + public Builder setAchDebitPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.AchDebitPayments + achDebitPayments) { + this.achDebitPayments = achDebitPayments; + return this; + } + + /** Allow the merchant to process ACSS debit payments. */ + public Builder setAcssDebitPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.AcssDebitPayments + acssDebitPayments) { + this.acssDebitPayments = acssDebitPayments; + return this; + } + + /** Allow the merchant to process Affirm payments. */ + public Builder setAffirmPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.AffirmPayments + affirmPayments) { + this.affirmPayments = affirmPayments; + return this; + } + + /** Allow the merchant to process Afterpay/Clearpay payments. */ + public Builder setAfterpayClearpayPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.AfterpayClearpayPayments + afterpayClearpayPayments) { + this.afterpayClearpayPayments = afterpayClearpayPayments; + return this; + } + + /** Allow the merchant to process Alma payments. */ + public Builder setAlmaPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.AlmaPayments almaPayments) { + this.almaPayments = almaPayments; + return this; + } + + /** Allow the merchant to process Amazon Pay payments. */ + public Builder setAmazonPayPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.AmazonPayPayments + amazonPayPayments) { + this.amazonPayPayments = amazonPayPayments; + return this; + } + + /** Allow the merchant to process Australian BECS Direct Debit payments. */ + public Builder setAuBecsDebitPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.AuBecsDebitPayments + auBecsDebitPayments) { + this.auBecsDebitPayments = auBecsDebitPayments; + return this; + } + + /** Allow the merchant to process BACS Direct Debit payments. */ + public Builder setBacsDebitPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.BacsDebitPayments + bacsDebitPayments) { + this.bacsDebitPayments = bacsDebitPayments; + return this; + } + + /** Allow the merchant to process Bancontact payments. */ + public Builder setBancontactPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.BancontactPayments + bancontactPayments) { + this.bancontactPayments = bancontactPayments; + return this; + } + + /** Allow the merchant to process BLIK payments. */ + public Builder setBlikPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.BlikPayments blikPayments) { + this.blikPayments = blikPayments; + return this; + } + + /** Allow the merchant to process Boleto payments. */ + public Builder setBoletoPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.BoletoPayments + boletoPayments) { + this.boletoPayments = boletoPayments; + return this; + } + + /** Allow the merchant to collect card payments. */ + public Builder setCardPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.CardPayments cardPayments) { + this.cardPayments = cardPayments; + return this; + } + + /** Allow the merchant to process Cartes Bancaires payments. */ + public Builder setCartesBancairesPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.CartesBancairesPayments + cartesBancairesPayments) { + this.cartesBancairesPayments = cartesBancairesPayments; + return this; + } + + /** Allow the merchant to process Cash App payments. */ + public Builder setCashappPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.CashappPayments + cashappPayments) { + this.cashappPayments = cashappPayments; + return this; + } + + /** Allow the merchant to process EPS payments. */ + public Builder setEpsPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.EpsPayments epsPayments) { + this.epsPayments = epsPayments; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Allow the merchant to process FPX payments. */ + public Builder setFpxPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.FpxPayments fpxPayments) { + this.fpxPayments = fpxPayments; + return this; + } + + /** Allow the merchant to process UK bank transfer payments. */ + public Builder setGbBankTransferPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.GbBankTransferPayments + gbBankTransferPayments) { + this.gbBankTransferPayments = gbBankTransferPayments; + return this; + } + + /** Allow the merchant to process GrabPay payments. */ + public Builder setGrabpayPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.GrabpayPayments + grabpayPayments) { + this.grabpayPayments = grabpayPayments; + return this; + } + + /** Allow the merchant to process iDEAL payments. */ + public Builder setIdealPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.IdealPayments idealPayments) { + this.idealPayments = idealPayments; + return this; + } + + /** Allow the merchant to process JCB card payments. */ + public Builder setJcbPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.JcbPayments jcbPayments) { + this.jcbPayments = jcbPayments; + return this; + } + + /** Allow the merchant to process Japanese bank transfer payments. */ + public Builder setJpBankTransferPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.JpBankTransferPayments + jpBankTransferPayments) { + this.jpBankTransferPayments = jpBankTransferPayments; + return this; + } + + /** Allow the merchant to process Kakao Pay payments. */ + public Builder setKakaoPayPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.KakaoPayPayments + kakaoPayPayments) { + this.kakaoPayPayments = kakaoPayPayments; + return this; + } + + /** Allow the merchant to process Klarna payments. */ + public Builder setKlarnaPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.KlarnaPayments + klarnaPayments) { + this.klarnaPayments = klarnaPayments; + return this; + } + + /** Allow the merchant to process Konbini convenience store payments. */ + public Builder setKonbiniPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.KonbiniPayments + konbiniPayments) { + this.konbiniPayments = konbiniPayments; + return this; + } + + /** Allow the merchant to process Korean card payments. */ + public Builder setKrCardPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.KrCardPayments + krCardPayments) { + this.krCardPayments = krCardPayments; + return this; + } + + /** Allow the merchant to process Link payments. */ + public Builder setLinkPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.LinkPayments linkPayments) { + this.linkPayments = linkPayments; + return this; + } + + /** Allow the merchant to process MobilePay payments. */ + public Builder setMobilepayPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.MobilepayPayments + mobilepayPayments) { + this.mobilepayPayments = mobilepayPayments; + return this; + } + + /** Allow the merchant to process Multibanco payments. */ + public Builder setMultibancoPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.MultibancoPayments + multibancoPayments) { + this.multibancoPayments = multibancoPayments; + return this; + } + + /** Allow the merchant to process Mexican bank transfer payments. */ + public Builder setMxBankTransferPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.MxBankTransferPayments + mxBankTransferPayments) { + this.mxBankTransferPayments = mxBankTransferPayments; + return this; + } + + /** Allow the merchant to process Naver Pay payments. */ + public Builder setNaverPayPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.NaverPayPayments + naverPayPayments) { + this.naverPayPayments = naverPayPayments; + return this; + } + + /** Allow the merchant to process OXXO payments. */ + public Builder setOxxoPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.OxxoPayments oxxoPayments) { + this.oxxoPayments = oxxoPayments; + return this; + } + + /** Allow the merchant to process Przelewy24 (P24) payments. */ + public Builder setP24Payments( + AccountUpdateParams.Configuration.Merchant.Capabilities.P24Payments p24Payments) { + this.p24Payments = p24Payments; + return this; + } + + /** Allow the merchant to process Pay by Bank payments. */ + public Builder setPayByBankPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.PayByBankPayments + payByBankPayments) { + this.payByBankPayments = payByBankPayments; + return this; + } + + /** Allow the merchant to process PAYCO payments. */ + public Builder setPaycoPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.PaycoPayments paycoPayments) { + this.paycoPayments = paycoPayments; + return this; + } + + /** Allow the merchant to process PayNow payments. */ + public Builder setPaynowPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.PaynowPayments + paynowPayments) { + this.paynowPayments = paynowPayments; + return this; + } + + /** Allow the merchant to process PromptPay payments. */ + public Builder setPromptpayPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.PromptpayPayments + promptpayPayments) { + this.promptpayPayments = promptpayPayments; + return this; + } + + /** Allow the merchant to process Revolut Pay payments. */ + public Builder setRevolutPayPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.RevolutPayPayments + revolutPayPayments) { + this.revolutPayPayments = revolutPayPayments; + return this; + } + + /** Allow the merchant to process Samsung Pay payments. */ + public Builder setSamsungPayPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.SamsungPayPayments + samsungPayPayments) { + this.samsungPayPayments = samsungPayPayments; + return this; + } + + /** Allow the merchant to process SEPA bank transfer payments. */ + public Builder setSepaBankTransferPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.SepaBankTransferPayments + sepaBankTransferPayments) { + this.sepaBankTransferPayments = sepaBankTransferPayments; + return this; + } + + /** Allow the merchant to process SEPA Direct Debit payments. */ + public Builder setSepaDebitPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.SepaDebitPayments + sepaDebitPayments) { + this.sepaDebitPayments = sepaDebitPayments; + return this; + } + + /** Allow the merchant to process Swish payments. */ + public Builder setSwishPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.SwishPayments swishPayments) { + this.swishPayments = swishPayments; + return this; + } + + /** Allow the merchant to process TWINT payments. */ + public Builder setTwintPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.TwintPayments twintPayments) { + this.twintPayments = twintPayments; + return this; + } + + /** Allow the merchant to process US bank transfer payments. */ + public Builder setUsBankTransferPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.UsBankTransferPayments + usBankTransferPayments) { + this.usBankTransferPayments = usBankTransferPayments; + return this; + } + + /** Allow the merchant to process Zip payments. */ + public Builder setZipPayments( + AccountUpdateParams.Configuration.Merchant.Capabilities.ZipPayments zipPayments) { + this.zipPayments = zipPayments; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AchDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AchDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.AchDebitPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.AchDebitPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AchDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AchDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AcssDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.AcssDebitPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.AcssDebitPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AcssDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AcssDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AffirmPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AffirmPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.AffirmPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.AffirmPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AffirmPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AffirmPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AfterpayClearpayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.AfterpayClearpayPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities + .AfterpayClearpayPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AfterpayClearpayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AfterpayClearpayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AlmaPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AlmaPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.AlmaPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.AlmaPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AlmaPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AlmaPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AmazonPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.AmazonPayPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.AmazonPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AmazonPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AmazonPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private AuBecsDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.AuBecsDebitPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities + .AuBecsDebitPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AuBecsDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.AuBecsDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BacsDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private BacsDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.BacsDebitPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.BacsDebitPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.BacsDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.BacsDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BancontactPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private BancontactPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.BancontactPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.BancontactPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.BancontactPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.BancontactPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BlikPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private BlikPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.BlikPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.BlikPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.BlikPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.BlikPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BoletoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private BoletoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.BoletoPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.BoletoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.BoletoPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.BoletoPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CardPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.CardPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.CardPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.CardPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.CardPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CartesBancairesPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CartesBancairesPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.CartesBancairesPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities + .CartesBancairesPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.CartesBancairesPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.CartesBancairesPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CashappPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CashappPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.CashappPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.CashappPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.CashappPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.CashappPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class EpsPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private EpsPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.EpsPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.EpsPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.EpsPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.EpsPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FpxPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private FpxPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.FpxPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.FpxPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.FpxPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.FpxPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class GbBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private GbBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.GbBankTransferPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities + .GbBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.GbBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.GbBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class GrabpayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private GrabpayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.GrabpayPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.GrabpayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.GrabpayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.GrabpayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdealPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private IdealPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.IdealPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.IdealPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.IdealPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.IdealPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class JcbPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private JcbPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.JcbPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.JcbPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.JcbPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.JcbPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class JpBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private JpBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.JpBankTransferPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities + .JpBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.JpBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.JpBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private KakaoPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.KakaoPayPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.KakaoPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.KakaoPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.KakaoPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KlarnaPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private KlarnaPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.KlarnaPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.KlarnaPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.KlarnaPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.KlarnaPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KonbiniPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private KonbiniPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.KonbiniPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.KonbiniPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KrCardPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private KrCardPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.KrCardPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.KrCardPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.KrCardPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.KrCardPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LinkPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private LinkPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.LinkPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.LinkPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.LinkPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.LinkPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MobilepayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private MobilepayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.MobilepayPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.MobilepayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.MobilepayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.MobilepayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MultibancoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private MultibancoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.MultibancoPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.MultibancoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.MultibancoPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.MultibancoPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MxBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private MxBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.MxBankTransferPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities + .MxBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.MxBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.MxBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NaverPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private NaverPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.NaverPayPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.NaverPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.NaverPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.NaverPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OxxoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private OxxoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.OxxoPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.OxxoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.OxxoPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.OxxoPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class P24Payments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private P24Payments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.P24Payments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.P24Payments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.P24Payments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.P24Payments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PayByBankPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private PayByBankPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.PayByBankPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.PayByBankPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.PayByBankPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.PayByBankPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaycoPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private PaycoPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.PaycoPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.PaycoPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.PaycoPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.PaycoPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaynowPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private PaynowPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.PaynowPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.PaynowPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.PaynowPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.PaynowPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PromptpayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private PromptpayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.PromptpayPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.PromptpayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.PromptpayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.PromptpayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private RevolutPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.RevolutPayPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.RevolutPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.RevolutPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.RevolutPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private SamsungPayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.SamsungPayPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.SamsungPayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.SamsungPayPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.SamsungPayPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private SepaBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.SepaBankTransferPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities + .SepaBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.SepaBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.SepaBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebitPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private SepaDebitPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.SepaDebitPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.SepaDebitPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.SepaDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.SepaDebitPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SwishPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private SwishPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.SwishPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.SwishPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.SwishPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.SwishPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TwintPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private TwintPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.TwintPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.TwintPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.TwintPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.TwintPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class UsBankTransferPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private UsBankTransferPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.UsBankTransferPayments + build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities + .UsBankTransferPayments(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.UsBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.UsBankTransferPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ZipPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private ZipPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Capabilities.ZipPayments build() { + return new AccountUpdateParams.Configuration.Merchant.Capabilities.ZipPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.ZipPayments#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Capabilities.ZipPayments#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPayments { + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + @SerializedName("decline_on") + DeclineOn declineOn; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private CardPayments(DeclineOn declineOn, Map extraParams) { + this.declineOn = declineOn; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DeclineOn declineOn; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.CardPayments build() { + return new AccountUpdateParams.Configuration.Merchant.CardPayments( + this.declineOn, this.extraParams); + } + + /** + * Automatically declines certain charge types regardless of whether the card issuer + * accepted or declined the charge. + */ + public Builder setDeclineOn( + AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn declineOn) { + this.declineOn = declineOn; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.CardPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.CardPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DeclineOn { + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. + * This setting only applies when a ZIP or postal code is provided and they fail bank + * verification. + */ + @SerializedName("avs_failure") + Boolean avsFailure; + + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting only + * applies when a CVC is provided and it fails bank verification. + */ + @SerializedName("cvc_failure") + Boolean cvcFailure; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private DeclineOn( + Boolean avsFailure, Boolean cvcFailure, Map extraParams) { + this.avsFailure = avsFailure; + this.cvcFailure = cvcFailure; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean avsFailure; + + private Boolean cvcFailure; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn build() { + return new AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn( + this.avsFailure, this.cvcFailure, this.extraParams); + } + + /** + * Whether Stripe automatically declines charges with an incorrect ZIP or postal code. + * This setting only applies when a ZIP or postal code is provided and they fail bank + * verification. + */ + public Builder setAvsFailure(Boolean avsFailure) { + this.avsFailure = avsFailure; + return this; + } + + /** + * Whether Stripe automatically declines charges with an incorrect CVC. This setting + * only applies when a CVC is provided and it fails bank verification. + */ + public Builder setCvcFailure(Boolean cvcFailure) { + this.cvcFailure = cvcFailure; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.CardPayments.DeclineOn#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class KonbiniPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Support for Konbini payments. */ + @SerializedName("support") + Support support; + + private KonbiniPayments(Map extraParams, Support support) { + this.extraParams = extraParams; + this.support = support; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Support support; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.KonbiniPayments build() { + return new AccountUpdateParams.Configuration.Merchant.KonbiniPayments( + this.extraParams, this.support); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.KonbiniPayments#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Support for Konbini payments. */ + public Builder setSupport( + AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support support) { + this.support = support; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Support { + /** Support email address for Konbini payments. */ + @SerializedName("email") + Object email; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Support hours for Konbini payments. */ + @SerializedName("hours") + Hours hours; + + /** Support phone number for Konbini payments. */ + @SerializedName("phone") + Object phone; + + private Support( + Object email, Map extraParams, Hours hours, Object phone) { + this.email = email; + this.extraParams = extraParams; + this.hours = hours; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object email; + + private Map extraParams; + + private Hours hours; + + private Object phone; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support build() { + return new AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support( + this.email, this.extraParams, this.hours, this.phone); + } + + /** Support email address for Konbini payments. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** Support email address for Konbini payments. */ + public Builder setEmail(EmptyParam email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Support hours for Konbini payments. */ + public Builder setHours( + AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours hours) { + this.hours = hours; + return this; + } + + /** Support phone number for Konbini payments. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** Support phone number for Konbini payments. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hours { + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("end_time") + Object endTime; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + @SerializedName("start_time") + Object startTime; + + private Hours(Object endTime, Map extraParams, Object startTime) { + this.endTime = endTime; + this.extraParams = extraParams; + this.startTime = startTime; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object endTime; + + private Map extraParams; + + private Object startTime; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours + build() { + return new AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours( + this.endTime, this.extraParams, this.startTime); + } + + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + public Builder setEndTime(String endTime) { + this.endTime = endTime; + return this; + } + + /** Support hours end time (JST time of day) for in {@code HH:MM} format. */ + public Builder setEndTime(EmptyParam endTime) { + this.endTime = endTime; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.KonbiniPayments.Support.Hours#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + public Builder setStartTime(String startTime) { + this.startTime = startTime; + return this; + } + + /** Support hours start time (JST time of day) for in {@code HH:MM} format. */ + public Builder setStartTime(EmptyParam startTime) { + this.startTime = startTime; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptStatementDescriptor { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The Kana variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kana") + Kana kana; + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese statement + * descriptors have special + * requirements. + */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptStatementDescriptor(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor build() { + return new AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The Kana variation of statement_descriptor used for charges in Japan. Japanese + * statement descriptors have special + * requirements. + */ + public Builder setKana( + AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana kana) { + this.kana = kana; + return this; + } + + /** + * The Kanji variation of statement_descriptor used for charges in Japan. Japanese + * statement descriptors have special + * requirements. + */ + public Builder setKanji( + AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + Object descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + Object prefix; + + private Kana(Object descriptor, Map extraParams, Object prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object descriptor; + + private Map extraParams; + + private Object prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana + build() { + return new AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(EmptyParam descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kana#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(EmptyParam prefix) { + this.prefix = prefix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + @SerializedName("descriptor") + Object descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + Object prefix; + + private Kanji(Object descriptor, Map extraParams, Object prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object descriptor; + + private Map extraParams; + + private Object prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji + build() { + return new AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. + * For card charges, if you don’t set a statement_descriptor_prefix, this text is also + * used as the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, + * we truncate the statement_descriptor text to limit the full descriptor to 22 + * characters. For more information about statement descriptors and their requirements, + * see the Merchant Configuration settings documentation. + */ + public Builder setDescriptor(EmptyParam descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.ScriptStatementDescriptor.Kanji#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space + * for the dynamic part of the descriptor, keep this text short. If you don’t specify + * this value, statement_descriptor is used as the prefix. For more information about + * statement descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(EmptyParam prefix) { + this.prefix = prefix; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StatementDescriptor { + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement descriptor + * suffix causes the combined statement descriptor to exceed 22 characters, we truncate the + * statement_descriptor text to limit the full descriptor to 22 characters. For more + * information about statement descriptors and their requirements, see the Merchant + * Configuration settings documentation. + */ + @SerializedName("descriptor") + Object descriptor; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing any + * dynamic statement_descriptor_suffix specified on the charge. To maximize space for the + * dynamic part of the descriptor, keep this text short. If you don’t specify this value, + * statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + @SerializedName("prefix") + Object prefix; + + private StatementDescriptor( + Object descriptor, Map extraParams, Object prefix) { + this.descriptor = descriptor; + this.extraParams = extraParams; + this.prefix = prefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object descriptor; + + private Map extraParams; + + private Object prefix; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.StatementDescriptor build() { + return new AccountUpdateParams.Configuration.Merchant.StatementDescriptor( + this.descriptor, this.extraParams, this.prefix); + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + public Builder setDescriptor(String descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * The default text that appears on statements for non-card charges outside of Japan. For + * card charges, if you don’t set a statement_descriptor_prefix, this text is also used as + * the statement descriptor prefix. In that case, if concatenating the statement + * descriptor suffix causes the combined statement descriptor to exceed 22 characters, we + * truncate the statement_descriptor text to limit the full descriptor to 22 characters. + * For more information about statement descriptors and their requirements, see the + * Merchant Configuration settings documentation. + */ + public Builder setDescriptor(EmptyParam descriptor) { + this.descriptor = descriptor; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Configuration.Merchant.StatementDescriptor#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Default text that appears on statements for card charges outside of Japan, prefixing + * any dynamic statement_descriptor_suffix specified on the charge. To maximize space for + * the dynamic part of the descriptor, keep this text short. If you don’t specify this + * value, statement_descriptor is used as the prefix. For more information about statement + * descriptors and their requirements, see the Merchant Configuration settings + * documentation. + */ + public Builder setPrefix(EmptyParam prefix) { + this.prefix = prefix; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Support { + /** A publicly available mailing address for sending support issues to. */ + @SerializedName("address") + Address address; + + /** A publicly available email address for sending support issues to. */ + @SerializedName("email") + Object email; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A publicly available phone number to call with support issues. */ + @SerializedName("phone") + Object phone; + + /** A publicly available website for handling support issues. */ + @SerializedName("url") + Object url; + + private Support( + Address address, + Object email, + Map extraParams, + Object phone, + Object url) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.phone = phone; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Object email; + + private Map extraParams; + + private Object phone; + + private Object url; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Support build() { + return new AccountUpdateParams.Configuration.Merchant.Support( + this.address, this.email, this.extraParams, this.phone, this.url); + } + + /** A publicly available mailing address for sending support issues to. */ + public Builder setAddress( + AccountUpdateParams.Configuration.Merchant.Support.Address address) { + this.address = address; + return this; + } + + /** A publicly available email address for sending support issues to. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** A publicly available email address for sending support issues to. */ + public Builder setEmail(EmptyParam email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.Support#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Merchant.Support#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A publicly available phone number to call with support issues. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** A publicly available phone number to call with support issues. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + + /** A publicly available website for handling support issues. */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + + /** A publicly available website for handling support issues. */ + public Builder setUrl(EmptyParam url) { + this.url = url; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.Support.Address build() { + return new AccountUpdateParams.Configuration.Merchant.Support.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Support.Address#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Merchant.Support.Address#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Recipient { + /** + * Represents the state of the configuration, and can be updated to deactivate or re-apply a + * configuration. + */ + @SerializedName("applied") + Boolean applied; + + /** Capabilities to request on the Recipient Configuration. */ + @SerializedName("capabilities") + Capabilities capabilities; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Recipient( + Boolean applied, Capabilities capabilities, Map extraParams) { + this.applied = applied; + this.capabilities = capabilities; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean applied; + + private Capabilities capabilities; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient build() { + return new AccountUpdateParams.Configuration.Recipient( + this.applied, this.capabilities, this.extraParams); + } + + /** + * Represents the state of the configuration, and can be updated to deactivate or re-apply a + * configuration. + */ + public Builder setApplied(Boolean applied) { + this.applied = applied; + return this; + } + + /** Capabilities to request on the Recipient Configuration. */ + public Builder setCapabilities( + AccountUpdateParams.Configuration.Recipient.Capabilities capabilities) { + this.capabilities = capabilities; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Recipient#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Recipient#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Capabilities { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). */ + @SerializedName("stripe_balance") + StripeBalance stripeBalance; + + private Capabilities(Map extraParams, StripeBalance stripeBalance) { + this.extraParams = extraParams; + this.stripeBalance = stripeBalance; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private StripeBalance stripeBalance; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities( + this.extraParams, this.stripeBalance); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Recipient.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Configuration.Recipient.Capabilities#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + */ + public Builder setStripeBalance( + AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance + stripeBalance) { + this.stripeBalance = stripeBalance; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeBalance { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Enables this Account to receive /v1/transfers into their Stripe Balance (/v1/balance). + */ + @SerializedName("stripe_transfers") + StripeTransfers stripeTransfers; + + private StripeBalance(Map extraParams, StripeTransfers stripeTransfers) { + this.extraParams = extraParams; + this.stripeTransfers = stripeTransfers; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private StripeTransfers stripeTransfers; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance( + this.extraParams, this.stripeTransfers); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Enables this Account to receive /v1/transfers into their Stripe Balance + * (/v1/balance). + */ + public Builder setStripeTransfers( + AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance + .StripeTransfers + stripeTransfers) { + this.stripeTransfers = stripeTransfers; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class StripeTransfers { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private StripeTransfers(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance + .StripeTransfers + build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance + .StripeTransfers(this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance.StripeTransfers#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Recipient.Capabilities.StripeBalance.StripeTransfers#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Defaults { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The Account's preferred locales (languages), ordered by preference. */ + @SerializedName("locales") + List locales; + + /** Account profile information. */ + @SerializedName("profile") + Profile profile; + + /** Default responsibilities held by either Stripe or the platform. */ + @SerializedName("responsibilities") + Responsibilities responsibilities; + + private Defaults( + Object currency, + Map extraParams, + List locales, + Profile profile, + Responsibilities responsibilities) { + this.currency = currency; + this.extraParams = extraParams; + this.locales = locales; + this.profile = profile; + this.responsibilities = responsibilities; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private List locales; + + private Profile profile; + + private Responsibilities responsibilities; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Defaults build() { + return new AccountUpdateParams.Defaults( + this.currency, this.extraParams, this.locales, this.profile, this.responsibilities); + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountUpdateParams.Defaults#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountUpdateParams.Defaults#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `locales` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Defaults#locales} for the field documentation. + */ + public Builder addLocale(AccountUpdateParams.Defaults.Locale element) { + if (this.locales == null) { + this.locales = new ArrayList<>(); + } + this.locales.add(element); + return this; + } + + /** + * Add all elements to `locales` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Defaults#locales} for the field documentation. + */ + public Builder addAllLocale(List elements) { + if (this.locales == null) { + this.locales = new ArrayList<>(); + } + this.locales.addAll(elements); + return this; + } + + /** Account profile information. */ + public Builder setProfile(AccountUpdateParams.Defaults.Profile profile) { + this.profile = profile; + return this; + } + + /** Default responsibilities held by either Stripe or the platform. */ + public Builder setResponsibilities( + AccountUpdateParams.Defaults.Responsibilities responsibilities) { + this.responsibilities = responsibilities; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Profile { + /** The business's publicly-available website. */ + @SerializedName("business_url") + Object businessUrl; + + /** The name which is used by the business. */ + @SerializedName("doing_business_as") + Object doingBusinessAs; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + @SerializedName("product_description") + Object productDescription; + + private Profile( + Object businessUrl, + Object doingBusinessAs, + Map extraParams, + Object productDescription) { + this.businessUrl = businessUrl; + this.doingBusinessAs = doingBusinessAs; + this.extraParams = extraParams; + this.productDescription = productDescription; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object businessUrl; + + private Object doingBusinessAs; + + private Map extraParams; + + private Object productDescription; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Defaults.Profile build() { + return new AccountUpdateParams.Defaults.Profile( + this.businessUrl, this.doingBusinessAs, this.extraParams, this.productDescription); + } + + /** The business's publicly-available website. */ + public Builder setBusinessUrl(String businessUrl) { + this.businessUrl = businessUrl; + return this; + } + + /** The business's publicly-available website. */ + public Builder setBusinessUrl(EmptyParam businessUrl) { + this.businessUrl = businessUrl; + return this; + } + + /** The name which is used by the business. */ + public Builder setDoingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + return this; + } + + /** The name which is used by the business. */ + public Builder setDoingBusinessAs(EmptyParam doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Defaults.Profile#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Defaults.Profile#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + public Builder setProductDescription(String productDescription) { + this.productDescription = productDescription; + return this; + } + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + public Builder setProductDescription(EmptyParam productDescription) { + this.productDescription = productDescription; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Responsibilities { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A value indicating the party responsible for collecting fees + * from this account. + */ + @SerializedName("fees_collector") + FeesCollector feesCollector; + + /** + * Required. A value indicating who is responsible for losses when this + * Account can’t pay back negative balances from payments. + */ + @SerializedName("losses_collector") + LossesCollector lossesCollector; + + private Responsibilities( + Map extraParams, + FeesCollector feesCollector, + LossesCollector lossesCollector) { + this.extraParams = extraParams; + this.feesCollector = feesCollector; + this.lossesCollector = lossesCollector; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FeesCollector feesCollector; + + private LossesCollector lossesCollector; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Defaults.Responsibilities build() { + return new AccountUpdateParams.Defaults.Responsibilities( + this.extraParams, this.feesCollector, this.lossesCollector); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Defaults.Responsibilities#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Defaults.Responsibilities#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A value indicating the party responsible for collecting fees + * from this account. + */ + public Builder setFeesCollector( + AccountUpdateParams.Defaults.Responsibilities.FeesCollector feesCollector) { + this.feesCollector = feesCollector; + return this; + } + + /** + * Required. A value indicating who is responsible for losses when this + * Account can’t pay back negative balances from payments. + */ + public Builder setLossesCollector( + AccountUpdateParams.Defaults.Responsibilities.LossesCollector lossesCollector) { + this.lossesCollector = lossesCollector; + return this; + } + } + + public enum FeesCollector implements ApiRequestParams.EnumParam { + @SerializedName("application") + APPLICATION("application"), + + @SerializedName("application_custom") + APPLICATION_CUSTOM("application_custom"), + + @SerializedName("application_express") + APPLICATION_EXPRESS("application_express"), + + @SerializedName("stripe") + STRIPE("stripe"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FeesCollector(String value) { + this.value = value; + } + } + + public enum LossesCollector implements ApiRequestParams.EnumParam { + @SerializedName("application") + APPLICATION("application"), + + @SerializedName("stripe") + STRIPE("stripe"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LossesCollector(String value) { + this.value = value; + } + } + } + + public enum Locale implements ApiRequestParams.EnumParam { + @SerializedName("ar-SA") + AR_SA("ar-SA"), + + @SerializedName("bg") + BG("bg"), + + @SerializedName("bg-BG") + BG_BG("bg-BG"), + + @SerializedName("cs") + CS("cs"), + + @SerializedName("cs-CZ") + CS_CZ("cs-CZ"), + + @SerializedName("da") + DA("da"), + + @SerializedName("da-DK") + DA_DK("da-DK"), + + @SerializedName("de") + DE("de"), + + @SerializedName("de-DE") + DE_DE("de-DE"), + + @SerializedName("el") + EL("el"), + + @SerializedName("el-GR") + EL_GR("el-GR"), + + @SerializedName("en") + EN("en"), + + @SerializedName("en-AU") + EN_AU("en-AU"), + + @SerializedName("en-CA") + EN_CA("en-CA"), + + @SerializedName("en-GB") + EN_GB("en-GB"), + + @SerializedName("en-IE") + EN_IE("en-IE"), + + @SerializedName("en-IN") + EN_IN("en-IN"), + + @SerializedName("en-NZ") + EN_NZ("en-NZ"), + + @SerializedName("en-SG") + EN_SG("en-SG"), + + @SerializedName("en-US") + EN_US("en-US"), + + @SerializedName("es") + ES("es"), + + @SerializedName("es-419") + ES_419("es-419"), + + @SerializedName("es-ES") + ES_ES("es-ES"), + + @SerializedName("et") + ET("et"), + + @SerializedName("et-EE") + ET_EE("et-EE"), + + @SerializedName("fi") + FI("fi"), + + @SerializedName("fil") + FIL("fil"), + + @SerializedName("fil-PH") + FIL_PH("fil-PH"), + + @SerializedName("fi-FI") + FI_FI("fi-FI"), + + @SerializedName("fr") + FR("fr"), + + @SerializedName("fr-CA") + FR_CA("fr-CA"), + + @SerializedName("fr-FR") + FR_FR("fr-FR"), + + @SerializedName("he-IL") + HE_IL("he-IL"), + + @SerializedName("hr") + HR("hr"), + + @SerializedName("hr-HR") + HR_HR("hr-HR"), + + @SerializedName("hu") + HU("hu"), + + @SerializedName("hu-HU") + HU_HU("hu-HU"), + + @SerializedName("id") + ID("id"), + + @SerializedName("id-ID") + ID_ID("id-ID"), + + @SerializedName("it") + IT("it"), + + @SerializedName("it-IT") + IT_IT("it-IT"), + + @SerializedName("ja") + JA("ja"), + + @SerializedName("ja-JP") + JA_JP("ja-JP"), + + @SerializedName("ko") + KO("ko"), + + @SerializedName("ko-KR") + KO_KR("ko-KR"), + + @SerializedName("lt") + LT("lt"), + + @SerializedName("lt-LT") + LT_LT("lt-LT"), + + @SerializedName("lv") + LV("lv"), + + @SerializedName("lv-LV") + LV_LV("lv-LV"), + + @SerializedName("ms") + MS("ms"), + + @SerializedName("ms-MY") + MS_MY("ms-MY"), + + @SerializedName("mt") + MT("mt"), + + @SerializedName("mt-MT") + MT_MT("mt-MT"), + + @SerializedName("nb") + NB("nb"), + + @SerializedName("nb-NO") + NB_NO("nb-NO"), + + @SerializedName("nl") + NL("nl"), + + @SerializedName("nl-NL") + NL_NL("nl-NL"), + + @SerializedName("pl") + PL("pl"), + + @SerializedName("pl-PL") + PL_PL("pl-PL"), + + @SerializedName("pt") + PT("pt"), + + @SerializedName("pt-BR") + PT_BR("pt-BR"), + + @SerializedName("pt-PT") + PT_PT("pt-PT"), + + @SerializedName("ro") + RO("ro"), + + @SerializedName("ro-RO") + RO_RO("ro-RO"), + + @SerializedName("ru") + RU("ru"), + + @SerializedName("ru-RU") + RU_RU("ru-RU"), + + @SerializedName("sk") + SK("sk"), + + @SerializedName("sk-SK") + SK_SK("sk-SK"), + + @SerializedName("sl") + SL("sl"), + + @SerializedName("sl-SI") + SL_SI("sl-SI"), + + @SerializedName("sv") + SV("sv"), + + @SerializedName("sv-SE") + SV_SE("sv-SE"), + + @SerializedName("th") + TH("th"), + + @SerializedName("th-TH") + TH_TH("th-TH"), + + @SerializedName("tr") + TR("tr"), + + @SerializedName("tr-TR") + TR_TR("tr-TR"), + + @SerializedName("vi") + VI("vi"), + + @SerializedName("vi-VN") + VI_VN("vi-VN"), + + @SerializedName("zh") + ZH("zh"), + + @SerializedName("zh-Hans") + ZH_HANS("zh-Hans"), + + @SerializedName("zh-Hant-HK") + ZH_HANT_HK("zh-Hant-HK"), + + @SerializedName("zh-Hant-TW") + ZH_HANT_TW("zh-Hant-TW"), + + @SerializedName("zh-HK") + ZH_HK("zh-HK"), + + @SerializedName("zh-TW") + ZH_TW("zh-TW"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Locale(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Identity { + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + @SerializedName("attestations") + Attestations attestations; + + /** Information about the company or business. */ + @SerializedName("business_details") + BusinessDetails businessDetails; + + /** + * The country in which the account holder resides, or in which the business is legally + * established. This should be an ISO + * 3166-1 alpha-2 country code. + */ + @SerializedName("country") + Object country; + + /** The entity type. */ + @SerializedName("entity_type") + EntityType entityType; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Information about the individual represented by the Account. This property is {@code null} + * unless {@code entity_type} is set to {@code individual}. + */ + @SerializedName("individual") + Individual individual; + + private Identity( + Attestations attestations, + BusinessDetails businessDetails, + Object country, + EntityType entityType, + Map extraParams, + Individual individual) { + this.attestations = attestations; + this.businessDetails = businessDetails; + this.country = country; + this.entityType = entityType; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Attestations attestations; + + private BusinessDetails businessDetails; + + private Object country; + + private EntityType entityType; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity build() { + return new AccountUpdateParams.Identity( + this.attestations, + this.businessDetails, + this.country, + this.entityType, + this.extraParams, + this.individual); + } + + /** + * Attestations from the identity's key people, e.g. owners, executives, directors, + * representatives. + */ + public Builder setAttestations(AccountUpdateParams.Identity.Attestations attestations) { + this.attestations = attestations; + return this; + } + + /** Information about the company or business. */ + public Builder setBusinessDetails( + AccountUpdateParams.Identity.BusinessDetails businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** + * The country in which the account holder resides, or in which the business is legally + * established. This should be an ISO 3166-1 alpha-2 country + * code. + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * The country in which the account holder resides, or in which the business is legally + * established. This should be an ISO 3166-1 alpha-2 country + * code. + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** The entity type. */ + public Builder setEntityType(AccountUpdateParams.Identity.EntityType entityType) { + this.entityType = entityType; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountUpdateParams.Identity#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountUpdateParams.Identity#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Information about the individual represented by the Account. This property is {@code null} + * unless {@code entity_type} is set to {@code individual}. + */ + public Builder setIndividual(AccountUpdateParams.Identity.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Attestations { + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + @SerializedName("directorship_declaration") + DirectorshipDeclaration directorshipDeclaration; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct. + */ + @SerializedName("ownership_declaration") + OwnershipDeclaration ownershipDeclaration; + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + @SerializedName("persons_provided") + PersonsProvided personsProvided; + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + @SerializedName("representative_declaration") + RepresentativeDeclaration representativeDeclaration; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("terms_of_service") + TermsOfService termsOfService; + + private Attestations( + DirectorshipDeclaration directorshipDeclaration, + Map extraParams, + OwnershipDeclaration ownershipDeclaration, + PersonsProvided personsProvided, + RepresentativeDeclaration representativeDeclaration, + TermsOfService termsOfService) { + this.directorshipDeclaration = directorshipDeclaration; + this.extraParams = extraParams; + this.ownershipDeclaration = ownershipDeclaration; + this.personsProvided = personsProvided; + this.representativeDeclaration = representativeDeclaration; + this.termsOfService = termsOfService; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DirectorshipDeclaration directorshipDeclaration; + + private Map extraParams; + + private OwnershipDeclaration ownershipDeclaration; + + private PersonsProvided personsProvided; + + private RepresentativeDeclaration representativeDeclaration; + + private TermsOfService termsOfService; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations build() { + return new AccountUpdateParams.Identity.Attestations( + this.directorshipDeclaration, + this.extraParams, + this.ownershipDeclaration, + this.personsProvided, + this.representativeDeclaration, + this.termsOfService); + } + + /** + * This hash is used to attest that the directors information provided to Stripe is both + * current and correct. + */ + public Builder setDirectorshipDeclaration( + AccountUpdateParams.Identity.Attestations.DirectorshipDeclaration + directorshipDeclaration) { + this.directorshipDeclaration = directorshipDeclaration; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Attestations#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Attestations#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * This hash is used to attest that the beneficial owner information provided to Stripe is + * both current and correct. + */ + public Builder setOwnershipDeclaration( + AccountUpdateParams.Identity.Attestations.OwnershipDeclaration ownershipDeclaration) { + this.ownershipDeclaration = ownershipDeclaration; + return this; + } + + /** Attestation that all Persons with a specific Relationship value have been provided. */ + public Builder setPersonsProvided( + AccountUpdateParams.Identity.Attestations.PersonsProvided personsProvided) { + this.personsProvided = personsProvided; + return this; + } + + /** + * This hash is used to attest that the representative is authorized to act as the + * representative of their legal entity. + */ + public Builder setRepresentativeDeclaration( + AccountUpdateParams.Identity.Attestations.RepresentativeDeclaration + representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + + /** Attestations of accepted terms of service agreements. */ + public Builder setTermsOfService( + AccountUpdateParams.Identity.Attestations.TermsOfService termsOfService) { + this.termsOfService = termsOfService; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DirectorshipDeclaration { + /** + * The time marking when the director attestation was made. Represented as a RFC 3339 date + * & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The IP address from which the director attestation was made. */ + @SerializedName("ip") + Object ip; + + /** The user agent of the browser from which the director attestation was made. */ + @SerializedName("user_agent") + Object userAgent; + + private DirectorshipDeclaration( + Instant date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.DirectorshipDeclaration build() { + return new AccountUpdateParams.Identity.Attestations.DirectorshipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time marking when the director attestation was made. Represented as a RFC 3339 date + * & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.Attestations.DirectorshipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.Attestations.DirectorshipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the director attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The IP address from which the director attestation was made. */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** The user agent of the browser from which the director attestation was made. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** The user agent of the browser from which the director attestation was made. */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class OwnershipDeclaration { + /** + * The time marking when the beneficial owner attestation was made. Represented as a RFC + * 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The IP address from which the beneficial owner attestation was made. */ + @SerializedName("ip") + Object ip; + + /** The user agent of the browser from which the beneficial owner attestation was made. */ + @SerializedName("user_agent") + Object userAgent; + + private OwnershipDeclaration( + Instant date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.OwnershipDeclaration build() { + return new AccountUpdateParams.Identity.Attestations.OwnershipDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time marking when the beneficial owner attestation was made. Represented as a RFC + * 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.Attestations.OwnershipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.Attestations.OwnershipDeclaration#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the beneficial owner attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The IP address from which the beneficial owner attestation was made. */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** The user agent of the browser from which the beneficial owner attestation was made. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** The user agent of the browser from which the beneficial owner attestation was made. */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PersonsProvided { + /** + * Whether the company’s directors have been provided. Set this Boolean to true after + * creating all the company’s directors with the Persons API. + */ + @SerializedName("directors") + Boolean directors; + + /** + * Whether the company’s executives have been provided. Set this Boolean to true after + * creating all the company’s executives with the Persons API. + */ + @SerializedName("executives") + Boolean executives; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Whether the company’s owners have been provided. Set this Boolean to true after creating + * all the company’s owners with the Persons API. + */ + @SerializedName("owners") + Boolean owners; + + /** Reason for why the company is exempt from providing ownership information. */ + @SerializedName("ownership_exemption_reason") + OwnershipExemptionReason ownershipExemptionReason; + + private PersonsProvided( + Boolean directors, + Boolean executives, + Map extraParams, + Boolean owners, + OwnershipExemptionReason ownershipExemptionReason) { + this.directors = directors; + this.executives = executives; + this.extraParams = extraParams; + this.owners = owners; + this.ownershipExemptionReason = ownershipExemptionReason; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean directors; + + private Boolean executives; + + private Map extraParams; + + private Boolean owners; + + private OwnershipExemptionReason ownershipExemptionReason; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.PersonsProvided build() { + return new AccountUpdateParams.Identity.Attestations.PersonsProvided( + this.directors, + this.executives, + this.extraParams, + this.owners, + this.ownershipExemptionReason); + } + + /** + * Whether the company’s directors have been provided. Set this Boolean to true after + * creating all the company’s directors with the Persons API. + */ + public Builder setDirectors(Boolean directors) { + this.directors = directors; + return this; + } + + /** + * Whether the company’s executives have been provided. Set this Boolean to true after + * creating all the company’s executives with the Persons API. + */ + public Builder setExecutives(Boolean executives) { + this.executives = executives; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Attestations.PersonsProvided#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Attestations.PersonsProvided#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the company’s owners have been provided. Set this Boolean to true after + * creating all the company’s owners with the Persons API. + */ + public Builder setOwners(Boolean owners) { + this.owners = owners; + return this; + } + + /** Reason for why the company is exempt from providing ownership information. */ + public Builder setOwnershipExemptionReason( + AccountUpdateParams.Identity.Attestations.PersonsProvided.OwnershipExemptionReason + ownershipExemptionReason) { + this.ownershipExemptionReason = ownershipExemptionReason; + return this; + } + } + + public enum OwnershipExemptionReason implements ApiRequestParams.EnumParam { + @SerializedName("qualified_entity_exceeds_ownership_threshold") + QUALIFIED_ENTITY_EXCEEDS_OWNERSHIP_THRESHOLD( + "qualified_entity_exceeds_ownership_threshold"), + + @SerializedName("qualifies_as_financial_institution") + QUALIFIES_AS_FINANCIAL_INSTITUTION("qualifies_as_financial_institution"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + OwnershipExemptionReason(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** + * The time marking when the representative attestation was made. Represented as a RFC 3339 + * date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The IP address from which the representative attestation was made. */ + @SerializedName("ip") + Object ip; + + /** The user agent of the browser from which the representative attestation was made. */ + @SerializedName("user_agent") + Object userAgent; + + private RepresentativeDeclaration( + Instant date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.RepresentativeDeclaration build() { + return new AccountUpdateParams.Identity.Attestations.RepresentativeDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time marking when the representative attestation was made. Represented as a RFC + * 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.Attestations.RepresentativeDeclaration#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.Attestations.RepresentativeDeclaration#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the representative attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The IP address from which the representative attestation was made. */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** The user agent of the browser from which the representative attestation was made. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** The user agent of the browser from which the representative attestation was made. */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TermsOfService { + /** + * Details on the Account's acceptance of the Stripe Services + * Agreement. + */ + @SerializedName("account") + Account account; + + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + @SerializedName("crypto_storer") + CryptoStorer cryptoStorer; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Details on the Account's acceptance of Treasury-specific terms of service. */ + @SerializedName("storer") + Storer storer; + + private TermsOfService( + Account account, + CryptoStorer cryptoStorer, + Map extraParams, + Storer storer) { + this.account = account; + this.cryptoStorer = cryptoStorer; + this.extraParams = extraParams; + this.storer = storer; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Account account; + + private CryptoStorer cryptoStorer; + + private Map extraParams; + + private Storer storer; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.TermsOfService build() { + return new AccountUpdateParams.Identity.Attestations.TermsOfService( + this.account, this.cryptoStorer, this.extraParams, this.storer); + } + + /** + * Details on the Account's acceptance of the Stripe Services + * Agreement. + */ + public Builder setAccount( + AccountUpdateParams.Identity.Attestations.TermsOfService.Account account) { + this.account = account; + return this; + } + + /** Details on the Account's acceptance of Crypto-storer-specific terms of service. */ + public Builder setCryptoStorer( + AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer cryptoStorer) { + this.cryptoStorer = cryptoStorer; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Attestations.TermsOfService#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Attestations.TermsOfService#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Details on the Account's acceptance of Treasury-specific terms of service. */ + public Builder setStorer( + AccountUpdateParams.Identity.Attestations.TermsOfService.Storer storer) { + this.storer = storer; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Account { + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + Object userAgent; + + private Account( + Instant date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.TermsOfService.Account build() { + return new AccountUpdateParams.Identity.Attestations.TermsOfService.Account( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Attestations.TermsOfService.Account#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Attestations.TermsOfService.Account#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoStorer { + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + Object userAgent; + + private CryptoStorer( + Instant date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer build() { + return new AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Attestations.TermsOfService.CryptoStorer#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Storer { + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + @SerializedName("user_agent") + Object userAgent; + + private Storer( + Instant date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Attestations.TermsOfService.Storer build() { + return new AccountUpdateParams.Identity.Attestations.TermsOfService.Storer( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time when the Account's representative accepted the terms of service. Represented + * as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Attestations.TermsOfService.Storer#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Attestations.TermsOfService.Storer#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The IP address from which the Account's representative accepted the terms of service. + */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the + * terms of service. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusinessDetails { + /** The business registration address of the business entity. */ + @SerializedName("address") + Address address; + + /** The business gross annual revenue for its preceding fiscal year. */ + @SerializedName("annual_revenue") + AnnualRevenue annualRevenue; + + /** A document verifying the business. */ + @SerializedName("documents") + Documents documents; + + /** + * Estimated maximum number of workers currently engaged by the business (including employees, + * contractors, and vendors). + */ + @SerializedName("estimated_worker_count") + Long estimatedWorkerCount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The ID numbers of a business entity. */ + @SerializedName("id_numbers") + List idNumbers; + + /** An estimate of the monthly revenue of the business. */ + @SerializedName("monthly_estimated_revenue") + MonthlyEstimatedRevenue monthlyEstimatedRevenue; + + /** The phone number of the Business Entity. */ + @SerializedName("phone") + Object phone; + + /** The business legal name. */ + @SerializedName("registered_name") + Object registeredName; + + /** The business registration address of the business entity in non latin script. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The business legal name in non latin script. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The category identifying the legal structure of the business. */ + @SerializedName("structure") + Structure structure; + + private BusinessDetails( + Address address, + AnnualRevenue annualRevenue, + Documents documents, + Long estimatedWorkerCount, + Map extraParams, + List idNumbers, + MonthlyEstimatedRevenue monthlyEstimatedRevenue, + Object phone, + Object registeredName, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + Structure structure) { + this.address = address; + this.annualRevenue = annualRevenue; + this.documents = documents; + this.estimatedWorkerCount = estimatedWorkerCount; + this.extraParams = extraParams; + this.idNumbers = idNumbers; + this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; + this.phone = phone; + this.registeredName = registeredName; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.structure = structure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private AnnualRevenue annualRevenue; + + private Documents documents; + + private Long estimatedWorkerCount; + + private Map extraParams; + + private List idNumbers; + + private MonthlyEstimatedRevenue monthlyEstimatedRevenue; + + private Object phone; + + private Object registeredName; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private Structure structure; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails build() { + return new AccountUpdateParams.Identity.BusinessDetails( + this.address, + this.annualRevenue, + this.documents, + this.estimatedWorkerCount, + this.extraParams, + this.idNumbers, + this.monthlyEstimatedRevenue, + this.phone, + this.registeredName, + this.scriptAddresses, + this.scriptNames, + this.structure); + } + + /** The business registration address of the business entity. */ + public Builder setAddress(AccountUpdateParams.Identity.BusinessDetails.Address address) { + this.address = address; + return this; + } + + /** The business gross annual revenue for its preceding fiscal year. */ + public Builder setAnnualRevenue( + AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue annualRevenue) { + this.annualRevenue = annualRevenue; + return this; + } + + /** A document verifying the business. */ + public Builder setDocuments( + AccountUpdateParams.Identity.BusinessDetails.Documents documents) { + this.documents = documents; + return this; + } + + /** + * Estimated maximum number of workers currently engaged by the business (including + * employees, contractors, and vendors). + */ + public Builder setEstimatedWorkerCount(Long estimatedWorkerCount) { + this.estimatedWorkerCount = estimatedWorkerCount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails#idNumbers} for the field documentation. + */ + public Builder addIdNumber(AccountUpdateParams.Identity.BusinessDetails.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber( + List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** An estimate of the monthly revenue of the business. */ + public Builder setMonthlyEstimatedRevenue( + AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + monthlyEstimatedRevenue) { + this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; + return this; + } + + /** The phone number of the Business Entity. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The phone number of the Business Entity. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + + /** The business legal name. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + + /** The business legal name. */ + public Builder setRegisteredName(EmptyParam registeredName) { + this.registeredName = registeredName; + return this; + } + + /** The business registration address of the business entity in non latin script. */ + public Builder setScriptAddresses( + AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The business legal name in non latin script. */ + public Builder setScriptNames( + AccountUpdateParams.Identity.BusinessDetails.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The category identifying the legal structure of the business. */ + public Builder setStructure( + AccountUpdateParams.Identity.BusinessDetails.Structure structure) { + this.structure = structure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Address build() { + return new AccountUpdateParams.Identity.BusinessDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.Address#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.Address#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AnnualRevenue { + /** A non-negative integer representing the amount in the smallest currency unit. */ + @SerializedName("amount") + Amount amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + @SerializedName("fiscal_year_end") + Object fiscalYearEnd; + + private AnnualRevenue( + Amount amount, Map extraParams, Object fiscalYearEnd) { + this.amount = amount; + this.extraParams = extraParams; + this.fiscalYearEnd = fiscalYearEnd; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private Map extraParams; + + private Object fiscalYearEnd; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue build() { + return new AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue( + this.amount, this.extraParams, this.fiscalYearEnd); + } + + /** A non-negative integer representing the amount in the smallest currency unit. */ + public Builder setAmount( + AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + public Builder setFiscalYearEnd(String fiscalYearEnd) { + this.fiscalYearEnd = fiscalYearEnd; + return this; + } + + /** + * The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for + * the 31st of December, 2023. + */ + public Builder setFiscalYearEnd(EmptyParam fiscalYearEnd) { + this.fiscalYearEnd = fiscalYearEnd; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(Object currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount build() { + return new AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.AnnualRevenue.Amount#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that support the bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + @SerializedName("bank_account_ownership_verification") + BankAccountOwnershipVerification bankAccountOwnershipVerification; + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + @SerializedName("company_license") + CompanyLicense companyLicense; + + /** One or more documents showing the company’s Memorandum of Association. */ + @SerializedName("company_memorandum_of_association") + CompanyMemorandumOfAssociation companyMemorandumOfAssociation; + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + @SerializedName("company_ministerial_decree") + CompanyMinisterialDecree companyMinisterialDecree; + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + @SerializedName("company_registration_verification") + CompanyRegistrationVerification companyRegistrationVerification; + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + @SerializedName("company_tax_id_verification") + CompanyTaxIdVerification companyTaxIdVerification; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A document verifying the business. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** One or more documents that demonstrate proof of address. */ + @SerializedName("proof_of_address") + ProofOfAddress proofOfAddress; + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + @SerializedName("proof_of_registration") + ProofOfRegistration proofOfRegistration; + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + @SerializedName("proof_of_ultimate_beneficial_ownership") + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + + private Documents( + BankAccountOwnershipVerification bankAccountOwnershipVerification, + CompanyLicense companyLicense, + CompanyMemorandumOfAssociation companyMemorandumOfAssociation, + CompanyMinisterialDecree companyMinisterialDecree, + CompanyRegistrationVerification companyRegistrationVerification, + CompanyTaxIdVerification companyTaxIdVerification, + Map extraParams, + PrimaryVerification primaryVerification, + ProofOfAddress proofOfAddress, + ProofOfRegistration proofOfRegistration, + ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { + this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; + this.companyLicense = companyLicense; + this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; + this.companyMinisterialDecree = companyMinisterialDecree; + this.companyRegistrationVerification = companyRegistrationVerification; + this.companyTaxIdVerification = companyTaxIdVerification; + this.extraParams = extraParams; + this.primaryVerification = primaryVerification; + this.proofOfAddress = proofOfAddress; + this.proofOfRegistration = proofOfRegistration; + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BankAccountOwnershipVerification bankAccountOwnershipVerification; + + private CompanyLicense companyLicense; + + private CompanyMemorandumOfAssociation companyMemorandumOfAssociation; + + private CompanyMinisterialDecree companyMinisterialDecree; + + private CompanyRegistrationVerification companyRegistrationVerification; + + private CompanyTaxIdVerification companyTaxIdVerification; + + private Map extraParams; + + private PrimaryVerification primaryVerification; + + private ProofOfAddress proofOfAddress; + + private ProofOfRegistration proofOfRegistration; + + private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents( + this.bankAccountOwnershipVerification, + this.companyLicense, + this.companyMemorandumOfAssociation, + this.companyMinisterialDecree, + this.companyRegistrationVerification, + this.companyTaxIdVerification, + this.extraParams, + this.primaryVerification, + this.proofOfAddress, + this.proofOfRegistration, + this.proofOfUltimateBeneficialOwnership); + } + + /** + * One or more documents that support the bank account ownership verification requirement. + * Must be a document associated with the account’s primary active bank account that + * displays the last 4 digits of the account number, either a statement or a check. + */ + public Builder setBankAccountOwnershipVerification( + AccountUpdateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification + bankAccountOwnershipVerification) { + this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; + return this; + } + + /** One or more documents that demonstrate proof of a company’s license to operate. */ + public Builder setCompanyLicense( + AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyLicense + companyLicense) { + this.companyLicense = companyLicense; + return this; + } + + /** One or more documents showing the company’s Memorandum of Association. */ + public Builder setCompanyMemorandumOfAssociation( + AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation + companyMemorandumOfAssociation) { + this.companyMemorandumOfAssociation = companyMemorandumOfAssociation; + return this; + } + + /** + * Certain countries only: One or more documents showing the ministerial decree legalizing + * the company’s establishment. + */ + public Builder setCompanyMinisterialDecree( + AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree + companyMinisterialDecree) { + this.companyMinisterialDecree = companyMinisterialDecree; + return this; + } + + /** + * One or more documents that demonstrate proof of a company’s registration with the + * appropriate local authorities. + */ + public Builder setCompanyRegistrationVerification( + AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification + companyRegistrationVerification) { + this.companyRegistrationVerification = companyRegistrationVerification; + return this; + } + + /** One or more documents that demonstrate proof of a company’s tax ID. */ + public Builder setCompanyTaxIdVerification( + AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification + companyTaxIdVerification) { + this.companyTaxIdVerification = companyTaxIdVerification; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.Documents#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.Documents#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A document verifying the business. */ + public Builder setPrimaryVerification( + AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification + primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** One or more documents that demonstrate proof of address. */ + public Builder setProofOfAddress( + AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress + proofOfAddress) { + this.proofOfAddress = proofOfAddress; + return this; + } + + /** + * One or more documents showing the company’s proof of registration with the national + * business registry. + */ + public Builder setProofOfRegistration( + AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfRegistration + proofOfRegistration) { + this.proofOfRegistration = proofOfRegistration; + return this; + } + + /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ + public Builder setProofOfUltimateBeneficialOwnership( + AccountUpdateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership + proofOfUltimateBeneficialOwnership) { + this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BankAccountOwnershipVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private BankAccountOwnershipVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification + build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.BankAccountOwnershipVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents + .BankAccountOwnershipVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyLicense { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyLicense(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyLicense build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyLicense( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyLicense#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyLicense#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyLicense#files} for the + * field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyLicense#files} for the + * field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyLicense.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMemorandumOfAssociation { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyMemorandumOfAssociation( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation + build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMemorandumOfAssociation#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents + .CompanyMemorandumOfAssociation.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyMinisterialDecree { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyMinisterialDecree( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree + build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents + .CompanyMinisterialDecree(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyMinisterialDecree.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyRegistrationVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyRegistrationVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification + build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyRegistrationVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents + .CompanyRegistrationVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyTaxIdVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyTaxIdVerification( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification + build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents + .CompanyTaxIdVerification(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents.CompanyTaxIdVerification.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification + build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification.Type + type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + Object back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + Object front; + + private FrontBack(Object back, Map extraParams, Object front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object back; + + private Map extraParams; + + private Object front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification + .FrontBack + build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents + .PrimaryVerification.FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(EmptyParam back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(EmptyParam front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfAddress { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfAddress(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress#files} for the + * field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress#files} for the + * field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfAddress.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfRegistration { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfRegistration( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfRegistration + build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfRegistration( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#files} for + * the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfRegistration#files} for + * the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfRegistration.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProofOfUltimateBeneficialOwnership { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private ProofOfUltimateBeneficialOwnership( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership + build() { + return new AccountUpdateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#files} + * for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.BusinessDetails.Documents.ProofOfUltimateBeneficialOwnership#files} + * for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.BusinessDetails.Documents + .ProofOfUltimateBeneficialOwnership.Type + type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The registrar of the ID number (Only valid for DE ID number types). */ + @SerializedName("registrar") + Object registrar; + + /** Required. Open Enum. The ID number type of a business entity. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + Object value; + + private IdNumber( + Map extraParams, Object registrar, Type type, Object value) { + this.extraParams = extraParams; + this.registrar = registrar; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object registrar; + + private Type type; + + private Object value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.IdNumber build() { + return new AccountUpdateParams.Identity.BusinessDetails.IdNumber( + this.extraParams, this.registrar, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.IdNumber#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.IdNumber#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The registrar of the ID number (Only valid for DE ID number types). */ + public Builder setRegistrar(String registrar) { + this.registrar = registrar; + return this; + } + + /** The registrar of the ID number (Only valid for DE ID number types). */ + public Builder setRegistrar(EmptyParam registrar) { + this.registrar = registrar; + return this; + } + + /** Required. Open Enum. The ID number type of a business entity. */ + public Builder setType(AccountUpdateParams.Identity.BusinessDetails.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_crn") + AE_CRN("ae_crn"), + + @SerializedName("ae_vat") + AE_VAT("ae_vat"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuit") + AR_CUIT("ar_cuit"), + + @SerializedName("at_fn") + AT_FN("at_fn"), + + @SerializedName("at_stn") + AT_STN("at_stn"), + + @SerializedName("at_vat") + AT_VAT("at_vat"), + + @SerializedName("au_abn") + AU_ABN("au_abn"), + + @SerializedName("au_acn") + AU_ACN("au_acn"), + + @SerializedName("au_in") + AU_IN("au_in"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("be_cbe") + BE_CBE("be_cbe"), + + @SerializedName("be_vat") + BE_VAT("be_vat"), + + @SerializedName("bg_uic") + BG_UIC("bg_uic"), + + @SerializedName("bg_vat") + BG_VAT("bg_vat"), + + @SerializedName("br_cnpj") + BR_CNPJ("br_cnpj"), + + @SerializedName("ca_cn") + CA_CN("ca_cn"), + + @SerializedName("ca_crarr") + CA_CRARR("ca_crarr"), + + @SerializedName("ca_gst_hst") + CA_GST_HST("ca_gst_hst"), + + @SerializedName("ca_neq") + CA_NEQ("ca_neq"), + + @SerializedName("ca_rid") + CA_RID("ca_rid"), + + @SerializedName("ch_chid") + CH_CHID("ch_chid"), + + @SerializedName("ch_uid") + CH_UID("ch_uid"), + + @SerializedName("cr_cpj") + CR_CPJ("cr_cpj"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_he") + CY_HE("cy_he"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cy_vat") + CY_VAT("cy_vat"), + + @SerializedName("cz_ico") + CZ_ICO("cz_ico"), + + @SerializedName("cz_vat") + CZ_VAT("cz_vat"), + + @SerializedName("de_hrn") + DE_HRN("de_hrn"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("de_vat") + DE_VAT("de_vat"), + + @SerializedName("dk_cvr") + DK_CVR("dk_cvr"), + + @SerializedName("dk_vat") + DK_VAT("dk_vat"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ee_rk") + EE_RK("ee_rk"), + + @SerializedName("ee_vat") + EE_VAT("ee_vat"), + + @SerializedName("es_cif") + ES_CIF("es_cif"), + + @SerializedName("es_vat") + ES_VAT("es_vat"), + + @SerializedName("fi_vat") + FI_VAT("fi_vat"), + + @SerializedName("fi_yt") + FI_YT("fi_yt"), + + @SerializedName("fr_rna") + FR_RNA("fr_rna"), + + @SerializedName("fr_siren") + FR_SIREN("fr_siren"), + + @SerializedName("fr_vat") + FR_VAT("fr_vat"), + + @SerializedName("gb_crn") + GB_CRN("gb_crn"), + + @SerializedName("gi_crn") + GI_CRN("gi_crn"), + + @SerializedName("gr_afm") + GR_AFM("gr_afm"), + + @SerializedName("gr_gemi") + GR_GEMI("gr_gemi"), + + @SerializedName("gr_vat") + GR_VAT("gr_vat"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_br") + HK_BR("hk_br"), + + @SerializedName("hk_cr") + HK_CR("hk_cr"), + + @SerializedName("hr_mbs") + HR_MBS("hr_mbs"), + + @SerializedName("hr_oib") + HR_OIB("hr_oib"), + + @SerializedName("hr_vat") + HR_VAT("hr_vat"), + + @SerializedName("hu_cjs") + HU_CJS("hu_cjs"), + + @SerializedName("hu_tin") + HU_TIN("hu_tin"), + + @SerializedName("hu_vat") + HU_VAT("hu_vat"), + + @SerializedName("ie_crn") + IE_CRN("ie_crn"), + + @SerializedName("ie_trn") + IE_TRN("ie_trn"), + + @SerializedName("ie_vat") + IE_VAT("ie_vat"), + + @SerializedName("it_rea") + IT_REA("it_rea"), + + @SerializedName("it_vat") + IT_VAT("it_vat"), + + @SerializedName("jp_cn") + JP_CN("jp_cn"), + + @SerializedName("kz_bin") + KZ_BIN("kz_bin"), + + @SerializedName("li_uid") + LI_UID("li_uid"), + + @SerializedName("lt_ccrn") + LT_CCRN("lt_ccrn"), + + @SerializedName("lt_vat") + LT_VAT("lt_vat"), + + @SerializedName("lu_nif") + LU_NIF("lu_nif"), + + @SerializedName("lu_rcs") + LU_RCS("lu_rcs"), + + @SerializedName("lu_vat") + LU_VAT("lu_vat"), + + @SerializedName("lv_urn") + LV_URN("lv_urn"), + + @SerializedName("lv_vat") + LV_VAT("lv_vat"), + + @SerializedName("mt_crn") + MT_CRN("mt_crn"), + + @SerializedName("mt_tin") + MT_TIN("mt_tin"), + + @SerializedName("mt_vat") + MT_VAT("mt_vat"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_brn") + MY_BRN("my_brn"), + + @SerializedName("my_coid") + MY_COID("my_coid"), + + @SerializedName("my_itn") + MY_ITN("my_itn"), + + @SerializedName("my_sst") + MY_SST("my_sst"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("nl_kvk") + NL_KVK("nl_kvk"), + + @SerializedName("nl_rsin") + NL_RSIN("nl_rsin"), + + @SerializedName("nl_vat") + NL_VAT("nl_vat"), + + @SerializedName("no_orgnr") + NO_ORGNR("no_orgnr"), + + @SerializedName("nz_bn") + NZ_BN("nz_bn"), + + @SerializedName("nz_ird") + NZ_IRD("nz_ird"), + + @SerializedName("pe_ruc") + PE_RUC("pe_ruc"), + + @SerializedName("pk_ntn") + PK_NTN("pk_ntn"), + + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + + @SerializedName("pl_regon") + PL_REGON("pl_regon"), + + @SerializedName("pl_vat") + PL_VAT("pl_vat"), + + @SerializedName("pt_vat") + PT_VAT("pt_vat"), + + @SerializedName("ro_cui") + RO_CUI("ro_cui"), + + @SerializedName("ro_orc") + RO_ORC("ro_orc"), + + @SerializedName("ro_vat") + RO_VAT("ro_vat"), + + @SerializedName("sa_crn") + SA_CRN("sa_crn"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_orgnr") + SE_ORGNR("se_orgnr"), + + @SerializedName("se_vat") + SE_VAT("se_vat"), + + @SerializedName("sg_uen") + SG_UEN("sg_uen"), + + @SerializedName("si_msp") + SI_MSP("si_msp"), + + @SerializedName("si_tin") + SI_TIN("si_tin"), + + @SerializedName("si_vat") + SI_VAT("si_vat"), + + @SerializedName("sk_dic") + SK_DIC("sk_dic"), + + @SerializedName("sk_ico") + SK_ICO("sk_ico"), + + @SerializedName("sk_vat") + SK_VAT("sk_vat"), + + @SerializedName("th_crn") + TH_CRN("th_crn"), + + @SerializedName("th_prn") + TH_PRN("th_prn"), + + @SerializedName("th_tin") + TH_TIN("th_tin"), + + @SerializedName("us_ein") + US_EIN("us_ein"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MonthlyEstimatedRevenue { + /** A non-negative integer representing the amount in the smallest currency unit. */ + @SerializedName("amount") + Amount amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MonthlyEstimatedRevenue(Amount amount, Map extraParams) { + this.amount = amount; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue build() { + return new AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue( + this.amount, this.extraParams); + } + + /** A non-negative integer representing the amount in the smallest currency unit. */ + public Builder setAmount( + AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + @SerializedName("currency") + Object currency; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + @SerializedName("value") + Long value; + + private Amount(Object currency, Map extraParams, Long value) { + this.currency = currency; + this.extraParams = extraParams; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object currency; + + private Map extraParams; + + private Long value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount + build() { + return new AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue + .Amount(this.currency, this.extraParams, this.value); + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported currency. + */ + public Builder setCurrency(EmptyParam currency) { + this.currency = currency; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.MonthlyEstimatedRevenue.Amount#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A non-negative integer representing how much to charge in the smallest currency unit. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses build() { + return new AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana( + AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji( + AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Kana( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kana build() { + return new AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kana#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kana#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Kanji( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kanji build() { + return new AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kanji#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptAddresses.Kanji#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana name. */ + @SerializedName("kana") + Kana kana; + + /** Kanji name. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.ScriptNames build() { + return new AccountUpdateParams.Identity.BusinessDetails.ScriptNames( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.ScriptNames#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.BusinessDetails.ScriptNames#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana name. */ + public Builder setKana( + AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji name. */ + public Builder setKanji( + AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Registered name of the business. */ + @SerializedName("registered_name") + Object registeredName; + + private Kana(Map extraParams, Object registeredName) { + this.extraParams = extraParams; + this.registeredName = registeredName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object registeredName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kana build() { + return new AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kana( + this.extraParams, this.registeredName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kana#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kana#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(EmptyParam registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Registered name of the business. */ + @SerializedName("registered_name") + Object registeredName; + + private Kanji(Map extraParams, Object registeredName) { + this.extraParams = extraParams; + this.registeredName = registeredName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object registeredName; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kanji build() { + return new AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kanji( + this.extraParams, this.registeredName); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kanji#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.BusinessDetails.ScriptNames.Kanji#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + + /** Registered name of the business. */ + public Builder setRegisteredName(EmptyParam registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + } + + public enum Structure implements ApiRequestParams.EnumParam { + @SerializedName("cooperative") + COOPERATIVE("cooperative"), + + @SerializedName("free_zone_establishment") + FREE_ZONE_ESTABLISHMENT("free_zone_establishment"), + + @SerializedName("free_zone_llc") + FREE_ZONE_LLC("free_zone_llc"), + + @SerializedName("governmental_unit") + GOVERNMENTAL_UNIT("governmental_unit"), + + @SerializedName("government_instrumentality") + GOVERNMENT_INSTRUMENTALITY("government_instrumentality"), + + @SerializedName("incorporated_association") + INCORPORATED_ASSOCIATION("incorporated_association"), + + @SerializedName("incorporated_non_profit") + INCORPORATED_NON_PROFIT("incorporated_non_profit"), + + @SerializedName("incorporated_partnership") + INCORPORATED_PARTNERSHIP("incorporated_partnership"), + + @SerializedName("limited_liability_partnership") + LIMITED_LIABILITY_PARTNERSHIP("limited_liability_partnership"), + + @SerializedName("llc") + LLC("llc"), + + @SerializedName("multi_member_llc") + MULTI_MEMBER_LLC("multi_member_llc"), + + @SerializedName("private_company") + PRIVATE_COMPANY("private_company"), + + @SerializedName("private_corporation") + PRIVATE_CORPORATION("private_corporation"), + + @SerializedName("private_partnership") + PRIVATE_PARTNERSHIP("private_partnership"), + + @SerializedName("public_company") + PUBLIC_COMPANY("public_company"), + + @SerializedName("public_corporation") + PUBLIC_CORPORATION("public_corporation"), + + @SerializedName("public_listed_corporation") + PUBLIC_LISTED_CORPORATION("public_listed_corporation"), + + @SerializedName("public_partnership") + PUBLIC_PARTNERSHIP("public_partnership"), + + @SerializedName("registered_charity") + REGISTERED_CHARITY("registered_charity"), + + @SerializedName("single_member_llc") + SINGLE_MEMBER_LLC("single_member_llc"), + + @SerializedName("sole_establishment") + SOLE_ESTABLISHMENT("sole_establishment"), + + @SerializedName("sole_proprietorship") + SOLE_PROPRIETORSHIP("sole_proprietorship"), + + @SerializedName("tax_exempt_government_instrumentality") + TAX_EXEMPT_GOVERNMENT_INSTRUMENTALITY("tax_exempt_government_instrumentality"), + + @SerializedName("trust") + TRUST("trust"), + + @SerializedName("unincorporated_association") + UNINCORPORATED_ASSOCIATION("unincorporated_association"), + + @SerializedName("unincorporated_non_profit") + UNINCORPORATED_NON_PROFIT("unincorporated_non_profit"), + + @SerializedName("unincorporated_partnership") + UNINCORPORATED_PARTNERSHIP("unincorporated_partnership"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Structure(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** Additional addresses associated with the individual. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the individual. */ + @SerializedName("additional_names") + List additionalNames; + + /** The individual's residential address. */ + @SerializedName("address") + Address address; + + /** The individual's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** The individual's email address. */ + @SerializedName("email") + Object email; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The individual's first name. */ + @SerializedName("given_name") + Object givenName; + + /** The identification numbers (e.g., SSN) associated with the individual. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The individual's gender (International regulations require either "male" or + * "female"). + */ + @SerializedName("legal_gender") + LegalGender legalGender; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** + * The countries where the individual is a national. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("nationalities") + List nationalities; + + /** The individual's phone number. */ + @SerializedName("phone") + Object phone; + + /** The individual's political exposure. */ + @SerializedName("political_exposure") + PoliticalExposure politicalExposure; + + /** The relationship that this individual has with the account's identity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The individuals primary name in non latin script. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The individual's last name. */ + @SerializedName("surname") + Object surname; + + private Individual( + List additionalAddresses, + List additionalNames, + Address address, + DateOfBirth dateOfBirth, + Documents documents, + Object email, + Map extraParams, + Object givenName, + List idNumbers, + LegalGender legalGender, + Map metadata, + List nationalities, + Object phone, + PoliticalExposure politicalExposure, + Relationship relationship, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + Object surname) { + this.additionalAddresses = additionalAddresses; + this.additionalNames = additionalNames; + this.address = address; + this.dateOfBirth = dateOfBirth; + this.documents = documents; + this.email = email; + this.extraParams = extraParams; + this.givenName = givenName; + this.idNumbers = idNumbers; + this.legalGender = legalGender; + this.metadata = metadata; + this.nationalities = nationalities; + this.phone = phone; + this.politicalExposure = politicalExposure; + this.relationship = relationship; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List additionalAddresses; + + private List additionalNames; + + private Address address; + + private DateOfBirth dateOfBirth; + + private Documents documents; + + private Object email; + + private Map extraParams; + + private Object givenName; + + private List idNumbers; + + private LegalGender legalGender; + + private Map metadata; + + private List nationalities; + + private Object phone; + + private PoliticalExposure politicalExposure; + + private Relationship relationship; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private Object surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual build() { + return new AccountUpdateParams.Identity.Individual( + this.additionalAddresses, + this.additionalNames, + this.address, + this.dateOfBirth, + this.documents, + this.email, + this.extraParams, + this.givenName, + this.idNumbers, + this.legalGender, + this.metadata, + this.nationalities, + this.phone, + this.politicalExposure, + this.relationship, + this.scriptAddresses, + this.scriptNames, + this.surname); + } + + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Identity.Individual#additionalAddresses} for the field + * documentation. + */ + public Builder addAdditionalAddress( + AccountUpdateParams.Identity.Individual.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Identity.Individual#additionalAddresses} for the field + * documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + + /** + * Add an element to `additionalNames` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Identity.Individual#additionalNames} for the field + * documentation. + */ + public Builder addAdditionalName( + AccountUpdateParams.Identity.Individual.AdditionalName element) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.add(element); + return this; + } + + /** + * Add all elements to `additionalNames` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Identity.Individual#additionalNames} for the field + * documentation. + */ + public Builder addAllAdditionalName( + List elements) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.addAll(elements); + return this; + } + + /** The individual's residential address. */ + public Builder setAddress(AccountUpdateParams.Identity.Individual.Address address) { + this.address = address; + return this; + } + + /** The individual's date of birth. */ + public Builder setDateOfBirth( + AccountUpdateParams.Identity.Individual.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + public Builder setDocuments(AccountUpdateParams.Identity.Individual.Documents documents) { + this.documents = documents; + return this; + } + + /** The individual's email address. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** The individual's email address. */ + public Builder setEmail(EmptyParam email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The individual's first name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The individual's first name. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.Individual#idNumbers} for the field documentation. + */ + public Builder addIdNumber(AccountUpdateParams.Identity.Individual.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.Individual#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber( + List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** + * The individual's gender (International regulations require either "male" or + * "female"). + */ + public Builder setLegalGender( + AccountUpdateParams.Identity.Individual.LegalGender legalGender) { + this.legalGender = legalGender; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountUpdateParams.Identity.Individual#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountUpdateParams.Identity.Individual#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. Map values can only be one of the following types: `String`, `EmptyParam`. See + * {@link AccountUpdateParams.Identity.Individual#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream() + .allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Add an element to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.Individual#nationalities} for the field documentation. + */ + public Builder addNationality(String element) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.add(element); + return this; + } + + /** + * Add all elements to `nationalities` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link AccountUpdateParams.Identity.Individual#nationalities} for the field + * documentation. + */ + public Builder addAllNationality(List elements) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.addAll(elements); + return this; + } + + /** The individual's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The individual's phone number. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + + /** The individual's political exposure. */ + public Builder setPoliticalExposure( + AccountUpdateParams.Identity.Individual.PoliticalExposure politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** The relationship that this individual has with the account's identity. */ + public Builder setRelationship( + AccountUpdateParams.Identity.Individual.Relationship relationship) { + this.relationship = relationship; + return this; + } + + /** The script addresses (e.g., non-Latin characters) associated with the individual. */ + public Builder setScriptAddresses( + AccountUpdateParams.Identity.Individual.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The individuals primary name in non latin script. */ + public Builder setScriptNames( + AccountUpdateParams.Identity.Individual.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The individual's last name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + + /** The individual's last name. */ + public Builder setSurname(EmptyParam surname) { + this.surname = surname; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private AdditionalAddress( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Purpose purpose, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Purpose purpose; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.AdditionalAddress build() { + return new AccountUpdateParams.Identity.Individual.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.AdditionalAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.AdditionalAddress#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose( + AccountUpdateParams.Identity.Individual.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("registered") + REGISTERED("registered"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's full name. */ + @SerializedName("full_name") + Object fullName; + + /** The person's first or given name. */ + @SerializedName("given_name") + Object givenName; + + /** Required. The purpose or type of the additional name. */ + @SerializedName("purpose") + Purpose purpose; + + /** The person's last or family name. */ + @SerializedName("surname") + Object surname; + + private AdditionalName( + Map extraParams, + Object fullName, + Object givenName, + Purpose purpose, + Object surname) { + this.extraParams = extraParams; + this.fullName = fullName; + this.givenName = givenName; + this.purpose = purpose; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object fullName; + + private Object givenName; + + private Purpose purpose; + + private Object surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.AdditionalName build() { + return new AccountUpdateParams.Identity.Individual.AdditionalName( + this.extraParams, this.fullName, this.givenName, this.purpose, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.AdditionalName#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.AdditionalName#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's full name. */ + public Builder setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** The person's full name. */ + public Builder setFullName(EmptyParam fullName) { + this.fullName = fullName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + + /** Required. The purpose or type of the additional name. */ + public Builder setPurpose( + AccountUpdateParams.Identity.Individual.AdditionalName.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(EmptyParam surname) { + this.surname = surname; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("alias") + ALIAS("alias"), + + @SerializedName("maiden") + MAIDEN("maiden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Address build() { + return new AccountUpdateParams.Identity.Individual.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.Address#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.Address#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth { + /** Required. The day of the birth. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth. */ + @SerializedName("month") + Long month; + + /** Required. The year of birth. */ + @SerializedName("year") + Long year; + + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.DateOfBirth build() { + return new AccountUpdateParams.Identity.Individual.DateOfBirth( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of the birth. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.DateOfBirth#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.DateOfBirth#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + @SerializedName("passport") + Passport passport; + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + @SerializedName("visa") + Visa visa; + + private Documents( + CompanyAuthorization companyAuthorization, + Map extraParams, + Passport passport, + PrimaryVerification primaryVerification, + SecondaryVerification secondaryVerification, + Visa visa) { + this.companyAuthorization = companyAuthorization; + this.extraParams = extraParams; + this.passport = passport; + this.primaryVerification = primaryVerification; + this.secondaryVerification = secondaryVerification; + this.visa = visa; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CompanyAuthorization companyAuthorization; + + private Map extraParams; + + private Passport passport; + + private PrimaryVerification primaryVerification; + + private SecondaryVerification secondaryVerification; + + private Visa visa; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Documents build() { + return new AccountUpdateParams.Identity.Individual.Documents( + this.companyAuthorization, + this.extraParams, + this.passport, + this.primaryVerification, + this.secondaryVerification, + this.visa); + } + + /** + * One or more documents that demonstrate proof that this person is authorized to + * represent the company. + */ + public Builder setCompanyAuthorization( + AccountUpdateParams.Identity.Individual.Documents.CompanyAuthorization + companyAuthorization) { + this.companyAuthorization = companyAuthorization; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.Documents#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.Documents#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * One or more documents showing the person’s passport page with photo and personal data. + */ + public Builder setPassport( + AccountUpdateParams.Identity.Individual.Documents.Passport passport) { + this.passport = passport; + return this; + } + + /** + * An identifying document showing the person's name, either a passport or local ID card. + */ + public Builder setPrimaryVerification( + AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification + primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + public Builder setSecondaryVerification( + AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification + secondaryVerification) { + this.secondaryVerification = secondaryVerification; + return this; + } + + /** + * One or more documents showing the person’s visa required for living in the country + * where they are residing. + */ + public Builder setVisa(AccountUpdateParams.Identity.Individual.Documents.Visa visa) { + this.visa = visa; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyAuthorization( + Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Documents.CompanyAuthorization build() { + return new AccountUpdateParams.Identity.Individual.Documents.CompanyAuthorization( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.CompanyAuthorization#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.CompanyAuthorization#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.Individual.Documents.CompanyAuthorization#files} for the + * field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.Individual.Documents.CompanyAuthorization#files} for the + * field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.Individual.Documents.CompanyAuthorization.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passport { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Passport(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Documents.Passport build() { + return new AccountUpdateParams.Identity.Individual.Documents.Passport( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.Individual.Documents.Passport#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.Individual.Documents.Passport#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.Individual.Documents.Passport.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification build() { + return new AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + Object back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + Object front; + + private FrontBack(Object back, Map extraParams, Object front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object back; + + private Map extraParams; + + private Object front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack + build() { + return new AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification + .FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(EmptyParam back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(EmptyParam front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private SecondaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification build() { + return new AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack + frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently + * supports {@code front_back} only. + */ + public Builder setType( + AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + @SerializedName("back") + Object back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 + * MB in size. + */ + @SerializedName("front") + Object front; + + private FrontBack(Object back, Map extraParams, Object front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object back; + + private Map extraParams; + + private Object front; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification + .FrontBack + build() { + return new AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification + .FrontBack(this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setBack(EmptyParam back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.SecondaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the + * uploaded file should be 'identity_document'. The uploaded file needs to be a color + * image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than + * 10 MB in size. + */ + public Builder setFront(EmptyParam front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Visa { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Visa(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Documents.Visa build() { + return new AccountUpdateParams.Identity.Individual.Documents.Visa( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.Individual.Documents.Visa#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountUpdateParams.Identity.Individual.Documents.Visa#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code + * files} only. + */ + public Builder setType( + AccountUpdateParams.Identity.Individual.Documents.Visa.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The ID number type of an individual. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + Object value; + + private IdNumber(Map extraParams, Type type, Object value) { + this.extraParams = extraParams; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + private Object value; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.IdNumber build() { + return new AccountUpdateParams.Identity.Individual.IdNumber( + this.extraParams, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.IdNumber#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.IdNumber#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The ID number type of an individual. */ + public Builder setType(AccountUpdateParams.Identity.Individual.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_eid") + AE_EID("ae_eid"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuil") + AR_CUIL("ar_cuil"), + + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + + @SerializedName("at_stn") + AT_STN("at_stn"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_brc") + BD_BRC("bd_brc"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("bd_nid") + BD_NID("bd_nid"), + + @SerializedName("be_nrn") + BE_NRN("be_nrn"), + + @SerializedName("bg_ucn") + BG_UCN("bg_ucn"), + + @SerializedName("bn_nric") + BN_NRIC("bn_nric"), + + @SerializedName("br_cpf") + BR_CPF("br_cpf"), + + @SerializedName("ca_sin") + CA_SIN("ca_sin"), + + @SerializedName("ch_oasi") + CH_OASI("ch_oasi"), + + @SerializedName("cl_rut") + CL_RUT("cl_rut"), + + @SerializedName("cn_pp") + CN_PP("cn_pp"), + + @SerializedName("co_nuip") + CO_NUIP("co_nuip"), + + @SerializedName("cr_ci") + CR_CI("cr_ci"), + + @SerializedName("cr_cpf") + CR_CPF("cr_cpf"), + + @SerializedName("cr_dimex") + CR_DIMEX("cr_dimex"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cz_rc") + CZ_RC("cz_rc"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("dk_cpr") + DK_CPR("dk_cpr"), + + @SerializedName("do_cie") + DO_CIE("do_cie"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ec_ci") + EC_CI("ec_ci"), + + @SerializedName("ee_ik") + EE_IK("ee_ik"), + + @SerializedName("es_nif") + ES_NIF("es_nif"), + + @SerializedName("fi_hetu") + FI_HETU("fi_hetu"), + + @SerializedName("fr_nir") + FR_NIR("fr_nir"), + + @SerializedName("gb_nino") + GB_NINO("gb_nino"), + + @SerializedName("gr_afm") + GR_AFM("gr_afm"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_id") + HK_ID("hk_id"), + + @SerializedName("hr_oib") + HR_OIB("hr_oib"), + + @SerializedName("hu_ad") + HU_AD("hu_ad"), + + @SerializedName("id_nik") + ID_NIK("id_nik"), + + @SerializedName("ie_ppsn") + IE_PPSN("ie_ppsn"), + + @SerializedName("is_kt") + IS_KT("is_kt"), + + @SerializedName("it_cf") + IT_CF("it_cf"), + + @SerializedName("jp_inc") + JP_INC("jp_inc"), + + @SerializedName("ke_pin") + KE_PIN("ke_pin"), + + @SerializedName("kz_iin") + KZ_IIN("kz_iin"), + + @SerializedName("li_peid") + LI_PEID("li_peid"), + + @SerializedName("lt_ak") + LT_AK("lt_ak"), + + @SerializedName("lu_nif") + LU_NIF("lu_nif"), + + @SerializedName("lv_pk") + LV_PK("lv_pk"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_nric") + MY_NRIC("my_nric"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("ng_nin") + NG_NIN("ng_nin"), + + @SerializedName("nl_bsn") + NL_BSN("nl_bsn"), + + @SerializedName("no_nin") + NO_NIN("no_nin"), + + @SerializedName("nz_ird") + NZ_IRD("nz_ird"), + + @SerializedName("pe_dni") + PE_DNI("pe_dni"), + + @SerializedName("pk_cnic") + PK_CNIC("pk_cnic"), + + @SerializedName("pk_snic") + PK_SNIC("pk_snic"), + + @SerializedName("pl_pesel") + PL_PESEL("pl_pesel"), + + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + + @SerializedName("ro_cnp") + RO_CNP("ro_cnp"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_pin") + SE_PIN("se_pin"), + + @SerializedName("sg_fin") + SG_FIN("sg_fin"), + + @SerializedName("sg_nric") + SG_NRIC("sg_nric"), + + @SerializedName("sk_dic") + SK_DIC("sk_dic"), + + @SerializedName("th_lc") + TH_LC("th_lc"), + + @SerializedName("th_pin") + TH_PIN("th_pin"), + + @SerializedName("tr_tin") + TR_TIN("tr_tin"), + + @SerializedName("us_itin") + US_ITIN("us_itin"), + + @SerializedName("us_itin_last_4") + US_ITIN_LAST_4("us_itin_last_4"), + + @SerializedName("us_ssn") + US_SSN("us_ssn"), + + @SerializedName("us_ssn_last_4") + US_SSN_LAST_4("us_ssn_last_4"), + + @SerializedName("uy_dni") + UY_DNI("uy_dni"), + + @SerializedName("za_id") + ZA_ID("za_id"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Relationship { + /** + * Whether the person is a director of the account's identity. Directors are typically + * members of the governing board of the company, or responsible for ensuring the company + * meets its regulatory obligations. + */ + @SerializedName("director") + Boolean director; + + /** + * Whether the person has significant responsibility to control, manage, or direct the + * organization. + */ + @SerializedName("executive") + Boolean executive; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Whether the person is an owner of the account’s identity. */ + @SerializedName("owner") + Boolean owner; + + /** The percent owned by the person of the account's legal entity. */ + @SerializedName("percent_ownership") + Object percentOwnership; + + /** The person's title (e.g., CEO, Support Engineer). */ + @SerializedName("title") + Object title; + + private Relationship( + Boolean director, + Boolean executive, + Map extraParams, + Boolean owner, + Object percentOwnership, + Object title) { + this.director = director; + this.executive = executive; + this.extraParams = extraParams; + this.owner = owner; + this.percentOwnership = percentOwnership; + this.title = title; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean director; + + private Boolean executive; + + private Map extraParams; + + private Boolean owner; + + private Object percentOwnership; + + private Object title; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.Relationship build() { + return new AccountUpdateParams.Identity.Individual.Relationship( + this.director, + this.executive, + this.extraParams, + this.owner, + this.percentOwnership, + this.title); + } + + /** + * Whether the person is a director of the account's identity. Directors are typically + * members of the governing board of the company, or responsible for ensuring the company + * meets its regulatory obligations. + */ + public Builder setDirector(Boolean director) { + this.director = director; + return this; + } + + /** + * Whether the person has significant responsibility to control, manage, or direct the + * organization. + */ + public Builder setExecutive(Boolean executive) { + this.executive = executive; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.Relationship#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.Relationship#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Whether the person is an owner of the account’s identity. */ + public Builder setOwner(Boolean owner) { + this.owner = owner; + return this; + } + + /** The percent owned by the person of the account's legal entity. */ + public Builder setPercentOwnership(String percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** The percent owned by the person of the account's legal entity. */ + public Builder setPercentOwnership(EmptyParam percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** The person's title (e.g., CEO, Support Engineer). */ + public Builder setTitle(String title) { + this.title = title; + return this; + } + + /** The person's title (e.g., CEO, Support Engineer). */ + public Builder setTitle(EmptyParam title) { + this.title = title; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.ScriptAddresses build() { + return new AccountUpdateParams.Identity.Individual.ScriptAddresses( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.ScriptAddresses#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.ScriptAddresses#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana( + AccountUpdateParams.Identity.Individual.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji( + AccountUpdateParams.Identity.Individual.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Kana( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.ScriptAddresses.Kana build() { + return new AccountUpdateParams.Identity.Individual.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.ScriptAddresses.Kana#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.ScriptAddresses.Kana#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Kanji( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.ScriptAddresses.Kanji build() { + return new AccountUpdateParams.Identity.Individual.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.ScriptAddresses.Kanji#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.ScriptAddresses.Kanji#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.ScriptNames build() { + return new AccountUpdateParams.Identity.Individual.ScriptNames( + this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.ScriptNames#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Identity.Individual.ScriptNames#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Persons name in kana script. */ + public Builder setKana(AccountUpdateParams.Identity.Individual.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Persons name in kanji script. */ + public Builder setKanji(AccountUpdateParams.Identity.Individual.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + Object givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + Object surname; + + private Kana(Map extraParams, Object givenName, Object surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object givenName; + + private Object surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.ScriptNames.Kana build() { + return new AccountUpdateParams.Identity.Individual.ScriptNames.Kana( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(EmptyParam surname) { + this.surname = surname; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + Object givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + Object surname; + + private Kanji(Map extraParams, Object givenName, Object surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object givenName; + + private Object surname; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Identity.Individual.ScriptNames.Kanji build() { + return new AccountUpdateParams.Identity.Individual.ScriptNames.Kanji( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Identity.Individual.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(EmptyParam surname) { + this.surname = surname; + return this; + } + } + } + } + + public enum LegalGender implements ApiRequestParams.EnumParam { + @SerializedName("female") + FEMALE("female"), + + @SerializedName("male") + MALE("male"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LegalGender(String value) { + this.value = value; + } + } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } + } + + public enum EntityType implements ApiRequestParams.EnumParam { + @SerializedName("company") + COMPANY("company"), + + @SerializedName("government_entity") + GOVERNMENT_ENTITY("government_entity"), + + @SerializedName("individual") + INDIVIDUAL("individual"), + + @SerializedName("non_profit") + NON_PROFIT("non_profit"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + EntityType(String value) { + this.value = value; + } + } + } + + public enum Dashboard implements ApiRequestParams.EnumParam { + @SerializedName("express") + EXPRESS("express"), + + @SerializedName("full") + FULL("full"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Dashboard(String value) { + this.value = value; + } + } + + public enum Include implements ApiRequestParams.EnumParam { + @SerializedName("configuration.customer") + CONFIGURATION__CUSTOMER("configuration.customer"), + + @SerializedName("configuration.merchant") + CONFIGURATION__MERCHANT("configuration.merchant"), + + @SerializedName("configuration.recipient") + CONFIGURATION__RECIPIENT("configuration.recipient"), + + @SerializedName("defaults") + DEFAULTS("defaults"), + + @SerializedName("future_requirements") + FUTURE_REQUIREMENTS("future_requirements"), + + @SerializedName("identity") + IDENTITY("identity"), + + @SerializedName("requirements") + REQUIREMENTS("requirements"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Include(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java new file mode 100644 index 00000000000..cb190454762 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java @@ -0,0 +1,3427 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.accounts; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PersonCreateParams extends ApiRequestParams { + /** Additional addresses associated with the person. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the person. */ + @SerializedName("additional_names") + List additionalNames; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("additional_terms_of_service") + AdditionalTermsOfService additionalTermsOfService; + + /** The person's residential address. */ + @SerializedName("address") + Address address; + + /** The person's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** Email. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first name. */ + @SerializedName("given_name") + String givenName; + + /** The identification numbers (e.g., SSN) associated with the person. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The person's gender (International regulations require either "male" or + * "female"). + */ + @SerializedName("legal_gender") + LegalGender legalGender; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** The nationalities (countries) this person is associated with. */ + @SerializedName("nationalities") + List nationalities; + + /** The person token generated by the person token api. */ + @SerializedName("person_token") + String personToken; + + /** The phone number for this person. */ + @SerializedName("phone") + String phone; + + /** The person's political exposure. */ + @SerializedName("political_exposure") + PoliticalExposure politicalExposure; + + /** The relationship that this person has with the Account's business or legal entity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The script names (e.g. non-Latin characters) associated with the person. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The person's last name. */ + @SerializedName("surname") + String surname; + + private PersonCreateParams( + List additionalAddresses, + List additionalNames, + AdditionalTermsOfService additionalTermsOfService, + Address address, + DateOfBirth dateOfBirth, + Documents documents, + String email, + Map extraParams, + String givenName, + List idNumbers, + LegalGender legalGender, + Map metadata, + List nationalities, + String personToken, + String phone, + PoliticalExposure politicalExposure, + Relationship relationship, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + String surname) { + this.additionalAddresses = additionalAddresses; + this.additionalNames = additionalNames; + this.additionalTermsOfService = additionalTermsOfService; + this.address = address; + this.dateOfBirth = dateOfBirth; + this.documents = documents; + this.email = email; + this.extraParams = extraParams; + this.givenName = givenName; + this.idNumbers = idNumbers; + this.legalGender = legalGender; + this.metadata = metadata; + this.nationalities = nationalities; + this.personToken = personToken; + this.phone = phone; + this.politicalExposure = politicalExposure; + this.relationship = relationship; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List additionalAddresses; + + private List additionalNames; + + private AdditionalTermsOfService additionalTermsOfService; + + private Address address; + + private DateOfBirth dateOfBirth; + + private Documents documents; + + private String email; + + private Map extraParams; + + private String givenName; + + private List idNumbers; + + private LegalGender legalGender; + + private Map metadata; + + private List nationalities; + + private String personToken; + + private String phone; + + private PoliticalExposure politicalExposure; + + private Relationship relationship; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams build() { + return new PersonCreateParams( + this.additionalAddresses, + this.additionalNames, + this.additionalTermsOfService, + this.address, + this.dateOfBirth, + this.documents, + this.email, + this.extraParams, + this.givenName, + this.idNumbers, + this.legalGender, + this.metadata, + this.nationalities, + this.personToken, + this.phone, + this.politicalExposure, + this.relationship, + this.scriptAddresses, + this.scriptNames, + this.surname); + } + + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PersonCreateParams#additionalAddresses} for the field documentation. + */ + public Builder addAdditionalAddress(PersonCreateParams.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PersonCreateParams#additionalAddresses} for the field documentation. + */ + public Builder addAllAdditionalAddress(List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + + /** + * Add an element to `additionalNames` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams#additionalNames} for the field documentation. + */ + public Builder addAdditionalName(PersonCreateParams.AdditionalName element) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.add(element); + return this; + } + + /** + * Add all elements to `additionalNames` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams#additionalNames} for the field documentation. + */ + public Builder addAllAdditionalName(List elements) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.addAll(elements); + return this; + } + + /** Attestations of accepted terms of service agreements. */ + public Builder setAdditionalTermsOfService( + PersonCreateParams.AdditionalTermsOfService additionalTermsOfService) { + this.additionalTermsOfService = additionalTermsOfService; + return this; + } + + /** The person's residential address. */ + public Builder setAddress(PersonCreateParams.Address address) { + this.address = address; + return this; + } + + /** The person's date of birth. */ + public Builder setDateOfBirth(PersonCreateParams.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + public Builder setDocuments(PersonCreateParams.Documents documents) { + this.documents = documents; + return this; + } + + /** Email. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams#idNumbers} for the field documentation. + */ + public Builder addIdNumber(PersonCreateParams.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber(List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** + * The person's gender (International regulations require either "male" or + * "female"). + */ + public Builder setLegalGender(PersonCreateParams.LegalGender legalGender) { + this.legalGender = legalGender; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Add an element to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams#nationalities} for the field documentation. + */ + public Builder addNationality(String element) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.add(element); + return this; + } + + /** + * Add all elements to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams#nationalities} for the field documentation. + */ + public Builder addAllNationality(List elements) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.addAll(elements); + return this; + } + + /** The person token generated by the person token api. */ + public Builder setPersonToken(String personToken) { + this.personToken = personToken; + return this; + } + + /** The phone number for this person. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The person's political exposure. */ + public Builder setPoliticalExposure(PersonCreateParams.PoliticalExposure politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** The relationship that this person has with the Account's business or legal entity. */ + public Builder setRelationship(PersonCreateParams.Relationship relationship) { + this.relationship = relationship; + return this; + } + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + public Builder setScriptAddresses(PersonCreateParams.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The script names (e.g. non-Latin characters) associated with the person. */ + public Builder setScriptNames(PersonCreateParams.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The person's last name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private AdditionalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + Purpose purpose, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private Purpose purpose; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.AdditionalAddress build() { + return new PersonCreateParams.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.AdditionalAddress#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.AdditionalAddress#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose(PersonCreateParams.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("registered") + REGISTERED("registered"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's full name. */ + @SerializedName("full_name") + String fullName; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** Required. The purpose or type of the additional name. */ + @SerializedName("purpose") + Purpose purpose; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private AdditionalName( + Map extraParams, + String fullName, + String givenName, + Purpose purpose, + String surname) { + this.extraParams = extraParams; + this.fullName = fullName; + this.givenName = givenName; + this.purpose = purpose; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String fullName; + + private String givenName; + + private Purpose purpose; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.AdditionalName build() { + return new PersonCreateParams.AdditionalName( + this.extraParams, this.fullName, this.givenName, this.purpose, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.AdditionalName#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.AdditionalName#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's full name. */ + public Builder setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** Required. The purpose or type of the additional name. */ + public Builder setPurpose(PersonCreateParams.AdditionalName.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("alias") + ALIAS("alias"), + + @SerializedName("maiden") + MAIDEN("maiden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalTermsOfService { + /** Stripe terms of service agreement. */ + @SerializedName("account") + Account account; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private AdditionalTermsOfService(Account account, Map extraParams) { + this.account = account; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Account account; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.AdditionalTermsOfService build() { + return new PersonCreateParams.AdditionalTermsOfService(this.account, this.extraParams); + } + + /** Stripe terms of service agreement. */ + public Builder setAccount(PersonCreateParams.AdditionalTermsOfService.Account account) { + this.account = account; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.AdditionalTermsOfService#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.AdditionalTermsOfService#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Account { + /** + * Required. The time when the Account's representative accepted the terms of + * service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for + * example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The IP address from which the Account's representative accepted + * the terms of service. + */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the Account's representative accepted the terms of + * service. + */ + @SerializedName("user_agent") + String userAgent; + + private Account(Instant date, Map extraParams, String ip, String userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.AdditionalTermsOfService.Account build() { + return new PersonCreateParams.AdditionalTermsOfService.Account( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * Required. The time when the Account's representative accepted the terms + * of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, + * for example: 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.AdditionalTermsOfService.Account#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.AdditionalTermsOfService.Account#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The IP address from which the Account's representative + * accepted the terms of service. + */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the terms + * of service. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Address build() { + return new PersonCreateParams.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.Address#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.Address#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth { + /** Required. The day of birth. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth. */ + @SerializedName("month") + Long month; + + /** Required. The year of birth. */ + @SerializedName("year") + Long year; + + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.DateOfBirth build() { + return new PersonCreateParams.DateOfBirth( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of birth. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.DateOfBirth#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.DateOfBirth#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that demonstrate proof that this person is authorized to represent the + * company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** One or more documents showing the person’s passport page with photo and personal data. */ + @SerializedName("passport") + Passport passport; + + /** An identifying document showing the person's name, either a passport or local ID card. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where they + * are residing. + */ + @SerializedName("visa") + Visa visa; + + private Documents( + CompanyAuthorization companyAuthorization, + Map extraParams, + Passport passport, + PrimaryVerification primaryVerification, + SecondaryVerification secondaryVerification, + Visa visa) { + this.companyAuthorization = companyAuthorization; + this.extraParams = extraParams; + this.passport = passport; + this.primaryVerification = primaryVerification; + this.secondaryVerification = secondaryVerification; + this.visa = visa; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CompanyAuthorization companyAuthorization; + + private Map extraParams; + + private Passport passport; + + private PrimaryVerification primaryVerification; + + private SecondaryVerification secondaryVerification; + + private Visa visa; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Documents build() { + return new PersonCreateParams.Documents( + this.companyAuthorization, + this.extraParams, + this.passport, + this.primaryVerification, + this.secondaryVerification, + this.visa); + } + + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + public Builder setCompanyAuthorization( + PersonCreateParams.Documents.CompanyAuthorization companyAuthorization) { + this.companyAuthorization = companyAuthorization; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.Documents#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.Documents#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** One or more documents showing the person’s passport page with photo and personal data. */ + public Builder setPassport(PersonCreateParams.Documents.Passport passport) { + this.passport = passport; + return this; + } + + /** An identifying document showing the person's name, either a passport or local ID card. */ + public Builder setPrimaryVerification( + PersonCreateParams.Documents.PrimaryVerification primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + public Builder setSecondaryVerification( + PersonCreateParams.Documents.SecondaryVerification secondaryVerification) { + this.secondaryVerification = secondaryVerification; + return this; + } + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + public Builder setVisa(PersonCreateParams.Documents.Visa visa) { + this.visa = visa; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyAuthorization(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Documents.CompanyAuthorization build() { + return new PersonCreateParams.Documents.CompanyAuthorization( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.CompanyAuthorization#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.CompanyAuthorization#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams.Documents.CompanyAuthorization#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams.Documents.CompanyAuthorization#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonCreateParams.Documents.CompanyAuthorization.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passport { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Passport(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Documents.Passport build() { + return new PersonCreateParams.Documents.Passport(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams.Documents.Passport#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams.Documents.Passport#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonCreateParams.Documents.Passport.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification(Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Documents.PrimaryVerification build() { + return new PersonCreateParams.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.PrimaryVerification#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.PrimaryVerification#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + PersonCreateParams.Documents.PrimaryVerification.FrontBack frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + public Builder setType(PersonCreateParams.Documents.PrimaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Documents.PrimaryVerification.FrontBack build() { + return new PersonCreateParams.Documents.PrimaryVerification.FrontBack( + this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private SecondaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Documents.SecondaryVerification build() { + return new PersonCreateParams.Documents.SecondaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.SecondaryVerification#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.SecondaryVerification#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + PersonCreateParams.Documents.SecondaryVerification.FrontBack frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + public Builder setType(PersonCreateParams.Documents.SecondaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Documents.SecondaryVerification.FrontBack build() { + return new PersonCreateParams.Documents.SecondaryVerification.FrontBack( + this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonCreateParams.Documents.SecondaryVerification.FrontBack#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonCreateParams.Documents.SecondaryVerification.FrontBack#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller + * than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Visa { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Visa(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Documents.Visa build() { + return new PersonCreateParams.Documents.Visa(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams.Documents.Visa#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonCreateParams.Documents.Visa#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonCreateParams.Documents.Visa.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The ID number type of an individual. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + String value; + + private IdNumber(Map extraParams, Type type, String value) { + this.extraParams = extraParams; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.IdNumber build() { + return new PersonCreateParams.IdNumber(this.extraParams, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.IdNumber#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.IdNumber#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The ID number type of an individual. */ + public Builder setType(PersonCreateParams.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_eid") + AE_EID("ae_eid"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuil") + AR_CUIL("ar_cuil"), + + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + + @SerializedName("at_stn") + AT_STN("at_stn"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_brc") + BD_BRC("bd_brc"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("bd_nid") + BD_NID("bd_nid"), + + @SerializedName("be_nrn") + BE_NRN("be_nrn"), + + @SerializedName("bg_ucn") + BG_UCN("bg_ucn"), + + @SerializedName("bn_nric") + BN_NRIC("bn_nric"), + + @SerializedName("br_cpf") + BR_CPF("br_cpf"), + + @SerializedName("ca_sin") + CA_SIN("ca_sin"), + + @SerializedName("ch_oasi") + CH_OASI("ch_oasi"), + + @SerializedName("cl_rut") + CL_RUT("cl_rut"), + + @SerializedName("cn_pp") + CN_PP("cn_pp"), + + @SerializedName("co_nuip") + CO_NUIP("co_nuip"), + + @SerializedName("cr_ci") + CR_CI("cr_ci"), + + @SerializedName("cr_cpf") + CR_CPF("cr_cpf"), + + @SerializedName("cr_dimex") + CR_DIMEX("cr_dimex"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cz_rc") + CZ_RC("cz_rc"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("dk_cpr") + DK_CPR("dk_cpr"), + + @SerializedName("do_cie") + DO_CIE("do_cie"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ec_ci") + EC_CI("ec_ci"), + + @SerializedName("ee_ik") + EE_IK("ee_ik"), + + @SerializedName("es_nif") + ES_NIF("es_nif"), + + @SerializedName("fi_hetu") + FI_HETU("fi_hetu"), + + @SerializedName("fr_nir") + FR_NIR("fr_nir"), + + @SerializedName("gb_nino") + GB_NINO("gb_nino"), + + @SerializedName("gr_afm") + GR_AFM("gr_afm"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_id") + HK_ID("hk_id"), + + @SerializedName("hr_oib") + HR_OIB("hr_oib"), + + @SerializedName("hu_ad") + HU_AD("hu_ad"), + + @SerializedName("id_nik") + ID_NIK("id_nik"), + + @SerializedName("ie_ppsn") + IE_PPSN("ie_ppsn"), + + @SerializedName("is_kt") + IS_KT("is_kt"), + + @SerializedName("it_cf") + IT_CF("it_cf"), + + @SerializedName("jp_inc") + JP_INC("jp_inc"), + + @SerializedName("ke_pin") + KE_PIN("ke_pin"), + + @SerializedName("kz_iin") + KZ_IIN("kz_iin"), + + @SerializedName("li_peid") + LI_PEID("li_peid"), + + @SerializedName("lt_ak") + LT_AK("lt_ak"), + + @SerializedName("lu_nif") + LU_NIF("lu_nif"), + + @SerializedName("lv_pk") + LV_PK("lv_pk"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_nric") + MY_NRIC("my_nric"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("ng_nin") + NG_NIN("ng_nin"), + + @SerializedName("nl_bsn") + NL_BSN("nl_bsn"), + + @SerializedName("no_nin") + NO_NIN("no_nin"), + + @SerializedName("nz_ird") + NZ_IRD("nz_ird"), + + @SerializedName("pe_dni") + PE_DNI("pe_dni"), + + @SerializedName("pk_cnic") + PK_CNIC("pk_cnic"), + + @SerializedName("pk_snic") + PK_SNIC("pk_snic"), + + @SerializedName("pl_pesel") + PL_PESEL("pl_pesel"), + + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + + @SerializedName("ro_cnp") + RO_CNP("ro_cnp"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_pin") + SE_PIN("se_pin"), + + @SerializedName("sg_fin") + SG_FIN("sg_fin"), + + @SerializedName("sg_nric") + SG_NRIC("sg_nric"), + + @SerializedName("sk_dic") + SK_DIC("sk_dic"), + + @SerializedName("th_lc") + TH_LC("th_lc"), + + @SerializedName("th_pin") + TH_PIN("th_pin"), + + @SerializedName("tr_tin") + TR_TIN("tr_tin"), + + @SerializedName("us_itin") + US_ITIN("us_itin"), + + @SerializedName("us_itin_last_4") + US_ITIN_LAST_4("us_itin_last_4"), + + @SerializedName("us_ssn") + US_SSN("us_ssn"), + + @SerializedName("us_ssn_last_4") + US_SSN_LAST_4("us_ssn_last_4"), + + @SerializedName("uy_dni") + UY_DNI("uy_dni"), + + @SerializedName("za_id") + ZA_ID("za_id"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Relationship { + /** Whether the individual is an authorizer of the Account's identity. */ + @SerializedName("authorizer") + Boolean authorizer; + + /** Indicates whether the person is a director of the associated legal entity. */ + @SerializedName("director") + Boolean director; + + /** Indicates whether the person is an executive of the associated legal entity. */ + @SerializedName("executive") + Boolean executive; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Indicates whether the person is a legal guardian of the associated legal entity. */ + @SerializedName("legal_guardian") + Boolean legalGuardian; + + /** Indicates whether the person is an owner of the associated legal entity. */ + @SerializedName("owner") + Boolean owner; + + /** The percentage of ownership the person has in the associated legal entity. */ + @SerializedName("percent_ownership") + String percentOwnership; + + /** Indicates whether the person is a representative of the associated legal entity. */ + @SerializedName("representative") + Boolean representative; + + /** The title or position the person holds in the associated legal entity. */ + @SerializedName("title") + String title; + + private Relationship( + Boolean authorizer, + Boolean director, + Boolean executive, + Map extraParams, + Boolean legalGuardian, + Boolean owner, + String percentOwnership, + Boolean representative, + String title) { + this.authorizer = authorizer; + this.director = director; + this.executive = executive; + this.extraParams = extraParams; + this.legalGuardian = legalGuardian; + this.owner = owner; + this.percentOwnership = percentOwnership; + this.representative = representative; + this.title = title; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean authorizer; + + private Boolean director; + + private Boolean executive; + + private Map extraParams; + + private Boolean legalGuardian; + + private Boolean owner; + + private String percentOwnership; + + private Boolean representative; + + private String title; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.Relationship build() { + return new PersonCreateParams.Relationship( + this.authorizer, + this.director, + this.executive, + this.extraParams, + this.legalGuardian, + this.owner, + this.percentOwnership, + this.representative, + this.title); + } + + /** Whether the individual is an authorizer of the Account's identity. */ + public Builder setAuthorizer(Boolean authorizer) { + this.authorizer = authorizer; + return this; + } + + /** Indicates whether the person is a director of the associated legal entity. */ + public Builder setDirector(Boolean director) { + this.director = director; + return this; + } + + /** Indicates whether the person is an executive of the associated legal entity. */ + public Builder setExecutive(Boolean executive) { + this.executive = executive; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.Relationship#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.Relationship#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Indicates whether the person is a legal guardian of the associated legal entity. */ + public Builder setLegalGuardian(Boolean legalGuardian) { + this.legalGuardian = legalGuardian; + return this; + } + + /** Indicates whether the person is an owner of the associated legal entity. */ + public Builder setOwner(Boolean owner) { + this.owner = owner; + return this; + } + + /** The percentage of ownership the person has in the associated legal entity. */ + public Builder setPercentOwnership(String percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** Indicates whether the person is a representative of the associated legal entity. */ + public Builder setRepresentative(Boolean representative) { + this.representative = representative; + return this; + } + + /** The title or position the person holds in the associated legal entity. */ + public Builder setTitle(String title) { + this.title = title; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.ScriptAddresses build() { + return new PersonCreateParams.ScriptAddresses(this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.ScriptAddresses#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.ScriptAddresses#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana(PersonCreateParams.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji(PersonCreateParams.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.ScriptAddresses.Kana build() { + return new PersonCreateParams.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.ScriptAddresses.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.ScriptAddresses.Kana#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.ScriptAddresses.Kanji build() { + return new PersonCreateParams.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.ScriptAddresses.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.ScriptAddresses.Kanji#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.ScriptNames build() { + return new PersonCreateParams.ScriptNames(this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonCreateParams.ScriptNames#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonCreateParams.ScriptNames#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Persons name in kana script. */ + public Builder setKana(PersonCreateParams.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Persons name in kanji script. */ + public Builder setKanji(PersonCreateParams.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kana(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.ScriptNames.Kana build() { + return new PersonCreateParams.ScriptNames.Kana( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kanji(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonCreateParams.ScriptNames.Kanji build() { + return new PersonCreateParams.ScriptNames.Kanji( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonCreateParams.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + } + + public enum LegalGender implements ApiRequestParams.EnumParam { + @SerializedName("female") + FEMALE("female"), + + @SerializedName("male") + MALE("male"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LegalGender(String value) { + this.value = value; + } + } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonListParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonListParams.java new file mode 100644 index 00000000000..c27d8412a60 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonListParams.java @@ -0,0 +1,78 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.accounts; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PersonListParams extends ApiRequestParams { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The upper limit on the number of accounts returned by the List Account request. */ + @SerializedName("limit") + Long limit; + + private PersonListParams(Map extraParams, Long limit) { + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonListParams build() { + return new PersonListParams(this.extraParams, this.limit); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonListParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The upper limit on the number of accounts returned by the List Account request. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java new file mode 100644 index 00000000000..5d4fae4ceb8 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonTokenCreateParams.java @@ -0,0 +1,3398 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.accounts; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PersonTokenCreateParams extends ApiRequestParams { + /** Additional addresses associated with the person. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the person. */ + @SerializedName("additional_names") + List additionalNames; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("additional_terms_of_service") + AdditionalTermsOfService additionalTermsOfService; + + /** The person's residential address. */ + @SerializedName("address") + Address address; + + /** The person's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** Email. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first name. */ + @SerializedName("given_name") + String givenName; + + /** The identification numbers (e.g., SSN) associated with the person. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The person's gender (International regulations require either "male" or + * "female"). + */ + @SerializedName("legal_gender") + LegalGender legalGender; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** The nationalities (countries) this person is associated with. */ + @SerializedName("nationalities") + List nationalities; + + /** The phone number for this person. */ + @SerializedName("phone") + String phone; + + /** The person's political exposure. */ + @SerializedName("political_exposure") + PoliticalExposure politicalExposure; + + /** The relationship that this person has with the Account's business or legal entity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The script names (e.g. non-Latin characters) associated with the person. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The person's last name. */ + @SerializedName("surname") + String surname; + + private PersonTokenCreateParams( + List additionalAddresses, + List additionalNames, + AdditionalTermsOfService additionalTermsOfService, + Address address, + DateOfBirth dateOfBirth, + Documents documents, + String email, + Map extraParams, + String givenName, + List idNumbers, + LegalGender legalGender, + Map metadata, + List nationalities, + String phone, + PoliticalExposure politicalExposure, + Relationship relationship, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + String surname) { + this.additionalAddresses = additionalAddresses; + this.additionalNames = additionalNames; + this.additionalTermsOfService = additionalTermsOfService; + this.address = address; + this.dateOfBirth = dateOfBirth; + this.documents = documents; + this.email = email; + this.extraParams = extraParams; + this.givenName = givenName; + this.idNumbers = idNumbers; + this.legalGender = legalGender; + this.metadata = metadata; + this.nationalities = nationalities; + this.phone = phone; + this.politicalExposure = politicalExposure; + this.relationship = relationship; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List additionalAddresses; + + private List additionalNames; + + private AdditionalTermsOfService additionalTermsOfService; + + private Address address; + + private DateOfBirth dateOfBirth; + + private Documents documents; + + private String email; + + private Map extraParams; + + private String givenName; + + private List idNumbers; + + private LegalGender legalGender; + + private Map metadata; + + private List nationalities; + + private String phone; + + private PoliticalExposure politicalExposure; + + private Relationship relationship; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams build() { + return new PersonTokenCreateParams( + this.additionalAddresses, + this.additionalNames, + this.additionalTermsOfService, + this.address, + this.dateOfBirth, + this.documents, + this.email, + this.extraParams, + this.givenName, + this.idNumbers, + this.legalGender, + this.metadata, + this.nationalities, + this.phone, + this.politicalExposure, + this.relationship, + this.scriptAddresses, + this.scriptNames, + this.surname); + } + + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PersonTokenCreateParams#additionalAddresses} for the field documentation. + */ + public Builder addAdditionalAddress(PersonTokenCreateParams.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PersonTokenCreateParams#additionalAddresses} for the field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + + /** + * Add an element to `additionalNames` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#additionalNames} for the field documentation. + */ + public Builder addAdditionalName(PersonTokenCreateParams.AdditionalName element) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.add(element); + return this; + } + + /** + * Add all elements to `additionalNames` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#additionalNames} for the field documentation. + */ + public Builder addAllAdditionalName(List elements) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.addAll(elements); + return this; + } + + /** Attestations of accepted terms of service agreements. */ + public Builder setAdditionalTermsOfService( + PersonTokenCreateParams.AdditionalTermsOfService additionalTermsOfService) { + this.additionalTermsOfService = additionalTermsOfService; + return this; + } + + /** The person's residential address. */ + public Builder setAddress(PersonTokenCreateParams.Address address) { + this.address = address; + return this; + } + + /** The person's date of birth. */ + public Builder setDateOfBirth(PersonTokenCreateParams.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + public Builder setDocuments(PersonTokenCreateParams.Documents documents) { + this.documents = documents; + return this; + } + + /** Email. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#idNumbers} for the field documentation. + */ + public Builder addIdNumber(PersonTokenCreateParams.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber(List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** + * The person's gender (International regulations require either "male" or + * "female"). + */ + public Builder setLegalGender(PersonTokenCreateParams.LegalGender legalGender) { + this.legalGender = legalGender; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * Map values can only be one of the following types: `String`, `EmptyParam`. See {@link + * PersonTokenCreateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Add an element to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#nationalities} for the field documentation. + */ + public Builder addNationality(String element) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.add(element); + return this; + } + + /** + * Add all elements to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams#nationalities} for the field documentation. + */ + public Builder addAllNationality(List elements) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.addAll(elements); + return this; + } + + /** The phone number for this person. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The person's political exposure. */ + public Builder setPoliticalExposure( + PersonTokenCreateParams.PoliticalExposure politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** The relationship that this person has with the Account's business or legal entity. */ + public Builder setRelationship(PersonTokenCreateParams.Relationship relationship) { + this.relationship = relationship; + return this; + } + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + public Builder setScriptAddresses(PersonTokenCreateParams.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The script names (e.g. non-Latin characters) associated with the person. */ + public Builder setScriptNames(PersonTokenCreateParams.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The person's last name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private AdditionalAddress( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + Purpose purpose, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private Purpose purpose; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.AdditionalAddress build() { + return new PersonTokenCreateParams.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.AdditionalAddress#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.AdditionalAddress#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose(PersonTokenCreateParams.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("registered") + REGISTERED("registered"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's full name. */ + @SerializedName("full_name") + String fullName; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** Required. The purpose or type of the additional name. */ + @SerializedName("purpose") + Purpose purpose; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private AdditionalName( + Map extraParams, + String fullName, + String givenName, + Purpose purpose, + String surname) { + this.extraParams = extraParams; + this.fullName = fullName; + this.givenName = givenName; + this.purpose = purpose; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String fullName; + + private String givenName; + + private Purpose purpose; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.AdditionalName build() { + return new PersonTokenCreateParams.AdditionalName( + this.extraParams, this.fullName, this.givenName, this.purpose, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.AdditionalName#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.AdditionalName#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's full name. */ + public Builder setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** Required. The purpose or type of the additional name. */ + public Builder setPurpose(PersonTokenCreateParams.AdditionalName.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("alias") + ALIAS("alias"), + + @SerializedName("maiden") + MAIDEN("maiden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalTermsOfService { + /** + * Details on the Person's acceptance of the [Stripe Services Agreement]; IP, date, and User + * Agent are expanded by Stripe. + */ + @SerializedName("account") + Account account; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private AdditionalTermsOfService(Account account, Map extraParams) { + this.account = account; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Account account; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.AdditionalTermsOfService build() { + return new PersonTokenCreateParams.AdditionalTermsOfService(this.account, this.extraParams); + } + + /** + * Details on the Person's acceptance of the [Stripe Services Agreement]; IP, date, and User + * Agent are expanded by Stripe. + */ + public Builder setAccount(PersonTokenCreateParams.AdditionalTermsOfService.Account account) { + this.account = account; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.AdditionalTermsOfService#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.AdditionalTermsOfService#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Account { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The boolean value indicating if the terms of service have been accepted. */ + @SerializedName("shown_and_accepted") + Boolean shownAndAccepted; + + private Account(Map extraParams, Boolean shownAndAccepted) { + this.extraParams = extraParams; + this.shownAndAccepted = shownAndAccepted; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean shownAndAccepted; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.AdditionalTermsOfService.Account build() { + return new PersonTokenCreateParams.AdditionalTermsOfService.Account( + this.extraParams, this.shownAndAccepted); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.AdditionalTermsOfService.Account#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.AdditionalTermsOfService.Account#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The boolean value indicating if the terms of service have been accepted. */ + public Builder setShownAndAccepted(Boolean shownAndAccepted) { + this.shownAndAccepted = shownAndAccepted; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Address build() { + return new PersonTokenCreateParams.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.Address#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.Address#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth { + /** Required. The day of the birth. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth. */ + @SerializedName("month") + Long month; + + /** Required. The year of birth. */ + @SerializedName("year") + Long year; + + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.DateOfBirth build() { + return new PersonTokenCreateParams.DateOfBirth( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of the birth. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.DateOfBirth#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.DateOfBirth#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that demonstrate proof that this person is authorized to represent the + * company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** One or more documents showing the person’s passport page with photo and personal data. */ + @SerializedName("passport") + Passport passport; + + /** An identifying document showing the person's name, either a passport or local ID card. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where they + * are residing. + */ + @SerializedName("visa") + Visa visa; + + private Documents( + CompanyAuthorization companyAuthorization, + Map extraParams, + Passport passport, + PrimaryVerification primaryVerification, + SecondaryVerification secondaryVerification, + Visa visa) { + this.companyAuthorization = companyAuthorization; + this.extraParams = extraParams; + this.passport = passport; + this.primaryVerification = primaryVerification; + this.secondaryVerification = secondaryVerification; + this.visa = visa; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CompanyAuthorization companyAuthorization; + + private Map extraParams; + + private Passport passport; + + private PrimaryVerification primaryVerification; + + private SecondaryVerification secondaryVerification; + + private Visa visa; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents build() { + return new PersonTokenCreateParams.Documents( + this.companyAuthorization, + this.extraParams, + this.passport, + this.primaryVerification, + this.secondaryVerification, + this.visa); + } + + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + public Builder setCompanyAuthorization( + PersonTokenCreateParams.Documents.CompanyAuthorization companyAuthorization) { + this.companyAuthorization = companyAuthorization; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.Documents#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.Documents#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** One or more documents showing the person’s passport page with photo and personal data. */ + public Builder setPassport(PersonTokenCreateParams.Documents.Passport passport) { + this.passport = passport; + return this; + } + + /** An identifying document showing the person's name, either a passport or local ID card. */ + public Builder setPrimaryVerification( + PersonTokenCreateParams.Documents.PrimaryVerification primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + public Builder setSecondaryVerification( + PersonTokenCreateParams.Documents.SecondaryVerification secondaryVerification) { + this.secondaryVerification = secondaryVerification; + return this; + } + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + public Builder setVisa(PersonTokenCreateParams.Documents.Visa visa) { + this.visa = visa; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyAuthorization(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.CompanyAuthorization build() { + return new PersonTokenCreateParams.Documents.CompanyAuthorization( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.CompanyAuthorization#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.CompanyAuthorization#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.CompanyAuthorization#files} for the field + * documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.CompanyAuthorization#files} for the field + * documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonTokenCreateParams.Documents.CompanyAuthorization.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passport { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Passport(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.Passport build() { + return new PersonTokenCreateParams.Documents.Passport( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.Passport#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.Passport#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonTokenCreateParams.Documents.Passport.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification(Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.PrimaryVerification build() { + return new PersonTokenCreateParams.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.PrimaryVerification#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.PrimaryVerification#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + public Builder setType(PersonTokenCreateParams.Documents.PrimaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack build() { + return new PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack( + this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonTokenCreateParams.Documents.PrimaryVerification.FrontBack#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private SecondaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.SecondaryVerification build() { + return new PersonTokenCreateParams.Documents.SecondaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.SecondaryVerification#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.SecondaryVerification#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + public Builder setType(PersonTokenCreateParams.Documents.SecondaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + String back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + String front; + + private FrontBack(String back, Map extraParams, String front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String back; + + private Map extraParams; + + private String front; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack build() { + return new PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack( + this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonTokenCreateParams.Documents.SecondaryVerification.FrontBack#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Visa { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Visa(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Documents.Visa build() { + return new PersonTokenCreateParams.Documents.Visa( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.Visa#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonTokenCreateParams.Documents.Visa#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonTokenCreateParams.Documents.Visa.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The ID number type of an individual. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + String value; + + private IdNumber(Map extraParams, Type type, String value) { + this.extraParams = extraParams; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + private String value; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.IdNumber build() { + return new PersonTokenCreateParams.IdNumber(this.extraParams, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.IdNumber#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.IdNumber#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The ID number type of an individual. */ + public Builder setType(PersonTokenCreateParams.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_eid") + AE_EID("ae_eid"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuil") + AR_CUIL("ar_cuil"), + + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + + @SerializedName("at_stn") + AT_STN("at_stn"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_brc") + BD_BRC("bd_brc"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("bd_nid") + BD_NID("bd_nid"), + + @SerializedName("be_nrn") + BE_NRN("be_nrn"), + + @SerializedName("bg_ucn") + BG_UCN("bg_ucn"), + + @SerializedName("bn_nric") + BN_NRIC("bn_nric"), + + @SerializedName("br_cpf") + BR_CPF("br_cpf"), + + @SerializedName("ca_sin") + CA_SIN("ca_sin"), + + @SerializedName("ch_oasi") + CH_OASI("ch_oasi"), + + @SerializedName("cl_rut") + CL_RUT("cl_rut"), + + @SerializedName("cn_pp") + CN_PP("cn_pp"), + + @SerializedName("co_nuip") + CO_NUIP("co_nuip"), + + @SerializedName("cr_ci") + CR_CI("cr_ci"), + + @SerializedName("cr_cpf") + CR_CPF("cr_cpf"), + + @SerializedName("cr_dimex") + CR_DIMEX("cr_dimex"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cz_rc") + CZ_RC("cz_rc"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("dk_cpr") + DK_CPR("dk_cpr"), + + @SerializedName("do_cie") + DO_CIE("do_cie"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ec_ci") + EC_CI("ec_ci"), + + @SerializedName("ee_ik") + EE_IK("ee_ik"), + + @SerializedName("es_nif") + ES_NIF("es_nif"), + + @SerializedName("fi_hetu") + FI_HETU("fi_hetu"), + + @SerializedName("fr_nir") + FR_NIR("fr_nir"), + + @SerializedName("gb_nino") + GB_NINO("gb_nino"), + + @SerializedName("gr_afm") + GR_AFM("gr_afm"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_id") + HK_ID("hk_id"), + + @SerializedName("hr_oib") + HR_OIB("hr_oib"), + + @SerializedName("hu_ad") + HU_AD("hu_ad"), + + @SerializedName("id_nik") + ID_NIK("id_nik"), + + @SerializedName("ie_ppsn") + IE_PPSN("ie_ppsn"), + + @SerializedName("is_kt") + IS_KT("is_kt"), + + @SerializedName("it_cf") + IT_CF("it_cf"), + + @SerializedName("jp_inc") + JP_INC("jp_inc"), + + @SerializedName("ke_pin") + KE_PIN("ke_pin"), + + @SerializedName("kz_iin") + KZ_IIN("kz_iin"), + + @SerializedName("li_peid") + LI_PEID("li_peid"), + + @SerializedName("lt_ak") + LT_AK("lt_ak"), + + @SerializedName("lu_nif") + LU_NIF("lu_nif"), + + @SerializedName("lv_pk") + LV_PK("lv_pk"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_nric") + MY_NRIC("my_nric"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("ng_nin") + NG_NIN("ng_nin"), + + @SerializedName("nl_bsn") + NL_BSN("nl_bsn"), + + @SerializedName("no_nin") + NO_NIN("no_nin"), + + @SerializedName("nz_ird") + NZ_IRD("nz_ird"), + + @SerializedName("pe_dni") + PE_DNI("pe_dni"), + + @SerializedName("pk_cnic") + PK_CNIC("pk_cnic"), + + @SerializedName("pk_snic") + PK_SNIC("pk_snic"), + + @SerializedName("pl_pesel") + PL_PESEL("pl_pesel"), + + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + + @SerializedName("ro_cnp") + RO_CNP("ro_cnp"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_pin") + SE_PIN("se_pin"), + + @SerializedName("sg_fin") + SG_FIN("sg_fin"), + + @SerializedName("sg_nric") + SG_NRIC("sg_nric"), + + @SerializedName("sk_dic") + SK_DIC("sk_dic"), + + @SerializedName("th_lc") + TH_LC("th_lc"), + + @SerializedName("th_pin") + TH_PIN("th_pin"), + + @SerializedName("tr_tin") + TR_TIN("tr_tin"), + + @SerializedName("us_itin") + US_ITIN("us_itin"), + + @SerializedName("us_itin_last_4") + US_ITIN_LAST_4("us_itin_last_4"), + + @SerializedName("us_ssn") + US_SSN("us_ssn"), + + @SerializedName("us_ssn_last_4") + US_SSN_LAST_4("us_ssn_last_4"), + + @SerializedName("uy_dni") + UY_DNI("uy_dni"), + + @SerializedName("za_id") + ZA_ID("za_id"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Relationship { + /** Whether the individual is an authorizer of the Account's identity. */ + @SerializedName("authorizer") + Boolean authorizer; + + /** Indicates whether the person is a director of the associated legal entity. */ + @SerializedName("director") + Boolean director; + + /** Indicates whether the person is an executive of the associated legal entity. */ + @SerializedName("executive") + Boolean executive; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Indicates whether the person is a legal guardian of the associated legal entity. */ + @SerializedName("legal_guardian") + Boolean legalGuardian; + + /** Indicates whether the person is an owner of the associated legal entity. */ + @SerializedName("owner") + Boolean owner; + + /** The percentage of ownership the person has in the associated legal entity. */ + @SerializedName("percent_ownership") + String percentOwnership; + + /** Indicates whether the person is a representative of the associated legal entity. */ + @SerializedName("representative") + Boolean representative; + + /** The title or position the person holds in the associated legal entity. */ + @SerializedName("title") + String title; + + private Relationship( + Boolean authorizer, + Boolean director, + Boolean executive, + Map extraParams, + Boolean legalGuardian, + Boolean owner, + String percentOwnership, + Boolean representative, + String title) { + this.authorizer = authorizer; + this.director = director; + this.executive = executive; + this.extraParams = extraParams; + this.legalGuardian = legalGuardian; + this.owner = owner; + this.percentOwnership = percentOwnership; + this.representative = representative; + this.title = title; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean authorizer; + + private Boolean director; + + private Boolean executive; + + private Map extraParams; + + private Boolean legalGuardian; + + private Boolean owner; + + private String percentOwnership; + + private Boolean representative; + + private String title; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.Relationship build() { + return new PersonTokenCreateParams.Relationship( + this.authorizer, + this.director, + this.executive, + this.extraParams, + this.legalGuardian, + this.owner, + this.percentOwnership, + this.representative, + this.title); + } + + /** Whether the individual is an authorizer of the Account's identity. */ + public Builder setAuthorizer(Boolean authorizer) { + this.authorizer = authorizer; + return this; + } + + /** Indicates whether the person is a director of the associated legal entity. */ + public Builder setDirector(Boolean director) { + this.director = director; + return this; + } + + /** Indicates whether the person is an executive of the associated legal entity. */ + public Builder setExecutive(Boolean executive) { + this.executive = executive; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.Relationship#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.Relationship#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Indicates whether the person is a legal guardian of the associated legal entity. */ + public Builder setLegalGuardian(Boolean legalGuardian) { + this.legalGuardian = legalGuardian; + return this; + } + + /** Indicates whether the person is an owner of the associated legal entity. */ + public Builder setOwner(Boolean owner) { + this.owner = owner; + return this; + } + + /** The percentage of ownership the person has in the associated legal entity. */ + public Builder setPercentOwnership(String percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** Indicates whether the person is a representative of the associated legal entity. */ + public Builder setRepresentative(Boolean representative) { + this.representative = representative; + return this; + } + + /** The title or position the person holds in the associated legal entity. */ + public Builder setTitle(String title) { + this.title = title; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptAddresses build() { + return new PersonTokenCreateParams.ScriptAddresses(this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.ScriptAddresses#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.ScriptAddresses#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana(PersonTokenCreateParams.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji(PersonTokenCreateParams.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptAddresses.Kana build() { + return new PersonTokenCreateParams.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptAddresses.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptAddresses.Kana#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + String line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + + private Kanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptAddresses.Kanji build() { + return new PersonTokenCreateParams.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptAddresses.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptAddresses.Kanji#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptNames build() { + return new PersonTokenCreateParams.ScriptNames(this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonTokenCreateParams.ScriptNames#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonTokenCreateParams.ScriptNames#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Persons name in kana script. */ + public Builder setKana(PersonTokenCreateParams.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Persons name in kanji script. */ + public Builder setKanji(PersonTokenCreateParams.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kana(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptNames.Kana build() { + return new PersonTokenCreateParams.ScriptNames.Kana( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + String givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + String surname; + + private Kanji(Map extraParams, String givenName, String surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String givenName; + + private String surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonTokenCreateParams.ScriptNames.Kanji build() { + return new PersonTokenCreateParams.ScriptNames.Kanji( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonTokenCreateParams.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + } + } + } + + public enum LegalGender implements ApiRequestParams.EnumParam { + @SerializedName("female") + FEMALE("female"), + + @SerializedName("male") + MALE("male"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LegalGender(String value) { + this.value = value; + } + } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java new file mode 100644 index 00000000000..c886d483511 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java @@ -0,0 +1,3771 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.core.accounts; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.time.Instant; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PersonUpdateParams extends ApiRequestParams { + /** Additional addresses associated with the person. */ + @SerializedName("additional_addresses") + List additionalAddresses; + + /** Additional names (e.g. aliases) associated with the person. */ + @SerializedName("additional_names") + List additionalNames; + + /** Attestations of accepted terms of service agreements. */ + @SerializedName("additional_terms_of_service") + AdditionalTermsOfService additionalTermsOfService; + + /** The primary address associated with the person. */ + @SerializedName("address") + Address address; + + /** The person's date of birth. */ + @SerializedName("date_of_birth") + DateOfBirth dateOfBirth; + + /** Documents that may be submitted to satisfy various informational requests. */ + @SerializedName("documents") + Documents documents; + + /** Email. */ + @SerializedName("email") + Object email; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first name. */ + @SerializedName("given_name") + Object givenName; + + /** The identification numbers (e.g., SSN) associated with the person. */ + @SerializedName("id_numbers") + List idNumbers; + + /** + * The person's gender (International regulations require either "male" or + * "female"). + */ + @SerializedName("legal_gender") + LegalGender legalGender; + + /** + * Set of key-value pairs that you can attach to an object. This can be useful for storing + * additional information about the object in a structured format. + */ + @SerializedName("metadata") + Map metadata; + + /** The nationalities (countries) this person is associated with. */ + @SerializedName("nationalities") + List nationalities; + + /** The person token generated by the person token api. */ + @SerializedName("person_token") + Object personToken; + + /** The phone number for this person. */ + @SerializedName("phone") + Object phone; + + /** The person's political exposure. */ + @SerializedName("political_exposure") + PoliticalExposure politicalExposure; + + /** The relationship that this person has with the Account's business or legal entity. */ + @SerializedName("relationship") + Relationship relationship; + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + @SerializedName("script_addresses") + ScriptAddresses scriptAddresses; + + /** The script names (e.g. non-Latin characters) associated with the person. */ + @SerializedName("script_names") + ScriptNames scriptNames; + + /** The person's last name. */ + @SerializedName("surname") + Object surname; + + private PersonUpdateParams( + List additionalAddresses, + List additionalNames, + AdditionalTermsOfService additionalTermsOfService, + Address address, + DateOfBirth dateOfBirth, + Documents documents, + Object email, + Map extraParams, + Object givenName, + List idNumbers, + LegalGender legalGender, + Map metadata, + List nationalities, + Object personToken, + Object phone, + PoliticalExposure politicalExposure, + Relationship relationship, + ScriptAddresses scriptAddresses, + ScriptNames scriptNames, + Object surname) { + this.additionalAddresses = additionalAddresses; + this.additionalNames = additionalNames; + this.additionalTermsOfService = additionalTermsOfService; + this.address = address; + this.dateOfBirth = dateOfBirth; + this.documents = documents; + this.email = email; + this.extraParams = extraParams; + this.givenName = givenName; + this.idNumbers = idNumbers; + this.legalGender = legalGender; + this.metadata = metadata; + this.nationalities = nationalities; + this.personToken = personToken; + this.phone = phone; + this.politicalExposure = politicalExposure; + this.relationship = relationship; + this.scriptAddresses = scriptAddresses; + this.scriptNames = scriptNames; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List additionalAddresses; + + private List additionalNames; + + private AdditionalTermsOfService additionalTermsOfService; + + private Address address; + + private DateOfBirth dateOfBirth; + + private Documents documents; + + private Object email; + + private Map extraParams; + + private Object givenName; + + private List idNumbers; + + private LegalGender legalGender; + + private Map metadata; + + private List nationalities; + + private Object personToken; + + private Object phone; + + private PoliticalExposure politicalExposure; + + private Relationship relationship; + + private ScriptAddresses scriptAddresses; + + private ScriptNames scriptNames; + + private Object surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams build() { + return new PersonUpdateParams( + this.additionalAddresses, + this.additionalNames, + this.additionalTermsOfService, + this.address, + this.dateOfBirth, + this.documents, + this.email, + this.extraParams, + this.givenName, + this.idNumbers, + this.legalGender, + this.metadata, + this.nationalities, + this.personToken, + this.phone, + this.politicalExposure, + this.relationship, + this.scriptAddresses, + this.scriptNames, + this.surname); + } + + /** + * Add an element to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PersonUpdateParams#additionalAddresses} for the field documentation. + */ + public Builder addAdditionalAddress(PersonUpdateParams.AdditionalAddress element) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.add(element); + return this; + } + + /** + * Add all elements to `additionalAddresses` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PersonUpdateParams#additionalAddresses} for the field documentation. + */ + public Builder addAllAdditionalAddress(List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + + /** + * Add an element to `additionalNames` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams#additionalNames} for the field documentation. + */ + public Builder addAdditionalName(PersonUpdateParams.AdditionalName element) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.add(element); + return this; + } + + /** + * Add all elements to `additionalNames` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams#additionalNames} for the field documentation. + */ + public Builder addAllAdditionalName(List elements) { + if (this.additionalNames == null) { + this.additionalNames = new ArrayList<>(); + } + this.additionalNames.addAll(elements); + return this; + } + + /** Attestations of accepted terms of service agreements. */ + public Builder setAdditionalTermsOfService( + PersonUpdateParams.AdditionalTermsOfService additionalTermsOfService) { + this.additionalTermsOfService = additionalTermsOfService; + return this; + } + + /** The primary address associated with the person. */ + public Builder setAddress(PersonUpdateParams.Address address) { + this.address = address; + return this; + } + + /** The person's date of birth. */ + public Builder setDateOfBirth(PersonUpdateParams.DateOfBirth dateOfBirth) { + this.dateOfBirth = dateOfBirth; + return this; + } + + /** Documents that may be submitted to satisfy various informational requests. */ + public Builder setDocuments(PersonUpdateParams.Documents documents) { + this.documents = documents; + return this; + } + + /** Email. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** Email. */ + public Builder setEmail(EmptyParam email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's first name. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + + /** + * Add an element to `idNumbers` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams#idNumbers} for the field documentation. + */ + public Builder addIdNumber(PersonUpdateParams.IdNumber element) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.add(element); + return this; + } + + /** + * Add all elements to `idNumbers` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams#idNumbers} for the field documentation. + */ + public Builder addAllIdNumber(List elements) { + if (this.idNumbers == null) { + this.idNumbers = new ArrayList<>(); + } + this.idNumbers.addAll(elements); + return this; + } + + /** + * The person's gender (International regulations require either "male" or + * "female"). + */ + public Builder setLegalGender(PersonUpdateParams.LegalGender legalGender) { + this.legalGender = legalGender; + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * Map values can only be one of the following types: `String`, `EmptyParam`. See {@link + * PersonUpdateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + + /** + * Add an element to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams#nationalities} for the field documentation. + */ + public Builder addNationality(String element) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.add(element); + return this; + } + + /** + * Add all elements to `nationalities` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams#nationalities} for the field documentation. + */ + public Builder addAllNationality(List elements) { + if (this.nationalities == null) { + this.nationalities = new ArrayList<>(); + } + this.nationalities.addAll(elements); + return this; + } + + /** The person token generated by the person token api. */ + public Builder setPersonToken(String personToken) { + this.personToken = personToken; + return this; + } + + /** The person token generated by the person token api. */ + public Builder setPersonToken(EmptyParam personToken) { + this.personToken = personToken; + return this; + } + + /** The phone number for this person. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The phone number for this person. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } + + /** The person's political exposure. */ + public Builder setPoliticalExposure(PersonUpdateParams.PoliticalExposure politicalExposure) { + this.politicalExposure = politicalExposure; + return this; + } + + /** The relationship that this person has with the Account's business or legal entity. */ + public Builder setRelationship(PersonUpdateParams.Relationship relationship) { + this.relationship = relationship; + return this; + } + + /** The script addresses (e.g., non-Latin characters) associated with the person. */ + public Builder setScriptAddresses(PersonUpdateParams.ScriptAddresses scriptAddresses) { + this.scriptAddresses = scriptAddresses; + return this; + } + + /** The script names (e.g. non-Latin characters) associated with the person. */ + public Builder setScriptNames(PersonUpdateParams.ScriptNames scriptNames) { + this.scriptNames = scriptNames; + return this; + } + + /** The person's last name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + + /** The person's last name. */ + public Builder setSurname(EmptyParam surname) { + this.surname = surname; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalAddress { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** Required. Purpose of additional address. */ + @SerializedName("purpose") + Purpose purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private AdditionalAddress( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Purpose purpose, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.purpose = purpose; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Purpose purpose; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.AdditionalAddress build() { + return new PersonUpdateParams.AdditionalAddress( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.purpose, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.AdditionalAddress#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.AdditionalAddress#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Required. Purpose of additional address. */ + public Builder setPurpose(PersonUpdateParams.AdditionalAddress.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("registered") + REGISTERED("registered"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalName { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's full name. */ + @SerializedName("full_name") + Object fullName; + + /** The person's first or given name. */ + @SerializedName("given_name") + Object givenName; + + /** Required. The purpose or type of the additional name. */ + @SerializedName("purpose") + Purpose purpose; + + /** The person's last or family name. */ + @SerializedName("surname") + Object surname; + + private AdditionalName( + Map extraParams, + Object fullName, + Object givenName, + Purpose purpose, + Object surname) { + this.extraParams = extraParams; + this.fullName = fullName; + this.givenName = givenName; + this.purpose = purpose; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object fullName; + + private Object givenName; + + private Purpose purpose; + + private Object surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.AdditionalName build() { + return new PersonUpdateParams.AdditionalName( + this.extraParams, this.fullName, this.givenName, this.purpose, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.AdditionalName#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.AdditionalName#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's full name. */ + public Builder setFullName(String fullName) { + this.fullName = fullName; + return this; + } + + /** The person's full name. */ + public Builder setFullName(EmptyParam fullName) { + this.fullName = fullName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + + /** Required. The purpose or type of the additional name. */ + public Builder setPurpose(PersonUpdateParams.AdditionalName.Purpose purpose) { + this.purpose = purpose; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(EmptyParam surname) { + this.surname = surname; + return this; + } + } + + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("alias") + ALIAS("alias"), + + @SerializedName("maiden") + MAIDEN("maiden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalTermsOfService { + /** Stripe terms of service agreement. */ + @SerializedName("account") + Account account; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private AdditionalTermsOfService(Account account, Map extraParams) { + this.account = account; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Account account; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.AdditionalTermsOfService build() { + return new PersonUpdateParams.AdditionalTermsOfService(this.account, this.extraParams); + } + + /** Stripe terms of service agreement. */ + public Builder setAccount(PersonUpdateParams.AdditionalTermsOfService.Account account) { + this.account = account; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.AdditionalTermsOfService#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.AdditionalTermsOfService#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Account { + /** + * The time when the Account's representative accepted the terms of service. Represented as a + * RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("date") + Instant date; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The IP address from which the Account's representative accepted the terms of service. */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the Account's representative accepted the terms of + * service. + */ + @SerializedName("user_agent") + Object userAgent; + + private Account(Instant date, Map extraParams, Object ip, Object userAgent) { + this.date = date; + this.extraParams = extraParams; + this.ip = ip; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.AdditionalTermsOfService.Account build() { + return new PersonUpdateParams.AdditionalTermsOfService.Account( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The time when the Account's representative accepted the terms of service. Represented as + * a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + public Builder setDate(Instant date) { + this.date = date; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.AdditionalTermsOfService.Account#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.AdditionalTermsOfService.Account#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The IP address from which the Account's representative accepted the terms of service. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The IP address from which the Account's representative accepted the terms of service. */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the terms + * of service. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the Account's representative accepted the terms + * of service. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Address( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Address build() { + return new PersonUpdateParams.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.Address#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.Address#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DateOfBirth { + /** Required. The day of the birth. */ + @SerializedName("day") + Long day; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The month of birth. */ + @SerializedName("month") + Long month; + + /** Required. The year of birth. */ + @SerializedName("year") + Long year; + + private DateOfBirth(Long day, Map extraParams, Long month, Long year) { + this.day = day; + this.extraParams = extraParams; + this.month = month; + this.year = year; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long day; + + private Map extraParams; + + private Long month; + + private Long year; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.DateOfBirth build() { + return new PersonUpdateParams.DateOfBirth( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of the birth. */ + public Builder setDay(Long day) { + this.day = day; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.DateOfBirth#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.DateOfBirth#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The month of birth. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The year of birth. */ + public Builder setYear(Long year) { + this.year = year; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Documents { + /** + * One or more documents that demonstrate proof that this person is authorized to represent the + * company. + */ + @SerializedName("company_authorization") + CompanyAuthorization companyAuthorization; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** One or more documents showing the person’s passport page with photo and personal data. */ + @SerializedName("passport") + Passport passport; + + /** An identifying document showing the person's name, either a passport or local ID card. */ + @SerializedName("primary_verification") + PrimaryVerification primaryVerification; + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + @SerializedName("secondary_verification") + SecondaryVerification secondaryVerification; + + /** + * One or more documents showing the person’s visa required for living in the country where they + * are residing. + */ + @SerializedName("visa") + Visa visa; + + private Documents( + CompanyAuthorization companyAuthorization, + Map extraParams, + Passport passport, + PrimaryVerification primaryVerification, + SecondaryVerification secondaryVerification, + Visa visa) { + this.companyAuthorization = companyAuthorization; + this.extraParams = extraParams; + this.passport = passport; + this.primaryVerification = primaryVerification; + this.secondaryVerification = secondaryVerification; + this.visa = visa; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CompanyAuthorization companyAuthorization; + + private Map extraParams; + + private Passport passport; + + private PrimaryVerification primaryVerification; + + private SecondaryVerification secondaryVerification; + + private Visa visa; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Documents build() { + return new PersonUpdateParams.Documents( + this.companyAuthorization, + this.extraParams, + this.passport, + this.primaryVerification, + this.secondaryVerification, + this.visa); + } + + /** + * One or more documents that demonstrate proof that this person is authorized to represent + * the company. + */ + public Builder setCompanyAuthorization( + PersonUpdateParams.Documents.CompanyAuthorization companyAuthorization) { + this.companyAuthorization = companyAuthorization; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.Documents#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.Documents#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** One or more documents showing the person’s passport page with photo and personal data. */ + public Builder setPassport(PersonUpdateParams.Documents.Passport passport) { + this.passport = passport; + return this; + } + + /** An identifying document showing the person's name, either a passport or local ID card. */ + public Builder setPrimaryVerification( + PersonUpdateParams.Documents.PrimaryVerification primaryVerification) { + this.primaryVerification = primaryVerification; + return this; + } + + /** + * A document showing address, either a passport, local ID card, or utility bill from a + * well-known utility company. + */ + public Builder setSecondaryVerification( + PersonUpdateParams.Documents.SecondaryVerification secondaryVerification) { + this.secondaryVerification = secondaryVerification; + return this; + } + + /** + * One or more documents showing the person’s visa required for living in the country where + * they are residing. + */ + public Builder setVisa(PersonUpdateParams.Documents.Visa visa) { + this.visa = visa; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CompanyAuthorization { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private CompanyAuthorization(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Documents.CompanyAuthorization build() { + return new PersonUpdateParams.Documents.CompanyAuthorization( + this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.CompanyAuthorization#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.CompanyAuthorization#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams.Documents.CompanyAuthorization#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams.Documents.CompanyAuthorization#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonUpdateParams.Documents.CompanyAuthorization.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Passport { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Passport(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Documents.Passport build() { + return new PersonUpdateParams.Documents.Passport(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.Passport#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams.Documents.Passport#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams.Documents.Passport#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonUpdateParams.Documents.Passport.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrimaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private PrimaryVerification(Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Documents.PrimaryVerification build() { + return new PersonUpdateParams.Documents.PrimaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.PrimaryVerification#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.PrimaryVerification#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + PersonUpdateParams.Documents.PrimaryVerification.FrontBack frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + public Builder setType(PersonUpdateParams.Documents.PrimaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + Object back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + Object front; + + private FrontBack(Object back, Map extraParams, Object front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object back; + + private Map extraParams; + + private Object front; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Documents.PrimaryVerification.FrontBack build() { + return new PersonUpdateParams.Documents.PrimaryVerification.FrontBack( + this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(EmptyParam back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.PrimaryVerification.FrontBack#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setFront(EmptyParam front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SecondaryVerification { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + @SerializedName("front_back") + FrontBack frontBack; + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + @SerializedName("type") + Type type; + + private SecondaryVerification( + Map extraParams, FrontBack frontBack, Type type) { + this.extraParams = extraParams; + this.frontBack = frontBack; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private FrontBack frontBack; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Documents.SecondaryVerification build() { + return new PersonUpdateParams.Documents.SecondaryVerification( + this.extraParams, this.frontBack, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.SecondaryVerification#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.SecondaryVerification#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The file upload tokens + * referring to each side of the document. + */ + public Builder setFrontBack( + PersonUpdateParams.Documents.SecondaryVerification.FrontBack frontBack) { + this.frontBack = frontBack; + return this; + } + + /** + * Required. The format of the verification document. Currently supports + * {@code front_back} only. + */ + public Builder setType(PersonUpdateParams.Documents.SecondaryVerification.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrontBack { + /** + * A file upload token + * representing the back of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("back") + Object back; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A file upload token + * representing the front of the verification document. The purpose of the uploaded file + * should be 'identity_document'. The uploaded file needs to be a color image (smaller than + * 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + */ + @SerializedName("front") + Object front; + + private FrontBack(Object back, Map extraParams, Object front) { + this.back = back; + this.extraParams = extraParams; + this.front = front; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object back; + + private Map extraParams; + + private Object front; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Documents.SecondaryVerification.FrontBack build() { + return new PersonUpdateParams.Documents.SecondaryVerification.FrontBack( + this.back, this.extraParams, this.front); + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(String back) { + this.back = back; + return this; + } + + /** + * A file upload + * token representing the back of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setBack(EmptyParam back) { + this.back = back; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonUpdateParams.Documents.SecondaryVerification.FrontBack#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PersonUpdateParams.Documents.SecondaryVerification.FrontBack#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setFront(String front) { + this.front = front; + return this; + } + + /** + * A file upload + * token representing the front of the verification document. The purpose of the uploaded + * file should be 'identity_document'. The uploaded file needs to be a color image + * (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in + * size. + */ + public Builder setFront(EmptyParam front) { + this.front = front; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("front_back") + FRONT_BACK("front_back"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Visa { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. One or more document IDs returned by a file upload with a + * purpose value of {@code account_requirement}. + */ + @SerializedName("files") + List files; + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + @SerializedName("type") + Type type; + + private Visa(Map extraParams, List files, Type type) { + this.extraParams = extraParams; + this.files = files; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Documents.Visa build() { + return new PersonUpdateParams.Documents.Visa(this.extraParams, this.files, this.type); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.Documents.Visa#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams.Documents.Visa#files} for the field documentation. + */ + public Builder addFile(String element) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.add(element); + return this; + } + + /** + * Add all elements to `files` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PersonUpdateParams.Documents.Visa#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + + /** + * Required. The format of the document. Currently supports {@code files} + * only. + */ + public Builder setType(PersonUpdateParams.Documents.Visa.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("files") + FILES("files"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class IdNumber { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. The ID number type of an individual. */ + @SerializedName("type") + Type type; + + /** Required. The value of the ID number. */ + @SerializedName("value") + Object value; + + private IdNumber(Map extraParams, Type type, Object value) { + this.extraParams = extraParams; + this.type = type; + this.value = value; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + private Object value; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.IdNumber build() { + return new PersonUpdateParams.IdNumber(this.extraParams, this.type, this.value); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.IdNumber#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.IdNumber#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. The ID number type of an individual. */ + public Builder setType(PersonUpdateParams.IdNumber.Type type) { + this.type = type; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** Required. The value of the ID number. */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("ae_eid") + AE_EID("ae_eid"), + + @SerializedName("ao_nif") + AO_NIF("ao_nif"), + + @SerializedName("ar_cuil") + AR_CUIL("ar_cuil"), + + @SerializedName("ar_dni") + AR_DNI("ar_dni"), + + @SerializedName("at_stn") + AT_STN("at_stn"), + + @SerializedName("az_tin") + AZ_TIN("az_tin"), + + @SerializedName("bd_brc") + BD_BRC("bd_brc"), + + @SerializedName("bd_etin") + BD_ETIN("bd_etin"), + + @SerializedName("bd_nid") + BD_NID("bd_nid"), + + @SerializedName("be_nrn") + BE_NRN("be_nrn"), + + @SerializedName("bg_ucn") + BG_UCN("bg_ucn"), + + @SerializedName("bn_nric") + BN_NRIC("bn_nric"), + + @SerializedName("br_cpf") + BR_CPF("br_cpf"), + + @SerializedName("ca_sin") + CA_SIN("ca_sin"), + + @SerializedName("ch_oasi") + CH_OASI("ch_oasi"), + + @SerializedName("cl_rut") + CL_RUT("cl_rut"), + + @SerializedName("cn_pp") + CN_PP("cn_pp"), + + @SerializedName("co_nuip") + CO_NUIP("co_nuip"), + + @SerializedName("cr_ci") + CR_CI("cr_ci"), + + @SerializedName("cr_cpf") + CR_CPF("cr_cpf"), + + @SerializedName("cr_dimex") + CR_DIMEX("cr_dimex"), + + @SerializedName("cr_nite") + CR_NITE("cr_nite"), + + @SerializedName("cy_tic") + CY_TIC("cy_tic"), + + @SerializedName("cz_rc") + CZ_RC("cz_rc"), + + @SerializedName("de_stn") + DE_STN("de_stn"), + + @SerializedName("dk_cpr") + DK_CPR("dk_cpr"), + + @SerializedName("do_cie") + DO_CIE("do_cie"), + + @SerializedName("do_rcn") + DO_RCN("do_rcn"), + + @SerializedName("ec_ci") + EC_CI("ec_ci"), + + @SerializedName("ee_ik") + EE_IK("ee_ik"), + + @SerializedName("es_nif") + ES_NIF("es_nif"), + + @SerializedName("fi_hetu") + FI_HETU("fi_hetu"), + + @SerializedName("fr_nir") + FR_NIR("fr_nir"), + + @SerializedName("gb_nino") + GB_NINO("gb_nino"), + + @SerializedName("gr_afm") + GR_AFM("gr_afm"), + + @SerializedName("gt_nit") + GT_NIT("gt_nit"), + + @SerializedName("hk_id") + HK_ID("hk_id"), + + @SerializedName("hr_oib") + HR_OIB("hr_oib"), + + @SerializedName("hu_ad") + HU_AD("hu_ad"), + + @SerializedName("id_nik") + ID_NIK("id_nik"), + + @SerializedName("ie_ppsn") + IE_PPSN("ie_ppsn"), + + @SerializedName("is_kt") + IS_KT("is_kt"), + + @SerializedName("it_cf") + IT_CF("it_cf"), + + @SerializedName("jp_inc") + JP_INC("jp_inc"), + + @SerializedName("ke_pin") + KE_PIN("ke_pin"), + + @SerializedName("kz_iin") + KZ_IIN("kz_iin"), + + @SerializedName("li_peid") + LI_PEID("li_peid"), + + @SerializedName("lt_ak") + LT_AK("lt_ak"), + + @SerializedName("lu_nif") + LU_NIF("lu_nif"), + + @SerializedName("lv_pk") + LV_PK("lv_pk"), + + @SerializedName("mx_rfc") + MX_RFC("mx_rfc"), + + @SerializedName("my_nric") + MY_NRIC("my_nric"), + + @SerializedName("mz_nuit") + MZ_NUIT("mz_nuit"), + + @SerializedName("ng_nin") + NG_NIN("ng_nin"), + + @SerializedName("nl_bsn") + NL_BSN("nl_bsn"), + + @SerializedName("no_nin") + NO_NIN("no_nin"), + + @SerializedName("nz_ird") + NZ_IRD("nz_ird"), + + @SerializedName("pe_dni") + PE_DNI("pe_dni"), + + @SerializedName("pk_cnic") + PK_CNIC("pk_cnic"), + + @SerializedName("pk_snic") + PK_SNIC("pk_snic"), + + @SerializedName("pl_pesel") + PL_PESEL("pl_pesel"), + + @SerializedName("pt_nif") + PT_NIF("pt_nif"), + + @SerializedName("ro_cnp") + RO_CNP("ro_cnp"), + + @SerializedName("sa_tin") + SA_TIN("sa_tin"), + + @SerializedName("se_pin") + SE_PIN("se_pin"), + + @SerializedName("sg_fin") + SG_FIN("sg_fin"), + + @SerializedName("sg_nric") + SG_NRIC("sg_nric"), + + @SerializedName("sk_dic") + SK_DIC("sk_dic"), + + @SerializedName("th_lc") + TH_LC("th_lc"), + + @SerializedName("th_pin") + TH_PIN("th_pin"), + + @SerializedName("tr_tin") + TR_TIN("tr_tin"), + + @SerializedName("us_itin") + US_ITIN("us_itin"), + + @SerializedName("us_itin_last_4") + US_ITIN_LAST_4("us_itin_last_4"), + + @SerializedName("us_ssn") + US_SSN("us_ssn"), + + @SerializedName("us_ssn_last_4") + US_SSN_LAST_4("us_ssn_last_4"), + + @SerializedName("uy_dni") + UY_DNI("uy_dni"), + + @SerializedName("za_id") + ZA_ID("za_id"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Relationship { + /** Whether the individual is an authorizer of the Account's identity. */ + @SerializedName("authorizer") + Boolean authorizer; + + /** Indicates whether the person is a director of the associated legal entity. */ + @SerializedName("director") + Boolean director; + + /** Indicates whether the person is an executive of the associated legal entity. */ + @SerializedName("executive") + Boolean executive; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Indicates whether the person is a legal guardian of the associated legal entity. */ + @SerializedName("legal_guardian") + Boolean legalGuardian; + + /** Indicates whether the person is an owner of the associated legal entity. */ + @SerializedName("owner") + Boolean owner; + + /** The percentage of ownership the person has in the associated legal entity. */ + @SerializedName("percent_ownership") + Object percentOwnership; + + /** Indicates whether the person is a representative of the associated legal entity. */ + @SerializedName("representative") + Boolean representative; + + /** The title or position the person holds in the associated legal entity. */ + @SerializedName("title") + Object title; + + private Relationship( + Boolean authorizer, + Boolean director, + Boolean executive, + Map extraParams, + Boolean legalGuardian, + Boolean owner, + Object percentOwnership, + Boolean representative, + Object title) { + this.authorizer = authorizer; + this.director = director; + this.executive = executive; + this.extraParams = extraParams; + this.legalGuardian = legalGuardian; + this.owner = owner; + this.percentOwnership = percentOwnership; + this.representative = representative; + this.title = title; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean authorizer; + + private Boolean director; + + private Boolean executive; + + private Map extraParams; + + private Boolean legalGuardian; + + private Boolean owner; + + private Object percentOwnership; + + private Boolean representative; + + private Object title; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.Relationship build() { + return new PersonUpdateParams.Relationship( + this.authorizer, + this.director, + this.executive, + this.extraParams, + this.legalGuardian, + this.owner, + this.percentOwnership, + this.representative, + this.title); + } + + /** Whether the individual is an authorizer of the Account's identity. */ + public Builder setAuthorizer(Boolean authorizer) { + this.authorizer = authorizer; + return this; + } + + /** Indicates whether the person is a director of the associated legal entity. */ + public Builder setDirector(Boolean director) { + this.director = director; + return this; + } + + /** Indicates whether the person is an executive of the associated legal entity. */ + public Builder setExecutive(Boolean executive) { + this.executive = executive; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.Relationship#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.Relationship#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Indicates whether the person is a legal guardian of the associated legal entity. */ + public Builder setLegalGuardian(Boolean legalGuardian) { + this.legalGuardian = legalGuardian; + return this; + } + + /** Indicates whether the person is an owner of the associated legal entity. */ + public Builder setOwner(Boolean owner) { + this.owner = owner; + return this; + } + + /** The percentage of ownership the person has in the associated legal entity. */ + public Builder setPercentOwnership(String percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** The percentage of ownership the person has in the associated legal entity. */ + public Builder setPercentOwnership(EmptyParam percentOwnership) { + this.percentOwnership = percentOwnership; + return this; + } + + /** Indicates whether the person is a representative of the associated legal entity. */ + public Builder setRepresentative(Boolean representative) { + this.representative = representative; + return this; + } + + /** The title or position the person holds in the associated legal entity. */ + public Builder setTitle(String title) { + this.title = title; + return this; + } + + /** The title or position the person holds in the associated legal entity. */ + public Builder setTitle(EmptyParam title) { + this.title = title; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptAddresses { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Kana Address. */ + @SerializedName("kana") + Kana kana; + + /** Kanji Address. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptAddresses(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.ScriptAddresses build() { + return new PersonUpdateParams.ScriptAddresses(this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.ScriptAddresses#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.ScriptAddresses#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Kana Address. */ + public Builder setKana(PersonUpdateParams.ScriptAddresses.Kana kana) { + this.kana = kana; + return this; + } + + /** Kanji Address. */ + public Builder setKanji(PersonUpdateParams.ScriptAddresses.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Kana( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.ScriptAddresses.Kana build() { + return new PersonUpdateParams.ScriptAddresses.Kana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.ScriptAddresses.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.ScriptAddresses.Kana#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1 (e.g., street, PO Box, or company name). */ + @SerializedName("line1") + Object line1; + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + Object state; + + /** Town or district. */ + @SerializedName("town") + Object town; + + private Kanji( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.ScriptAddresses.Kanji build() { + return new PersonUpdateParams.ScriptAddresses.Kanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.ScriptAddresses.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.ScriptAddresses.Kanji#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1 (e.g., street, PO Box, or company name). */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2 (e.g., apartment, suite, unit, or building). */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or district. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or district. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ScriptNames { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Persons name in kana script. */ + @SerializedName("kana") + Kana kana; + + /** Persons name in kanji script. */ + @SerializedName("kanji") + Kanji kanji; + + private ScriptNames(Map extraParams, Kana kana, Kanji kanji) { + this.extraParams = extraParams; + this.kana = kana; + this.kanji = kanji; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Kana kana; + + private Kanji kanji; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.ScriptNames build() { + return new PersonUpdateParams.ScriptNames(this.extraParams, this.kana, this.kanji); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PersonUpdateParams.ScriptNames#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PersonUpdateParams.ScriptNames#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Persons name in kana script. */ + public Builder setKana(PersonUpdateParams.ScriptNames.Kana kana) { + this.kana = kana; + return this; + } + + /** Persons name in kanji script. */ + public Builder setKanji(PersonUpdateParams.ScriptNames.Kanji kanji) { + this.kanji = kanji; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kana { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + Object givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + Object surname; + + private Kana(Map extraParams, Object givenName, Object surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object givenName; + + private Object surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.ScriptNames.Kana build() { + return new PersonUpdateParams.ScriptNames.Kana( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.ScriptNames.Kana#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(EmptyParam surname) { + this.surname = surname; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Kanji { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The person's first or given name. */ + @SerializedName("given_name") + Object givenName; + + /** The person's last or family name. */ + @SerializedName("surname") + Object surname; + + private Kanji(Map extraParams, Object givenName, Object surname) { + this.extraParams = extraParams; + this.givenName = givenName; + this.surname = surname; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object givenName; + + private Object surname; + + /** Finalize and obtain parameter instance from this builder. */ + public PersonUpdateParams.ScriptNames.Kanji build() { + return new PersonUpdateParams.ScriptNames.Kanji( + this.extraParams, this.givenName, this.surname); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PersonUpdateParams.ScriptNames.Kanji#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(String givenName) { + this.givenName = givenName; + return this; + } + + /** The person's first or given name. */ + public Builder setGivenName(EmptyParam givenName) { + this.givenName = givenName; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(String surname) { + this.surname = surname; + return this; + } + + /** The person's last or family name. */ + public Builder setSurname(EmptyParam surname) { + this.surname = surname; + return this; + } + } + } + } + + public enum LegalGender implements ApiRequestParams.EnumParam { + @SerializedName("female") + FEMALE("female"), + + @SerializedName("male") + MALE("male"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LegalGender(String value) { + this.value = value; + } + } + + public enum PoliticalExposure implements ApiRequestParams.EnumParam { + @SerializedName("existing") + EXISTING("existing"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PoliticalExposure(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/service/InvoiceItemService.java b/src/main/java/com/stripe/service/InvoiceItemService.java index e09c088c002..7d63633d91a 100644 --- a/src/main/java/com/stripe/service/InvoiceItemService.java +++ b/src/main/java/com/stripe/service/InvoiceItemService.java @@ -149,6 +149,20 @@ public StripeCollection list(InvoiceItemListParams params, RequestO public InvoiceItem create(InvoiceItemCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } + /** + * Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is + * specified, the item will be on the next invoice created for the customer specified. + */ + public InvoiceItem create(RequestOptions options) throws StripeException { + return create((InvoiceItemCreateParams) null, options); + } + /** + * Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is + * specified, the item will be on the next invoice created for the customer specified. + */ + public InvoiceItem create() throws StripeException { + return create((InvoiceItemCreateParams) null, (RequestOptions) null); + } /** * Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is * specified, the item will be on the next invoice created for the customer specified. diff --git a/src/main/java/com/stripe/service/PaymentMethodService.java b/src/main/java/com/stripe/service/PaymentMethodService.java index d8cb6adba68..377a89efaf7 100644 --- a/src/main/java/com/stripe/service/PaymentMethodService.java +++ b/src/main/java/com/stripe/service/PaymentMethodService.java @@ -24,40 +24,20 @@ public PaymentMethodService(StripeResponseGetter responseGetter) { super(responseGetter); } - /** - * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods - * attached to a Customer for payments, you should use the List a Customer’s - * PaymentMethods API instead. - */ + /** Returns a list of all PaymentMethods. */ public StripeCollection list(PaymentMethodListParams params) throws StripeException { return list(params, (RequestOptions) null); } - /** - * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods - * attached to a Customer for payments, you should use the List a Customer’s - * PaymentMethods API instead. - */ + /** Returns a list of all PaymentMethods. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((PaymentMethodListParams) null, options); } - /** - * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods - * attached to a Customer for payments, you should use the List a Customer’s - * PaymentMethods API instead. - */ + /** Returns a list of all PaymentMethods. */ public StripeCollection list() throws StripeException { return list((PaymentMethodListParams) null, (RequestOptions) null); } - /** - * Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods - * attached to a Customer for payments, you should use the List a Customer’s - * PaymentMethods API instead. - */ + /** Returns a list of all PaymentMethods. */ public StripeCollection list( PaymentMethodListParams params, RequestOptions options) throws StripeException { String path = "/v1/payment_methods"; @@ -239,6 +219,46 @@ public PaymentMethod attach(String paymentMethod, PaymentMethodAttachParams para throws StripeException { return attach(paymentMethod, params, (RequestOptions) null); } + /** + * Attaches a PaymentMethod object to a Customer. + * + *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage. + * These approaches will perform any necessary steps to set up the PaymentMethod for future + * payments. Using the {@code /v1/payment_methods/:id/attach} endpoint without first using a + * SetupIntent or PaymentIntent with {@code setup_future_usage} does not optimize the + * PaymentMethod for future use, which makes later declines and payment friction more likely. See + * Optimizing cards for + * future payments for more information about setting up future payments. + * + *

To use this PaymentMethod as the default for invoice or subscription payments, set {@code + * invoice_settings.default_payment_method}, on the Customer to the PaymentMethod’s ID. + */ + public PaymentMethod attach(String paymentMethod, RequestOptions options) throws StripeException { + return attach(paymentMethod, (PaymentMethodAttachParams) null, options); + } + /** + * Attaches a PaymentMethod object to a Customer. + * + *

To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage. + * These approaches will perform any necessary steps to set up the PaymentMethod for future + * payments. Using the {@code /v1/payment_methods/:id/attach} endpoint without first using a + * SetupIntent or PaymentIntent with {@code setup_future_usage} does not optimize the + * PaymentMethod for future use, which makes later declines and payment friction more likely. See + * Optimizing cards for + * future payments for more information about setting up future payments. + * + *

To use this PaymentMethod as the default for invoice or subscription payments, set {@code + * invoice_settings.default_payment_method}, on the Customer to the PaymentMethod’s ID. + */ + public PaymentMethod attach(String paymentMethod) throws StripeException { + return attach(paymentMethod, (PaymentMethodAttachParams) null, (RequestOptions) null); + } /** * Attaches a PaymentMethod object to a Customer. * diff --git a/src/main/java/com/stripe/service/SubscriptionService.java b/src/main/java/com/stripe/service/SubscriptionService.java index 445d2509e4d..524670b4e11 100644 --- a/src/main/java/com/stripe/service/SubscriptionService.java +++ b/src/main/java/com/stripe/service/SubscriptionService.java @@ -440,6 +440,40 @@ public StripeCollection list(SubscriptionListParams params, Reques public Subscription create(SubscriptionCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } + /** + * Creates a new subscription on an existing customer. Each customer can have up to 500 active or + * scheduled subscriptions. + * + *

When you create a subscription with {@code collection_method=charge_automatically}, the + * first invoice is finalized as part of the request. The {@code payment_behavior} parameter + * determines the exact behavior of the initial payment. + * + *

To start subscriptions where the first invoice always begins in a {@code draft} status, use + * subscription + * schedules instead. Schedules provide the flexibility to model more complex billing + * configurations that change over time. + */ + public Subscription create(RequestOptions options) throws StripeException { + return create((SubscriptionCreateParams) null, options); + } + /** + * Creates a new subscription on an existing customer. Each customer can have up to 500 active or + * scheduled subscriptions. + * + *

When you create a subscription with {@code collection_method=charge_automatically}, the + * first invoice is finalized as part of the request. The {@code payment_behavior} parameter + * determines the exact behavior of the initial payment. + * + *

To start subscriptions where the first invoice always begins in a {@code draft} status, use + * subscription + * schedules instead. Schedules provide the flexibility to model more complex billing + * configurations that change over time. + */ + public Subscription create() throws StripeException { + return create((SubscriptionCreateParams) null, (RequestOptions) null); + } /** * Creates a new subscription on an existing customer. Each customer can have up to 500 active or * scheduled subscriptions. diff --git a/src/main/java/com/stripe/service/billing/CreditBalanceTransactionService.java b/src/main/java/com/stripe/service/billing/CreditBalanceTransactionService.java index 101ab5fa719..9a6a7b3bff2 100644 --- a/src/main/java/com/stripe/service/billing/CreditBalanceTransactionService.java +++ b/src/main/java/com/stripe/service/billing/CreditBalanceTransactionService.java @@ -26,6 +26,15 @@ public StripeCollection list(CreditBalanceTransactionL return list(params, (RequestOptions) null); } /** Retrieve a list of credit balance transactions. */ + public StripeCollection list(RequestOptions options) + throws StripeException { + return list((CreditBalanceTransactionListParams) null, options); + } + /** Retrieve a list of credit balance transactions. */ + public StripeCollection list() throws StripeException { + return list((CreditBalanceTransactionListParams) null, (RequestOptions) null); + } + /** Retrieve a list of credit balance transactions. */ public StripeCollection list( CreditBalanceTransactionListParams params, RequestOptions options) throws StripeException { String path = "/v1/billing/credit_balance_transactions"; diff --git a/src/main/java/com/stripe/service/billingportal/SessionService.java b/src/main/java/com/stripe/service/billingportal/SessionService.java index 16cd15a8e3f..16788cbc16b 100644 --- a/src/main/java/com/stripe/service/billingportal/SessionService.java +++ b/src/main/java/com/stripe/service/billingportal/SessionService.java @@ -22,6 +22,14 @@ public Session create(SessionCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** Creates a session of the customer portal. */ + public Session create(RequestOptions options) throws StripeException { + return create((SessionCreateParams) null, options); + } + /** Creates a session of the customer portal. */ + public Session create() throws StripeException { + return create((SessionCreateParams) null, (RequestOptions) null); + } + /** Creates a session of the customer portal. */ public Session create(SessionCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/billing_portal/sessions"; ApiRequest request = diff --git a/src/main/java/com/stripe/service/v2/CoreService.java b/src/main/java/com/stripe/service/v2/CoreService.java index 773df5e38ee..6f38dc21be7 100644 --- a/src/main/java/com/stripe/service/v2/CoreService.java +++ b/src/main/java/com/stripe/service/v2/CoreService.java @@ -9,6 +9,18 @@ public CoreService(StripeResponseGetter responseGetter) { super(responseGetter); } + public com.stripe.service.v2.core.AccountLinkService accountLinks() { + return new com.stripe.service.v2.core.AccountLinkService(this.getResponseGetter()); + } + + public com.stripe.service.v2.core.AccountTokenService accountTokens() { + return new com.stripe.service.v2.core.AccountTokenService(this.getResponseGetter()); + } + + public com.stripe.service.v2.core.AccountService accounts() { + return new com.stripe.service.v2.core.AccountService(this.getResponseGetter()); + } + public com.stripe.service.v2.core.EventDestinationService eventDestinations() { return new com.stripe.service.v2.core.EventDestinationService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/v2/core/AccountLinkService.java b/src/main/java/com/stripe/service/v2/core/AccountLinkService.java new file mode 100644 index 00000000000..a47c0c59b5d --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/AccountLinkService.java @@ -0,0 +1,43 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountLink; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.AccountLinkCreateParams; + +public final class AccountLinkService extends ApiService { + public AccountLinkService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Creates an AccountLink object that includes a single-use URL that an account can use to access + * a Stripe-hosted flow for collecting or updating required information. + */ + public AccountLink create(AccountLinkCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * Creates an AccountLink object that includes a single-use URL that an account can use to access + * a Stripe-hosted flow for collecting or updating required information. + */ + public AccountLink create(AccountLinkCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/core/account_links"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, AccountLink.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/AccountService.java b/src/main/java/com/stripe/service/v2/core/AccountService.java new file mode 100644 index 00000000000..0ba14c9d182 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/AccountService.java @@ -0,0 +1,194 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.core.Account; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.AccountCloseParams; +import com.stripe.param.v2.core.AccountCreateParams; +import com.stripe.param.v2.core.AccountListParams; +import com.stripe.param.v2.core.AccountRetrieveParams; +import com.stripe.param.v2.core.AccountUpdateParams; + +public final class AccountService extends ApiService { + public AccountService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a list of Accounts. */ + public StripeCollection list(AccountListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of Accounts. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((AccountListParams) null, options); + } + /** Returns a list of Accounts. */ + public StripeCollection list() throws StripeException { + return list((AccountListParams) null, (RequestOptions) null); + } + /** Returns a list of Accounts. */ + public StripeCollection list(AccountListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/core/accounts"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** + * An Account is a representation of a company, individual or other entity that a user interacts + * with. Accounts contain identifying information about the entity, and configurations that store + * the features an account has access to. An account can be configured as any or all of the + * following configurations: Customer, Merchant and/or Recipient. + */ + public Account create(AccountCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * An Account is a representation of a company, individual or other entity that a user interacts + * with. Accounts contain identifying information about the entity, and configurations that store + * the features an account has access to. An account can be configured as any or all of the + * following configurations: Customer, Merchant and/or Recipient. + */ + public Account create(RequestOptions options) throws StripeException { + return create((AccountCreateParams) null, options); + } + /** + * An Account is a representation of a company, individual or other entity that a user interacts + * with. Accounts contain identifying information about the entity, and configurations that store + * the features an account has access to. An account can be configured as any or all of the + * following configurations: Customer, Merchant and/or Recipient. + */ + public Account create() throws StripeException { + return create((AccountCreateParams) null, (RequestOptions) null); + } + /** + * An Account is a representation of a company, individual or other entity that a user interacts + * with. Accounts contain identifying information about the entity, and configurations that store + * the features an account has access to. An account can be configured as any or all of the + * following configurations: Customer, Merchant and/or Recipient. + */ + public Account create(AccountCreateParams params, RequestOptions options) throws StripeException { + String path = "/v2/core/accounts"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Account.class); + } + /** Retrieves the details of an Account. */ + public Account retrieve(String id, AccountRetrieveParams params) throws StripeException { + return retrieve(id, params, (RequestOptions) null); + } + /** Retrieves the details of an Account. */ + public Account retrieve(String id, RequestOptions options) throws StripeException { + return retrieve(id, (AccountRetrieveParams) null, options); + } + /** Retrieves the details of an Account. */ + public Account retrieve(String id) throws StripeException { + return retrieve(id, (AccountRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves the details of an Account. */ + public Account retrieve(String id, AccountRetrieveParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v2/core/accounts/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Account.class); + } + /** Updates the details of an Account. */ + public Account update(String id, AccountUpdateParams params) throws StripeException { + return update(id, params, (RequestOptions) null); + } + /** Updates the details of an Account. */ + public Account update(String id, RequestOptions options) throws StripeException { + return update(id, (AccountUpdateParams) null, options); + } + /** Updates the details of an Account. */ + public Account update(String id) throws StripeException { + return update(id, (AccountUpdateParams) null, (RequestOptions) null); + } + /** Updates the details of an Account. */ + public Account update(String id, AccountUpdateParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v2/core/accounts/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Account.class); + } + /** + * Removes access to the Account and its associated resources. Closed Accounts can no longer be + * operated on, but limited information can still be retrieved through the API in order to be able + * to track their history. + */ + public Account close(String id, AccountCloseParams params) throws StripeException { + return close(id, params, (RequestOptions) null); + } + /** + * Removes access to the Account and its associated resources. Closed Accounts can no longer be + * operated on, but limited information can still be retrieved through the API in order to be able + * to track their history. + */ + public Account close(String id, RequestOptions options) throws StripeException { + return close(id, (AccountCloseParams) null, options); + } + /** + * Removes access to the Account and its associated resources. Closed Accounts can no longer be + * operated on, but limited information can still be retrieved through the API in order to be able + * to track their history. + */ + public Account close(String id) throws StripeException { + return close(id, (AccountCloseParams) null, (RequestOptions) null); + } + /** + * Removes access to the Account and its associated resources. Closed Accounts can no longer be + * operated on, but limited information can still be retrieved through the API in order to be able + * to track their history. + */ + public Account close(String id, AccountCloseParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v2/core/accounts/%s/close", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Account.class); + } + + public com.stripe.service.v2.core.accounts.PersonTokenService personTokens() { + return new com.stripe.service.v2.core.accounts.PersonTokenService(this.getResponseGetter()); + } + + public com.stripe.service.v2.core.accounts.PersonService persons() { + return new com.stripe.service.v2.core.accounts.PersonService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/AccountTokenService.java b/src/main/java/com/stripe/service/v2/core/AccountTokenService.java new file mode 100644 index 00000000000..cc7c754b89a --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/AccountTokenService.java @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountToken; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.AccountTokenCreateParams; + +public final class AccountTokenService extends ApiService { + public AccountTokenService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Creates an Account Token. */ + public AccountToken create(AccountTokenCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** Creates an Account Token. */ + public AccountToken create(RequestOptions options) throws StripeException { + return create((AccountTokenCreateParams) null, options); + } + /** Creates an Account Token. */ + public AccountToken create() throws StripeException { + return create((AccountTokenCreateParams) null, (RequestOptions) null); + } + /** Creates an Account Token. */ + public AccountToken create(AccountTokenCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/core/account_tokens"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, AccountToken.class); + } + /** Retrieves an Account Token. */ + public AccountToken retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves an Account Token. */ + public AccountToken retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/account_tokens/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, AccountToken.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java b/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java new file mode 100644 index 00000000000..1ba7615b0cc --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/accounts/PersonService.java @@ -0,0 +1,150 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core.accounts; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.DeletedObject; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.accounts.PersonCreateParams; +import com.stripe.param.v2.core.accounts.PersonListParams; +import com.stripe.param.v2.core.accounts.PersonUpdateParams; + +public final class PersonService extends ApiService { + public PersonService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a paginated list of Persons associated with an Account. */ + public StripeCollection list(String accountId, PersonListParams params) + throws StripeException { + return list(accountId, params, (RequestOptions) null); + } + /** Returns a paginated list of Persons associated with an Account. */ + public StripeCollection list(String accountId, RequestOptions options) + throws StripeException { + return list(accountId, (PersonListParams) null, options); + } + /** Returns a paginated list of Persons associated with an Account. */ + public StripeCollection list(String accountId) throws StripeException { + return list(accountId, (PersonListParams) null, (RequestOptions) null); + } + /** Returns a paginated list of Persons associated with an Account. */ + public StripeCollection list( + String accountId, PersonListParams params, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/accounts/%s/persons", ApiResource.urlEncodeId(accountId)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** + * Create a Person. Adds an individual to an Account's identity. You can set relationship + * attributes and identity information at creation. + */ + public AccountPerson create(String accountId, PersonCreateParams params) throws StripeException { + return create(accountId, params, (RequestOptions) null); + } + /** + * Create a Person. Adds an individual to an Account's identity. You can set relationship + * attributes and identity information at creation. + */ + public AccountPerson create(String accountId, RequestOptions options) throws StripeException { + return create(accountId, (PersonCreateParams) null, options); + } + /** + * Create a Person. Adds an individual to an Account's identity. You can set relationship + * attributes and identity information at creation. + */ + public AccountPerson create(String accountId) throws StripeException { + return create(accountId, (PersonCreateParams) null, (RequestOptions) null); + } + /** + * Create a Person. Adds an individual to an Account's identity. You can set relationship + * attributes and identity information at creation. + */ + public AccountPerson create(String accountId, PersonCreateParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v2/core/accounts/%s/persons", ApiResource.urlEncodeId(accountId)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, AccountPerson.class); + } + /** Delete a Person associated with an Account. */ + public DeletedObject delete(String accountId, String id) throws StripeException { + return delete(accountId, id, (RequestOptions) null); + } + /** Delete a Person associated with an Account. */ + public DeletedObject delete(String accountId, String id, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v2/core/accounts/%s/persons/%s", + ApiResource.urlEncodeId(accountId), ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.DELETE, path, null, options); + return this.request(request, DeletedObject.class); + } + /** Retrieves a Person associated with an Account. */ + public AccountPerson retrieve(String accountId, String id) throws StripeException { + return retrieve(accountId, id, (RequestOptions) null); + } + /** Retrieves a Person associated with an Account. */ + public AccountPerson retrieve(String accountId, String id, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v2/core/accounts/%s/persons/%s", + ApiResource.urlEncodeId(accountId), ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, AccountPerson.class); + } + /** Updates a Person associated with an Account. */ + public AccountPerson update(String accountId, String id, PersonUpdateParams params) + throws StripeException { + return update(accountId, id, params, (RequestOptions) null); + } + /** Updates a Person associated with an Account. */ + public AccountPerson update(String accountId, String id, RequestOptions options) + throws StripeException { + return update(accountId, id, (PersonUpdateParams) null, options); + } + /** Updates a Person associated with an Account. */ + public AccountPerson update(String accountId, String id) throws StripeException { + return update(accountId, id, (PersonUpdateParams) null, (RequestOptions) null); + } + /** Updates a Person associated with an Account. */ + public AccountPerson update( + String accountId, String id, PersonUpdateParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v2/core/accounts/%s/persons/%s", + ApiResource.urlEncodeId(accountId), ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, AccountPerson.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java new file mode 100644 index 00000000000..4325a3193ec --- /dev/null +++ b/src/main/java/com/stripe/service/v2/core/accounts/PersonTokenService.java @@ -0,0 +1,64 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.core.accounts; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPersonToken; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.core.accounts.PersonTokenCreateParams; + +public final class PersonTokenService extends ApiService { + public PersonTokenService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Creates a Person Token associated with an Account. */ + public AccountPersonToken create(String accountId, PersonTokenCreateParams params) + throws StripeException { + return create(accountId, params, (RequestOptions) null); + } + /** Creates a Person Token associated with an Account. */ + public AccountPersonToken create(String accountId, RequestOptions options) + throws StripeException { + return create(accountId, (PersonTokenCreateParams) null, options); + } + /** Creates a Person Token associated with an Account. */ + public AccountPersonToken create(String accountId) throws StripeException { + return create(accountId, (PersonTokenCreateParams) null, (RequestOptions) null); + } + /** Creates a Person Token associated with an Account. */ + public AccountPersonToken create( + String accountId, PersonTokenCreateParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v2/core/accounts/%s/person_tokens", ApiResource.urlEncodeId(accountId)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, AccountPersonToken.class); + } + /** Retrieves a Person Token associated with an Account. */ + public AccountPersonToken retrieve(String accountId, String id) throws StripeException { + return retrieve(accountId, id, (RequestOptions) null); + } + /** Retrieves a Person Token associated with an Account. */ + public AccountPersonToken retrieve(String accountId, String id, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v2/core/accounts/%s/person_tokens/%s", + ApiResource.urlEncodeId(accountId), ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, AccountPersonToken.class); + } +} diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 6eeab497786..44f6f8fea82 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -3208,7 +3208,7 @@ public void testCoreEventsGetServices() throws StripeException { null, null, com.stripe.model.v2.core.Event.class, - "{\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); + "{\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("ll_123"); @@ -24489,6 +24489,427 @@ public void testV2BillingMeterEventStreamPostServices() throws StripeException { null); } + @Test + public void testV2CoreAccountGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection>() {}.getType(), + "{\"data\":[{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountListParams params = + com.stripe.param.v2.core.AccountListParams.builder().build(); + + com.stripe.model.v2.StripeCollection stripeCollection = + client.v2().core().accounts().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/core/accounts", params.toMap(), null); + } + + @Test + public void testV2CoreAccountPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts", + null, + null, + com.stripe.model.v2.core.Account.class, + "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountCreateParams params = + com.stripe.param.v2.core.AccountCreateParams.builder().build(); + + com.stripe.model.v2.core.Account account = client.v2().core().accounts().create(params); + assertNotNull(account); + verifyRequest( + BaseAddress.API, ApiResource.RequestMethod.POST, "/v2/core/accounts", params.toMap(), null); + } + + @Test + public void testV2CoreAccountGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/id_123", + null, + null, + com.stripe.model.v2.core.Account.class, + "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountRetrieveParams params = + com.stripe.param.v2.core.AccountRetrieveParams.builder().build(); + + com.stripe.model.v2.core.Account account = + client.v2().core().accounts().retrieve("id_123", params); + assertNotNull(account); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/id_123", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/id_123", + null, + null, + com.stripe.model.v2.core.Account.class, + "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountUpdateParams params = + com.stripe.param.v2.core.AccountUpdateParams.builder().build(); + + com.stripe.model.v2.core.Account account = + client.v2().core().accounts().update("id_123", params); + assertNotNull(account); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/id_123", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountPost3Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/id_123/close", + null, + null, + com.stripe.model.v2.core.Account.class, + "{\"applied_configurations\":[\"recipient\"],\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountCloseParams params = + com.stripe.param.v2.core.AccountCloseParams.builder().build(); + + com.stripe.model.v2.core.Account account = + client.v2().core().accounts().close("id_123", params); + assertNotNull(account); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/id_123/close", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountsPersonGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/persons", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.core.AccountPerson>>() {}.getType(), + "{\"data\":[{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.accounts.PersonListParams params = + com.stripe.param.v2.core.accounts.PersonListParams.builder().build(); + + com.stripe.model.v2.StripeCollection stripeCollection = + client.v2().core().accounts().persons().list("account_id_123", params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/persons", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountsPersonPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/account_id_123/persons", + null, + null, + com.stripe.model.v2.core.AccountPerson.class, + "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.accounts.PersonCreateParams params = + com.stripe.param.v2.core.accounts.PersonCreateParams.builder().build(); + + com.stripe.model.v2.core.AccountPerson accountPerson = + client.v2().core().accounts().persons().create("account_id_123", params); + assertNotNull(accountPerson); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/account_id_123/persons", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountsPersonDeleteServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v2/core/accounts/account_id_123/persons/id_123", + null, + null, + com.stripe.model.v2.DeletedObject.class, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.DeletedObject deletedObject = + client.v2().core().accounts().persons().delete("account_id_123", "id_123"); + assertNotNull(deletedObject); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v2/core/accounts/account_id_123/persons/id_123", + null, + null); + } + + @Test + public void testV2CoreAccountsPersonGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/persons/id_123", + null, + null, + com.stripe.model.v2.core.AccountPerson.class, + "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.AccountPerson accountPerson = + client.v2().core().accounts().persons().retrieve("account_id_123", "id_123"); + assertNotNull(accountPerson); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/persons/id_123", + null, + null); + } + + @Test + public void testV2CoreAccountsPersonPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/account_id_123/persons/id_123", + null, + null, + com.stripe.model.v2.core.AccountPerson.class, + "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.account_person\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.accounts.PersonUpdateParams params = + com.stripe.param.v2.core.accounts.PersonUpdateParams.builder().build(); + + com.stripe.model.v2.core.AccountPerson accountPerson = + client.v2().core().accounts().persons().update("account_id_123", "id_123", params); + assertNotNull(accountPerson); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/account_id_123/persons/id_123", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountsPersonTokenPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/account_id_123/person_tokens", + null, + null, + com.stripe.model.v2.core.AccountPersonToken.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_person_token\",\"used\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.accounts.PersonTokenCreateParams params = + com.stripe.param.v2.core.accounts.PersonTokenCreateParams.builder().build(); + + com.stripe.model.v2.core.AccountPersonToken accountPersonToken = + client.v2().core().accounts().personTokens().create("account_id_123", params); + assertNotNull(accountPersonToken); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/accounts/account_id_123/person_tokens", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountsPersonTokenGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/person_tokens/id_123", + null, + null, + com.stripe.model.v2.core.AccountPersonToken.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_person_token\",\"used\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.AccountPersonToken accountPersonToken = + client.v2().core().accounts().personTokens().retrieve("account_id_123", "id_123"); + assertNotNull(accountPersonToken); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/account_id_123/person_tokens/id_123", + null, + null); + } + + @Test + public void testV2CoreAccountLinkPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/account_links", + null, + null, + com.stripe.model.v2.core.AccountLink.class, + "{\"account\":\"account\",\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"object\":\"v2.core.account_link\",\"url\":\"url\",\"use_case\":{\"type\":\"account_onboarding\"},\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountLinkCreateParams params = + com.stripe.param.v2.core.AccountLinkCreateParams.builder() + .setAccount("account") + .setUseCase( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.builder() + .setType( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.Type + .ACCOUNT_ONBOARDING) + .setAccountOnboarding( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountOnboarding + .builder() + .setCollectionOptions( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountOnboarding.CollectionOptions.builder() + .setFields( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountOnboarding.CollectionOptions.Fields + .EVENTUALLY_DUE) + .setFutureRequirements( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountOnboarding.CollectionOptions.FutureRequirements + .INCLUDE) + .build()) + .addConfiguration( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountOnboarding.Configuration.MERCHANT) + .setRefreshUrl("refresh_url") + .setReturnUrl("return_url") + .build()) + .setAccountUpdate( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase.AccountUpdate + .builder() + .setCollectionOptions( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountUpdate.CollectionOptions.builder() + .setFields( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountUpdate.CollectionOptions.Fields.EVENTUALLY_DUE) + .setFutureRequirements( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountUpdate.CollectionOptions.FutureRequirements + .INCLUDE) + .build()) + .addConfiguration( + com.stripe.param.v2.core.AccountLinkCreateParams.UseCase + .AccountUpdate.Configuration.MERCHANT) + .setRefreshUrl("refresh_url") + .setReturnUrl("return_url") + .build()) + .build()) + .build(); + + com.stripe.model.v2.core.AccountLink accountLink = + client.v2().core().accountLinks().create(params); + assertNotNull(accountLink); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/account_links", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountTokenPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/account_tokens", + null, + null, + com.stripe.model.v2.core.AccountToken.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_token\",\"used\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountTokenCreateParams params = + com.stripe.param.v2.core.AccountTokenCreateParams.builder().build(); + + com.stripe.model.v2.core.AccountToken accountToken = + client.v2().core().accountTokens().create(params); + assertNotNull(accountToken); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/core/account_tokens", + params.toMap(), + null); + } + + @Test + public void testV2CoreAccountTokenGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/account_tokens/id_123", + null, + null, + com.stripe.model.v2.core.AccountToken.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.account_token\",\"used\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.AccountToken accountToken = + client.v2().core().accountTokens().retrieve("id_123"); + assertNotNull(accountToken); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/account_tokens/id_123", + null, + null); + } + @Test public void testV2CoreEventGetServices() throws StripeException { stubRequest( From 2fb0bb3520c97dfd149c77bbfe60655d4ab86299 Mon Sep 17 00:00:00 2001 From: System Administrator Date: Tue, 16 Dec 2025 11:45:11 -0800 Subject: [PATCH 3/8] Bump version to 31.1.0 --- CHANGELOG.md | 37 ++++++++++++++++++++++++++++ README.md | 10 ++++---- VERSION | 2 +- gradle.properties | 2 +- src/main/java/com/stripe/Stripe.java | 2 +- 5 files changed, 45 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 87d10ed81a9..39fd038c2f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,42 @@ # Changelog +## 31.1.0 - 2025-12-16 +This release changes the pinned API version to `2025-12-15.clover`. + +* [#2126](https://github.com/stripe/stripe-java/pull/2126) Update generated code + * Add support for new resources `v2.core.AccountLink`, `v2.core.AccountPersonToken`, `v2.core.AccountPerson`, `v2.core.AccountToken`, and `v2.core.Account` + * Add support for `create` and `retrieve` methods on resources `v2.core.AccountPersonToken` and `v2.core.AccountToken` + * Add support for `create` method on resource `v2.core.AccountLink` + * Add support for `close`, `create`, `list`, `retrieve`, and `update` methods on resource `v2.core.Account` + * Add support for `create`, `delete`, `list`, `retrieve`, and `update` methods on resource `v2.core.AccountPerson` + * Add support for `customerAccount` on `CashBalance`, `ConfirmationToken.payment_method_preview`, `CreditNoteListParams`, `CreditNote`, `CustomerBalanceTransaction`, `CustomerCashBalanceTransaction`, `CustomerSessionCreateParams`, `CustomerSession`, `Customer`, `Discount`, `InvoiceCreateParams`, `InvoiceCreatePreviewParams`, `InvoiceItemCreateParams`, `InvoiceItemListParams`, `InvoiceItem`, `InvoiceListParams`, `Invoice`, `PaymentIntentCreateParams`, `PaymentIntentListParams`, `PaymentIntentUpdateParams`, `PaymentIntent`, `PaymentMethodAttachParams`, `PaymentMethodListParams`, `PaymentMethod`, `PromotionCodeCreateParams`, `PromotionCodeListParams`, `PromotionCode`, `QuoteCreateParams`, `QuoteListParams`, `QuoteUpdateParams`, `Quote`, `SetupAttempt`, `SetupIntentCreateParams`, `SetupIntentListParams`, `SetupIntentUpdateParams`, `SetupIntent`, `SubscriptionCreateParams`, `SubscriptionListParams`, `SubscriptionScheduleCreateParams`, `SubscriptionScheduleListParams`, `SubscriptionSchedule`, `Subscription`, `TaxId.owner`, `TaxIdCreateParams.owner`, `TaxIdListParams.owner`, `TaxId`, `billing.CreditBalanceSummaryRetrieveParams`, `billing.CreditBalanceSummary`, `billing.CreditBalanceTransactionListParams`, `billing.CreditGrantCreateParams`, `billing.CreditGrantListParams`, `billing.CreditGrant`, `billingportal.SessionCreateParams`, `billingportal.Session`, `checkout.SessionCreateParams`, `checkout.SessionListParams`, `checkout.Session`, `financialconnections.Account.account_holder`, `financialconnections.AccountListParams.account_holder`, `financialconnections.Session.account_holder`, and `financialconnections.SessionCreateParams.account_holder` + * Add support for `metadata` on `LineItem` and `checkout.SessionCreateParams.line_items[]` + * Add support for `paytoPayments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` + * Add support for `signer` on `AccountCreateParams.documents.proof_of_registration`, `AccountCreateParams.documents.proof_of_ultimate_beneficial_ownership`, `AccountUpdateParams.documents.proof_of_registration`, and `AccountUpdateParams.documents.proof_of_ultimate_beneficial_ownership` + * Change `CustomerSessionCreateParams.customer`, `InvoiceItemCreateParams.customer`, `PaymentMethodAttachParams.customer`, `SubscriptionCreateParams.customer`, `billing.CreditBalanceSummaryRetrieveParams.customer`, `billing.CreditBalanceTransactionListParams.customer`, `billing.CreditGrantCreateParams.customer`, and `billingportal.SessionCreateParams.customer` to be optional + * Add support for `billingCycleAnchor` on `billingportal.Configuration.features.subscription_update`, `billingportal.ConfigurationCreateParams.features.subscription_update`, and `billingportal.ConfigurationUpdateParams.features.subscription_update` + * Add support for `payto` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `Invoice.payment_settings.payment_method_options`, `InvoiceCreateParams.payment_settings.payment_method_options`, `InvoiceUpdateParams.payment_settings.payment_method_options`, `Mandate.payment_method_details`, `PaymentAttemptRecord.payment_method_details`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, `PaymentMethodCreateParams`, `PaymentMethodUpdateParams`, `PaymentMethod`, `PaymentRecord.payment_method_details`, `SetupAttempt.payment_method_details`, `SetupIntent.payment_method_options`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentConfirmParams.payment_method_options`, `SetupIntentCreateParams.payment_method_data`, `SetupIntentCreateParams.payment_method_options`, `SetupIntentUpdateParams.payment_method_data`, `SetupIntentUpdateParams.payment_method_options`, `Subscription.payment_settings.payment_method_options`, `SubscriptionCreateParams.payment_settings.payment_method_options`, `SubscriptionUpdateParams.payment_settings.payment_method_options`, `checkout.Session.payment_method_options`, and `checkout.SessionCreateParams.payment_method_options` + * Add support for `expectedDebitDate` on `Charge.payment_method_details.acss_debit`, `Charge.payment_method_details.au_becs_debit`, `Charge.payment_method_details.bacs_debit`, `Charge.payment_method_details.nz_bank_account`, `Charge.payment_method_details.sepa_debit`, `Charge.payment_method_details.us_bank_account`, `PaymentAttemptRecord.payment_method_details.acss_debit`, `PaymentAttemptRecord.payment_method_details.au_becs_debit`, `PaymentAttemptRecord.payment_method_details.bacs_debit`, `PaymentAttemptRecord.payment_method_details.nz_bank_account`, `PaymentAttemptRecord.payment_method_details.sepa_debit`, `PaymentAttemptRecord.payment_method_details.us_bank_account`, `PaymentRecord.payment_method_details.acss_debit`, `PaymentRecord.payment_method_details.au_becs_debit`, `PaymentRecord.payment_method_details.bacs_debit`, `PaymentRecord.payment_method_details.nz_bank_account`, `PaymentRecord.payment_method_details.sepa_debit`, and `PaymentRecord.payment_method_details.us_bank_account` + * Add support for new value `payto` on enums `PaymentIntentConfirmParams.excludedPaymentMethodTypes`, `PaymentIntentCreateParams.excludedPaymentMethodTypes`, `PaymentIntentUpdateParams.excludedPaymentMethodTypes`, `SetupIntentCreateParams.excludedPaymentMethodTypes`, `SetupIntentUpdateParams.excludedPaymentMethodTypes`, and `checkout.SessionCreateParams.excludedPaymentMethodTypes` + * Add support for new value `payto` on enum `checkout.SessionCreateParams.paymentMethodTypes` + * Add support for `lineItems` on `checkout.SessionUpdateParams` + * Add support for new value `mollie` on enums `ConfirmationTokenCreateParams.payment_method_data.ideal.bank`, `PaymentIntentConfirmParams.payment_method_data.ideal.bank`, `PaymentIntentCreateParams.payment_method_data.ideal.bank`, `PaymentIntentUpdateParams.payment_method_data.ideal.bank`, `PaymentMethodCreateParams.ideal.bank`, `SetupIntentConfirmParams.payment_method_data.ideal.bank`, `SetupIntentCreateParams.payment_method_data.ideal.bank`, and `SetupIntentUpdateParams.payment_method_data.ideal.bank` + * Add support for new value `payto` on enums `ConfirmationTokenCreateParams.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type` + * Add support for new value `payto` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` + * Add support for `invoice` on `CustomerBalanceTransactionListParams` + * Add support for `relatedCustomerAccount` on `identity.VerificationSessionCreateParams`, `identity.VerificationSessionListParams`, and `identity.VerificationSession` + * Change type of `InvoiceItem.pricing.price_details.price` and `InvoiceLineItem.pricing.price_details.price` from `string` to `expandable($Price)` + * Add support for new value `payto` on enums `InvoiceCreateParams.payment_settings.paymentMethodTypes`, `InvoiceUpdateParams.payment_settings.paymentMethodTypes`, `SubscriptionCreateParams.payment_settings.paymentMethodTypes`, and `SubscriptionUpdateParams.payment_settings.paymentMethodTypes` + * Add support for `subtotal` on `InvoiceLineItem` + * Add support for `authorizationCode`, `description`, `iin`, `installments`, `issuer`, `networkAdviceCode`, `networkDeclineCode`, and `storedCredentialUsage` on `PaymentAttemptRecord.payment_method_details.card` and `PaymentRecord.payment_method_details.card` + * Add support for new value `payto` on enums `PaymentLinkCreateParams.paymentMethodTypes` and `PaymentLinkUpdateParams.paymentMethodTypes` + * Add support for `allowRedisplay` on `PaymentMethodListParams` + * Add support for `reportedBy` on `PaymentRecord` + * Add support for new values `2025-12-15.clover` and `2026-01-28.clover` on enum `WebhookEndpointCreateParams.apiVersion` + * Add support for `changes` on `v2.core.Event` +* [#2124](https://github.com/stripe/stripe-java/pull/2124) Adds the Gson version included at runtime to the X-STRIPE-CLIENT-USER-AGENT header hash +* [#2121](https://github.com/stripe/stripe-java/pull/2121) Adds `Automatic-Module-Name: stripe.java` to the jar's manifest entry + ## 31.0.0 - 2025-11-18 This release changes the pinned API version to `2025-11-17.clover`. diff --git a/README.md b/README.md index 7c024619803..9f002dd38f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v31.0.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v31.1.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) [![JavaDoc](http://img.shields.io/badge/javadoc-reference-blue.svg)](https://stripe.dev/stripe-java) [![Build Status](https://github.com/stripe/stripe-java/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/stripe/stripe-java/actions?query=branch%3Amaster) @@ -23,7 +23,7 @@ We support LTS versions of the JDK. Currently, that's Java versions: Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:31.0.0" +implementation "com.stripe:stripe-java:31.1.0" ``` ### Maven users @@ -34,7 +34,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 31.0.0 + 31.1.0 ``` @@ -43,8 +43,8 @@ Add this dependency to your project's POM: If you are not using Gradle or Maven, you will need to manually install the following JARs: 1. The Stripe JAR: - - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/31.0.0/stripe-java-31.0.0.jar) - - Current release version: 31.0.0 + - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/31.1.0/stripe-java-31.1.0.jar) + - Current release version: 31.1.0 2. Google Gson: - The Stripe JAR builds and tests with Gson version 2.10.1 diff --git a/VERSION b/VERSION index 221a8da0b57..cc85ff7699a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -31.0.0 +31.1.0 diff --git a/gradle.properties b/gradle.properties index 7a14623b5f4..fab8ff14e47 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=31.0.0 +VERSION_NAME=31.1.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index aebdc412d18..b7cfc92f083 100644 --- a/src/main/java/com/stripe/Stripe.java +++ b/src/main/java/com/stripe/Stripe.java @@ -14,7 +14,7 @@ public abstract class Stripe { public static final String LIVE_API_BASE = "https://api.stripe.com"; public static final String UPLOAD_API_BASE = "https://files.stripe.com"; public static final String METER_EVENTS_API_BASE = "https://meter-events.stripe.com"; - public static final String VERSION = "31.0.0"; + public static final String VERSION = "31.1.0"; public static volatile String apiKey; public static volatile String clientId; From 6527b501c87e4b0970bbd6591b06d51dacc76129 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 08:37:48 +0000 Subject: [PATCH 4/8] Update generated code for v2144 and --- OPENAPI_VERSION | 2 +- .../param/PaymentIntentConfirmParams.java | 12 ++- .../param/PaymentIntentCreateParams.java | 12 ++- .../param/PaymentIntentUpdateParams.java | 12 ++- .../com/stripe/param/PlanCreateParams.java | 98 +++++++++++++++++++ .../com/stripe/param/PriceCreateParams.java | 98 +++++++++++++++++++ .../param/SetupIntentConfirmParams.java | 12 ++- .../stripe/param/SetupIntentCreateParams.java | 12 ++- .../stripe/param/SetupIntentUpdateParams.java | 12 ++- 9 files changed, 251 insertions(+), 19 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index abf60f20644..d3b53dafb36 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2143 \ No newline at end of file +v2144 \ No newline at end of file diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 383332536f1..901ce176588 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -3173,9 +3173,9 @@ public static class Benefit { /** French meal voucher benefit details for this PaymentIntent. */ @SerializedName("fr_meal_voucher") - FrMealVoucher frMealVoucher; + Object frMealVoucher; - private Benefit(Map extraParams, FrMealVoucher frMealVoucher) { + private Benefit(Map extraParams, Object frMealVoucher) { this.extraParams = extraParams; this.frMealVoucher = frMealVoucher; } @@ -3187,7 +3187,7 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private FrMealVoucher frMealVoucher; + private Object frMealVoucher; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentDetails.Benefit build() { @@ -3229,6 +3229,12 @@ public Builder setFrMealVoucher( this.frMealVoucher = frMealVoucher; return this; } + + /** French meal voucher benefit details for this PaymentIntent. */ + public Builder setFrMealVoucher(EmptyParam frMealVoucher) { + this.frMealVoucher = frMealVoucher; + return this; + } } @Getter diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index f42ed094cb4..41aa777caed 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -3711,9 +3711,9 @@ public static class Benefit { /** French meal voucher benefit details for this PaymentIntent. */ @SerializedName("fr_meal_voucher") - FrMealVoucher frMealVoucher; + Object frMealVoucher; - private Benefit(Map extraParams, FrMealVoucher frMealVoucher) { + private Benefit(Map extraParams, Object frMealVoucher) { this.extraParams = extraParams; this.frMealVoucher = frMealVoucher; } @@ -3725,7 +3725,7 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private FrMealVoucher frMealVoucher; + private Object frMealVoucher; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentDetails.Benefit build() { @@ -3767,6 +3767,12 @@ public Builder setFrMealVoucher( this.frMealVoucher = frMealVoucher; return this; } + + /** French meal voucher benefit details for this PaymentIntent. */ + public Builder setFrMealVoucher(EmptyParam frMealVoucher) { + this.frMealVoucher = frMealVoucher; + return this; + } } @Getter diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 0df0c2f5353..407e4ce52ad 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -3421,9 +3421,9 @@ public static class Benefit { /** French meal voucher benefit details for this PaymentIntent. */ @SerializedName("fr_meal_voucher") - FrMealVoucher frMealVoucher; + Object frMealVoucher; - private Benefit(Map extraParams, FrMealVoucher frMealVoucher) { + private Benefit(Map extraParams, Object frMealVoucher) { this.extraParams = extraParams; this.frMealVoucher = frMealVoucher; } @@ -3435,7 +3435,7 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private FrMealVoucher frMealVoucher; + private Object frMealVoucher; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentDetails.Benefit build() { @@ -3477,6 +3477,12 @@ public Builder setFrMealVoucher( this.frMealVoucher = frMealVoucher; return this; } + + /** French meal voucher benefit details for this PaymentIntent. */ + public Builder setFrMealVoucher(EmptyParam frMealVoucher) { + this.frMealVoucher = frMealVoucher; + return this; + } } @Getter diff --git a/src/main/java/com/stripe/param/PlanCreateParams.java b/src/main/java/com/stripe/param/PlanCreateParams.java index 874c7c03d7b..41812ea1318 100644 --- a/src/main/java/com/stripe/param/PlanCreateParams.java +++ b/src/main/java/com/stripe/param/PlanCreateParams.java @@ -574,6 +574,13 @@ public static class Product { @SerializedName("tax_code") String taxCode; + /** + * Tax details for this product, including the tax + * code and an optional performance location. + */ + @SerializedName("tax_details") + TaxDetails taxDetails; + /** * A label that represents units of this product. When set, this will be included in customers' * receipts, invoices, Checkout, and the customer portal. @@ -589,6 +596,7 @@ private Product( String name, String statementDescriptor, String taxCode, + TaxDetails taxDetails, String unitLabel) { this.active = active; this.extraParams = extraParams; @@ -597,6 +605,7 @@ private Product( this.name = name; this.statementDescriptor = statementDescriptor; this.taxCode = taxCode; + this.taxDetails = taxDetails; this.unitLabel = unitLabel; } @@ -619,6 +628,8 @@ public static class Builder { private String taxCode; + private TaxDetails taxDetails; + private String unitLabel; /** Finalize and obtain parameter instance from this builder. */ @@ -631,6 +642,7 @@ public PlanCreateParams.Product build() { this.name, this.statementDescriptor, this.taxCode, + this.taxDetails, this.unitLabel); } @@ -727,6 +739,15 @@ public Builder setTaxCode(String taxCode) { return this; } + /** + * Tax details for this product, including the tax + * code and an optional performance location. + */ + public Builder setTaxDetails(PlanCreateParams.Product.TaxDetails taxDetails) { + this.taxDetails = taxDetails; + return this; + } + /** * A label that represents units of this product. When set, this will be included in * customers' receipts, invoices, Checkout, and the customer portal. @@ -736,6 +757,83 @@ public Builder setUnitLabel(String unitLabel) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TaxDetails { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A tax + * code ID. + */ + @SerializedName("tax_code") + String taxCode; + + private TaxDetails(Map extraParams, String taxCode) { + this.extraParams = extraParams; + this.taxCode = taxCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String taxCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PlanCreateParams.Product.TaxDetails build() { + return new PlanCreateParams.Product.TaxDetails(this.extraParams, this.taxCode); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PlanCreateParams.Product.TaxDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PlanCreateParams.Product.TaxDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A tax + * code ID. + */ + public Builder setTaxCode(String taxCode) { + this.taxCode = taxCode; + return this; + } + } + } } @Getter diff --git a/src/main/java/com/stripe/param/PriceCreateParams.java b/src/main/java/com/stripe/param/PriceCreateParams.java index 3748c9890a8..693140a151f 100644 --- a/src/main/java/com/stripe/param/PriceCreateParams.java +++ b/src/main/java/com/stripe/param/PriceCreateParams.java @@ -1232,6 +1232,13 @@ public static class ProductData { @SerializedName("tax_code") String taxCode; + /** + * Tax details for this product, including the tax + * code and an optional performance location. + */ + @SerializedName("tax_details") + TaxDetails taxDetails; + /** * A label that represents units of this product. When set, this will be included in customers' * receipts, invoices, Checkout, and the customer portal. @@ -1247,6 +1254,7 @@ private ProductData( String name, String statementDescriptor, String taxCode, + TaxDetails taxDetails, String unitLabel) { this.active = active; this.extraParams = extraParams; @@ -1255,6 +1263,7 @@ private ProductData( this.name = name; this.statementDescriptor = statementDescriptor; this.taxCode = taxCode; + this.taxDetails = taxDetails; this.unitLabel = unitLabel; } @@ -1277,6 +1286,8 @@ public static class Builder { private String taxCode; + private TaxDetails taxDetails; + private String unitLabel; /** Finalize and obtain parameter instance from this builder. */ @@ -1289,6 +1300,7 @@ public PriceCreateParams.ProductData build() { this.name, this.statementDescriptor, this.taxCode, + this.taxDetails, this.unitLabel); } @@ -1385,6 +1397,15 @@ public Builder setTaxCode(String taxCode) { return this; } + /** + * Tax details for this product, including the tax + * code and an optional performance location. + */ + public Builder setTaxDetails(PriceCreateParams.ProductData.TaxDetails taxDetails) { + this.taxDetails = taxDetails; + return this; + } + /** * A label that represents units of this product. When set, this will be included in * customers' receipts, invoices, Checkout, and the customer portal. @@ -1394,6 +1415,83 @@ public Builder setUnitLabel(String unitLabel) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class TaxDetails { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A tax + * code ID. + */ + @SerializedName("tax_code") + String taxCode; + + private TaxDetails(Map extraParams, String taxCode) { + this.extraParams = extraParams; + this.taxCode = taxCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String taxCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PriceCreateParams.ProductData.TaxDetails build() { + return new PriceCreateParams.ProductData.TaxDetails(this.extraParams, this.taxCode); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PriceCreateParams.ProductData.TaxDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PriceCreateParams.ProductData.TaxDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. A tax + * code ID. + */ + public Builder setTaxCode(String taxCode) { + this.taxCode = taxCode; + return this; + } + } + } } @Getter diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 539183affda..e288e61ad85 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -12143,9 +12143,9 @@ public static class Benefit { /** French meal voucher benefit details for this SetupIntent. */ @SerializedName("fr_meal_voucher") - FrMealVoucher frMealVoucher; + Object frMealVoucher; - private Benefit(Map extraParams, FrMealVoucher frMealVoucher) { + private Benefit(Map extraParams, Object frMealVoucher) { this.extraParams = extraParams; this.frMealVoucher = frMealVoucher; } @@ -12157,7 +12157,7 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private FrMealVoucher frMealVoucher; + private Object frMealVoucher; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentConfirmParams.SetupDetails.Benefit build() { @@ -12199,6 +12199,12 @@ public Builder setFrMealVoucher( this.frMealVoucher = frMealVoucher; return this; } + + /** French meal voucher benefit details for this SetupIntent. */ + public Builder setFrMealVoucher(EmptyParam frMealVoucher) { + this.frMealVoucher = frMealVoucher; + return this; + } } @Getter diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 08d924d8a34..f836ba81a8d 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -12674,9 +12674,9 @@ public static class Benefit { /** French meal voucher benefit details for this SetupIntent. */ @SerializedName("fr_meal_voucher") - FrMealVoucher frMealVoucher; + Object frMealVoucher; - private Benefit(Map extraParams, FrMealVoucher frMealVoucher) { + private Benefit(Map extraParams, Object frMealVoucher) { this.extraParams = extraParams; this.frMealVoucher = frMealVoucher; } @@ -12688,7 +12688,7 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private FrMealVoucher frMealVoucher; + private Object frMealVoucher; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams.SetupDetails.Benefit build() { @@ -12730,6 +12730,12 @@ public Builder setFrMealVoucher( this.frMealVoucher = frMealVoucher; return this; } + + /** French meal voucher benefit details for this SetupIntent. */ + public Builder setFrMealVoucher(EmptyParam frMealVoucher) { + this.frMealVoucher = frMealVoucher; + return this; + } } @Getter diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index 7414e7feb05..f073d579de8 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -12418,9 +12418,9 @@ public static class Benefit { /** French meal voucher benefit details for this SetupIntent. */ @SerializedName("fr_meal_voucher") - FrMealVoucher frMealVoucher; + Object frMealVoucher; - private Benefit(Map extraParams, FrMealVoucher frMealVoucher) { + private Benefit(Map extraParams, Object frMealVoucher) { this.extraParams = extraParams; this.frMealVoucher = frMealVoucher; } @@ -12432,7 +12432,7 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private FrMealVoucher frMealVoucher; + private Object frMealVoucher; /** Finalize and obtain parameter instance from this builder. */ public SetupIntentUpdateParams.SetupDetails.Benefit build() { @@ -12474,6 +12474,12 @@ public Builder setFrMealVoucher( this.frMealVoucher = frMealVoucher; return this; } + + /** French meal voucher benefit details for this SetupIntent. */ + public Builder setFrMealVoucher(EmptyParam frMealVoucher) { + this.frMealVoucher = frMealVoucher; + return this; + } } @Getter From 7c91caf093c31278994e3e1eab1eec016f8228ce Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 20:09:55 +0000 Subject: [PATCH 5/8] Update generated code for v2146 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../model/sharedpayment/GrantedToken.java | 30 ++++++-- .../RequestedSessionUpdateParams.java | 76 ++++++++++++++----- ...ams.java => GrantedTokenRevokeParams.java} | 16 ++-- .../sharedpayment/GrantedTokenService.java | 20 ++--- 6 files changed, 98 insertions(+), 48 deletions(-) rename src/main/java/com/stripe/param/sharedpayment/{GrantedTokenUpdateParams.java => GrantedTokenRevokeParams.java} (85%) diff --git a/API_VERSION b/API_VERSION index 4fb5364fd7e..a6cd1432a51 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -bd43cbb47f556744f4727eeea7cddebc9b1cc05f \ No newline at end of file +62f4f6bb7256abf1d83d35d2fb79a309954b19c9 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d3b53dafb36..cef0e899277 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2144 \ No newline at end of file +v2146 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java b/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java index 1f1033048b3..08539392a4b 100644 --- a/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java +++ b/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java @@ -13,7 +13,7 @@ import com.stripe.net.StripeResponseGetter; import com.stripe.param.sharedpayment.GrantedTokenCreateParams; import com.stripe.param.sharedpayment.GrantedTokenRetrieveParams; -import com.stripe.param.sharedpayment.GrantedTokenUpdateParams; +import com.stripe.param.sharedpayment.GrantedTokenRevokeParams; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -237,15 +237,31 @@ public static GrantedToken create(GrantedTokenCreateParams params, RequestOption * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration */ - public GrantedToken update(Map params) throws StripeException { - return update(params, (RequestOptions) null); + public GrantedToken revoke() throws StripeException { + return revoke((Map) null, (RequestOptions) null); } /** * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration */ - public GrantedToken update(Map params, RequestOptions options) + public GrantedToken revoke(RequestOptions options) throws StripeException { + return revoke((Map) null, options); + } + + /** + * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode + * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration + */ + public GrantedToken revoke(Map params) throws StripeException { + return revoke(params, (RequestOptions) null); + } + + /** + * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode + * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration + */ + public GrantedToken revoke(Map params, RequestOptions options) throws StripeException { String path = String.format( @@ -260,15 +276,15 @@ public GrantedToken update(Map params, RequestOptions options) * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration */ - public GrantedToken update(GrantedTokenUpdateParams params) throws StripeException { - return update(params, (RequestOptions) null); + public GrantedToken revoke(GrantedTokenRevokeParams params) throws StripeException { + return revoke(params, (RequestOptions) null); } /** * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration */ - public GrantedToken update(GrantedTokenUpdateParams params, RequestOptions options) + public GrantedToken revoke(GrantedTokenRevokeParams params, RequestOptions options) throws StripeException { String path = String.format( diff --git a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java index f0f7f451884..1ae29befb2e 100644 --- a/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java +++ b/src/main/java/com/stripe/param/delegatedcheckout/RequestedSessionUpdateParams.java @@ -37,7 +37,7 @@ public class RequestedSessionUpdateParams extends ApiRequestParams { /** The metadata for this requested session. */ @SerializedName("metadata") - Map metadata; + Object metadata; /** The payment method for this requested session. */ @SerializedName("payment_method") @@ -45,21 +45,21 @@ public class RequestedSessionUpdateParams extends ApiRequestParams { /** The payment method data for this requested session. */ @SerializedName("payment_method_data") - PaymentMethodData paymentMethodData; + Object paymentMethodData; /** The shared metadata for this requested session. */ @SerializedName("shared_metadata") - Map sharedMetadata; + Object sharedMetadata; private RequestedSessionUpdateParams( List expand, Map extraParams, FulfillmentDetails fulfillmentDetails, List lineItemDetails, - Map metadata, + Object metadata, Object paymentMethod, - PaymentMethodData paymentMethodData, - Map sharedMetadata) { + Object paymentMethodData, + Object sharedMetadata) { this.expand = expand; this.extraParams = extraParams; this.fulfillmentDetails = fulfillmentDetails; @@ -83,13 +83,13 @@ public static class Builder { private List lineItemDetails; - private Map metadata; + private Object metadata; private Object paymentMethod; - private PaymentMethodData paymentMethodData; + private Object paymentMethodData; - private Map sharedMetadata; + private Object sharedMetadata; /** Finalize and obtain parameter instance from this builder. */ public RequestedSessionUpdateParams build() { @@ -195,11 +195,12 @@ public Builder addAllLineItemDetail( * and subsequent calls add additional key/value pairs to the original map. See {@link * RequestedSessionUpdateParams#metadata} for the field documentation. */ + @SuppressWarnings("unchecked") public Builder putMetadata(String key, String value) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); } - this.metadata.put(key, value); + ((Map) this.metadata).put(key, value); return this; } @@ -208,11 +209,24 @@ public Builder putMetadata(String key, String value) { * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. * See {@link RequestedSessionUpdateParams#metadata} for the field documentation. */ + @SuppressWarnings("unchecked") public Builder putAllMetadata(Map map) { - if (this.metadata == null) { - this.metadata = new HashMap<>(); + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); } - this.metadata.putAll(map); + ((Map) this.metadata).putAll(map); + return this; + } + + /** The metadata for this requested session. */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** The metadata for this requested session. */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; return this; } @@ -235,16 +249,23 @@ public Builder setPaymentMethodData( return this; } + /** The payment method data for this requested session. */ + public Builder setPaymentMethodData(EmptyParam paymentMethodData) { + this.paymentMethodData = paymentMethodData; + return this; + } + /** * Add a key/value pair to `sharedMetadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link * RequestedSessionUpdateParams#sharedMetadata} for the field documentation. */ + @SuppressWarnings("unchecked") public Builder putSharedMetadata(String key, String value) { - if (this.sharedMetadata == null) { - this.sharedMetadata = new HashMap<>(); + if (this.sharedMetadata == null || this.sharedMetadata instanceof EmptyParam) { + this.sharedMetadata = new HashMap(); } - this.sharedMetadata.put(key, value); + ((Map) this.sharedMetadata).put(key, value); return this; } @@ -253,11 +274,24 @@ public Builder putSharedMetadata(String key, String value) { * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. * See {@link RequestedSessionUpdateParams#sharedMetadata} for the field documentation. */ + @SuppressWarnings("unchecked") public Builder putAllSharedMetadata(Map map) { - if (this.sharedMetadata == null) { - this.sharedMetadata = new HashMap<>(); + if (this.sharedMetadata == null || this.sharedMetadata instanceof EmptyParam) { + this.sharedMetadata = new HashMap(); } - this.sharedMetadata.putAll(map); + ((Map) this.sharedMetadata).putAll(map); + return this; + } + + /** The shared metadata for this requested session. */ + public Builder setSharedMetadata(EmptyParam sharedMetadata) { + this.sharedMetadata = sharedMetadata; + return this; + } + + /** The shared metadata for this requested session. */ + public Builder setSharedMetadata(Map sharedMetadata) { + this.sharedMetadata = sharedMetadata; return this; } } diff --git a/src/main/java/com/stripe/param/sharedpayment/GrantedTokenUpdateParams.java b/src/main/java/com/stripe/param/sharedpayment/GrantedTokenRevokeParams.java similarity index 85% rename from src/main/java/com/stripe/param/sharedpayment/GrantedTokenUpdateParams.java rename to src/main/java/com/stripe/param/sharedpayment/GrantedTokenRevokeParams.java index 032845acc7b..7a07612158a 100644 --- a/src/main/java/com/stripe/param/sharedpayment/GrantedTokenUpdateParams.java +++ b/src/main/java/com/stripe/param/sharedpayment/GrantedTokenRevokeParams.java @@ -12,7 +12,7 @@ @Getter @EqualsAndHashCode(callSuper = false) -public class GrantedTokenUpdateParams extends ApiRequestParams { +public class GrantedTokenRevokeParams extends ApiRequestParams { /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -26,7 +26,7 @@ public class GrantedTokenUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private GrantedTokenUpdateParams(List expand, Map extraParams) { + private GrantedTokenRevokeParams(List expand, Map extraParams) { this.expand = expand; this.extraParams = extraParams; } @@ -41,14 +41,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public GrantedTokenUpdateParams build() { - return new GrantedTokenUpdateParams(this.expand, this.extraParams); + public GrantedTokenRevokeParams build() { + return new GrantedTokenRevokeParams(this.expand, this.extraParams); } /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * GrantedTokenUpdateParams#expand} for the field documentation. + * GrantedTokenRevokeParams#expand} for the field documentation. */ public Builder addExpand(String element) { if (this.expand == null) { @@ -61,7 +61,7 @@ public Builder addExpand(String element) { /** * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link - * GrantedTokenUpdateParams#expand} for the field documentation. + * GrantedTokenRevokeParams#expand} for the field documentation. */ public Builder addAllExpand(List elements) { if (this.expand == null) { @@ -74,7 +74,7 @@ public Builder addAllExpand(List elements) { /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * GrantedTokenUpdateParams#extraParams} for the field documentation. + * GrantedTokenRevokeParams#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -87,7 +87,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link GrantedTokenUpdateParams#extraParams} for the field documentation. + * See {@link GrantedTokenRevokeParams#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { diff --git a/src/main/java/com/stripe/service/testhelpers/sharedpayment/GrantedTokenService.java b/src/main/java/com/stripe/service/testhelpers/sharedpayment/GrantedTokenService.java index 9ac86518c78..74b761d2976 100644 --- a/src/main/java/com/stripe/service/testhelpers/sharedpayment/GrantedTokenService.java +++ b/src/main/java/com/stripe/service/testhelpers/sharedpayment/GrantedTokenService.java @@ -11,7 +11,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.sharedpayment.GrantedTokenCreateParams; -import com.stripe.param.sharedpayment.GrantedTokenUpdateParams; +import com.stripe.param.sharedpayment.GrantedTokenRevokeParams; public final class GrantedTokenService extends ApiService { public GrantedTokenService(StripeResponseGetter responseGetter) { @@ -45,32 +45,32 @@ public GrantedToken create(GrantedTokenCreateParams params, RequestOptions optio * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration */ - public GrantedToken update(String sharedPaymentGrantedToken, GrantedTokenUpdateParams params) + public GrantedToken revoke(String sharedPaymentGrantedToken, GrantedTokenRevokeParams params) throws StripeException { - return update(sharedPaymentGrantedToken, params, (RequestOptions) null); + return revoke(sharedPaymentGrantedToken, params, (RequestOptions) null); } /** * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration */ - public GrantedToken update(String sharedPaymentGrantedToken, RequestOptions options) + public GrantedToken revoke(String sharedPaymentGrantedToken, RequestOptions options) throws StripeException { - return update(sharedPaymentGrantedToken, (GrantedTokenUpdateParams) null, options); + return revoke(sharedPaymentGrantedToken, (GrantedTokenRevokeParams) null, options); } /** * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration */ - public GrantedToken update(String sharedPaymentGrantedToken) throws StripeException { - return update( - sharedPaymentGrantedToken, (GrantedTokenUpdateParams) null, (RequestOptions) null); + public GrantedToken revoke(String sharedPaymentGrantedToken) throws StripeException { + return revoke( + sharedPaymentGrantedToken, (GrantedTokenRevokeParams) null, (RequestOptions) null); } /** * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode * and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration */ - public GrantedToken update( - String sharedPaymentGrantedToken, GrantedTokenUpdateParams params, RequestOptions options) + public GrantedToken revoke( + String sharedPaymentGrantedToken, GrantedTokenRevokeParams params, RequestOptions options) throws StripeException { String path = String.format( From d34e594b3a63c1c40cc0055b22c64eb044c1d18b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 19 Dec 2025 07:43:25 +0000 Subject: [PATCH 6/8] Update generated code for v2148 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../stripe/model/EventDataClassLookup.java | 1 + src/main/java/com/stripe/model/TaxCode.java | 33 ++ .../com/stripe/model/tax/Calculation.java | 20 +- .../stripe/model/tax/CalculationLineItem.java | 21 +- .../java/com/stripe/model/tax/Location.java | 240 ++++++++++++ .../stripe/model/tax/LocationCollection.java | 6 + .../com/stripe/model/tax/Registration.java | 166 +++++++- .../com/stripe/model/tax/Transaction.java | 12 +- .../stripe/param/InvoiceAddLinesParams.java | 26 +- .../param/InvoiceLineItemUpdateParams.java | 36 +- .../param/InvoiceUpdateLinesParams.java | 26 +- .../stripe/param/PaymentLinkCreateParams.java | 26 +- .../com/stripe/param/PlanCreateParams.java | 27 +- .../com/stripe/param/PriceCreateParams.java | 27 +- .../com/stripe/param/ProductCreateParams.java | 27 +- .../com/stripe/param/ProductUpdateParams.java | 37 +- .../param/checkout/SessionCreateParams.java | 26 +- .../param/checkout/SessionUpdateParams.java | 36 +- .../param/tax/CalculationCreateParams.java | 23 ++ .../param/tax/LocationCreateParams.java | 363 ++++++++++++++++++ .../stripe/param/tax/LocationListParams.java | 208 ++++++++++ .../param/tax/LocationRetrieveParams.java | 100 +++++ .../param/tax/RegistrationCreateParams.java | 26 +- .../java/com/stripe/service/TaxService.java | 4 + .../stripe/service/tax/LocationService.java | 129 +++++++ 27 files changed, 1608 insertions(+), 42 deletions(-) create mode 100644 src/main/java/com/stripe/model/tax/Location.java create mode 100644 src/main/java/com/stripe/model/tax/LocationCollection.java create mode 100644 src/main/java/com/stripe/param/tax/LocationCreateParams.java create mode 100644 src/main/java/com/stripe/param/tax/LocationListParams.java create mode 100644 src/main/java/com/stripe/param/tax/LocationRetrieveParams.java create mode 100644 src/main/java/com/stripe/service/tax/LocationService.java diff --git a/API_VERSION b/API_VERSION index a6cd1432a51..67216660571 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -62f4f6bb7256abf1d83d35d2fb79a309954b19c9 \ No newline at end of file +0822236fb875490aa7ccc7b66dbb52f8965ee062 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index cef0e899277..6a50c81b8fc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2146 \ No newline at end of file +v2148 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index 61c1a6c2400..28c12348ab1 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -234,6 +234,7 @@ public final class EventDataClassLookup { classLookup.put("tax.calculation", com.stripe.model.tax.Calculation.class); classLookup.put("tax.calculation_line_item", com.stripe.model.tax.CalculationLineItem.class); classLookup.put("tax.form", com.stripe.model.tax.Form.class); + classLookup.put("tax.location", com.stripe.model.tax.Location.class); classLookup.put("tax.registration", com.stripe.model.tax.Registration.class); classLookup.put("tax.settings", com.stripe.model.tax.Settings.class); classLookup.put("tax.transaction", com.stripe.model.tax.Transaction.class); diff --git a/src/main/java/com/stripe/model/TaxCode.java b/src/main/java/com/stripe/model/TaxCode.java index 0d2f8b945f6..8bd65c97281 100644 --- a/src/main/java/com/stripe/model/TaxCode.java +++ b/src/main/java/com/stripe/model/TaxCode.java @@ -8,6 +8,7 @@ import com.stripe.net.ApiResource; import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; import com.stripe.param.TaxCodeListParams; import com.stripe.param.TaxCodeRetrieveParams; import java.util.Map; @@ -44,6 +45,14 @@ public class TaxCode extends ApiResource implements HasId { @SerializedName("object") String object; + /** + * An object that describes more information about the tax location required for this tax code. + * Some tax + * codes require a tax location of type {@code performance} to calculate tax correctly. + */ + @SerializedName("requirements") + Requirements requirements; + /** * A list of all tax codes available to * add to Products in order to allow specific tax calculations. @@ -135,4 +144,28 @@ public static TaxCode retrieve(String id, TaxCodeRetrieveParams params, RequestO options); return getGlobalResponseGetter().request(request, TaxCode.class); } + + /** + * For more details about Requirements, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Requirements extends StripeObject { + /** + * Describes whether a performance location is required for a successful tax calculation with a + * tax code. + * + *

One of {@code optional}, or {@code required}. + */ + @SerializedName("performance_location") + String performanceLocation; + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(requirements, responseGetter); + } } diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 4f2a4219eb2..bcf98d9be3b 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -472,7 +472,7 @@ public static class TaxBreakdown extends StripeObject { * Indicates whether the jurisdiction was determined by the origin (merchant's address) or * destination (customer's address). * - *

One of {@code destination}, or {@code origin}. + *

One of {@code destination}, {@code origin}, or {@code performance}. */ @SerializedName("sourcing") String sourcing; @@ -565,10 +565,12 @@ public static class TaxRateDetails extends StripeObject { /** * The tax type, such as {@code vat} or {@code sales_tax}. * - *

One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, - * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code - * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code - * vat}. + *

One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code + * communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst}, + * {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, + * {@code luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code + * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code + * tourism_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; @@ -666,9 +668,11 @@ public static class TaxRateDetails extends StripeObject { /** * The tax type, such as {@code vat} or {@code sales_tax}. * - *

One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, - * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code - * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}. + *

One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code + * communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst}, + * {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, {@code + * luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code retail_delivery_fee}, + * {@code rst}, {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/tax/CalculationLineItem.java b/src/main/java/com/stripe/model/tax/CalculationLineItem.java index fc64b94fa46..e61fee72e71 100644 --- a/src/main/java/com/stripe/model/tax/CalculationLineItem.java +++ b/src/main/java/com/stripe/model/tax/CalculationLineItem.java @@ -57,6 +57,17 @@ public class CalculationLineItem extends StripeObject implements HasId { @SerializedName("object") String object; + /** + * A tax location for a line item that acts as a performance location. This indicates that the + * line item might be taxed at the place where it is being performed at. This is helpful for + * events or other services being performed at non-customer addresses like venues or offices. This + * can be left empty for tax codes that do not require a tax location. For tax codes where the + * location requirement is "optional", this would override the customer address in most + * use cases. + */ + @SerializedName("performance_location") + String performanceLocation; + /** The ID of an existing Product. */ @SerializedName("product") String product; @@ -113,7 +124,7 @@ public static class TaxBreakdown extends StripeObject { * Indicates whether the jurisdiction was determined by the origin (merchant's address) or * destination (customer's address). * - *

One of {@code destination}, or {@code origin}. + *

One of {@code destination}, {@code origin}, or {@code performance}. */ @SerializedName("sourcing") String sourcing; @@ -206,9 +217,11 @@ public static class TaxRateDetails extends StripeObject { /** * The tax type, such as {@code vat} or {@code sales_tax}. * - *

One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, - * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code - * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}. + *

One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code + * communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst}, + * {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, {@code + * luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code retail_delivery_fee}, + * {@code rst}, {@code sales_tax}, {@code service_tax}, {@code tourism_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/tax/Location.java b/src/main/java/com/stripe/model/tax/Location.java new file mode 100644 index 00000000000..e303834a2c9 --- /dev/null +++ b/src/main/java/com/stripe/model/tax/Location.java @@ -0,0 +1,240 @@ +// File generated from our OpenAPI spec +package com.stripe.model.tax; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.Address; +import com.stripe.model.HasId; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.tax.LocationCreateParams; +import com.stripe.param.tax.LocationListParams; +import com.stripe.param.tax.LocationRetrieveParams; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** Tax locations represent venues for services, tickets, or other product types. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Location extends ApiResource implements HasId { + @SerializedName("address") + Address address; + + /** + * A descriptive text providing additional context about the tax location. This can include + * information about the venue, types of events held, services available, or any relevant details + * for better identification (e.g., "A spacious auditorium suitable for large concerts and + * events."). + */ + @SerializedName("description") + String description; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code tax.location}. + */ + @SerializedName("object") + String object; + + /** + * The type of tax location to be defined. Currently the only option is {@code performance}. + * + *

Equal to {@code performance}. + */ + @SerializedName("type") + String type; + + /** + * Create a tax location to use in calculating taxes for a service, ticket, or other type of + * product. The resulting object contains the id, address, name, description, and current + * operational status of the tax location. + */ + public static Location create(Map params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Create a tax location to use in calculating taxes for a service, ticket, or other type of + * product. The resulting object contains the id, address, name, description, and current + * operational status of the tax location. + */ + public static Location create(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/locations"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, Location.class); + } + + /** + * Create a tax location to use in calculating taxes for a service, ticket, or other type of + * product. The resulting object contains the id, address, name, description, and current + * operational status of the tax location. + */ + public static Location create(LocationCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Create a tax location to use in calculating taxes for a service, ticket, or other type of + * product. The resulting object contains the id, address, name, description, and current + * operational status of the tax location. + */ + public static Location create(LocationCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/locations"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, Location.class); + } + + /** + * Retrieve a list of all tax locations. Tax locations can represent the venues for services, + * tickets, or other product types. + * + *

The response includes detailed information for each tax location, such as its address, name, + * description, and current operational status. + * + *

You can paginate through the list by using the {@code limit} parameter to control the number + * of results returned in each request. + */ + public static LocationCollection list(Map params) throws StripeException { + return list(params, (RequestOptions) null); + } + + /** + * Retrieve a list of all tax locations. Tax locations can represent the venues for services, + * tickets, or other product types. + * + *

The response includes detailed information for each tax location, such as its address, name, + * description, and current operational status. + * + *

You can paginate through the list by using the {@code limit} parameter to control the number + * of results returned in each request. + */ + public static LocationCollection list(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/locations"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, LocationCollection.class); + } + + /** + * Retrieve a list of all tax locations. Tax locations can represent the venues for services, + * tickets, or other product types. + * + *

The response includes detailed information for each tax location, such as its address, name, + * description, and current operational status. + * + *

You can paginate through the list by using the {@code limit} parameter to control the number + * of results returned in each request. + */ + public static LocationCollection list(LocationListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + + /** + * Retrieve a list of all tax locations. Tax locations can represent the venues for services, + * tickets, or other product types. + * + *

The response includes detailed information for each tax location, such as its address, name, + * description, and current operational status. + * + *

You can paginate through the list by using the {@code limit} parameter to control the number + * of results returned in each request. + */ + public static LocationCollection list(LocationListParams params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/locations"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, LocationCollection.class); + } + + /** + * Fetch the details of a specific tax location using its unique identifier. Use a tax location to + * calculate taxes based on the location of the end product, such as a performance, instead of the + * customer address. For more details, check the integration guide. + */ + public static Location retrieve(String location) throws StripeException { + return retrieve(location, (Map) null, (RequestOptions) null); + } + + /** + * Fetch the details of a specific tax location using its unique identifier. Use a tax location to + * calculate taxes based on the location of the end product, such as a performance, instead of the + * customer address. For more details, check the integration guide. + */ + public static Location retrieve(String location, RequestOptions options) throws StripeException { + return retrieve(location, (Map) null, options); + } + + /** + * Fetch the details of a specific tax location using its unique identifier. Use a tax location to + * calculate taxes based on the location of the end product, such as a performance, instead of the + * customer address. For more details, check the integration guide. + */ + public static Location retrieve( + String location, Map params, RequestOptions options) throws StripeException { + String path = String.format("/v1/tax/locations/%s", ApiResource.urlEncodeId(location)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, Location.class); + } + + /** + * Fetch the details of a specific tax location using its unique identifier. Use a tax location to + * calculate taxes based on the location of the end product, such as a performance, instead of the + * customer address. For more details, check the integration guide. + */ + public static Location retrieve( + String location, LocationRetrieveParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/tax/locations/%s", ApiResource.urlEncodeId(location)); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, Location.class); + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(address, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/tax/LocationCollection.java b/src/main/java/com/stripe/model/tax/LocationCollection.java new file mode 100644 index 00000000000..ae8112a39fb --- /dev/null +++ b/src/main/java/com/stripe/model/tax/LocationCollection.java @@ -0,0 +1,6 @@ +// File generated from our OpenAPI spec +package com.stripe.model.tax; + +import com.stripe.model.StripeCollection; + +public class LocationCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/tax/Registration.java b/src/main/java/com/stripe/model/tax/Registration.java index 79c3c4fcfd2..46da67d03ff 100644 --- a/src/main/java/com/stripe/model/tax/Registration.java +++ b/src/main/java/com/stripe/model/tax/Registration.java @@ -2863,12 +2863,33 @@ public static class Ug extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Us extends StripeObject { + @SerializedName("admissions_tax") + AdmissionsTax admissionsTax; + + @SerializedName("attendance_tax") + AttendanceTax attendanceTax; + + @SerializedName("entertainment_tax") + EntertainmentTax entertainmentTax; + + @SerializedName("gross_receipts_tax") + GrossReceiptsTax grossReceiptsTax; + + @SerializedName("hospitality_tax") + HospitalityTax hospitalityTax; + @SerializedName("local_amusement_tax") LocalAmusementTax localAmusementTax; @SerializedName("local_lease_tax") LocalLeaseTax localLeaseTax; + @SerializedName("luxury_tax") + LuxuryTax luxuryTax; + + @SerializedName("resort_tax") + ResortTax resortTax; + /** * Two-letter US state code (ISO * 3166-2). @@ -2879,15 +2900,105 @@ public static class Us extends StripeObject { @SerializedName("state_sales_tax") StateSalesTax stateSalesTax; + @SerializedName("tourism_tax") + TourismTax tourismTax; + /** * Type of registration in the US. * - *

One of {@code local_amusement_tax}, {@code local_lease_tax}, {@code - * state_communications_tax}, {@code state_retail_delivery_fee}, or {@code state_sales_tax}. + *

One of {@code admissions_tax}, {@code attendance_tax}, {@code entertainment_tax}, {@code + * gross_receipts_tax}, {@code hospitality_tax}, {@code local_amusement_tax}, {@code + * local_lease_tax}, {@code luxury_tax}, {@code resort_tax}, {@code state_communications_tax}, + * {@code state_retail_delivery_fee}, {@code state_sales_tax}, or {@code tourism_tax}. */ @SerializedName("type") String type; + /** + * For more details about AdmissionsTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdmissionsTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + + /** + * For more details about AttendanceTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AttendanceTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + + /** + * For more details about EntertainmentTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EntertainmentTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + + /** + * For more details about GrossReceiptsTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GrossReceiptsTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + + /** + * For more details about HospitalityTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class HospitalityTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + /** * For more details about LocalAmusementTax, please refer to the API Reference. @@ -2920,6 +3031,40 @@ public static class LocalLeaseTax extends StripeObject { String jurisdiction; } + /** + * For more details about LuxuryTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LuxuryTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + + /** + * For more details about ResortTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ResortTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } + /** * For more details about StateSalesTax, please refer to the API Reference. @@ -2957,6 +3102,23 @@ public static class Election extends StripeObject { String type; } } + + /** + * For more details about TourismTax, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TourismTax extends StripeObject { + /** + * A jurisdiction + * code representing the local jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + } } /** diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index adb88509e17..99f048a1a82 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -533,7 +533,7 @@ public static class TaxBreakdown extends StripeObject { * Indicates whether the jurisdiction was determined by the origin (merchant's address) or * destination (customer's address). * - *

One of {@code destination}, or {@code origin}. + *

One of {@code destination}, {@code origin}, or {@code performance}. */ @SerializedName("sourcing") String sourcing; @@ -626,10 +626,12 @@ public static class TaxRateDetails extends StripeObject { /** * The tax type, such as {@code vat} or {@code sales_tax}. * - *

One of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, - * {@code igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code - * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code - * vat}. + *

One of {@code admissions_tax}, {@code amusement_tax}, {@code attendance_tax}, {@code + * communications_tax}, {@code entertainment_tax}, {@code gross_receipts_tax}, {@code gst}, + * {@code hospitality_tax}, {@code hst}, {@code igst}, {@code jct}, {@code lease_tax}, + * {@code luxury_tax}, {@code pst}, {@code qst}, {@code resort_tax}, {@code + * retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code service_tax}, {@code + * tourism_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java index 10de188bab8..3098d036291 100644 --- a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java @@ -1649,6 +1649,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + String performanceLocation; + /** * Required. A tax * code ID. @@ -1656,8 +1664,10 @@ public static class TaxDetails { @SerializedName("tax_code") String taxCode; - private TaxDetails(Map extraParams, String taxCode) { + private TaxDetails( + Map extraParams, String performanceLocation, String taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -1668,12 +1678,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private String performanceLocation; + private String taxCode; /** Finalize and obtain parameter instance from this builder. */ public InvoiceAddLinesParams.Line.PriceData.ProductData.TaxDetails build() { return new InvoiceAddLinesParams.Line.PriceData.ProductData.TaxDetails( - this.extraParams, this.taxCode); + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -1706,6 +1718,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java index cffc4d9f7f7..09bd27569f1 100644 --- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java @@ -1561,6 +1561,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + Object performanceLocation; + /** * Required. A tax * code ID. @@ -1568,8 +1576,10 @@ public static class TaxDetails { @SerializedName("tax_code") Object taxCode; - private TaxDetails(Map extraParams, Object taxCode) { + private TaxDetails( + Map extraParams, Object performanceLocation, Object taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -1580,12 +1590,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Object performanceLocation; + private Object taxCode; /** Finalize and obtain parameter instance from this builder. */ public InvoiceLineItemUpdateParams.PriceData.ProductData.TaxDetails build() { return new InvoiceLineItemUpdateParams.PriceData.ProductData.TaxDetails( - this.extraParams, this.taxCode); + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -1618,6 +1630,26 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(EmptyParam performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java index 152754a31ae..ed641c984e7 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java @@ -1676,6 +1676,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + String performanceLocation; + /** * Required. A tax * code ID. @@ -1683,8 +1691,10 @@ public static class TaxDetails { @SerializedName("tax_code") String taxCode; - private TaxDetails(Map extraParams, String taxCode) { + private TaxDetails( + Map extraParams, String performanceLocation, String taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -1695,12 +1705,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private String performanceLocation; + private String taxCode; /** Finalize and obtain parameter instance from this builder. */ public InvoiceUpdateLinesParams.Line.PriceData.ProductData.TaxDetails build() { return new InvoiceUpdateLinesParams.Line.PriceData.ProductData.TaxDetails( - this.extraParams, this.taxCode); + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -1733,6 +1745,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 0e4efdf3443..1ab1bf683cb 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -4147,6 +4147,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + String performanceLocation; + /** * Required. A tax * code ID. @@ -4154,8 +4162,10 @@ public static class TaxDetails { @SerializedName("tax_code") String taxCode; - private TaxDetails(Map extraParams, String taxCode) { + private TaxDetails( + Map extraParams, String performanceLocation, String taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -4166,12 +4176,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private String performanceLocation; + private String taxCode; /** Finalize and obtain parameter instance from this builder. */ public PaymentLinkCreateParams.LineItem.PriceData.ProductData.TaxDetails build() { return new PaymentLinkCreateParams.LineItem.PriceData.ProductData.TaxDetails( - this.extraParams, this.taxCode); + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -4204,6 +4216,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/PlanCreateParams.java b/src/main/java/com/stripe/param/PlanCreateParams.java index 41812ea1318..2084b657094 100644 --- a/src/main/java/com/stripe/param/PlanCreateParams.java +++ b/src/main/java/com/stripe/param/PlanCreateParams.java @@ -770,6 +770,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + String performanceLocation; + /** * Required. A tax * code ID. @@ -777,8 +785,10 @@ public static class TaxDetails { @SerializedName("tax_code") String taxCode; - private TaxDetails(Map extraParams, String taxCode) { + private TaxDetails( + Map extraParams, String performanceLocation, String taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -789,11 +799,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private String performanceLocation; + private String taxCode; /** Finalize and obtain parameter instance from this builder. */ public PlanCreateParams.Product.TaxDetails build() { - return new PlanCreateParams.Product.TaxDetails(this.extraParams, this.taxCode); + return new PlanCreateParams.Product.TaxDetails( + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -824,6 +837,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/PriceCreateParams.java b/src/main/java/com/stripe/param/PriceCreateParams.java index 693140a151f..0c99c8b8b88 100644 --- a/src/main/java/com/stripe/param/PriceCreateParams.java +++ b/src/main/java/com/stripe/param/PriceCreateParams.java @@ -1428,6 +1428,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + String performanceLocation; + /** * Required. A tax * code ID. @@ -1435,8 +1443,10 @@ public static class TaxDetails { @SerializedName("tax_code") String taxCode; - private TaxDetails(Map extraParams, String taxCode) { + private TaxDetails( + Map extraParams, String performanceLocation, String taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -1447,11 +1457,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private String performanceLocation; + private String taxCode; /** Finalize and obtain parameter instance from this builder. */ public PriceCreateParams.ProductData.TaxDetails build() { - return new PriceCreateParams.ProductData.TaxDetails(this.extraParams, this.taxCode); + return new PriceCreateParams.ProductData.TaxDetails( + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -1482,6 +1495,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/ProductCreateParams.java b/src/main/java/com/stripe/param/ProductCreateParams.java index c2606bbeffb..ef38d768adb 100644 --- a/src/main/java/com/stripe/param/ProductCreateParams.java +++ b/src/main/java/com/stripe/param/ProductCreateParams.java @@ -1744,6 +1744,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + String performanceLocation; + /** * Required. A tax * code ID. @@ -1751,8 +1759,10 @@ public static class TaxDetails { @SerializedName("tax_code") String taxCode; - private TaxDetails(Map extraParams, String taxCode) { + private TaxDetails( + Map extraParams, String performanceLocation, String taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -1763,11 +1773,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private String performanceLocation; + private String taxCode; /** Finalize and obtain parameter instance from this builder. */ public ProductCreateParams.TaxDetails build() { - return new ProductCreateParams.TaxDetails(this.extraParams, this.taxCode); + return new ProductCreateParams.TaxDetails( + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -1796,6 +1809,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/ProductUpdateParams.java b/src/main/java/com/stripe/param/ProductUpdateParams.java index 6dbc4dfb4d1..9d03daa1743 100644 --- a/src/main/java/com/stripe/param/ProductUpdateParams.java +++ b/src/main/java/com/stripe/param/ProductUpdateParams.java @@ -770,6 +770,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + Object performanceLocation; + /** * Required. A tax * code ID. @@ -777,8 +785,10 @@ public static class TaxDetails { @SerializedName("tax_code") Object taxCode; - private TaxDetails(Map extraParams, Object taxCode) { + private TaxDetails( + Map extraParams, Object performanceLocation, Object taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -789,11 +799,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Object performanceLocation; + private Object taxCode; /** Finalize and obtain parameter instance from this builder. */ public ProductUpdateParams.TaxDetails build() { - return new ProductUpdateParams.TaxDetails(this.extraParams, this.taxCode); + return new ProductUpdateParams.TaxDetails( + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -822,6 +835,26 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(EmptyParam performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 1e9ddd8ec8b..513eb654202 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -6504,6 +6504,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + String performanceLocation; + /** * Required. A tax * code ID. @@ -6511,8 +6519,10 @@ public static class TaxDetails { @SerializedName("tax_code") String taxCode; - private TaxDetails(Map extraParams, String taxCode) { + private TaxDetails( + Map extraParams, String performanceLocation, String taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -6523,12 +6533,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private String performanceLocation; + private String taxCode; /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.LineItem.PriceData.ProductData.TaxDetails build() { return new SessionCreateParams.LineItem.PriceData.ProductData.TaxDetails( - this.extraParams, this.taxCode); + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -6561,6 +6573,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java index 3dd1911ec49..f984abc0368 100644 --- a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java @@ -2527,6 +2527,14 @@ public static class TaxDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + Object performanceLocation; + /** * Required. A tax * code ID. @@ -2534,8 +2542,10 @@ public static class TaxDetails { @SerializedName("tax_code") Object taxCode; - private TaxDetails(Map extraParams, Object taxCode) { + private TaxDetails( + Map extraParams, Object performanceLocation, Object taxCode) { this.extraParams = extraParams; + this.performanceLocation = performanceLocation; this.taxCode = taxCode; } @@ -2546,12 +2556,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Object performanceLocation; + private Object taxCode; /** Finalize and obtain parameter instance from this builder. */ public SessionUpdateParams.LineItem.PriceData.ProductData.TaxDetails build() { return new SessionUpdateParams.LineItem.PriceData.ProductData.TaxDetails( - this.extraParams, this.taxCode); + this.extraParams, this.performanceLocation, this.taxCode); } /** @@ -2584,6 +2596,26 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(EmptyParam performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * Required. A tax * code ID. diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index 10433a7db45..10c7a4675c7 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -1149,6 +1149,14 @@ public static class LineItem { @SerializedName("metadata") Map metadata; + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + @SerializedName("performance_location") + String performanceLocation; + /** * If provided, the product's {@code tax_code} will be used as the line item's {@code tax_code}. */ @@ -1188,6 +1196,7 @@ private LineItem( Long amount, Map extraParams, Map metadata, + String performanceLocation, String product, Long quantity, String reference, @@ -1196,6 +1205,7 @@ private LineItem( this.amount = amount; this.extraParams = extraParams; this.metadata = metadata; + this.performanceLocation = performanceLocation; this.product = product; this.quantity = quantity; this.reference = reference; @@ -1214,6 +1224,8 @@ public static class Builder { private Map metadata; + private String performanceLocation; + private String product; private Long quantity; @@ -1230,6 +1242,7 @@ public CalculationCreateParams.LineItem build() { this.amount, this.extraParams, this.metadata, + this.performanceLocation, this.product, this.quantity, this.reference, @@ -1300,6 +1313,16 @@ public Builder putAllMetadata(Map map) { return this; } + /** + * A tax location ID. Depending on the tax + * code, this is required, optional, or not supported. + */ + public Builder setPerformanceLocation(String performanceLocation) { + this.performanceLocation = performanceLocation; + return this; + } + /** * If provided, the product's {@code tax_code} will be used as the line item's {@code * tax_code}. diff --git a/src/main/java/com/stripe/param/tax/LocationCreateParams.java b/src/main/java/com/stripe/param/tax/LocationCreateParams.java new file mode 100644 index 00000000000..09c005d003b --- /dev/null +++ b/src/main/java/com/stripe/param/tax/LocationCreateParams.java @@ -0,0 +1,363 @@ +// File generated from our OpenAPI spec +package com.stripe.param.tax; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class LocationCreateParams extends ApiRequestParams { + /** Required. The physical address of the tax location. */ + @SerializedName("address") + Address address; + + /** + * Details to identify the tax location by its venue, types of events held, or available services, + * such as "A spacious auditorium suitable for large concerts and events.". + */ + @SerializedName("description") + String description; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The type of tax location. The only supported value is + * "performance". + */ + @SerializedName("type") + Type type; + + private LocationCreateParams( + Address address, + String description, + List expand, + Map extraParams, + Type type) { + this.address = address; + this.description = description; + this.expand = expand; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String description; + + private List expand; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationCreateParams build() { + return new LocationCreateParams( + this.address, this.description, this.expand, this.extraParams, this.type); + } + + /** Required. The physical address of the tax location. */ + public Builder setAddress(LocationCreateParams.Address address) { + this.address = address; + return this; + } + + /** + * Details to identify the tax location by its venue, types of events held, or available + * services, such as "A spacious auditorium suitable for large concerts and events.". + */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * LocationCreateParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * LocationCreateParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of tax location. The only supported value is + * "performance". + */ + public Builder setType(LocationCreateParams.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + Object city; + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** + * State/province as an ISO 3166-2 + * subdivision code, without country prefix, such as "NY" or "TX". + */ + @SerializedName("state") + Object state; + + private Address( + Object city, + String country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private String country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationCreateParams.Address build() { + return new LocationCreateParams.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Required. Two-letter country code (ISO 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationCreateParams.Address#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationCreateParams.Address#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State/province as an ISO 3166-2 + * subdivision code, without country prefix, such as "NY" or "TX". + */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** + * State/province as an ISO 3166-2 + * subdivision code, without country prefix, such as "NY" or "TX". + */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("performance") + PERFORMANCE("performance"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/tax/LocationListParams.java b/src/main/java/com/stripe/param/tax/LocationListParams.java new file mode 100644 index 00000000000..74a0c89d1b7 --- /dev/null +++ b/src/main/java/com/stripe/param/tax/LocationListParams.java @@ -0,0 +1,208 @@ +// File generated from our OpenAPI spec +package com.stripe.param.tax; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class LocationListParams extends ApiRequestParams { + /** + * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, starting with + * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to + * fetch the previous page of the list. + */ + @SerializedName("ending_before") + String endingBefore; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + * default is 10. + */ + @SerializedName("limit") + Long limit; + + /** + * A cursor for use in pagination. {@code starting_after} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, ending with + * {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in order to + * fetch the next page of the list. + */ + @SerializedName("starting_after") + String startingAfter; + + /** + * Required. Type of the tax location. Currently the only option is {@code + * performance}. + */ + @SerializedName("type") + Type type; + + private LocationListParams( + String endingBefore, + List expand, + Map extraParams, + Long limit, + String startingAfter, + Type type) { + this.endingBefore = endingBefore; + this.expand = expand; + this.extraParams = extraParams; + this.limit = limit; + this.startingAfter = startingAfter; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String endingBefore; + + private List expand; + + private Map extraParams; + + private Long limit; + + private String startingAfter; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationListParams build() { + return new LocationListParams( + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter, + this.type); + } + + /** + * A cursor for use in pagination. {@code ending_before} is an object ID that defines your place + * in the list. For instance, if you make a list request and receive 100 objects, starting with + * {@code obj_bar}, your subsequent call can include {@code ending_before=obj_bar} in order to + * fetch the previous page of the list. + */ + public Builder setEndingBefore(String endingBefore) { + this.endingBefore = endingBefore; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * LocationListParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * LocationListParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationListParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + * default is 10. + */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * A cursor for use in pagination. {@code starting_after} is an object ID that defines your + * place in the list. For instance, if you make a list request and receive 100 objects, ending + * with {@code obj_foo}, your subsequent call can include {@code starting_after=obj_foo} in + * order to fetch the next page of the list. + */ + public Builder setStartingAfter(String startingAfter) { + this.startingAfter = startingAfter; + return this; + } + + /** + * Required. Type of the tax location. Currently the only option is {@code + * performance}. + */ + public Builder setType(LocationListParams.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("performance") + PERFORMANCE("performance"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/tax/LocationRetrieveParams.java b/src/main/java/com/stripe/param/tax/LocationRetrieveParams.java new file mode 100644 index 00000000000..7bf5d7457eb --- /dev/null +++ b/src/main/java/com/stripe/param/tax/LocationRetrieveParams.java @@ -0,0 +1,100 @@ +// File generated from our OpenAPI spec +package com.stripe.param.tax; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class LocationRetrieveParams extends ApiRequestParams { + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private LocationRetrieveParams(List expand, Map extraParams) { + this.expand = expand; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationRetrieveParams build() { + return new LocationRetrieveParams(this.expand, this.extraParams); + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * LocationRetrieveParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * LocationRetrieveParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationRetrieveParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationRetrieveParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index 3a272c23e08..4db517cb554 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -16161,12 +16161,33 @@ public enum Type implements ApiRequestParams.EnumParam { } public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("admissions_tax") + ADMISSIONS_TAX("admissions_tax"), + + @SerializedName("attendance_tax") + ATTENDANCE_TAX("attendance_tax"), + + @SerializedName("entertainment_tax") + ENTERTAINMENT_TAX("entertainment_tax"), + + @SerializedName("gross_receipts_tax") + GROSS_RECEIPTS_TAX("gross_receipts_tax"), + + @SerializedName("hospitality_tax") + HOSPITALITY_TAX("hospitality_tax"), + @SerializedName("local_amusement_tax") LOCAL_AMUSEMENT_TAX("local_amusement_tax"), @SerializedName("local_lease_tax") LOCAL_LEASE_TAX("local_lease_tax"), + @SerializedName("luxury_tax") + LUXURY_TAX("luxury_tax"), + + @SerializedName("resort_tax") + RESORT_TAX("resort_tax"), + @SerializedName("state_communications_tax") STATE_COMMUNICATIONS_TAX("state_communications_tax"), @@ -16174,7 +16195,10 @@ public enum Type implements ApiRequestParams.EnumParam { STATE_RETAIL_DELIVERY_FEE("state_retail_delivery_fee"), @SerializedName("state_sales_tax") - STATE_SALES_TAX("state_sales_tax"); + STATE_SALES_TAX("state_sales_tax"), + + @SerializedName("tourism_tax") + TOURISM_TAX("tourism_tax"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/service/TaxService.java b/src/main/java/com/stripe/service/TaxService.java index bb805e3527d..c359f37c717 100644 --- a/src/main/java/com/stripe/service/TaxService.java +++ b/src/main/java/com/stripe/service/TaxService.java @@ -21,6 +21,10 @@ public com.stripe.service.tax.FormService forms() { return new com.stripe.service.tax.FormService(this.getResponseGetter()); } + public com.stripe.service.tax.LocationService locations() { + return new com.stripe.service.tax.LocationService(this.getResponseGetter()); + } + public com.stripe.service.tax.RegistrationService registrations() { return new com.stripe.service.tax.RegistrationService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/tax/LocationService.java b/src/main/java/com/stripe/service/tax/LocationService.java new file mode 100644 index 00000000000..4f62322aa36 --- /dev/null +++ b/src/main/java/com/stripe/service/tax/LocationService.java @@ -0,0 +1,129 @@ +// File generated from our OpenAPI spec +package com.stripe.service.tax; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.StripeCollection; +import com.stripe.model.tax.Location; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.tax.LocationCreateParams; +import com.stripe.param.tax.LocationListParams; +import com.stripe.param.tax.LocationRetrieveParams; + +public final class LocationService extends ApiService { + public LocationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Retrieve a list of all tax locations. Tax locations can represent the venues for services, + * tickets, or other product types. + * + *

The response includes detailed information for each tax location, such as its address, name, + * description, and current operational status. + * + *

You can paginate through the list by using the {@code limit} parameter to control the number + * of results returned in each request. + */ + public StripeCollection list(LocationListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** + * Retrieve a list of all tax locations. Tax locations can represent the venues for services, + * tickets, or other product types. + * + *

The response includes detailed information for each tax location, such as its address, name, + * description, and current operational status. + * + *

You can paginate through the list by using the {@code limit} parameter to control the number + * of results returned in each request. + */ + public StripeCollection list(LocationListParams params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/locations"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** + * Create a tax location to use in calculating taxes for a service, ticket, or other type of + * product. The resulting object contains the id, address, name, description, and current + * operational status of the tax location. + */ + public Location create(LocationCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * Create a tax location to use in calculating taxes for a service, ticket, or other type of + * product. The resulting object contains the id, address, name, description, and current + * operational status of the tax location. + */ + public Location create(LocationCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/locations"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Location.class); + } + /** + * Fetch the details of a specific tax location using its unique identifier. Use a tax location to + * calculate taxes based on the location of the end product, such as a performance, instead of the + * customer address. For more details, check the integration guide. + */ + public Location retrieve(String location, LocationRetrieveParams params) throws StripeException { + return retrieve(location, params, (RequestOptions) null); + } + /** + * Fetch the details of a specific tax location using its unique identifier. Use a tax location to + * calculate taxes based on the location of the end product, such as a performance, instead of the + * customer address. For more details, check the integration guide. + */ + public Location retrieve(String location, RequestOptions options) throws StripeException { + return retrieve(location, (LocationRetrieveParams) null, options); + } + /** + * Fetch the details of a specific tax location using its unique identifier. Use a tax location to + * calculate taxes based on the location of the end product, such as a performance, instead of the + * customer address. For more details, check the integration guide. + */ + public Location retrieve(String location) throws StripeException { + return retrieve(location, (LocationRetrieveParams) null, (RequestOptions) null); + } + /** + * Fetch the details of a specific tax location using its unique identifier. Use a tax location to + * calculate taxes based on the location of the end product, such as a performance, instead of the + * customer address. For more details, check the integration guide. + */ + public Location retrieve(String location, LocationRetrieveParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/tax/locations/%s", ApiResource.urlEncodeId(location)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Location.class); + } +} From 4997e40128729a04a95d2979cefcd260662d0602 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 23 Dec 2025 22:39:02 +0000 Subject: [PATCH 7/8] Update generated code for v2149 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/main/java/com/stripe/model/Plan.java | 7 +++++++ src/main/java/com/stripe/model/Price.java | 7 +++++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/API_VERSION b/API_VERSION index 67216660571..fdbfbaad776 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -0822236fb875490aa7ccc7b66dbb52f8965ee062 \ No newline at end of file +499f00588b1b41670a44a1e00598db81222ce169 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6a50c81b8fc..02f8a7cef1a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2148 \ No newline at end of file +v2149 \ No newline at end of file diff --git a/src/main/java/com/stripe/model/Plan.java b/src/main/java/com/stripe/model/Plan.java index 99a23a59c21..cfb08fb1354 100644 --- a/src/main/java/com/stripe/model/Plan.java +++ b/src/main/java/com/stripe/model/Plan.java @@ -89,6 +89,13 @@ public class Plan extends ApiResource implements HasId, MetadataStore { @SerializedName("deleted") Boolean deleted; + /** + * A custom identifier for this price, such as a SKU number or product code, that can be used to + * reference records from external systems. + */ + @SerializedName("external_reference") + String externalReference; + /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") diff --git a/src/main/java/com/stripe/model/Price.java b/src/main/java/com/stripe/model/Price.java index 3441e837841..0bdd27cffe6 100644 --- a/src/main/java/com/stripe/model/Price.java +++ b/src/main/java/com/stripe/model/Price.java @@ -89,6 +89,13 @@ public class Price extends ApiResource implements HasId, MetadataStore { @SerializedName("deleted") Boolean deleted; + /** + * A custom identifier for this price, such as a SKU number or product code, that can be used to + * reference records from external systems. + */ + @SerializedName("external_reference") + String externalReference; + /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") From 11b30cdbca500a558190188d7633ee35b076283f Mon Sep 17 00:00:00 2001 From: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> Date: Fri, 2 Jan 2026 04:45:53 -0800 Subject: [PATCH 8/8] Copy API_VERSION to CODEGEN_VERSION (#2132) --- CODEGEN_VERSION | 1 + 1 file changed, 1 insertion(+) create mode 100644 CODEGEN_VERSION diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION new file mode 100644 index 00000000000..93be1cef53b --- /dev/null +++ b/CODEGEN_VERSION @@ -0,0 +1 @@ +88aa59022b32620f4d66d6196e3b42d5a0f86bbb \ No newline at end of file