diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dfe6e367612..86c0dbccc2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,12 +18,17 @@ on: - sdk-release/** - feature/** +permissions: {} + jobs: build: name: Build runs-on: "ubuntu-24.04" + permissions: + contents: read + steps: - uses: extractions/setup-just@v2 - uses: actions/checkout@master @@ -49,19 +54,25 @@ jobs: runs-on: "ubuntu-24.04" + permissions: + contents: read + strategy: fail-fast: false matrix: # We test Stripe SDK against Java LTS versions(8, 11, 17, 21) and currently supported non-LTS versions. # https://www.oracle.com/java/technologies/java-se-support-roadmap.html + # https://endoflife.date/oracle-jdk java-version: + # LTS versions - "1.8" - "11" - "17" - "21" - - "22" - - "23" - - "24" + - "25" + # non-LTS versions + # we should periodically add the latest non-LTS version here to test against + # as of 2025-09-29, the latest version of java (25) is LTS, so this section is empty. In March 2026, we'll add "26". steps: - uses: extractions/setup-just@v2 @@ -103,6 +114,8 @@ jobs: endsWith(github.actor, '-stripe') needs: [build, test] runs-on: "ubuntu-24.04" + permissions: + contents: read steps: - uses: actions/checkout@master - name: Setup Java @@ -166,6 +179,9 @@ jobs: compat: runs-on: "ubuntu-24.04" + permissions: + contents: read + steps: - name: Checkout repository uses: actions/checkout@v2 diff --git a/.github/workflows/rules.yml b/.github/workflows/rules.yml index 21d6c0989bc..b7d9c0d8bcc 100644 --- a/.github/workflows/rules.yml +++ b/.github/workflows/rules.yml @@ -7,6 +7,8 @@ on: types: - auto_merge_enabled +permissions: {} + jobs: require_merge_commit_on_merge_script_pr: name: Merge script PRs must create merge commits diff --git a/API_VERSION b/API_VERSION deleted file mode 100644 index 0336d6a3a58..00000000000 --- a/API_VERSION +++ /dev/null @@ -1 +0,0 @@ -2025-08-27.basil \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8043a9a0d97..71ead5ba323 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,212 @@ # Changelog +## 31.3.0 - 2026-01-28 +This release changes the pinned API version to `2026-01-28.clover`. + +* [#2147](https://github.com/stripe/stripe-java/pull/2147) Update generated code + * Add support for new resource `radar.PaymentEvaluation` + * Add support for `create` method on resource `radar.PaymentEvaluation` + * Add support for `adjustableQuantity` on `LineItem` + * Add support for new value `adyen` 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 `pl_nip` on enums `CustomerCreateParams.tax_id_data[].type`, `InvoiceCreatePreviewParams.customer_details.tax_ids[].type`, `TaxIdCreateParams.type`, and `tax.CalculationCreateParams.customer_details.tax_ids[].type` + * Add support for `enforceArithmeticValidation` on `PaymentIntentCaptureParams.amount_details`, `PaymentIntentConfirmParams.amount_details`, `PaymentIntentCreateParams.amount_details`, `PaymentIntentIncrementAuthorizationParams.amount_details`, and `PaymentIntentUpdateParams.amount_details` + * Add support for new values `2.3.0` and `2.3.1` on enums `PaymentIntentConfirmParams.payment_method_options.card.three_d_secure.version`, `PaymentIntentCreateParams.payment_method_options.card.three_d_secure.version`, `PaymentIntentUpdateParams.payment_method_options.card.three_d_secure.version`, `SetupIntentConfirmParams.payment_method_options.card.three_d_secure.version`, `SetupIntentCreateParams.payment_method_options.card.three_d_secure.version`, and `SetupIntentUpdateParams.payment_method_options.card.three_d_secure.version` + * Add support for `error` on `PaymentIntent.amount_details` + * Remove support for `bgn` on `terminal.Configuration.tipping`, `terminal.ConfigurationCreateParams.tipping`, and `terminal.ConfigurationUpdateParams.tipping` + * Add support for `topup` on `treasury.ReceivedDebit.linked_flows` + * Add support for `contactPhone` on `v2.core.AccountCreateParams`, `v2.core.AccountTokenCreateParams`, `v2.core.AccountUpdateParams`, and `v2.core.Account` + * Add support for `registrationDate` on `v2.core.Account.identity.business_details`, `v2.core.AccountCreateParams.identity.business_details`, `v2.core.AccountTokenCreateParams.identity.business_details`, and `v2.core.AccountUpdateParams.identity.business_details` + * Add support for new value `gb_vat` on enums `v2.core.AccountCreateParams.identity.business_details.id_numbers[].type`, `v2.core.AccountTokenCreateParams.identity.business_details.id_numbers[].type`, and `v2.core.AccountUpdateParams.identity.business_details.id_numbers[].type` + +## 31.2.0 - 2026-01-16 +* [#2144](https://github.com/stripe/stripe-java/pull/2144) Update generated code + * Add support for event notifications `V2CoreAccountClosedEvent`, `V2CoreAccountCreatedEvent`, `V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationCustomerUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationMerchantUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent`, `V2CoreAccountIncludingConfigurationRecipientUpdatedEvent`, `V2CoreAccountIncludingDefaultsUpdatedEvent`, `V2CoreAccountIncludingFutureRequirementsUpdatedEvent`, `V2CoreAccountIncludingIdentityUpdatedEvent`, `V2CoreAccountIncludingRequirementsUpdatedEvent`, and `V2CoreAccountUpdatedEvent` with related object `v2.core.Account` + * Add support for event notification `V2CoreAccountLinkReturnedEvent` + * Add support for event notifications `V2CoreAccountPersonCreatedEvent`, `V2CoreAccountPersonDeletedEvent`, and `V2CoreAccountPersonUpdatedEvent` with related object `v2.core.AccountPerson` + +## 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`. + +* [#2113](https://github.com/stripe/stripe-java/pull/2113) Update generated code + * ⚠️ Remove support for `gt`, `gte`, `lt`, and `lte` on `v2.core.EventListParams` in favor of `created`. +* [#2110](https://github.com/stripe/stripe-java/pull/2110) Update v2 array parameter serialization to use indexed format + - `Retrieve` and `List` calls for `/v2` endpoints now use indexed format (e.g., `?include[0]=foo&include[1]=bar`) instead of repeated parameter format (e.g., `?include=foo&include=bar`) when communicating with the Stripe API. This may break any unit tests that expect the latter behavior when setting up a mock server. Instead, they should now expect the former. + - The `arraysAsRepeated` parameter was removed from the internal-use-only method `FormEncoder#createQueryString` +* [#2108](https://github.com/stripe/stripe-java/pull/2108) Update generated code + * Add support for new resources `tax.Association` and `terminal.OnboardingLink` + * Add support for `find` method on resource `tax.Association` + * Add support for `create` method on resource `terminal.OnboardingLink` + * Add support for `paymentMethodConfiguration` on `billingportal.Configuration.features.payment_method_update` + * Add support for `transactionId` on `Charge.payment_method_details.ideal`, `PaymentAttemptRecord.payment_method_details.ideal`, and `PaymentRecord.payment_method_details.ideal` + * Add support for new value `finom` 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 `created` on `CustomerBalanceTransactionListParams` and `InvoicePaymentListParams` + * Add support for `accountNumbers` on `financialconnections.Account` + * Add support for `fraudRisk` on `issuing.AuthorizationCreateParams.risk_assessment` + * Add support for `latestFraudWarning` on `issuing.Card` + * Add support for `hooks` on `PaymentIntentCaptureParams`, `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentIncrementAuthorizationParams`, `PaymentIntentUpdateParams`, and `PaymentIntent` + * Add support for `mbWay` and `twint` on `Refund.destination_details` + * Add support for new values `financial_connections.account.account_numbers_updated` and `financial_connections.account.upcoming_account_number_expiry` on enums `WebhookEndpointCreateParams.enabledEvents` and `WebhookEndpointUpdateParams.enabledEvents` + * Add support for snapshot events `financial_connections.account.account_numbers_updated` and `financial_connections.account.upcoming_account_number_expiry` with resource `financialconnections.Account` + +## 30.2.0 - 2025-11-05 +* [#2102](https://github.com/stripe/stripe-java/pull/2102) Update generated code + * Add support for `captureMethod` on `PaymentIntent.payment_method_options.card_present`, `PaymentIntentConfirmParams.payment_method_options.card_present`, `PaymentIntentCreateParams.payment_method_options.card_present`, and `PaymentIntentUpdateParams.payment_method_options.card_present` + +## 30.1.0 - 2025-10-29 + +This release changes the pinned API version to `2025-10-29.clover`. + +* [#2093](https://github.com/stripe/stripe-java/pull/2093) Update generated code + * Improve docs for PaymentIntent related endpoints +* [#2086](https://github.com/stripe/stripe-java/pull/2086) Update generated code + * Add support for new resources `PaymentAttemptRecord`, `PaymentIntentAmountDetailsLineItem`, and `PaymentRecord` + * Add support for `list` and `retrieve` methods on resource `PaymentAttemptRecord` + * Add support for `report_payment_attempt_canceled`, `report_payment_attempt_failed`, `report_payment_attempt_guaranteed`, `report_payment_attempt_informational`, `report_payment_attempt`, `report_payment`, `report_refund`, and `retrieve` methods on resource `PaymentRecord` + * Add support for `list` method on resource `PaymentIntentAmountDetailsLineItem` + * Add support for `representativeDeclaration` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company` + * Change `billing.CreditGrantCreateParams.category` to be optional + * Add support for `paymentMethodConfiguration` on `billingportal.ConfigurationCreateParams.features.payment_method_update` and `billingportal.ConfigurationUpdateParams.features.payment_method_update` + * Add support for new value `mb_way` on enum `checkout.SessionCreateParams.excludedPaymentMethodTypes` + * Add support for `twint` on `checkout.Session.payment_method_options` and `checkout.SessionCreateParams.payment_method_options` + * Add support for new value `mb_way` on enum `checkout.SessionCreateParams.paymentMethodTypes` + * Add support for `paymentRecordRefund` and `type` on `CreditNote.refunds[]`, `CreditNoteCreateParams.refunds[]`, `CreditNotePreviewLinesParams.refunds[]`, and `CreditNotePreviewParams.refunds[]` + * Add support for `customerSheet` and `mobilePaymentElement` on `CustomerSession.components` and `CustomerSessionCreateParams.components` + * Add support for new value `custom` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` + * Add support for `provider` on `Customer.tax` + * Add support for new value `platform_terms_of_service` on enum `FileListParams.purpose` + * Add support for new value `platform_terms_of_service` on enum `FileCreateParams.purpose` + * Add support for `paymentRecord` on `InvoiceAttachPaymentParams`, `InvoicePayment.payment`, and `InvoicePaymentListParams.payment` + * Change type of `InvoicePaymentListParams.payment.type` from `literal('payment_intent')` to `enum('payment_intent'|'payment_record')` + * Add support for new value `custom` on enums `InvoiceCreateParams.payment_settings.paymentMethodTypes`, `InvoiceUpdateParams.payment_settings.paymentMethodTypes`, `SubscriptionCreateParams.payment_settings.paymentMethodTypes`, and `SubscriptionUpdateParams.payment_settings.paymentMethodTypes` + * Add support for `amountDetails` on `PaymentIntentCaptureParams`, `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentIncrementAuthorizationParams`, and `PaymentIntentUpdateParams` + * Add support for `paymentDetails` on `PaymentIntentCaptureParams`, `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentIncrementAuthorizationParams`, `PaymentIntentUpdateParams`, and `PaymentIntent` + * Add support for `discountAmount`, `lineItems`, `shipping`, and `tax` on `PaymentIntent.amount_details` + * Add support for `nameCollection` on `PaymentLinkCreateParams`, `PaymentLinkUpdateParams`, and `PaymentLink` + * Add support for new value `mb_way` on enums `PaymentLinkCreateParams.paymentMethodTypes` and `PaymentLinkUpdateParams.paymentMethodTypes` + * Add support for `crypto` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, `PaymentMethodConfiguration`, and `Refund.destination_details` + * Add support for `mbWay` on `PaymentMethodConfigurationCreateParams`, `PaymentMethodConfigurationUpdateParams`, and `PaymentMethodConfiguration` + * Add support for `custom` on `PaymentMethodCreateParams` and `PaymentMethod` + * Add support for `excludedPaymentMethodTypes` on `SetupIntentCreateParams`, `SetupIntentUpdateParams`, and `SetupIntent` + * Add support for `tw` on `tax.Registration.country_options` and `tax.RegistrationCreateParams.country_options` + * Add support for `gip` on `terminal.Configuration.tipping`, `terminal.ConfigurationCreateParams.tipping`, and `terminal.ConfigurationUpdateParams.tipping` + * Add support for `lastSeenAt` on `terminal.Reader` + * Add support for new values `balance_settings.updated` and `invoice.payment_attempt_required` on enums `WebhookEndpointCreateParams.enabledEvents` and `WebhookEndpointUpdateParams.enabledEvents` + * Add support for new value `2025-10-29.clover` on enum `WebhookEndpointCreateParams.apiVersion` + * Add support for `gt`, `gte`, `lt`, `lte`, and `types` on `v2.core.EventListParams` + * Change `v2.core.EventListParams.objectId` to be optional + * Add support for snapshot event `balance_settings.updated` with resource `BalanceSettings` + * Add support for snapshot event `invoice.payment_attempt_required` with resource `Invoice` + +## 30.0.0 - 2025-09-30 +This release changes the pinned API version to `2025-09-30.clover` and contains breaking changes (prefixed with ⚠️ below) + +* [#2036](https://github.com/stripe/stripe-java/pull/2036) ⚠️ Add strongly typed EventNotifications + We've overhauled how V2 Events are handled in the SDK! This approach should provide a lot more information at authoring and compile time, leading to more robust integrations. As part of this process, there are a number of changes to be aware of. + - Added matching `EventNotification` classes to every v2 `Event`. For example, there's now a `V1BillingMeterErrorReportTriggeredEventNotification` to match the existing `V1BillingMeterErrorReportTriggeredEvent`. Each notification class defines a `fetchEvent()` method to retrieve its corresponding event. For events with related objects, there's a `fetchRelatedObject()` method that performs the API call and casts the response to the correct type. + - ⚠️ Rename function `StripeClient.parseThinEvent` to `StripeClient.parseEventNotification` and remove the `Stripe.ThinEvent` class. + - This function now returns a `Stripe.V2.Core.EventNotification` (which is the shared base class that all of the more specific `Stripe.Events.*EventNotification` classes share) instead of `Stripe.ThinEvent`. When applicable, these event notifications will have the `relatedObject` property and a `fetchRelatedObject()` function. They also have a `fetchEvent()` method to retrieve their corresponding `Stripe.Event.*Event` instance. + - If you parse an event the SDK doesn't have types for (e.g. it's newer than the SDK you're using), you'll get an instance of `Stripe.Events.UnknownEventNotification` instead of a more specific type. It has both the `relatedObject` property and the `fetchRelatedObject()` function (but they may be/return `null`) +* [#2069](https://github.com/stripe/stripe-java/pull/2069) Move `V2.Event` API resources to `V2.Core.Events` + - ⚠️ Move the below event related classes from `com.stripe.model.v2` to `com.stripe.model.v2.core`. This enables us to correctly match the API path to the namespace + - `com.stripe.model.v2.Event` -> `com.stripe.model.v2.core.Event` + - `com.stripe.model.v2.EventDestination` -> `com.stripe.model.v2.core.EventDestination` +* [#2057](https://github.com/stripe/stripe-java/pull/2057) Add `StripeContext` object + - Add the `StripeContext` class. Previously, you could set the stripe context only as a string via `StripeClientBuilder .setStripeContext()`. The same method can now take an instance of the `StripeContext` class as well + - ⚠️ Change `EventNotification` (formerly known as `ThinEvent`)'s `context` property from `string` to `StripeContext` +* [#2041](https://github.com/stripe/stripe-java/pull/2041) Throw `ApiKeyMissingException` instead of `IllegalArgumentException` for unset API keys + - ⚠️ throw `ApiKeyMissingException` instead of `IllegalArgumentException` when making a request before setting an API key initializing a client without an API key. Tweak the wording of that message to better indicate how to fix. +* [#2039](https://github.com/stripe/stripe-java/pull/2039) ⚠️ Build SDK w/ V2 OpenAPI spec + - ⚠️ The delete methods for v2 APIs (the ones in the `StripeClient.v2` namespace) now return a `V2DeletedObject` which has the id of the object that has been deleted and a string representing the type of the object that has been deleted. + - ⚠️ Query params on v2 APIs (like `limit`) are now `Long` instead of `Integer` (to match v1 APIs) + - ⚠️ Deeply nested param hashes with no properties no longer have classes generated for them. Instead, they're typed as `Map`. Because there were no params, it's unlikely you were using these classes. +* ⚠️ Deprecated the V1 service accessors living directly under StripeClient(e.g. customers, products) as they were copied under the new V1 service in our [last release](https://github.com/stripe/stripe-java/releases/tag/v29.5.0). Service accessors living directly under StripeClient(e.g. customers, products) will be removed from StripeClient in a future release. E.g. + ```diff + StripeClient client = new StripeClient("sk_test...") + + # Accessing V1 Stripe services on a StripeClient should be through the V1 namespace + - client.customers().list() + + client.v1().customers().list() + ``` + Refer to the [migration guide](https://github.com/stripe/stripe-java/wiki/v1-namespace-in-StripeClient) for help upgrading. +* [#2046](https://github.com/stripe/stripe-java/pull/2046) Adds v2 support to RateLimitException + * ⚠️ The base class of `RateLimitException` has been changed from `InvalidRequestException` to `ApiException`. There is no change to the public interface for the `RateLimitException` class. +* [#2037](https://github.com/stripe/stripe-java/pull/2037) Fix type bounds on request + * ⚠️ Changes the signature of `LiveResponseGetter#request`, `ApiService#request`, and `StripeResponseGetter#request` to return `` instead of ``. This only affects advanced use cases where users are extending `StripeObjectInterface` with their own objects to deserialize Stripe responses. Those objects will now need to extend `StripeObject`. + +* [#2040](https://github.com/stripe/stripe-java/pull/2040), [#2058](https://github.com/stripe/stripe-java/pull/2058), [#2059](https://github.com/stripe/stripe-java/pull/2059), [#2073](https://github.com/stripe/stripe-java/pull/2073) Update generated code based on incoming API changes in the `2025-09-30.clover` API version. + * ⚠️ Remove support for `balanceReport` and `payoutReconciliationReport` on `AccountSession.components` and `AccountSessionCreateParams.components` + * ⚠️ Change type of `InvoiceCreatePreviewParams.subscription_details.cancelAt`, `SubscriptionCreateParams.cancelAt` and `SubscriptionUpdateParams.cancelAt` from `DateTime` to `DateTime | enum('max_period_end'|'min_period_end')` + * ⚠️ Remove support for values `saturday` and `sunday` from enums `AccountCreateParams.settings.payouts.schedule.weeklyPayoutDays` and `AccountUpdateParams.settings.payouts.schedule.weeklyPayoutDays` + * ⚠️ Remove support for `iterations` on `InvoiceCreatePreviewParams.schedule_details.phases[]`, `SubscriptionScheduleCreateParams.phases[]`, and `SubscriptionScheduleUpdateParams.phases[]` + * ⚠️ Remove support for `link` and `payByBank` on `PaymentMethodUpdateParams` + * ⚠️ Remove support for `coupon` on `Discount`, `PromotionCodeCreateParams`, and `PromotionCode`. Use `Discount.source.coupon`, `PromotionCodeCreateParams.promotion.coupon`, and `PromotionCode.promotion.coupon` instead + * Add support for new resource `BalanceSettings` + * Add support for `retrieve` and `update` methods on resource `BalanceSettings` + * Add support for `source` on `Discount` + * Add support for `mbWayPayments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` + * Add support for `trialUpdateBehavior` on `billingportal.Configuration.features.subscription_update`, `billingportal.ConfigurationCreateParams.features.subscription_update`, and `billingportal.ConfigurationUpdateParams.features.subscription_update` + * Add support for `mbWay` on `Charge.payment_method_details`, `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.payment_method_data`, `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`, `PaymentMethodCreateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data` + * Add support for `brandingSettings` and `nameCollection` on `checkout.SessionCreateParams` and `checkout.Session` + * Add support for `excludedPaymentMethodTypes` on `PaymentIntentConfirmParams`, `PaymentIntentUpdateParams`, `checkout.SessionCreateParams`, and `checkout.Session` + * Add support for `unitLabel` on `InvoiceAddLinesParams.lines[].price_data.product_data`, `InvoiceLineItemUpdateParams.price_data.product_data`, `InvoiceUpdateLinesParams.lines[].price_data.product_data`, `PaymentLinkCreateParams.line_items[].price_data.product_data`, and `checkout.SessionCreateParams.line_items[].price_data.product_data` + * Add support for `alma`, `billie`, and `satispay` on `checkout.Session.payment_method_options` and `checkout.SessionCreateParams.payment_method_options` + * Add support for `demoPay` on `checkout.SessionCreateParams.payment_method_options` + * Add support for `captureMethod` on `checkout.Session.payment_method_options.affirm`, `checkout.Session.payment_method_options.afterpay_clearpay`, `checkout.Session.payment_method_options.amazon_pay`, `checkout.Session.payment_method_options.card`, `checkout.Session.payment_method_options.cashapp`, `checkout.Session.payment_method_options.klarna`, `checkout.Session.payment_method_options.link`, `checkout.Session.payment_method_options.mobilepay`, `checkout.Session.payment_method_options.revolut_pay`, `checkout.SessionCreateParams.payment_method_options.affirm`, `checkout.SessionCreateParams.payment_method_options.afterpay_clearpay`, `checkout.SessionCreateParams.payment_method_options.amazon_pay`, `checkout.SessionCreateParams.payment_method_options.card`, `checkout.SessionCreateParams.payment_method_options.cashapp`, `checkout.SessionCreateParams.payment_method_options.klarna`, `checkout.SessionCreateParams.payment_method_options.link`, `checkout.SessionCreateParams.payment_method_options.mobilepay`, and `checkout.SessionCreateParams.payment_method_options.revolut_pay` + * Add support for `flexible` on `InvoiceCreatePreviewParams.schedule_details.billing_mode`, `InvoiceCreatePreviewParams.subscription_details.billing_mode`, `Quote.subscription_data.billing_mode`, `QuoteCreateParams.subscription_data.billing_mode`, `Subscription.billing_mode`, `SubscriptionCreateParams.billing_mode`, `SubscriptionMigrateParams.billing_mode`, `SubscriptionSchedule.billing_mode`, `SubscriptionScheduleCreateParams.billing_mode`, and `checkout.SessionCreateParams.subscription_data.billing_mode` + * Add support for `businessName` and `individualName` on `CustomerCreateParams`, `CustomerUpdateParams`, `Customer`, `checkout.Session.collected_information`, and `checkout.Session.customer_details` + * Add support for new values `mb_way`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 values `mb_way`on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` + * Add support for `chargebackLossReasonCode` on `Dispute.payment_method_details.klarna` + * Add support for `netAmount` and `prorationDetails` on `InvoiceItem` + * Add support for `fraudDisputabilityLikelihood` and `riskAssessment` on `issuing.AuthorizationCreateParams` + * Add support for `secondLine` on `issuing.Card` + * Add support for new values `mb_way`on enum `PaymentIntentCreateParams.excludedPaymentMethodTypes` + * Add support for `frMealVoucherConecs` on `PaymentMethodConfigurationCreateParams` and `PaymentMethodConfigurationUpdateParams` + * Add support for `promotion` on `PromotionCodeCreateParams` and `PromotionCode` + * Add support for `provider` on `tax.Settings.defaults` + * Add support for `bbposWisepad3` on `terminal.ConfigurationCreateParams`, `terminal.ConfigurationUpdateParams`, and `terminal.Configuration` + * Add support for `addressKana`, `addressKanji`, `displayNameKana`, `displayNameKanji`, and `phone` on `terminal.LocationCreateParams`, `terminal.LocationUpdateParams`, and `terminal.Location` + * Change `terminal.LocationCreateParams.address` to be optional + * Change `terminal.LocationCreateParams.displayName` to be optional + * Add support for new value `2025-09-30.clover` on enum `WebhookEndpointCreateParams.apiVersion` + ## 29.5.0 - 2025-08-27 * [#2034](https://github.com/stripe/stripe-java/pull/2034) Add section on private preview SDKs in readme * [#2030](https://github.com/stripe/stripe-java/pull/2030) Update generated code. This release changes the pinned API version to `2025-08-27.basil`. diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION new file mode 100644 index 00000000000..41e180fca76 --- /dev/null +++ b/CODEGEN_VERSION @@ -0,0 +1 @@ +fdbf5e05015131c7993d2b4017103f0d94561b6a \ No newline at end of file diff --git a/Makefile b/Makefile index 710e3b7228c..164e9777442 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ update-version: @echo "$(VERSION)" > VERSION @perl -pi -e 's|badge/maven--central-v[.\d\-\w]+-blue|badge/maven--central-v$(VERSION)-blue|' README.md - @perl -pi -e 's|https:\/\/search\.maven\.org\/remotecontent\?filepath=com\/stripe\/stripe-java\/[.\d\-\w]+\/stripe-java-[.\d\-\w]+.jar|https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/$(VERSION)/stripe-java-$(VERSION).jar|' README.md + @perl -pi -e 's|https:\/\/repo1\.maven\.org\/maven2\/com\/stripe\/stripe-java\/[.\d\-\w]+\/stripe-java-[.\d\-\w]+.jar|https://repo1.maven.org/maven2/com/stripe/stripe-java/$(VERSION)/stripe-java-$(VERSION).jar|' README.md + @perl -pi -e 's|Current release version: [.\d\-\w]+|Current release version: $(VERSION)|' README.md @perl -pi -e 's|implementation "com\.stripe:stripe-java:[.\d\-\w]+"|implementation "com.stripe:stripe-java:$(VERSION)"|' README.md @perl -pi -e 's|[.\d\-\w]+<\/version>|$(VERSION)|' README.md @perl -pi -e 's|VERSION_NAME=[.\d\-\w]+|VERSION_NAME=$(VERSION)|' gradle.properties diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6598803dc33..469687e756a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1932 \ No newline at end of file +v2160 \ No newline at end of file diff --git a/README.md b/README.md index a6a07d5a639..ff1af756ea8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Stripe Java client library -[![Maven Central](https://img.shields.io/badge/maven--central-v29.5.0-blue)](https://mvnrepository.com/artifact/com.stripe/stripe-java) +[![Maven Central](https://img.shields.io/badge/maven--central-v31.3.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) @@ -10,14 +10,20 @@ The official [Stripe][stripe] Java client library. ### Requirements -- Java 1.8 or later +We support LTS versions of the JDK. Currently, that's Java versions: + +- 8 (1.8) +- 11 +- 17 +- 21 +- 25 ### Gradle users Add this dependency to your project's build file: ```groovy -implementation "com.stripe:stripe-java:29.5.0" +implementation "com.stripe:stripe-java:31.3.0" ``` ### Maven users @@ -28,7 +34,7 @@ Add this dependency to your project's POM: com.stripe stripe-java - 29.5.0 + 31.3.0 ``` @@ -37,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/29.0.0/stripe-java-29.0.0.jar) - - Current release version: 29.0.0 + - Download the latest release version from [Maven Central](https://repo1.maven.org/maven2/com/stripe/stripe-java/31.3.0/stripe-java-31.3.0.jar) + - Current release version: 31.3.0 2. Google Gson: - The Stripe JAR builds and tests with Gson version 2.10.1 @@ -93,7 +99,7 @@ public class StripeExample { .build(); try { - Customer customer = client.customers().create(params); + Customer customer = client.v1().customers().create(params); System.out.println(customer); } catch (StripeException e) { e.printStackTrace(); @@ -112,7 +118,7 @@ Once the legacy pattern is deprecated, new API endpoints will only be accessible ### Per-request Configuration -All of the request methods accept an optional `RequestOptions` object. This is +All the request methods accept an optional `RequestOptions` object. This is used if you want to set an [idempotency key][idempotency-keys], if you are using [Stripe Connect][connect-auth], or if you want to pass the secret API key on each method. @@ -124,9 +130,9 @@ RequestOptions requestOptions = RequestOptions.builder() .setStripeAccount("acct_...") .build(); -client.customers().list(requestOptions); +client.v1().customers().list(requestOptions); -client.customers().retrieve("cus_123456789", requestOptions); +client.v1().customers().retrieve("cus_123456789", requestOptions); ``` ### Configuring automatic retries @@ -147,7 +153,7 @@ Or on a finer grain level using `RequestOptions`: RequestOptions options = RequestOptions.builder() .setMaxNetworkRetries(2) .build(); -client.customers().create(params, options); +client.v1().customers().create(params, options); ``` [Idempotency keys][idempotency-keys] are added to requests to guarantee that @@ -171,7 +177,7 @@ RequestOptions options = RequestOptions.builder() .setConnectTimeout(30 * 1000) // in milliseconds .setReadTimeout(80 * 1000) .build(); -client.customers().create(params, options); +client.v1().customers().create(params, options); ``` Please take care to set conservative read timeouts. Some API requests can take @@ -207,7 +213,7 @@ CustomerCreateParams params = .putExtraParam("secret_parameter[secondary]", "secondary value") .build(); -client.customers().create(params); +client.v1().customers().create(params); ``` #### Properties @@ -215,7 +221,7 @@ client.customers().create(params); To retrieve undocumented properties from Stripe using Java you can use an option in the library to return the raw JSON object and return the property as a native type. An example of this is shown below: ```java -final Customer customer = client.customers().retrieve("cus_1234"); +final Customer customer = client.v1().customers().retrieve("cus_1234"); Boolean featureEnabled = customer.getRawJsonObject() .getAsJsonPrimitive("secret_feature_enabled") @@ -276,6 +282,8 @@ Stripe has features in the [private preview phase](https://docs.stripe.com/relea ### Custom requests +> This feature is only available from version 27 of this SDK. + If you would like to send a request to an undocumented API (for example you are in a private beta), or if you prefer to bypass the method definitions in the library and specify your request details directly, you can use the `rawRequest` method on `StripeClient`. ```java diff --git a/VERSION b/VERSION index a643f896189..3e51532314b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -29.5.0 +31.3.0 diff --git a/build.gradle b/build.gradle index 87f2e32c815..aebb8359c45 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ tasks.withType(JavaCompile) { } options.fork = true - options.forkOptions.jvmArgs += ['-Xms512M', '-Xmx1g'] + options.forkOptions.jvmArgs += ['-Xms512M', '-Xmx4g'] options.release = project.targetCompatibility.majorVersion as Integer @@ -99,7 +99,8 @@ jar { "Implementation-Version": VERSION_NAME, "Implementation-Vendor": VENDOR_NAME, "Bundle-SymbolicName": POM_ARTIFACT_ID, - "Export-Package": "com.stripe.*") + "Export-Package": "com.stripe.*", + "Automatic-Module-Name": "stripe.java") archiveVersion = VERSION_NAME } diff --git a/gradle.properties b/gradle.properties index 25c20a3a61e..8bb80db73da 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.stripe -VERSION_NAME=29.5.0 +VERSION_NAME=31.3.0 POM_URL=https://github.com/stripe/stripe-java POM_SCM_URL=git@github.com:stripe/stripe-java.git diff --git a/justfile b/justfile index 8db677dee7b..d48f299877e 100644 --- a/justfile +++ b/justfile @@ -28,7 +28,8 @@ format-check: update-version version: echo "{{ version }}" > VERSION perl -pi -e 's|badge/maven--central-v[.\d\-\w]+-blue|badge/maven--central-v{{ version }}-blue|' README.md - perl -pi -e 's|https:\/\/search\.maven\.org\/remotecontent\?filepath=com\/stripe\/stripe-java\/[.\d\-\w]+\/stripe-java-[.\d\-\w]+.jar|https://search.maven.org/remotecontent?filepath=com/stripe/stripe-java/{{ version }}/stripe-java-{{ version }}.jar|' README.md + perl -pi -e 's|https:\/\/repo1\.maven\.org\/maven2\/com\/stripe\/stripe-java\/[.\d\-\w]+\/stripe-java-[.\d\-\w]+.jar|https://repo1.maven.org/maven2/com/stripe/stripe-java/{{ version }}/stripe-java-{{ version }}.jar|' README.md + perl -pi -e 's|Current release version: [.\d\-\w]+|Current release version: {{ version }}|' README.md perl -pi -e 's|implementation "com\.stripe:stripe-java:[.\d\-\w]+"|implementation "com.stripe:stripe-java:{{ version }}"|' README.md perl -pi -e 's|[.\d\-\w]+<\/version>|{{ version }}|' README.md perl -pi -e 's|VERSION_NAME=[.\d\-\w]+|VERSION_NAME={{ version }}|' gradle.properties diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index b78ef170199..e2e04d01544 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-08-27.basil"; - public static final String CURRENT_MAJOR = "basil"; + public static final String CURRENT = "2026-01-28.clover"; + public static final String CURRENT_MAJOR = "clover"; } diff --git a/src/main/java/com/stripe/Stripe.java b/src/main/java/com/stripe/Stripe.java index e471356d122..188ec10bd24 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 = "29.5.0"; + public static final String VERSION = "31.3.0"; public static volatile String apiKey; public static volatile String clientId; diff --git a/src/main/java/com/stripe/StripeClient.java b/src/main/java/com/stripe/StripeClient.java index e181cb02976..360b3c26b09 100644 --- a/src/main/java/com/stripe/StripeClient.java +++ b/src/main/java/com/stripe/StripeClient.java @@ -3,7 +3,7 @@ import com.stripe.exception.SignatureVerificationException; import com.stripe.exception.StripeException; import com.stripe.model.StripeObject; -import com.stripe.model.ThinEvent; +import com.stripe.model.v2.core.EventNotification; import com.stripe.net.*; import com.stripe.net.Webhook.Signature; import java.net.PasswordAuthentication; @@ -52,9 +52,9 @@ protected StripeResponseGetter getResponseGetter() { * @return the StripeEvent instance * @throws SignatureVerificationException if the verification fails. */ - public ThinEvent parseThinEvent(String payload, String sigHeader, String secret) + public EventNotification parseEventNotification(String payload, String sigHeader, String secret) throws SignatureVerificationException { - return parseThinEvent(payload, sigHeader, secret, Webhook.DEFAULT_TOLERANCE); + return parseEventNotification(payload, sigHeader, secret, Webhook.DEFAULT_TOLERANCE); } /** @@ -70,11 +70,12 @@ public ThinEvent parseThinEvent(String payload, String sigHeader, String secret) * @return the StripeEvent instance * @throws SignatureVerificationException if the verification fails. */ - public ThinEvent parseThinEvent(String payload, String sigHeader, String secret, long tolerance) + public EventNotification parseEventNotification( + String payload, String sigHeader, String secret, long tolerance) throws SignatureVerificationException { Signature.verifyHeader(payload, sigHeader, secret, tolerance); - return ApiResource.GSON.fromJson(payload, ThinEvent.class); + return EventNotification.fromJson(payload, this); } /** @@ -126,705 +127,828 @@ public com.stripe.service.V2Services v2() { } /** - * Deprecation Warning: StripeClient.accountLinks() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().accountLinks(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.accountLinks() is deprecated, use StripeClient.v1().accountLinks() + * instead. All functionality under it has been copied over to + * StripeClient.v1().accountLinks(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.AccountLinkService accountLinks() { return new com.stripe.service.AccountLinkService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.accountSessions() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().accountSessions(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.accountSessions() is deprecated, use + * StripeClient.v1().accountSessions() instead. All functionality under it has been copied + * over to StripeClient.v1().accountSessions(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.AccountSessionService accountSessions() { return new com.stripe.service.AccountSessionService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.accounts() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().accounts(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.accounts() is deprecated, use StripeClient.v1().accounts() instead. + * All functionality under it has been copied over to StripeClient.v1().accounts(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.AccountService accounts() { return new com.stripe.service.AccountService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.applePayDomains() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().applePayDomains(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.applePayDomains() is deprecated, use + * StripeClient.v1().applePayDomains() instead. All functionality under it has been copied + * over to StripeClient.v1().applePayDomains(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ApplePayDomainService applePayDomains() { return new com.stripe.service.ApplePayDomainService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.applicationFees() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().applicationFees(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.applicationFees() is deprecated, use + * StripeClient.v1().applicationFees() instead. All functionality under it has been copied + * over to StripeClient.v1().applicationFees(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ApplicationFeeService applicationFees() { return new com.stripe.service.ApplicationFeeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.apps() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().apps(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.apps() is deprecated, use StripeClient.v1().apps() instead. All + * functionality under it has been copied over to StripeClient.v1().apps(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.AppsService apps() { return new com.stripe.service.AppsService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.balance() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().balance(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.balance() is deprecated, use StripeClient.v1().balance() instead. All + * functionality under it has been copied over to StripeClient.v1().balance(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.BalanceService balance() { return new com.stripe.service.BalanceService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.balanceTransactions() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().balanceTransactions(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.balanceSettings() is deprecated, use + * StripeClient.v1().balanceSettings() instead. All functionality under it has been copied + * over to StripeClient.v1().balanceSettings(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. + */ + @Deprecated + public com.stripe.service.BalanceSettingsService balanceSettings() { + return new com.stripe.service.BalanceSettingsService(this.getResponseGetter()); + } + + /** + * @deprecated StripeClient.balanceTransactions() is deprecated, use + * StripeClient.v1().balanceTransactions() instead. All functionality under it has been copied + * over to StripeClient.v1().balanceTransactions(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.BalanceTransactionService balanceTransactions() { return new com.stripe.service.BalanceTransactionService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.billing() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().billing(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.billing() is deprecated, use StripeClient.v1().billing() instead. All + * functionality under it has been copied over to StripeClient.v1().billing(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.BillingService billing() { return new com.stripe.service.BillingService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.billingPortal() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().billingPortal(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.billingPortal() is deprecated, use StripeClient.v1().billingPortal() + * instead. All functionality under it has been copied over to + * StripeClient.v1().billingPortal(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.BillingPortalService billingPortal() { return new com.stripe.service.BillingPortalService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.charges() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().charges(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.charges() is deprecated, use StripeClient.v1().charges() instead. All + * functionality under it has been copied over to StripeClient.v1().charges(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ChargeService charges() { return new com.stripe.service.ChargeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.checkout() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().checkout(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.checkout() is deprecated, use StripeClient.v1().checkout() instead. + * All functionality under it has been copied over to StripeClient.v1().checkout(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CheckoutService checkout() { return new com.stripe.service.CheckoutService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.climate() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().climate(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.climate() is deprecated, use StripeClient.v1().climate() instead. All + * functionality under it has been copied over to StripeClient.v1().climate(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ClimateService climate() { return new com.stripe.service.ClimateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.confirmationTokens() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().confirmationTokens(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.confirmationTokens() is deprecated, use + * StripeClient.v1().confirmationTokens() instead. All functionality under it has been copied + * over to StripeClient.v1().confirmationTokens(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ConfirmationTokenService confirmationTokens() { return new com.stripe.service.ConfirmationTokenService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.countrySpecs() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().countrySpecs(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.countrySpecs() is deprecated, use StripeClient.v1().countrySpecs() + * instead. All functionality under it has been copied over to + * StripeClient.v1().countrySpecs(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CountrySpecService countrySpecs() { return new com.stripe.service.CountrySpecService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.coupons() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().coupons(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.coupons() is deprecated, use StripeClient.v1().coupons() instead. All + * functionality under it has been copied over to StripeClient.v1().coupons(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CouponService coupons() { return new com.stripe.service.CouponService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.creditNotes() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().creditNotes(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.creditNotes() is deprecated, use StripeClient.v1().creditNotes() + * instead. All functionality under it has been copied over to + * StripeClient.v1().creditNotes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CreditNoteService creditNotes() { return new com.stripe.service.CreditNoteService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.customerSessions() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().customerSessions(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.customerSessions() is deprecated, use + * StripeClient.v1().customerSessions() instead. All functionality under it has been copied + * over to StripeClient.v1().customerSessions(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CustomerSessionService customerSessions() { return new com.stripe.service.CustomerSessionService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.customers() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().customers(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.customers() is deprecated, use StripeClient.v1().customers() instead. + * All functionality under it has been copied over to StripeClient.v1().customers(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.CustomerService customers() { return new com.stripe.service.CustomerService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.disputes() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().disputes(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.disputes() is deprecated, use StripeClient.v1().disputes() instead. + * All functionality under it has been copied over to StripeClient.v1().disputes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.DisputeService disputes() { return new com.stripe.service.DisputeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.entitlements() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().entitlements(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.entitlements() is deprecated, use StripeClient.v1().entitlements() + * instead. All functionality under it has been copied over to + * StripeClient.v1().entitlements(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.EntitlementsService entitlements() { return new com.stripe.service.EntitlementsService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.ephemeralKeys() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().ephemeralKeys(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.ephemeralKeys() is deprecated, use StripeClient.v1().ephemeralKeys() + * instead. All functionality under it has been copied over to + * StripeClient.v1().ephemeralKeys(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.EphemeralKeyService ephemeralKeys() { return new com.stripe.service.EphemeralKeyService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.events() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().events(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.events() is deprecated, use StripeClient.v1().events() instead. All + * functionality under it has been copied over to StripeClient.v1().events(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.EventService events() { return new com.stripe.service.EventService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.exchangeRates() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().exchangeRates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.exchangeRates() is deprecated, use StripeClient.v1().exchangeRates() + * instead. All functionality under it has been copied over to + * StripeClient.v1().exchangeRates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ExchangeRateService exchangeRates() { return new com.stripe.service.ExchangeRateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.fileLinks() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().fileLinks(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.fileLinks() is deprecated, use StripeClient.v1().fileLinks() instead. + * All functionality under it has been copied over to StripeClient.v1().fileLinks(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.FileLinkService fileLinks() { return new com.stripe.service.FileLinkService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.files() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().files(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.files() is deprecated, use StripeClient.v1().files() instead. All + * functionality under it has been copied over to StripeClient.v1().files(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.FileService files() { return new com.stripe.service.FileService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.financialConnections() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().financialConnections(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.financialConnections() is deprecated, use + * StripeClient.v1().financialConnections() instead. All functionality under it has been + * copied over to StripeClient.v1().financialConnections(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.FinancialConnectionsService financialConnections() { return new com.stripe.service.FinancialConnectionsService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.forwarding() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().forwarding(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.forwarding() is deprecated, use StripeClient.v1().forwarding() + * instead. All functionality under it has been copied over to StripeClient.v1().forwarding(). + * See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ForwardingService forwarding() { return new com.stripe.service.ForwardingService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.identity() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().identity(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.identity() is deprecated, use StripeClient.v1().identity() instead. + * All functionality under it has been copied over to StripeClient.v1().identity(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.IdentityService identity() { return new com.stripe.service.IdentityService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.invoiceItems() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().invoiceItems(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.invoiceItems() is deprecated, use StripeClient.v1().invoiceItems() + * instead. All functionality under it has been copied over to + * StripeClient.v1().invoiceItems(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.InvoiceItemService invoiceItems() { return new com.stripe.service.InvoiceItemService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.invoicePayments() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().invoicePayments(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.invoicePayments() is deprecated, use + * StripeClient.v1().invoicePayments() instead. All functionality under it has been copied + * over to StripeClient.v1().invoicePayments(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.InvoicePaymentService invoicePayments() { return new com.stripe.service.InvoicePaymentService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.invoiceRenderingTemplates() will be deprecated in the next - * major release. All functionality under it has been copied over to - * StripeClient.v1().invoiceRenderingTemplates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.invoiceRenderingTemplates() is deprecated, use + * StripeClient.v1().invoiceRenderingTemplates() instead. All functionality under it has been + * copied over to StripeClient.v1().invoiceRenderingTemplates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.InvoiceRenderingTemplateService invoiceRenderingTemplates() { return new com.stripe.service.InvoiceRenderingTemplateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.invoices() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().invoices(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.invoices() is deprecated, use StripeClient.v1().invoices() instead. + * All functionality under it has been copied over to StripeClient.v1().invoices(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.InvoiceService invoices() { return new com.stripe.service.InvoiceService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.issuing() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().issuing(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.issuing() is deprecated, use StripeClient.v1().issuing() instead. All + * functionality under it has been copied over to StripeClient.v1().issuing(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.IssuingService issuing() { return new com.stripe.service.IssuingService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.mandates() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().mandates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.mandates() is deprecated, use StripeClient.v1().mandates() instead. + * All functionality under it has been copied over to StripeClient.v1().mandates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.MandateService mandates() { return new com.stripe.service.MandateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentIntents() will be deprecated in the next major - * release. All functionality under it has been copied over to StripeClient.v1().paymentIntents(). - * See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentAttemptRecords() is deprecated, use + * StripeClient.v1().paymentAttemptRecords() instead. All functionality under it has been + * copied over to StripeClient.v1().paymentAttemptRecords(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. + */ + @Deprecated + public com.stripe.service.PaymentAttemptRecordService paymentAttemptRecords() { + return new com.stripe.service.PaymentAttemptRecordService(this.getResponseGetter()); + } + + /** + * @deprecated StripeClient.paymentIntents() is deprecated, use StripeClient.v1().paymentIntents() + * instead. All functionality under it has been copied over to + * StripeClient.v1().paymentIntents(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentIntentService paymentIntents() { return new com.stripe.service.PaymentIntentService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentLinks() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().paymentLinks(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentLinks() is deprecated, use StripeClient.v1().paymentLinks() + * instead. All functionality under it has been copied over to + * StripeClient.v1().paymentLinks(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentLinkService paymentLinks() { return new com.stripe.service.PaymentLinkService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentMethodConfigurations() will be deprecated in the next - * major release. All functionality under it has been copied over to - * StripeClient.v1().paymentMethodConfigurations(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentMethodConfigurations() is deprecated, use + * StripeClient.v1().paymentMethodConfigurations() instead. All functionality under it has + * been copied over to StripeClient.v1().paymentMethodConfigurations(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentMethodConfigurationService paymentMethodConfigurations() { return new com.stripe.service.PaymentMethodConfigurationService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentMethodDomains() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().paymentMethodDomains(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentMethodDomains() is deprecated, use + * StripeClient.v1().paymentMethodDomains() instead. All functionality under it has been + * copied over to StripeClient.v1().paymentMethodDomains(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentMethodDomainService paymentMethodDomains() { return new com.stripe.service.PaymentMethodDomainService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.paymentMethods() will be deprecated in the next major - * release. All functionality under it has been copied over to StripeClient.v1().paymentMethods(). - * See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentMethods() is deprecated, use StripeClient.v1().paymentMethods() + * instead. All functionality under it has been copied over to + * StripeClient.v1().paymentMethods(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PaymentMethodService paymentMethods() { return new com.stripe.service.PaymentMethodService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.payouts() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().payouts(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.paymentRecords() is deprecated, use StripeClient.v1().paymentRecords() + * instead. All functionality under it has been copied over to + * StripeClient.v1().paymentRecords(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. + */ + @Deprecated + public com.stripe.service.PaymentRecordService paymentRecords() { + return new com.stripe.service.PaymentRecordService(this.getResponseGetter()); + } + + /** + * @deprecated StripeClient.payouts() is deprecated, use StripeClient.v1().payouts() instead. All + * functionality under it has been copied over to StripeClient.v1().payouts(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PayoutService payouts() { return new com.stripe.service.PayoutService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.plans() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().plans(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.plans() is deprecated, use StripeClient.v1().plans() instead. All + * functionality under it has been copied over to StripeClient.v1().plans(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PlanService plans() { return new com.stripe.service.PlanService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.prices() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().prices(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.prices() is deprecated, use StripeClient.v1().prices() instead. All + * functionality under it has been copied over to StripeClient.v1().prices(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PriceService prices() { return new com.stripe.service.PriceService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.products() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().products(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.products() is deprecated, use StripeClient.v1().products() instead. + * All functionality under it has been copied over to StripeClient.v1().products(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ProductService products() { return new com.stripe.service.ProductService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.promotionCodes() will be deprecated in the next major - * release. All functionality under it has been copied over to StripeClient.v1().promotionCodes(). - * See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.promotionCodes() is deprecated, use StripeClient.v1().promotionCodes() + * instead. All functionality under it has been copied over to + * StripeClient.v1().promotionCodes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.PromotionCodeService promotionCodes() { return new com.stripe.service.PromotionCodeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.quotes() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().quotes(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.quotes() is deprecated, use StripeClient.v1().quotes() instead. All + * functionality under it has been copied over to StripeClient.v1().quotes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.QuoteService quotes() { return new com.stripe.service.QuoteService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.radar() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().radar(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.radar() is deprecated, use StripeClient.v1().radar() instead. All + * functionality under it has been copied over to StripeClient.v1().radar(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.RadarService radar() { return new com.stripe.service.RadarService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.refunds() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().refunds(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.refunds() is deprecated, use StripeClient.v1().refunds() instead. All + * functionality under it has been copied over to StripeClient.v1().refunds(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.RefundService refunds() { return new com.stripe.service.RefundService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.reporting() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().reporting(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.reporting() is deprecated, use StripeClient.v1().reporting() instead. + * All functionality under it has been copied over to StripeClient.v1().reporting(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ReportingService reporting() { return new com.stripe.service.ReportingService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.reviews() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().reviews(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.reviews() is deprecated, use StripeClient.v1().reviews() instead. All + * functionality under it has been copied over to StripeClient.v1().reviews(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ReviewService reviews() { return new com.stripe.service.ReviewService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.setupAttempts() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().setupAttempts(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.setupAttempts() is deprecated, use StripeClient.v1().setupAttempts() + * instead. All functionality under it has been copied over to + * StripeClient.v1().setupAttempts(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SetupAttemptService setupAttempts() { return new com.stripe.service.SetupAttemptService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.setupIntents() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().setupIntents(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.setupIntents() is deprecated, use StripeClient.v1().setupIntents() + * instead. All functionality under it has been copied over to + * StripeClient.v1().setupIntents(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SetupIntentService setupIntents() { return new com.stripe.service.SetupIntentService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.shippingRates() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().shippingRates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.shippingRates() is deprecated, use StripeClient.v1().shippingRates() + * instead. All functionality under it has been copied over to + * StripeClient.v1().shippingRates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.ShippingRateService shippingRates() { return new com.stripe.service.ShippingRateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.sigma() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().sigma(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.sigma() is deprecated, use StripeClient.v1().sigma() instead. All + * functionality under it has been copied over to StripeClient.v1().sigma(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SigmaService sigma() { return new com.stripe.service.SigmaService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.sources() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().sources(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.sources() is deprecated, use StripeClient.v1().sources() instead. All + * functionality under it has been copied over to StripeClient.v1().sources(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SourceService sources() { return new com.stripe.service.SourceService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.subscriptionItems() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().subscriptionItems(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.subscriptionItems() is deprecated, use + * StripeClient.v1().subscriptionItems() instead. All functionality under it has been copied + * over to StripeClient.v1().subscriptionItems(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SubscriptionItemService subscriptionItems() { return new com.stripe.service.SubscriptionItemService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.subscriptionSchedules() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().subscriptionSchedules(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.subscriptionSchedules() is deprecated, use + * StripeClient.v1().subscriptionSchedules() instead. All functionality under it has been + * copied over to StripeClient.v1().subscriptionSchedules(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SubscriptionScheduleService subscriptionSchedules() { return new com.stripe.service.SubscriptionScheduleService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.subscriptions() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().subscriptions(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.subscriptions() is deprecated, use StripeClient.v1().subscriptions() + * instead. All functionality under it has been copied over to + * StripeClient.v1().subscriptions(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.SubscriptionService subscriptions() { return new com.stripe.service.SubscriptionService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.tax() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().tax(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.tax() is deprecated, use StripeClient.v1().tax() instead. All + * functionality under it has been copied over to StripeClient.v1().tax(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TaxService tax() { return new com.stripe.service.TaxService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.taxCodes() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().taxCodes(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.taxCodes() is deprecated, use StripeClient.v1().taxCodes() instead. + * All functionality under it has been copied over to StripeClient.v1().taxCodes(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TaxCodeService taxCodes() { return new com.stripe.service.TaxCodeService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.taxIds() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().taxIds(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.taxIds() is deprecated, use StripeClient.v1().taxIds() instead. All + * functionality under it has been copied over to StripeClient.v1().taxIds(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TaxIdService taxIds() { return new com.stripe.service.TaxIdService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.taxRates() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().taxRates(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.taxRates() is deprecated, use StripeClient.v1().taxRates() instead. + * All functionality under it has been copied over to StripeClient.v1().taxRates(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TaxRateService taxRates() { return new com.stripe.service.TaxRateService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.terminal() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().terminal(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.terminal() is deprecated, use StripeClient.v1().terminal() instead. + * All functionality under it has been copied over to StripeClient.v1().terminal(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TerminalService terminal() { return new com.stripe.service.TerminalService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.testHelpers() will be deprecated in the next major release. - * All functionality under it has been copied over to StripeClient.v1().testHelpers(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.testHelpers() is deprecated, use StripeClient.v1().testHelpers() + * instead. All functionality under it has been copied over to + * StripeClient.v1().testHelpers(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TestHelpersService testHelpers() { return new com.stripe.service.TestHelpersService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.tokens() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().tokens(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.tokens() is deprecated, use StripeClient.v1().tokens() instead. All + * functionality under it has been copied over to StripeClient.v1().tokens(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TokenService tokens() { return new com.stripe.service.TokenService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.topups() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().topups(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.topups() is deprecated, use StripeClient.v1().topups() instead. All + * functionality under it has been copied over to StripeClient.v1().topups(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TopupService topups() { return new com.stripe.service.TopupService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.transfers() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().transfers(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.transfers() is deprecated, use StripeClient.v1().transfers() instead. + * All functionality under it has been copied over to StripeClient.v1().transfers(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TransferService transfers() { return new com.stripe.service.TransferService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.treasury() will be deprecated in the next major release. All - * functionality under it has been copied over to StripeClient.v1().treasury(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.treasury() is deprecated, use StripeClient.v1().treasury() instead. + * All functionality under it has been copied over to StripeClient.v1().treasury(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.TreasuryService treasury() { return new com.stripe.service.TreasuryService(this.getResponseGetter()); } /** - * Deprecation Warning: StripeClient.webhookEndpoints() will be deprecated in the next major - * release. All functionality under it has been copied over to - * StripeClient.v1().webhookEndpoints(). See migration - * guide for more on this and tips on migrating to the new v1 namespace. + * @deprecated StripeClient.webhookEndpoints() is deprecated, use + * StripeClient.v1().webhookEndpoints() instead. All functionality under it has been copied + * over to StripeClient.v1().webhookEndpoints(). See migration + * guide for more on this and tips on migrating to the new v1 namespace. */ + @Deprecated public com.stripe.service.WebhookEndpointService webhookEndpoints() { return new com.stripe.service.WebhookEndpointService(this.getResponseGetter()); } @@ -1123,6 +1247,11 @@ public StripeClientBuilder setStripeContext(String context) { return this; } + public StripeClientBuilder setStripeContext(StripeContext context) { + this.stripeContext = context == null ? null : context.toString(); + return this; + } + public String getStripeContext() { return this.stripeContext; } diff --git a/src/main/java/com/stripe/StripeContext.java b/src/main/java/com/stripe/StripeContext.java new file mode 100644 index 00000000000..cd7b15b19e8 --- /dev/null +++ b/src/main/java/com/stripe/StripeContext.java @@ -0,0 +1,98 @@ +package com.stripe; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import lombok.EqualsAndHashCode; + +/** + * The StripeContext class provides an immutable container for interacting with the `Stripe-Context` + * header. + * + *

You can use it whenever you're initializing a `StripeClient` or sending `stripe_context` with + * a request. It's also found in the `EventNotification.context` property. + */ +@EqualsAndHashCode +public final class StripeContext { + private final List segments; + + /** Creates a new StripeContext with no segments. */ + public StripeContext() { + this(null); + } + + /** + * Creates a new StripeContext with the specified segments. + * + * @param segments the list of context segments + */ + public StripeContext(List segments) { + this.segments = + segments == null + ? Collections.emptyList() + : Collections.unmodifiableList(new ArrayList<>(segments)); + } + + /** + * Returns a new StripeContext with the given segment added to the end. + * + * @param segment the segment to add + * @return a new StripeContext instance with the segment appended + */ + public StripeContext push(String segment) { + List newSegments = new ArrayList<>(this.segments); + newSegments.add(segment); + return new StripeContext(newSegments); + } + + /** + * Returns a new StripeContext with the last segment removed. + * + * @return a new StripeContext instance with the last segment removed + */ + public StripeContext pop() { + if (segments.isEmpty()) { + throw new IllegalStateException("Cannot pop from an empty StripeContext"); + } + + List newSegments = new ArrayList<>(this.segments); + newSegments.remove(newSegments.size() - 1); + return new StripeContext(newSegments); + } + + /** + * Converts the context to a string by joining segments with '/'. + * + * @return string representation of the context segments joined by '/', `null` if there are no + * segments (useful for clearing context) + */ + @Override + public String toString() { + return String.join("/", segments); + } + + /** + * Parse a context string into a StripeContext instance. + * + * @param contextStr string to parse (segments separated by '/') + * @return StripeContext instance with segments from the string + */ + public static StripeContext parse(String contextStr) { + if (contextStr == null || contextStr.isEmpty()) { + return new StripeContext(); + } + + List segments = Arrays.asList(contextStr.split("/")); + return new StripeContext(segments); + } + + /** + * Returns an unmodifiable list of the current segments. + * + * @return the list of segments + */ + public List getSegments() { + return segments; + } +} diff --git a/src/main/java/com/stripe/events/UnknownEventNotification.java b/src/main/java/com/stripe/events/UnknownEventNotification.java new file mode 100644 index 00000000000..c70a4cca034 --- /dev/null +++ b/src/main/java/com/stripe/events/UnknownEventNotification.java @@ -0,0 +1,37 @@ +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.StripeObject; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +/** + * Represents a valid EventNotification that the SDK doesn't have a type for. May have a + * `relatedObject` property. + */ +@Getter +public class UnknownEventNotification extends EventNotification { + /** [Optional] Object containing the reference to API resource relevant to the event. */ + @SerializedName("related_object") + public RelatedObject relatedObject; + + /** + * Will make the API call to fetch a related object, if possible. The returned object will have + * the correct type at runtime, but type information about it isn't known at compile time. + */ + public StripeObject fetchRelatedObject() throws StripeException { + return super.fetchRelatedObject(this.relatedObject); + } + + /** + * Will make the API call to fetch a related object, if possible. The returned object will have + * the correct type at runtime, but type information about it isn't known at compile time. + */ + @Override + public Event fetchEvent() throws StripeException { + return super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java index 0d70dcb7f5a..4be0b7018e3 100644 --- a/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java +++ b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java @@ -4,7 +4,8 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.billing.Meter; -import com.stripe.model.v2.Event; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; import java.time.Instant; import java.util.List; import lombok.Getter; @@ -35,7 +36,7 @@ public static final class EventData { public static final class Reason { /** The total error count within this window. */ @SerializedName("error_count") - Integer errorCount; + Long errorCount; /** The error details. */ @SerializedName("error_types") List errorTypes; @@ -53,7 +54,7 @@ public static final class ErrorType { String code; /** The number of errors of this type. */ @SerializedName("error_count") - Integer errorCount; + Long errorCount; /** A list of sample errors of this type. */ @SerializedName("sample_errors") List diff --git a/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEventNotification.java b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEventNotification.java new file mode 100644 index 00000000000..986c1ddd0bf --- /dev/null +++ b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.billing.Meter; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V1BillingMeterErrorReportTriggeredEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Meter fetchRelatedObject() throws StripeException { + return (Meter) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1BillingMeterErrorReportTriggeredEvent fetchEvent() throws StripeException { + return (V1BillingMeterErrorReportTriggeredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEvent.java b/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEvent.java index e896ebe7687..a1fc6e3bbf0 100644 --- a/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEvent.java +++ b/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEvent.java @@ -2,7 +2,7 @@ package com.stripe.events; import com.google.gson.annotations.SerializedName; -import com.stripe.model.v2.Event; +import com.stripe.model.v2.core.Event; import java.time.Instant; import java.util.List; import lombok.Getter; @@ -33,7 +33,7 @@ public static final class EventData { public static final class Reason { /** The total error count within this window. */ @SerializedName("error_count") - Integer errorCount; + Long errorCount; /** The error details. */ @SerializedName("error_types") List errorTypes; @@ -51,7 +51,7 @@ public static final class ErrorType { String code; /** The number of errors of this type. */ @SerializedName("error_count") - Integer errorCount; + Long errorCount; /** A list of sample errors of this type. */ @SerializedName("sample_errors") List sampleErrors; diff --git a/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEventNotification.java b/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEventNotification.java new file mode 100644 index 00000000000..84cbd1e2de1 --- /dev/null +++ b/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEventNotification.java @@ -0,0 +1,13 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.EventNotification; + +public final class V1BillingMeterNoMeterFoundEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1BillingMeterNoMeterFoundEvent fetchEvent() throws StripeException { + return (V1BillingMeterNoMeterFoundEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java new file mode 100644 index 00000000000..05a2445690b --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountClosedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java new file mode 100644 index 00000000000..d677d1b4539 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountClosedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountClosedEvent fetchEvent() throws StripeException { + return (V2CoreAccountClosedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java new file mode 100644 index 00000000000..cbfdfc4f5d3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java new file mode 100644 index 00000000000..e0529a8b8cc --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountCreatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java new file mode 100644 index 00000000000..e266dd315f6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent + extends Event { + /** Data for the v2.core.account[configuration.customer].capability_status_updated event. */ + @SerializedName("data") + V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** + * Open Enum. The capability which had its status updated. + * + *

Equal to {@code automatic_indirect_tax}. + */ + @SerializedName("updated_capability") + String updatedCapability; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..c203c68e6fe --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final +class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java new file mode 100644 index 00000000000..eaf8240c359 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationCustomerUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java new file mode 100644 index 00000000000..4cf4b375336 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationCustomerUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationCustomerUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java new file mode 100644 index 00000000000..b9d23142347 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent + extends Event { + /** Data for the v2.core.account[configuration.merchant].capability_status_updated event. */ + @SerializedName("data") + V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** + * Open Enum. The capability which had its status updated. + * + *

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 au_becs_debit_payments}, {@code bacs_debit_payments}, {@code bancontact_payments}, + * {@code blik_payments}, {@code boleto_payments}, {@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 + * stripe_balance.payouts}, {@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 swish_payments}, {@code twint_payments}, {@code + * us_bank_transfer_payments}, or {@code zip_payments}. + */ + @SerializedName("updated_capability") + String updatedCapability; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..a651119b0b6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final +class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java new file mode 100644 index 00000000000..5d525b9faf3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationMerchantUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java new file mode 100644 index 00000000000..c531238467b --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationMerchantUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationMerchantUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java new file mode 100644 index 00000000000..fda9a61e76d --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java @@ -0,0 +1,42 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent + extends Event { + /** Data for the v2.core.account[configuration.recipient].capability_status_updated event. */ + @SerializedName("data") + V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** + * Open Enum. The capability which had its status updated. + * + *

One of {@code bank_accounts.local}, {@code bank_accounts.wire}, {@code cards}, {@code + * stripe_balance.payouts}, {@code stripe_balance.stripe_transfers}, or {@code + * stripe.transfers}. + */ + @SerializedName("updated_capability") + String updatedCapability; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..11072827081 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final +class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java new file mode 100644 index 00000000000..9215345d6f4 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationRecipientUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java new file mode 100644 index 00000000000..bdc8b261a09 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationRecipientUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationRecipientUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java new file mode 100644 index 00000000000..468bd1b4a8a --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingDefaultsUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java new file mode 100644 index 00000000000..d7e23077bfd --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingDefaultsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingDefaultsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingDefaultsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java new file mode 100644 index 00000000000..496147e2216 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingFutureRequirementsUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java new file mode 100644 index 00000000000..31c75530fa6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingFutureRequirementsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingFutureRequirementsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java new file mode 100644 index 00000000000..0e39b973f3e --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingIdentityUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java new file mode 100644 index 00000000000..fbadf63c66c --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingIdentityUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingIdentityUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingIdentityUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java new file mode 100644 index 00000000000..8772e2c6727 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingRequirementsUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java new file mode 100644 index 00000000000..5c0246387b5 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingRequirementsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingRequirementsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingRequirementsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEvent.java new file mode 100644 index 00000000000..8853cb981fd --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEvent.java @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.v2.core.Event; +import java.util.List; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountLinkReturnedEvent extends Event { + /** Data for the v2.core.account_link.returned event. */ + @SerializedName("data") + V2CoreAccountLinkReturnedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The ID of the v2 account. */ + @SerializedName("account_id") + String accountId; + /** Configurations on the Account that was onboarded via the account link. */ + @SerializedName("configurations") + List configurations; + /** + * Open Enum. The use case type of the account link that has been completed. + * + *

One of {@code account_onboarding}, or {@code account_update}. + */ + @SerializedName("use_case") + String useCase; + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java new file mode 100644 index 00000000000..447b6909d19 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java @@ -0,0 +1,13 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.EventNotification; + +public final class V2CoreAccountLinkReturnedEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountLinkReturnedEvent fetchEvent() throws StripeException { + return (V2CoreAccountLinkReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java new file mode 100644 index 00000000000..31eb01d754c --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountPersonCreatedEvent extends Event { + /** Data for the v2.core.account_person.created event. */ + @SerializedName("data") + V2CoreAccountPersonCreatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The ID of the v2 account. */ + @SerializedName("account_id") + String accountId; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java new file mode 100644 index 00000000000..52159283b25 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountPersonCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountPersonCreatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountPersonCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java new file mode 100644 index 00000000000..54168d8031d --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountPersonDeletedEvent extends Event { + /** Data for the v2.core.account_person.deleted event. */ + @SerializedName("data") + V2CoreAccountPersonDeletedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The ID of the v2 account. */ + @SerializedName("account_id") + String accountId; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java new file mode 100644 index 00000000000..ccdfef19c4c --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountPersonDeletedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountPersonDeletedEvent fetchEvent() throws StripeException { + return (V2CoreAccountPersonDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java new file mode 100644 index 00000000000..d9f19f199c2 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreAccountPersonUpdatedEvent extends Event { + /** Data for the v2.core.account_person.updated event. */ + @SerializedName("data") + V2CoreAccountPersonUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The ID of the v2 account. */ + @SerializedName("account_id") + String accountId; + } + + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java new file mode 100644 index 00000000000..7d9c09bccd0 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.AccountPerson; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountPersonUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountPersonUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountPersonUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java new file mode 100644 index 00000000000..767204a5eef --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import lombok.Getter; + +@Getter +public final class V2CoreAccountUpdatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java new file mode 100644 index 00000000000..6ecdb7e9f6d --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Account; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreAccountUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreEventDestinationPingEvent.java b/src/main/java/com/stripe/events/V2CoreEventDestinationPingEvent.java index 7d94b5d35f5..fbd5f8bbba2 100644 --- a/src/main/java/com/stripe/events/V2CoreEventDestinationPingEvent.java +++ b/src/main/java/com/stripe/events/V2CoreEventDestinationPingEvent.java @@ -3,8 +3,9 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; -import com.stripe.model.v2.Event; -import com.stripe.model.v2.EventDestination; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventDestination; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V2CoreEventDestinationPingEventNotification.java b/src/main/java/com/stripe/events/V2CoreEventDestinationPingEventNotification.java new file mode 100644 index 00000000000..4fc652b22c7 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreEventDestinationPingEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.core.EventDestination; +import com.stripe.model.v2.core.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreEventDestinationPingEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public EventDestination fetchRelatedObject() throws StripeException { + return (EventDestination) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreEventDestinationPingEvent fetchEvent() throws StripeException { + return (V2CoreEventDestinationPingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/examples/ThinEventWebhookHandler.java b/src/main/java/com/stripe/examples/EventNotificationWebhookHandler.java similarity index 50% rename from src/main/java/com/stripe/examples/ThinEventWebhookHandler.java rename to src/main/java/com/stripe/examples/EventNotificationWebhookHandler.java index f26cdf99bae..728b786d83f 100644 --- a/src/main/java/com/stripe/examples/ThinEventWebhookHandler.java +++ b/src/main/java/com/stripe/examples/EventNotificationWebhookHandler.java @@ -1,11 +1,12 @@ package com.stripe.examples; import com.stripe.StripeClient; +import com.stripe.events.UnknownEventNotification; import com.stripe.events.V1BillingMeterErrorReportTriggeredEvent; +import com.stripe.events.V1BillingMeterErrorReportTriggeredEventNotification; import com.stripe.exception.StripeException; -import com.stripe.model.ThinEvent; import com.stripe.model.billing.Meter; -import com.stripe.model.v2.Event; +import com.stripe.model.v2.core.EventNotification; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; @@ -16,18 +17,18 @@ import java.nio.charset.StandardCharsets; /** - * Receive and process thin events like the v1.billing.meter.error_report_triggered event. + * Receive and process EventNotifications like the v1.billing.meter.error_report_triggered event. * *

In this example, we: * *

    - *
  • use parseThinEvent to parse the received thin event webhook body - *
  • call StripeClient.v2.core.events.retrieve to retrieve the flil event object + *
  • use parseEventNotification to parse the received event notification webhook body + *
  • call StripeClient.v2.core.events.retrieve to retrieve the full event object *
  • if it is a V1BillingMeterErrorReportTriggeredEvent event type, call fetchRelatedObject to * retrieve the Billing Meter object associated with the event. *
*/ -public class ThinEventWebhookHandler { +public class EventNotificationWebhookHandler { private static final String API_KEY = System.getenv("STRIPE_API_KEY"); private static final String WEBHOOK_SECRET = System.getenv("WEBHOOK_SECRET"); @@ -65,20 +66,40 @@ public void handle(HttpExchange exchange) throws IOException { String sigHeader = exchange.getRequestHeaders().getFirst("Stripe-Signature"); try { - ThinEvent thinEvent = client.parseThinEvent(webhookBody, sigHeader, WEBHOOK_SECRET); - - // Fetch the event data to understand the failure - Event baseEvent = client.v2().core().events().retrieve(thinEvent.getId()); - if (baseEvent instanceof V1BillingMeterErrorReportTriggeredEvent) { - V1BillingMeterErrorReportTriggeredEvent event = - (V1BillingMeterErrorReportTriggeredEvent) baseEvent; - Meter meter = event.fetchRelatedObject(); - - String meterId = meter.getId(); - System.out.println(meterId); - - // Record the failures and alert your team - // Add your logic here + EventNotification notif = + client.parseEventNotification(webhookBody, sigHeader, WEBHOOK_SECRET); + + if (notif instanceof V1BillingMeterErrorReportTriggeredEventNotification) { + V1BillingMeterErrorReportTriggeredEventNotification eventNotification = + (V1BillingMeterErrorReportTriggeredEventNotification) notif; + + // there's basic info about the related object in the notification + System.out.println( + "Meter w/ id " + eventNotification.getRelatedObject().getId() + " had a problem"); + + // or you can fetch the full object form the API for more details + Meter meter = eventNotification.fetchRelatedObject(); + StringBuilder sb = new StringBuilder(); + sb.append("Meter ") + .append(meter.getDisplayName()) + .append(" (") + .append(meter.getId()) + .append(") had a problem"); + System.out.println(sb.toString()); + + // And you can always fetch the full event: + V1BillingMeterErrorReportTriggeredEvent event = eventNotification.fetchEvent(); + System.out.println("More info: " + event.getData().getDeveloperMessageSummary()); + } else if (notif instanceof UnknownEventNotification) { + // Events that were introduced after this SDK version release are + // represented as `UnknownEventNotification`s. + // They're valid, the SDK just doesn't have corresponding classes for them. + // You must match on the "type" property instead. + UnknownEventNotification unknownEvent = (UnknownEventNotification) notif; + if (unknownEvent.getType().equals("some.new.event")) { + // you can still `.fetchEvent()` and `.fetchRelatedObject()`, but the latter may + // return `null` if that event type doesn't have a related object. + } } exchange.sendResponseHeaders(200, -1); diff --git a/src/main/java/com/stripe/exception/RateLimitException.java b/src/main/java/com/stripe/exception/RateLimitException.java index e74c6c18c65..78353fcd7e9 100644 --- a/src/main/java/com/stripe/exception/RateLimitException.java +++ b/src/main/java/com/stripe/exception/RateLimitException.java @@ -1,8 +1,17 @@ package com.stripe.exception; -public class RateLimitException extends InvalidRequestException { +import com.google.gson.JsonObject; +import com.stripe.model.StripeError; +import com.stripe.model.StripeObject; +import com.stripe.net.StripeResponseGetter; +import lombok.Getter; + +@Getter +public class RateLimitException extends ApiException { private static final long serialVersionUID = 2L; + private final String param; + public RateLimitException( String message, String param, @@ -10,6 +19,22 @@ public RateLimitException( String code, Integer statusCode, Throwable e) { - super(message, param, requestId, code, statusCode, e); + super(message, requestId, code, statusCode, e); + this.param = param; } + + static RateLimitException parse( + JsonObject body, int statusCode, String requestId, StripeResponseGetter responseGetter) { + RateLimitException.RateLimitError error = + (RateLimitException.RateLimitError) + StripeObject.deserializeStripeObject( + body, RateLimitException.RateLimitError.class, responseGetter); + RateLimitException exception = + new RateLimitException( + error.getMessage(), error.getParam(), requestId, error.getCode(), statusCode, null); + exception.setStripeError(error); + return exception; + } + + public static class RateLimitError extends StripeError {} } diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index b039480686c..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. */ @@ -1144,6 +1144,15 @@ public static class Capabilities extends StripeObject { @SerializedName("link_payments") String linkPayments; + /** + * The status of the MB WAY payments capability of the account, or whether the account can + * directly process MB WAY charges. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("mb_way_payments") + String mbWayPayments; + /** * The status of the MobilePay capability of the account, or whether the account can directly * process MobilePay charges. @@ -1234,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. @@ -1407,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") @@ -1423,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. */ @@ -1470,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 @@ -1507,12 +1525,19 @@ public static class Company extends StripeObject { @SerializedName("registration_date") RegistrationDate registrationDate; + /** + * 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; + /** * The category identifying the legal structure of the company or legal entity. Also available * 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 @@ -1692,6 +1717,30 @@ public static class RegistrationDate extends StripeObject { Long year; } + /** + * For more details about RepresentativeDeclaration, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration extends StripeObject { + /** The Unix timestamp marking when the representative declaration attestation was made. */ + @SerializedName("date") + Long date; + + /** The IP address from which the representative declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user-agent string from the browser where the representative declaration attestation was + * made. + */ + @SerializedName("user_agent") + String userAgent; + } + /** * For more details about Verification, please refer to the API Reference. @@ -1712,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) @@ -1739,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) @@ -1802,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") @@ -1897,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; @@ -1913,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. */ @@ -1934,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; @@ -1948,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; @@ -1974,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") @@ -1997,14 +2048,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@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_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@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_signator}, {@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 @@ -2023,29 +2074,30 @@ public static class Errors extends StripeObject { * 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_value_other}, {@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_authorizer_authority}, {@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 + * {@code invalid_value_other}, {@code unsupported_business_type}, {@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_authorizer_authority}, {@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_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -2084,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") @@ -2100,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; @@ -2115,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") @@ -2124,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}, @@ -2138,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; @@ -2152,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; @@ -2176,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") @@ -2199,14 +2254,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@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_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@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_signator}, {@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 @@ -2225,29 +2280,30 @@ public static class Errors extends StripeObject { * 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_value_other}, {@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_authorizer_authority}, {@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 + * {@code invalid_value_other}, {@code unsupported_business_type}, {@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_authorizer_authority}, {@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_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -2558,8 +2614,9 @@ public static class Invoices extends StripeObject { List> defaultAccountTaxIds; /** - * Whether payment methods should be saved when a payment is completed for a one-time invoices - * on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or a + * subscription invoice when the customer already has a default payment method on the hosted + * invoice page. * *

One of {@code always}, {@code never}, or {@code offer}. */ 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 9cd529209eb..3c3d6afa5d6 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") @@ -132,9 +132,6 @@ public static class Components extends StripeObject { @SerializedName("account_onboarding") AccountOnboarding accountOnboarding; - @SerializedName("balance_report") - BalanceReport balanceReport; - @SerializedName("balances") Balances balances; @@ -174,9 +171,6 @@ public static class Components extends StripeObject { @SerializedName("payout_details") PayoutDetails payoutDetails; - @SerializedName("payout_reconciliation_report") - PayoutReconciliationReport payoutReconciliationReport; - @SerializedName("payouts") Payouts payouts; @@ -277,31 +271,6 @@ public static class Features extends StripeObject { } } - /** - * For more details about BalanceReport, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class BalanceReport extends StripeObject { - /** Whether the embedded component is enabled. */ - @SerializedName("enabled") - Boolean enabled; - - @SerializedName("features") - Features features; - - /** - * For more details about Features, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Features extends StripeObject {} - } - /** * For more details about Balances, please refer to the API Reference. @@ -353,9 +322,9 @@ public static class Features extends StripeObject { Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. + * Whether to allow creation of instant payouts. The default value is {@code enabled} when + * Stripe is responsible for negative account balances, and {@code use_dashboard_rules} + * otherwise. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -569,9 +538,9 @@ public static class Features extends StripeObject { Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. + * Whether to allow creation of instant payouts. The default value is {@code enabled} when + * Stripe is responsible for negative account balances, and {@code use_dashboard_rules} + * otherwise. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -882,31 +851,6 @@ public static class PayoutDetails extends StripeObject { public static class Features extends StripeObject {} } - /** - * For more details about PayoutReconciliationReport, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class PayoutReconciliationReport extends StripeObject { - /** Whether the embedded component is enabled. */ - @SerializedName("enabled") - Boolean enabled; - - @SerializedName("features") - Features features; - - /** - * For more details about Features, please refer to the API Reference. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class Features extends StripeObject {} - } - /** * For more details about Payouts, please refer to the API * Reference. @@ -958,9 +902,9 @@ public static class Features extends StripeObject { Boolean externalAccountCollection; /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. + * Whether to allow creation of instant payouts. The default value is {@code enabled} when + * Stripe is responsible for negative account balances, and {@code use_dashboard_rules} + * otherwise. */ @SerializedName("instant_payouts") Boolean instantPayouts; diff --git a/src/main/java/com/stripe/model/Address.java b/src/main/java/com/stripe/model/Address.java index 042bcd4c261..fb4a3980f9f 100644 --- a/src/main/java/com/stripe/model/Address.java +++ b/src/main/java/com/stripe/model/Address.java @@ -21,11 +21,11 @@ public class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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 new file mode 100644 index 00000000000..2856810b8de --- /dev/null +++ b/src/main/java/com/stripe/model/BalanceSettings.java @@ -0,0 +1,255 @@ +// File generated from our OpenAPI spec +package com.stripe.model; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +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.BalanceSettingsRetrieveParams; +import com.stripe.param.BalanceSettingsUpdateParams; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Options for customizing account balances and payout settings for a Stripe platform’s connected + * accounts. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class BalanceSettings extends ApiResource { + /** + * String representing the object's type. Objects of the same type share the same value. + * + *

Equal to {@code balance_settings}. + */ + @SerializedName("object") + String object; + + @SerializedName("payments") + Payments payments; + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings retrieve() throws StripeException { + return retrieve((Map) null, (RequestOptions) null); + } + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings retrieve(RequestOptions options) throws StripeException { + return retrieve((Map) null, options); + } + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings retrieve(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, BalanceSettings.class); + } + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings retrieve( + BalanceSettingsRetrieveParams params, RequestOptions options) throws StripeException { + String path = "/v1/balance_settings"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, BalanceSettings.class); + } + + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings update(Map params) throws StripeException { + return update(params, (RequestOptions) null); + } + + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings update(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, BalanceSettings.class); + } + + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings update(BalanceSettingsUpdateParams params) throws StripeException { + return update(params, (RequestOptions) null); + } + + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public static BalanceSettings update(BalanceSettingsUpdateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, BalanceSettings.class); + } + + /** + * For more details about Payments, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payments extends StripeObject { + /** + * A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank + * account. See Understanding Connect + * account balances for details. The default value is {@code false} when controller.requirement_collection + * is {@code application}, which includes Custom accounts, otherwise {@code true}. + */ + @SerializedName("debit_negative_balances") + Boolean debitNegativeBalances; + + /** Settings specific to the account's payouts. */ + @SerializedName("payouts") + Payouts payouts; + + @SerializedName("settlement_timing") + SettlementTiming settlementTiming; + + /** + * For more details about Payouts, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payouts extends StripeObject { + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds that + * exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + @SerializedName("minimum_balance_by_currency") + Map minimumBalanceByCurrency; + + /** + * Details on when funds from charges are available, and when they are paid out to an external + * account. See our Setting Bank and + * Debit Card Payouts documentation for details. + */ + @SerializedName("schedule") + Schedule schedule; + + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults + * to the platform's bank descriptor as set in the Dashboard. + */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** + * Whether the funds in this account can be paid out. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("status") + String status; + + /** + * For more details about Schedule, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Schedule extends StripeObject { + /** + * How frequently funds will be paid out. One of {@code manual} (payouts only created via + * API call), {@code daily}, {@code weekly}, or {@code monthly}. + */ + @SerializedName("interval") + String interval; + + /** + * The day of the month funds will be paid out. Only shown if {@code interval} is monthly. + * Payouts scheduled between the 29th and 31st of the month are sent on the last day of + * shorter months. + */ + @SerializedName("monthly_payout_days") + List monthlyPayoutDays; + + /** + * The days of the week when available funds are paid out, specified as an array, for + * example, [{@code monday}, {@code tuesday}]. Only shown if {@code interval} is weekly. + */ + @SerializedName("weekly_payout_days") + List weeklyPayoutDays; + } + } + + /** + * For more details about SettlementTiming, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SettlementTiming extends StripeObject { + /** The number of days charge funds are held before becoming available. */ + @SerializedName("delay_days") + Long delayDays; + + /** + * The number of days charge funds are held before becoming available. If present, overrides + * the default, or minimum available, for the account. + */ + @SerializedName("delay_days_override") + Long delayDaysOverride; + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(payments, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/BalanceTransaction.java b/src/main/java/com/stripe/model/BalanceTransaction.java index 2c195229c91..b8e639e7799 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 @@ -43,7 +43,8 @@ public class BalanceTransaction extends ApiResource implements HasId { /** * The balance that this transaction impacts. * - *

One of {@code issuing}, {@code payments}, or {@code refund_and_dispute_prefunding}. + *

One of {@code issuing}, {@code payments}, {@code refund_and_dispute_prefunding}, or {@code + * risk_reserved}. */ @SerializedName("balance_type") String balanceType; @@ -137,11 +138,11 @@ public class BalanceTransaction extends ApiResource implements HasId { * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code * payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code - * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code stripe_fee}, - * {@code stripe_fx_fee}, {@code stripe_balance_payment_debit}, {@code - * stripe_balance_payment_debit_reversal}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, - * {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code - * transfer_refund}. Learn more about balance transaction types and * what they represent. To classify transactions for accounting purposes, consider {@code * reporting_category} instead. @@ -156,11 +157,11 @@ public class BalanceTransaction extends ApiResource implements HasId { * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code * payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code - * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code - * stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code - * stripe_fee}, {@code stripe_fx_fee}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, - * {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code - * transfer_refund}. + * refund_failure}, {@code reserve_hold}, {@code reserve_release}, {@code reserve_transaction}, + * {@code reserved_funds}, {@code stripe_balance_payment_debit}, {@code + * stripe_balance_payment_debit_reversal}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code + * tax_fee}, {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, + * {@code transfer_failure}, or {@code transfer_refund}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/BankAccount.java b/src/main/java/com/stripe/model/BankAccount.java index 11764f9dafc..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. */ @@ -156,20 +156,24 @@ public class BankAccount extends ApiResource /** * For bank accounts, possible values are {@code new}, {@code validated}, {@code verified}, {@code - * verification_failed}, or {@code errored}. A bank account that hasn't had any activity or - * validation performed is {@code new}. If Stripe can determine that the bank account exists, its - * status will be {@code validated}. Note that there often isn’t enough information to know (e.g., - * for smaller credit unions), and the validation is not always run. If customer bank account - * verification has succeeded, the bank account status will be {@code verified}. If the - * verification failed for any reason, such as microdeposit failure, the status will be {@code - * verification_failed}. If a payout sent to this bank account fails, we'll set the status to - * {@code errored} and will not continue to send scheduled payouts until the bank * details are updated. * - *

For external accounts, possible values are {@code new}, {@code errored} and {@code - * verification_failed}. If a payout fails, the status is set to {@code errored} and scheduled - * payouts are stopped until account details are updated. In the US and India, if we can't For external accounts, possible values are {@code new}, {@code errored}, {@code + * verification_failed}, and {@code tokenized_account_number_deactivated}. If a payout fails, the + * status is set to {@code errored} and scheduled payouts are stopped until account details are + * updated. In the US and India, if we can't verify the * owner of the bank account, we'll set the status to {@code verification_failed}. Other * validations aren't run against external accounts because they're only used for payouts. This @@ -510,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; @@ -552,14 +556,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@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_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@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_signator}, {@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 @@ -578,29 +582,30 @@ public static class Errors extends StripeObject { * 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_value_other}, {@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_authorizer_authority}, {@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 + * {@code invalid_value_other}, {@code unsupported_business_type}, {@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_authorizer_authority}, {@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_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -638,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; @@ -680,14 +685,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@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_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@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_signator}, {@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 @@ -706,29 +711,30 @@ public static class Errors extends StripeObject { * 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_value_other}, {@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_authorizer_authority}, {@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 + * {@code invalid_value_other}, {@code unsupported_business_type}, {@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_authorizer_authority}, {@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_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java index f0c8d1b3e45..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") @@ -246,14 +248,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@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_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@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_signator}, {@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 @@ -272,29 +274,30 @@ public static class Errors extends StripeObject { * 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_value_other}, {@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_authorizer_authority}, {@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 + * {@code invalid_value_other}, {@code unsupported_business_type}, {@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_authorizer_authority}, {@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_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -332,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; @@ -349,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 @@ -370,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; @@ -384,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; @@ -408,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") @@ -431,14 +437,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@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_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@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_signator}, {@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 @@ -457,29 +463,30 @@ public static class Errors extends StripeObject { * 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_value_other}, {@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_authorizer_authority}, {@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 + * {@code invalid_value_other}, {@code unsupported_business_type}, {@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_authorizer_authority}, {@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_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Card.java b/src/main/java/com/stripe/model/Card.java index 5b22ef8f7fd..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 @@ -90,9 +90,9 @@ public class Card extends ApiResource List availablePayoutMethods; /** - * Card brand. Can be {@code American Express}, {@code Diners Club}, {@code Discover}, {@code - * Eftpos Australia}, {@code Girocard}, {@code JCB}, {@code MasterCard}, {@code UnionPay}, {@code - * Visa}, or {@code Unknown}. + * Card brand. Can be {@code American Express}, {@code Cartes Bancaires}, {@code Diners Club}, + * {@code Discover}, {@code Eftpos Australia}, {@code Girocard}, {@code JCB}, {@code MasterCard}, + * {@code UnionPay}, {@code Visa}, or {@code Unknown}. */ @SerializedName("brand") String brand; @@ -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 0952ca5cd80..0152cd0599a 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -23,9 +23,9 @@ /** * 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 transferring money to a - * different Stripe account through Connect also creates Charges. Some legacy payment flows create - * Charges directly, which is not recommended for new integrations. + * PaymentIntent confirmation is the most common way to create Charges, but Account Debits may also create Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. */ @Getter @Setter @@ -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; @@ -1240,6 +1240,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("link") Link link; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("mobilepay") Mobilepay mobilepay; @@ -1270,6 +1273,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -1305,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. @@ -1403,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. @@ -1436,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") @@ -1618,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. @@ -1642,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. @@ -1891,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; @@ -2194,7 +2218,7 @@ public static class ThreeDSecure extends StripeObject { /** * The version of 3D Secure that was used. * - *

One of {@code 1.0.2}, {@code 2.1.0}, or {@code 2.2.0}. + *

One of {@code 1.0.2}, {@code 2.1.0}, {@code 2.2.0}, {@code 2.3.0}, or {@code 2.3.1}. */ @SerializedName("version") String version; @@ -2473,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; @@ -2687,7 +2711,7 @@ public static class Crypto extends StripeObject { /** * The blockchain network that the transaction was sent on. * - *

One of {@code base}, {@code ethereum}, or {@code polygon}. + *

One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}. */ @SerializedName("network") String network; @@ -2827,10 +2851,11 @@ public static class Grabpay extends StripeObject { @EqualsAndHashCode(callSuper = false) 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 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}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code 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; @@ -2838,10 +2863,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@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}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code 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; @@ -2862,6 +2888,10 @@ public static class Ideal extends StripeObject { @SerializedName("iban_last4") String ibanLast4; + /** Unique transaction ID generated by iDEAL. */ + @SerializedName("transaction_id") + String transactionId; + /** * Owner's verified full name. Values are verified or provided by iDEAL directly (if * supported) at the time of authorization or settlement. They cannot be set or mutated. @@ -3278,6 +3308,15 @@ public static class Link extends StripeObject { String country; } + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + /** * For more details about Mobilepay, please refer to the API Reference. @@ -3381,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; @@ -3472,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") @@ -3557,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. @@ -3733,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. @@ -3746,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; @@ -3923,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. @@ -3992,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") @@ -4040,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 @@ -4048,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 d7a19863930..4c4a570d1fe 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; @@ -374,6 +377,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("link") Link link; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("mobilepay") Mobilepay mobilepay; @@ -404,6 +410,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -439,14 +448,14 @@ public static class PaymentMethodPreview extends StripeObject { *

One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay}, * {@code alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code * bancontact}, {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code - * card_present}, {@code cashapp}, {@code crypto}, {@code customer_balance}, {@code eps}, {@code - * fpx}, {@code giropay}, {@code grabpay}, {@code ideal}, {@code interac_present}, {@code - * kakao_pay}, {@code klarna}, {@code konbini}, {@code kr_card}, {@code link}, {@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}. + * card_present}, {@code cashapp}, {@code crypto}, {@code custom}, {@code customer_balance}, + * {@code eps}, {@code fpx}, {@code giropay}, {@code grabpay}, {@code ideal}, {@code + * 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 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; @@ -984,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; @@ -1661,10 +1670,11 @@ public static class Grabpay extends StripeObject {} @EqualsAndHashCode(callSuper = false) 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 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}. + * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code adyen}, {@code + * asn_bank}, {@code bunq}, {@code 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; @@ -1672,10 +1682,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank, if the bank was provided. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@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}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code 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; @@ -1899,6 +1910,15 @@ public static class Link extends StripeObject { String persistentToken; } + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + /** * For more details about Mobilepay, please refer to the API Reference. @@ -2064,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. @@ -2339,7 +2380,8 @@ public static class Blocked extends StripeObject { * *

One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code * bank_account_invalid_details}, {@code bank_account_restricted}, {@code - * bank_account_unusable}, or {@code debit_not_authorized}. + * bank_account_unusable}, {@code debit_not_authorized}, or {@code + * tokenized_account_number_deactivated}. */ @SerializedName("reason") String reason; 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 8576cb7d60e..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; @@ -739,12 +743,20 @@ public static class Refund extends StripeObject { @SerializedName("amount_refunded") Long amountRefunded; + /** The PaymentRecord refund details associated with this credit note refund. */ + @SerializedName("payment_record_refund") + PaymentRecordRefund paymentRecordRefund; + /** ID of the refund. */ @SerializedName("refund") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField refund; + /** Type of the refund, one of {@code refund} or {@code payment_record_refund}. */ + @SerializedName("type") + String type; + /** Get ID of expandable {@code refund} object. */ public String getRefund() { return (this.refund != null) ? this.refund.getId() : null; @@ -763,6 +775,23 @@ public void setRefundObject(com.stripe.model.Refund expandableObject) { this.refund = new ExpandableField(expandableObject.getId(), expandableObject); } + + /** + * For more details about PaymentRecordRefund, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentRecordRefund extends StripeObject { + /** ID of the payment record. */ + @SerializedName("payment_record") + String paymentRecord; + + /** ID of the refund group. */ + @SerializedName("refund_group") + String refundGroup; + } } /** @@ -918,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 a25a06ff9fd..309c0dadb5d 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,11 +47,15 @@ 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; + /** The customer's business name. */ + @SerializedName("business_name") + String businessName; + /** * The current funds being held by Stripe on behalf of the customer. You can apply these funds * towards payment intents when the source is "cash_balance". The {@code @@ -72,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") @@ -94,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 @@ -122,6 +133,10 @@ 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. */ @@ -772,14 +787,14 @@ public static CustomerSearchResult search(CustomerSearchParams params, RequestOp /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -791,14 +806,14 @@ public Customer update(Map params) throws StripeException { /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -814,14 +829,14 @@ public Customer update(Map params, RequestOptions options) /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -832,14 +847,14 @@ public Customer update(CustomerUpdateParams params) throws StripeException { /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -971,6 +986,15 @@ public static class Tax extends StripeObject { @SerializedName("location") Location location; + /** + * The tax calculation provider used for location resolution. Defaults to {@code stripe} when + * not using a third-party provider. + * + *

One of {@code anrok}, {@code avalara}, {@code sphere}, or {@code stripe}. + */ + @SerializedName("provider") + String provider; + /** * For more details about Location, please refer to the API Reference. 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 534a5a172e7..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; @@ -149,6 +153,17 @@ public static class Components extends StripeObject { @SerializedName("buy_button") BuyButton buyButton; + /** This hash contains whether the customer sheet is enabled and the features it supports. */ + @SerializedName("customer_sheet") + CustomerSheet customerSheet; + + /** + * This hash contains whether the mobile payment element is enabled and the features it + * supports. + */ + @SerializedName("mobile_payment_element") + MobilePaymentElement mobilePaymentElement; + /** This hash contains whether the Payment Element is enabled and the features it supports. */ @SerializedName("payment_element") PaymentElement paymentElement; @@ -167,6 +182,144 @@ public static class BuyButton extends StripeObject { Boolean enabled; } + /** This hash contains whether the customer sheet is enabled and the features it supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerSheet extends StripeObject { + /** Whether the customer sheet is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** This hash defines whether the customer sheet supports certain features. */ + @SerializedName("features") + Features features; + + /** This hash contains the features the customer sheet supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * A list of {@code + * allow_redisplay} values that controls which saved payment methods the customer sheet + * displays by filtering to only show payment methods with an {@code allow_redisplay} value + * that is present in this list. + * + *

If not specified, defaults to ["always"]. In order to display all saved + * payment methods, specify ["always", "limited", + * "unspecified"]. + */ + @SerializedName("payment_method_allow_redisplay_filters") + List paymentMethodAllowRedisplayFilters; + + /** + * Controls whether the customer sheet displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("payment_method_remove") + String paymentMethodRemove; + } + } + + /** + * This hash contains whether the mobile payment element is enabled and the features it + * supports. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MobilePaymentElement extends StripeObject { + /** Whether the mobile payment element is enabled. */ + @SerializedName("enabled") + Boolean enabled; + + /** This hash defines whether the mobile payment element supports certain features. */ + @SerializedName("features") + Features features; + + /** This hash contains the features the mobile payment element supports. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Features extends StripeObject { + /** + * A list of {@code + * allow_redisplay} values that controls which saved payment methods the mobile payment + * element displays by filtering to only show payment methods with an {@code + * allow_redisplay} value that is present in this list. + * + *

If not specified, defaults to ["always"]. In order to display all saved + * payment methods, specify ["always", "limited", + * "unspecified"]. + */ + @SerializedName("payment_method_allow_redisplay_filters") + List paymentMethodAllowRedisplayFilters; + + /** + * Controls whether or not the mobile payment element shows saved payment methods. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("payment_method_redisplay") + String paymentMethodRedisplay; + + /** + * Controls whether the mobile payment element displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("payment_method_remove") + String paymentMethodRemove; + + /** + * Controls whether the mobile payment element displays a checkbox offering to save a new + * payment method. + * + *

If a customer checks the box, the {@code + * allow_redisplay} value on the PaymentMethod is set to {@code 'always'} at + * confirmation time. For PaymentIntents, the {@code + * setup_future_usage} value is also set to the value defined in {@code + * payment_method_save_usage}. + * + *

One of {@code disabled}, or {@code enabled}. + */ + @SerializedName("payment_method_save") + String paymentMethodSave; + + /** + * Allows overriding the value of allow_override when saving a new payment method when + * payment_method_save is set to disabled. Use values: "always", + * "limited", or "unspecified". + * + *

If not specified, defaults to {@code nil} (no override value). + * + *

One of {@code always}, {@code limited}, or {@code unspecified}. + */ + @SerializedName("payment_method_save_allow_redisplay_override") + String paymentMethodSaveAllowRedisplayOverride; + } + } + /** This hash contains whether the Payment Element is enabled and the features it supports. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/Discount.java b/src/main/java/com/stripe/model/Discount.java index a1b93433ad9..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 @@ -27,25 +27,16 @@ public class Discount extends StripeObject implements HasId { @SerializedName("checkout_session") String checkoutSession; - /** - * 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. - */ - @SerializedName("coupon") - Coupon coupon; - /** The ID of the customer associated with this discount. */ @SerializedName("customer") @Getter(lombok.AccessLevel.NONE) @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; @@ -94,6 +85,9 @@ public class Discount extends StripeObject implements HasId { @Setter(lombok.AccessLevel.NONE) ExpandableField promotionCode; + @SerializedName("source") + Source source; + /** Date that the coupon was applied. */ @SerializedName("start") Long start; @@ -147,4 +141,45 @@ public void setPromotionCodeObject(PromotionCode expandableObject) { this.promotionCode = new ExpandableField(expandableObject.getId(), expandableObject); } + + /** + * For more details about Source, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Source extends StripeObject { + /** The coupon that was redeemed to create this discount. */ + @SerializedName("coupon") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField coupon; + + /** + * The source type of the discount. + * + *

Equal to {@code coupon}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code coupon} object. */ + public String getCoupon() { + return (this.coupon != null) ? this.coupon.getId() : null; + } + + public void setCoupon(String id) { + this.coupon = ApiResource.setExpandableFieldId(id, this.coupon); + } + + /** Get expanded {@code coupon}. */ + public Coupon getCouponObject() { + return (this.coupon != null) ? this.coupon.getExpanded() : null; + } + + public void setCouponObject(Coupon expandableObject) { + this.coupon = new ExpandableField(expandableObject.getId(), expandableObject); + } + } } diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java index 84007fef7b5..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") @@ -138,8 +138,8 @@ public class Dispute extends ApiResource * warning_under_review}, {@code warning_closed}, {@code needs_response}, {@code under_review}, * {@code won}, {@code lost}, or {@code prevented}. * - *

One of {@code lost}, {@code needs_response}, {@code under_review}, {@code warning_closed}, - * {@code warning_needs_response}, {@code warning_under_review}, or {@code won}. + *

One of {@code lost}, {@code needs_response}, {@code prevented}, {@code under_review}, {@code + * warning_closed}, {@code warning_needs_response}, {@code warning_under_review}, or {@code won}. */ @SerializedName("status") String status; @@ -878,11 +878,11 @@ public static class ShippingAddress extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; } @@ -966,11 +969,11 @@ public static class ShippingAddress extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; } @@ -1190,6 +1196,10 @@ public static class Card extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject { + /** Chargeback loss reason mapped by Stripe from Klarna's chargeback loss reason. */ + @SerializedName("chargeback_loss_reason_code") + String chargebackLossReasonCode; + /** The reason for the dispute as defined by Klarna. */ @SerializedName("reason_code") String reasonCode; diff --git a/src/main/java/com/stripe/model/Event.java b/src/main/java/com/stripe/model/Event.java index 46b57125e94..1f36c7d8289 100644 --- a/src/main/java/com/stripe/model/Event.java +++ b/src/main/java/com/stripe/model/Event.java @@ -104,7 +104,7 @@ public class Event extends ApiResource implements HasId { * {@code account.external_account.created}, {@code account.external_account.deleted}, {@code * account.external_account.updated}, {@code account.updated}, {@code application_fee.created}, * {@code application_fee.refund.updated}, {@code application_fee.refunded}, {@code - * balance.available}, {@code billing.alert.triggered}, {@code + * balance.available}, {@code balance_settings.updated}, {@code billing.alert.triggered}, {@code * billing_portal.configuration.created}, {@code billing_portal.configuration.updated}, {@code * billing_portal.session.created}, {@code capability.updated}, {@code * cash_balance.funds_available}, {@code charge.captured}, {@code charge.dispute.closed}, {@code @@ -129,19 +129,22 @@ public class Event extends ApiResource implements HasId { * customer.tax_id.created}, {@code customer.tax_id.deleted}, {@code customer.tax_id.updated}, * {@code customer.updated}, {@code customer_cash_balance_transaction.created}, {@code * entitlements.active_entitlement_summary.updated}, {@code file.created}, {@code + * financial_connections.account.account_numbers_updated}, {@code * financial_connections.account.created}, {@code financial_connections.account.deactivated}, * {@code financial_connections.account.disconnected}, {@code * financial_connections.account.reactivated}, {@code * financial_connections.account.refreshed_balance}, {@code * financial_connections.account.refreshed_ownership}, {@code * financial_connections.account.refreshed_transactions}, {@code + * financial_connections.account.upcoming_account_number_expiry}, {@code * identity.verification_session.canceled}, {@code identity.verification_session.created}, {@code * identity.verification_session.processing}, {@code identity.verification_session.redacted}, * {@code identity.verification_session.requires_input}, {@code * identity.verification_session.verified}, {@code invoice.created}, {@code invoice.deleted}, * {@code invoice.finalization_failed}, {@code invoice.finalized}, {@code * invoice.marked_uncollectible}, {@code invoice.overdue}, {@code invoice.overpaid}, {@code - * invoice.paid}, {@code invoice.payment_action_required}, {@code invoice.payment_failed}, {@code + * invoice.paid}, {@code invoice.payment_action_required}, {@code + * invoice.payment_attempt_required}, {@code invoice.payment_failed}, {@code * invoice.payment_succeeded}, {@code invoice.sent}, {@code invoice.upcoming}, {@code * invoice.updated}, {@code invoice.voided}, {@code invoice.will_be_due}, {@code * invoice_payment.paid}, {@code invoiceitem.created}, {@code invoiceitem.deleted}, {@code diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index 4d73ba4db60..0d55bf2b35e 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -14,80 +14,91 @@ public final class EventDataClassLookup { public static final Map> classLookup = new HashMap<>(); static { - classLookup.put("account", Account.class); - classLookup.put("account_link", AccountLink.class); - classLookup.put("account_session", AccountSession.class); - classLookup.put("apple_pay_domain", ApplePayDomain.class); - classLookup.put("application", Application.class); - classLookup.put("application_fee", ApplicationFee.class); - classLookup.put("balance", Balance.class); - classLookup.put("balance_transaction", BalanceTransaction.class); - classLookup.put("bank_account", BankAccount.class); - classLookup.put("capability", Capability.class); - classLookup.put("card", Card.class); - classLookup.put("cash_balance", CashBalance.class); - classLookup.put("charge", Charge.class); - classLookup.put("confirmation_token", ConfirmationToken.class); - classLookup.put("connect_collection_transfer", ConnectCollectionTransfer.class); - classLookup.put("country_spec", CountrySpec.class); - classLookup.put("coupon", Coupon.class); - classLookup.put("credit_note", CreditNote.class); - classLookup.put("credit_note_line_item", CreditNoteLineItem.class); - classLookup.put("customer", Customer.class); - classLookup.put("customer_balance_transaction", CustomerBalanceTransaction.class); - classLookup.put("customer_cash_balance_transaction", CustomerCashBalanceTransaction.class); - classLookup.put("customer_session", CustomerSession.class); - classLookup.put("discount", Discount.class); - classLookup.put("dispute", Dispute.class); - classLookup.put("ephemeral_key", EphemeralKey.class); - classLookup.put("event", Event.class); - classLookup.put("exchange_rate", ExchangeRate.class); - classLookup.put("fee_refund", FeeRefund.class); - classLookup.put("file", File.class); - classLookup.put("file_link", FileLink.class); - classLookup.put("funding_instructions", FundingInstructions.class); - classLookup.put("invoice", Invoice.class); - classLookup.put("invoice_payment", InvoicePayment.class); - classLookup.put("invoice_rendering_template", InvoiceRenderingTemplate.class); - classLookup.put("invoiceitem", InvoiceItem.class); - classLookup.put("item", LineItem.class); - classLookup.put("line_item", InvoiceLineItem.class); - classLookup.put("login_link", LoginLink.class); - classLookup.put("mandate", Mandate.class); - classLookup.put("payment_intent", PaymentIntent.class); - classLookup.put("payment_link", PaymentLink.class); - classLookup.put("payment_method", PaymentMethod.class); - classLookup.put("payment_method_configuration", PaymentMethodConfiguration.class); - classLookup.put("payment_method_domain", PaymentMethodDomain.class); - classLookup.put("payout", Payout.class); - classLookup.put("person", Person.class); - classLookup.put("plan", Plan.class); - classLookup.put("price", Price.class); - classLookup.put("product", Product.class); - classLookup.put("product_feature", ProductFeature.class); - classLookup.put("promotion_code", PromotionCode.class); - classLookup.put("quote", Quote.class); - classLookup.put("refund", Refund.class); - classLookup.put("reserve_transaction", ReserveTransaction.class); - classLookup.put("review", Review.class); - classLookup.put("setup_attempt", SetupAttempt.class); - classLookup.put("setup_intent", SetupIntent.class); - classLookup.put("shipping_rate", ShippingRate.class); - classLookup.put("source", Source.class); - classLookup.put("source_mandate_notification", SourceMandateNotification.class); - classLookup.put("source_transaction", SourceTransaction.class); - classLookup.put("subscription", Subscription.class); - classLookup.put("subscription_item", SubscriptionItem.class); - classLookup.put("subscription_schedule", SubscriptionSchedule.class); - classLookup.put("tax_code", TaxCode.class); - classLookup.put("tax_deducted_at_source", TaxDeductedAtSource.class); - classLookup.put("tax_id", TaxId.class); - classLookup.put("tax_rate", TaxRate.class); - classLookup.put("token", Token.class); - classLookup.put("topup", Topup.class); - classLookup.put("transfer", Transfer.class); - classLookup.put("transfer_reversal", TransferReversal.class); - classLookup.put("webhook_endpoint", WebhookEndpoint.class); + classLookup.put("account", com.stripe.model.Account.class); + classLookup.put("account_link", com.stripe.model.AccountLink.class); + classLookup.put("account_session", com.stripe.model.AccountSession.class); + classLookup.put("apple_pay_domain", com.stripe.model.ApplePayDomain.class); + classLookup.put("application", com.stripe.model.Application.class); + classLookup.put("application_fee", com.stripe.model.ApplicationFee.class); + classLookup.put("balance", com.stripe.model.Balance.class); + classLookup.put("balance_settings", com.stripe.model.BalanceSettings.class); + classLookup.put("balance_transaction", com.stripe.model.BalanceTransaction.class); + classLookup.put("bank_account", com.stripe.model.BankAccount.class); + classLookup.put("capability", com.stripe.model.Capability.class); + classLookup.put("card", com.stripe.model.Card.class); + classLookup.put("cash_balance", com.stripe.model.CashBalance.class); + classLookup.put("charge", com.stripe.model.Charge.class); + classLookup.put("confirmation_token", com.stripe.model.ConfirmationToken.class); + classLookup.put( + "connect_collection_transfer", com.stripe.model.ConnectCollectionTransfer.class); + classLookup.put("country_spec", com.stripe.model.CountrySpec.class); + classLookup.put("coupon", com.stripe.model.Coupon.class); + classLookup.put("credit_note", com.stripe.model.CreditNote.class); + classLookup.put("credit_note_line_item", com.stripe.model.CreditNoteLineItem.class); + classLookup.put("customer", com.stripe.model.Customer.class); + classLookup.put( + "customer_balance_transaction", com.stripe.model.CustomerBalanceTransaction.class); + classLookup.put( + "customer_cash_balance_transaction", com.stripe.model.CustomerCashBalanceTransaction.class); + classLookup.put("customer_session", com.stripe.model.CustomerSession.class); + classLookup.put("discount", com.stripe.model.Discount.class); + classLookup.put("dispute", com.stripe.model.Dispute.class); + classLookup.put("ephemeral_key", com.stripe.model.EphemeralKey.class); + classLookup.put("event", com.stripe.model.Event.class); + classLookup.put("exchange_rate", com.stripe.model.ExchangeRate.class); + classLookup.put("fee_refund", com.stripe.model.FeeRefund.class); + classLookup.put("file", com.stripe.model.File.class); + classLookup.put("file_link", com.stripe.model.FileLink.class); + classLookup.put("funding_instructions", com.stripe.model.FundingInstructions.class); + classLookup.put("invoice", com.stripe.model.Invoice.class); + classLookup.put("invoice_payment", com.stripe.model.InvoicePayment.class); + classLookup.put("invoice_rendering_template", com.stripe.model.InvoiceRenderingTemplate.class); + classLookup.put("invoiceitem", com.stripe.model.InvoiceItem.class); + classLookup.put("item", com.stripe.model.LineItem.class); + classLookup.put("line_item", com.stripe.model.InvoiceLineItem.class); + classLookup.put("login_link", com.stripe.model.LoginLink.class); + classLookup.put("mandate", com.stripe.model.Mandate.class); + classLookup.put("payment_attempt_record", com.stripe.model.PaymentAttemptRecord.class); + classLookup.put("payment_intent", com.stripe.model.PaymentIntent.class); + classLookup.put( + "payment_intent_amount_details_line_item", + com.stripe.model.PaymentIntentAmountDetailsLineItem.class); + classLookup.put("payment_link", com.stripe.model.PaymentLink.class); + classLookup.put("payment_method", com.stripe.model.PaymentMethod.class); + classLookup.put( + "payment_method_configuration", com.stripe.model.PaymentMethodConfiguration.class); + classLookup.put("payment_method_domain", com.stripe.model.PaymentMethodDomain.class); + classLookup.put("payment_record", com.stripe.model.PaymentRecord.class); + classLookup.put("payout", com.stripe.model.Payout.class); + classLookup.put("person", com.stripe.model.Person.class); + classLookup.put("plan", com.stripe.model.Plan.class); + classLookup.put("price", com.stripe.model.Price.class); + classLookup.put("product", com.stripe.model.Product.class); + classLookup.put("product_feature", com.stripe.model.ProductFeature.class); + classLookup.put("promotion_code", com.stripe.model.PromotionCode.class); + classLookup.put("quote", com.stripe.model.Quote.class); + classLookup.put("refund", com.stripe.model.Refund.class); + classLookup.put("reserve_transaction", com.stripe.model.ReserveTransaction.class); + classLookup.put("review", com.stripe.model.Review.class); + classLookup.put("setup_attempt", com.stripe.model.SetupAttempt.class); + classLookup.put("setup_intent", com.stripe.model.SetupIntent.class); + classLookup.put("shipping_rate", com.stripe.model.ShippingRate.class); + classLookup.put("source", com.stripe.model.Source.class); + classLookup.put( + "source_mandate_notification", com.stripe.model.SourceMandateNotification.class); + classLookup.put("source_transaction", com.stripe.model.SourceTransaction.class); + classLookup.put("subscription", com.stripe.model.Subscription.class); + classLookup.put("subscription_item", com.stripe.model.SubscriptionItem.class); + classLookup.put("subscription_schedule", com.stripe.model.SubscriptionSchedule.class); + classLookup.put("tax_code", com.stripe.model.TaxCode.class); + classLookup.put("tax_deducted_at_source", com.stripe.model.TaxDeductedAtSource.class); + classLookup.put("tax_id", com.stripe.model.TaxId.class); + classLookup.put("tax_rate", com.stripe.model.TaxRate.class); + classLookup.put("token", com.stripe.model.Token.class); + classLookup.put("topup", com.stripe.model.Topup.class); + classLookup.put("transfer", com.stripe.model.Transfer.class); + classLookup.put("transfer_reversal", com.stripe.model.TransferReversal.class); + classLookup.put("webhook_endpoint", com.stripe.model.WebhookEndpoint.class); classLookup.put("apps.secret", com.stripe.model.apps.Secret.class); @@ -155,6 +166,7 @@ public final class EventDataClassLookup { classLookup.put("issuing.transaction", com.stripe.model.issuing.Transaction.class); classLookup.put("radar.early_fraud_warning", com.stripe.model.radar.EarlyFraudWarning.class); + classLookup.put("radar.payment_evaluation", com.stripe.model.radar.PaymentEvaluation.class); classLookup.put("radar.value_list", com.stripe.model.radar.ValueList.class); classLookup.put("radar.value_list_item", com.stripe.model.radar.ValueListItem.class); @@ -163,6 +175,7 @@ public final class EventDataClassLookup { classLookup.put("scheduled_query_run", com.stripe.model.sigma.ScheduledQueryRun.class); + classLookup.put("tax.association", com.stripe.model.tax.Association.class); 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.registration", com.stripe.model.tax.Registration.class); @@ -173,6 +186,7 @@ public final class EventDataClassLookup { classLookup.put("terminal.configuration", com.stripe.model.terminal.Configuration.class); classLookup.put("terminal.connection_token", com.stripe.model.terminal.ConnectionToken.class); classLookup.put("terminal.location", com.stripe.model.terminal.Location.class); + classLookup.put("terminal.onboarding_link", com.stripe.model.terminal.OnboardingLink.class); classLookup.put("terminal.reader", com.stripe.model.terminal.Reader.class); classLookup.put("test_helpers.test_clock", com.stripe.model.testhelpers.TestClock.class); diff --git a/src/main/java/com/stripe/model/ExchangeRate.java b/src/main/java/com/stripe/model/ExchangeRate.java index 50f6240bc25..0a6056e8da6 100644 --- a/src/main/java/com/stripe/model/ExchangeRate.java +++ b/src/main/java/com/stripe/model/ExchangeRate.java @@ -17,19 +17,23 @@ import lombok.Setter; /** - * {@code ExchangeRate} objects allow you to determine the rates that Stripe is currently using to - * convert from one currency to another. Since this number is variable throughout the day, there 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). + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. * - *

Please refer to our Exchange Rates API guide + *

{@code ExchangeRate} objects allow you to determine the rates that Stripe is currently using + * to convert from one currency to another. Since this number is variable throughout the day, there + * 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 * 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. * *

----- * @@ -74,17 +78,27 @@ public class ExchangeRate extends ApiResource implements HasId { Map rates; /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ + @Deprecated public static ExchangeRateCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ + @Deprecated public static ExchangeRateCollection list(Map params, RequestOptions options) throws StripeException { String path = "/v1/exchange_rates"; @@ -94,17 +108,27 @@ public static ExchangeRateCollection list(Map params, RequestOpt } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ + @Deprecated public static ExchangeRateCollection list(ExchangeRateListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ + @Deprecated public static ExchangeRateCollection list(ExchangeRateListParams params, RequestOptions options) throws StripeException { String path = "/v1/exchange_rates"; @@ -119,18 +143,39 @@ public static ExchangeRateCollection list(ExchangeRateListParams params, Request return getGlobalResponseGetter().request(request, ExchangeRateCollection.class); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ + @Deprecated public static ExchangeRate retrieve(String rateId) throws StripeException { return retrieve(rateId, (Map) null, (RequestOptions) null); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ + @Deprecated public static ExchangeRate retrieve(String rateId, RequestOptions options) throws StripeException { return retrieve(rateId, (Map) null, options); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ + @Deprecated public static ExchangeRate retrieve( String rateId, Map params, RequestOptions options) throws StripeException { String path = String.format("/v1/exchange_rates/%s", ApiResource.urlEncodeId(rateId)); @@ -139,7 +184,14 @@ public static ExchangeRate retrieve( return getGlobalResponseGetter().request(request, ExchangeRate.class); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ + @Deprecated public static ExchangeRate retrieve( String rateId, ExchangeRateRetrieveParams params, RequestOptions options) throws StripeException { 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 39b436af72a..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}, @@ -70,8 +69,9 @@ public class File extends ApiResource implements HasId { * document_provider_identity_document}, {@code finance_report_run}, {@code * financial_account_statement}, {@code identity_document}, {@code * identity_document_downloadable}, {@code issuing_regulatory_reporting}, {@code pci_document}, - * {@code selfie}, {@code sigma_scheduled_query}, {@code tax_document_user_upload}, {@code - * terminal_android_apk}, or {@code terminal_reader_splashscreen}. + * {@code platform_terms_of_service}, {@code selfie}, {@code sigma_scheduled_query}, {@code + * tax_document_user_upload}, {@code terminal_android_apk}, or {@code + * terminal_reader_splashscreen}. */ @SerializedName("purpose") String purpose; 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 1e44d0a03d4..5ee18bcf717 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. */ @@ -174,7 +174,8 @@ public class Invoice extends ApiResource implements HasId, MetadataStoreOne of {@code automatic_pending_invoice_item_invoice}, {@code manual}, {@code quote_accept}, * {@code subscription}, {@code subscription_create}, {@code subscription_cycle}, {@code @@ -215,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. @@ -344,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") @@ -406,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. */ @@ -439,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") @@ -521,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; @@ -581,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. */ @@ -970,8 +975,8 @@ public Invoice attachPayment(InvoiceAttachPaymentParams params, RequestOptions o /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(Map params) throws StripeException { return create(params, (RequestOptions) null); @@ -980,8 +985,8 @@ public static Invoice create(Map params) throws StripeException /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(Map params, RequestOptions options) throws StripeException { @@ -994,8 +999,8 @@ public static Invoice create(Map params, RequestOptions options) /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(InvoiceCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -1004,8 +1009,8 @@ public static Invoice create(InvoiceCreateParams params) throws StripeException /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public static Invoice create(InvoiceCreateParams params, RequestOptions options) throws StripeException { @@ -1980,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") @@ -2100,21 +2105,21 @@ public static class CustomerTaxId extends StripeObject { * ro_tin}, {@code rs_pib}, {@code sv_nit}, {@code uy_ruc}, {@code ve_rif}, {@code vn_tin}, * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, - * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code tw_vat}, - * {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, {@code li_vat}, - * {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code ca_gst_hst}, {@code - * ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code sg_gst}, {@code - * ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, {@code il_vat}, - * {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code hu_tin}, {@code - * si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, {@code al_tin}, - * {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code de_stn}, {@code - * ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, {@code ma_vat}, - * {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code cd_nif}, {@code - * mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, {@code mk_vat}, - * {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code tj_tin}, {@code - * ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code az_tin}, {@code bd_bin}, - * {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code cm_niu}, {@code - * cv_nif}, {@code bf_ifu}, or {@code unknown}. + * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code pl_nip}, + * {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, + * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code + * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, {@code + * sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code my_frp}, + * {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, {@code + * hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code ph_tin}, + * {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, {@code + * de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code md_vat}, + * {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, {@code + * cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code gn_nif}, + * {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, {@code + * tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code az_tin}, + * {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, {@code + * cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; @@ -2248,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. @@ -2362,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. @@ -2445,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. * @@ -2539,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. @@ -2974,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 3e7ae0a0338..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. */ @@ -115,6 +119,13 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore metadata; + /** + * The amount after discounts, but before credits and taxes. This field is {@code null} for {@code + * discountable=true} items. + */ + @SerializedName("net_amount") + Long netAmount; + /** * String representing the object's type. Objects of the same type share the same value. * @@ -141,6 +152,9 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore 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); + } + } + } + + /** + * For more details about ProrationDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProrationDetails extends StripeObject { + /** Discount amounts applied when the proration was created. */ + @SerializedName("discount_amounts") + List discountAmounts; + + /** + * For more details about DiscountAmount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DiscountAmount extends StripeObject { + /** The amount, in cents (or local equivalent), of the discount. */ + @SerializedName("amount") + Long amount; + + /** The discount that was applied to get this discount amount. */ + @SerializedName("discount") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField discount; + + /** Get ID of expandable {@code discount} object. */ + public String getDiscount() { + return (this.discount != null) ? this.discount.getId() : null; + } + + public void setDiscount(String id) { + this.discount = ApiResource.setExpandableFieldId(id, this.discount); + } + + /** Get expanded {@code discount}. */ + public Discount getDiscountObject() { + return (this.discount != null) ? this.discount.getExpanded() : null; + } + + public void setDiscountObject(Discount expandableObject) { + this.discount = new ExpandableField(expandableObject.getId(), expandableObject); + } } } @@ -579,6 +663,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(parent, responseGetter); trySetResponseGetter(period, responseGetter); trySetResponseGetter(pricing, responseGetter); + trySetResponseGetter(prorationDetails, responseGetter); trySetResponseGetter(testClock, responseGetter); } } 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 eba29cef181..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 @@ -232,10 +232,19 @@ public static class Payment extends StripeObject { @Setter(lombok.AccessLevel.NONE) ExpandableField paymentIntent; + /** + * ID of the PaymentRecord associated with this payment when {@code type} is {@code + * payment_record}. + */ + @SerializedName("payment_record") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField paymentRecord; + /** * Type of payment object associated with this invoice payment. * - *

One of {@code charge}, or {@code payment_intent}. + *

One of {@code charge}, {@code payment_intent}, or {@code payment_record}. */ @SerializedName("type") String type; @@ -276,6 +285,25 @@ public void setPaymentIntentObject(PaymentIntent expandableObject) { this.paymentIntent = new ExpandableField(expandableObject.getId(), expandableObject); } + + /** Get ID of expandable {@code paymentRecord} object. */ + public String getPaymentRecord() { + return (this.paymentRecord != null) ? this.paymentRecord.getId() : null; + } + + public void setPaymentRecord(String id) { + this.paymentRecord = ApiResource.setExpandableFieldId(id, this.paymentRecord); + } + + /** Get expanded {@code paymentRecord}. */ + public PaymentRecord getPaymentRecordObject() { + return (this.paymentRecord != null) ? this.paymentRecord.getExpanded() : null; + } + + public void setPaymentRecordObject(PaymentRecord expandableObject) { + this.paymentRecord = + new ExpandableField(expandableObject.getId(), expandableObject); + } } /** 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..257c89f29dd 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; @@ -12,6 +13,9 @@ @Setter @EqualsAndHashCode(callSuper = false) public class LineItem extends StripeObject implements HasId { + @SerializedName("adjustable_quantity") + AdjustableQuantity adjustableQuantity; + /** Total discount amount applied. If no discounts were applied, defaults to 0. */ @SerializedName("amount_discount") Long amountDiscount; @@ -51,6 +55,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. * @@ -71,6 +83,24 @@ public class LineItem extends StripeObject implements HasId { @SerializedName("taxes") List taxes; + /** + * For more details about AdjustableQuantity, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdjustableQuantity extends StripeObject { + @SerializedName("enabled") + Boolean enabled; + + @SerializedName("maximum") + Long maximum; + + @SerializedName("minimum") + Long minimum; + } + /** * For more details about Discount, please refer to the API * Reference. @@ -85,11 +115,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 new file mode 100644 index 00000000000..5e482e24bd6 --- /dev/null +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -0,0 +1,3254 @@ +// File generated from our OpenAPI spec +package com.stripe.model; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +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.PaymentAttemptRecordListParams; +import com.stripe.param.PaymentAttemptRecordRetrieveParams; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe. + * Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment + * method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment + * Record can have guaranteed funds. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PaymentAttemptRecord extends ApiResource implements HasId { + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount") + Amount amount; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_authorized") + AmountAuthorized amountAuthorized; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_canceled") + AmountCanceled amountCanceled; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_failed") + AmountFailed amountFailed; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_guaranteed") + AmountGuaranteed amountGuaranteed; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_refunded") + AmountRefunded amountRefunded; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_requested") + AmountRequested amountRequested; + + /** ID of the Connect application that created the PaymentAttemptRecord. */ + @SerializedName("application") + String application; + + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + @SerializedName("created") + Long created; + + /** Customer information for this payment. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** + * Indicates whether the customer was present in your checkout flow during this payment. + * + *

One of {@code off_session}, or {@code on_session}. + */ + @SerializedName("customer_presence") + String customerPresence; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * 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. + * + *

Equal to {@code payment_attempt_record}. + */ + @SerializedName("object") + String object; + + /** Information about the Payment Method debited for this payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** ID of the Payment Record this Payment Attempt Record belongs to. */ + @SerializedName("payment_record") + String paymentRecord; + + /** Processor information associated with this payment. */ + @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; + + /** List all the Payment Attempt Records attached to the specified Payment Record. */ + public static PaymentAttemptRecordCollection list(Map params) + throws StripeException { + return list(params, (RequestOptions) null); + } + + /** List all the Payment Attempt Records attached to the specified Payment Record. */ + public static PaymentAttemptRecordCollection list( + Map params, RequestOptions options) throws StripeException { + String path = "/v1/payment_attempt_records"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, PaymentAttemptRecordCollection.class); + } + + /** List all the Payment Attempt Records attached to the specified Payment Record. */ + public static PaymentAttemptRecordCollection list(PaymentAttemptRecordListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + + /** List all the Payment Attempt Records attached to the specified Payment Record. */ + public static PaymentAttemptRecordCollection list( + PaymentAttemptRecordListParams params, RequestOptions options) throws StripeException { + String path = "/v1/payment_attempt_records"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentAttemptRecordCollection.class); + } + + /** Retrieves a Payment Attempt Record with the given ID. */ + public static PaymentAttemptRecord retrieve(String id) throws StripeException { + return retrieve(id, (Map) null, (RequestOptions) null); + } + + /** Retrieves a Payment Attempt Record with the given ID. */ + public static PaymentAttemptRecord retrieve(String id, RequestOptions options) + throws StripeException { + return retrieve(id, (Map) null, options); + } + + /** Retrieves a Payment Attempt Record with the given ID. */ + public static PaymentAttemptRecord retrieve( + String id, Map params, RequestOptions options) throws StripeException { + String path = String.format("/v1/payment_attempt_records/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** Retrieves a Payment Attempt Record with the given ID. */ + public static PaymentAttemptRecord retrieve( + String id, PaymentAttemptRecordRetrieveParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/payment_attempt_records/%s", ApiResource.urlEncodeId(id)); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentAttemptRecord.class); + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @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 positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountAuthorized extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountCanceled extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountFailed extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountGuaranteed extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountRefunded extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountRequested extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** Information about the customer for this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails extends StripeObject { + /** ID of the Stripe Customer associated with this payment. */ + @SerializedName("customer") + String customer; + + /** The customer's email address. */ + @SerializedName("email") + String email; + + /** The customer's name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + } + + /** Details about the Payment Method used in this payment attempt. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails extends StripeObject { + @SerializedName("ach_credit_transfer") + AchCreditTransfer achCreditTransfer; + + @SerializedName("ach_debit") + AchDebit achDebit; + + @SerializedName("acss_debit") + AcssDebit acssDebit; + + @SerializedName("affirm") + Affirm affirm; + + @SerializedName("afterpay_clearpay") + AfterpayClearpay afterpayClearpay; + + @SerializedName("alipay") + Alipay alipay; + + @SerializedName("alma") + Alma alma; + + @SerializedName("amazon_pay") + AmazonPay amazonPay; + + @SerializedName("au_becs_debit") + AuBecsDebit auBecsDebit; + + @SerializedName("bacs_debit") + BacsDebit bacsDebit; + + @SerializedName("bancontact") + Bancontact bancontact; + + @SerializedName("billie") + Billie billie; + + /** The billing details associated with the method of payment. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + @SerializedName("blik") + Blik blik; + + @SerializedName("boleto") + Boleto boleto; + + /** Details of the card used for this payment attempt. */ + @SerializedName("card") + Card card; + + @SerializedName("card_present") + CardPresent cardPresent; + + @SerializedName("cashapp") + Cashapp cashapp; + + @SerializedName("crypto") + Crypto crypto; + + /** + * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. + * This resource consists of details about the custom payment method used for this payment + * attempt. + */ + @SerializedName("custom") + Custom custom; + + @SerializedName("customer_balance") + CustomerBalance customerBalance; + + @SerializedName("eps") + Eps eps; + + @SerializedName("fpx") + Fpx fpx; + + @SerializedName("giropay") + Giropay giropay; + + @SerializedName("grabpay") + Grabpay grabpay; + + @SerializedName("ideal") + Ideal ideal; + + @SerializedName("interac_present") + InteracPresent interacPresent; + + @SerializedName("kakao_pay") + KakaoPay kakaoPay; + + @SerializedName("klarna") + Klarna klarna; + + @SerializedName("konbini") + Konbini konbini; + + @SerializedName("kr_card") + KrCard krCard; + + @SerializedName("link") + Link link; + + @SerializedName("mb_way") + MbWay mbWay; + + @SerializedName("mobilepay") + Mobilepay mobilepay; + + @SerializedName("multibanco") + Multibanco multibanco; + + @SerializedName("naver_pay") + NaverPay naverPay; + + @SerializedName("nz_bank_account") + NzBankAccount nzBankAccount; + + @SerializedName("oxxo") + Oxxo oxxo; + + @SerializedName("p24") + P24 p24; + + @SerializedName("pay_by_bank") + PayByBank payByBank; + + @SerializedName("payco") + Payco payco; + + /** ID of the Stripe PaymentMethod used to make this payment. */ + @SerializedName("payment_method") + String paymentMethod; + + @SerializedName("paynow") + Paynow paynow; + + @SerializedName("paypal") + Paypal paypal; + + @SerializedName("payto") + Payto payto; + + @SerializedName("pix") + Pix pix; + + @SerializedName("promptpay") + Promptpay promptpay; + + @SerializedName("revolut_pay") + RevolutPay revolutPay; + + @SerializedName("samsung_pay") + SamsungPay samsungPay; + + @SerializedName("satispay") + Satispay satispay; + + @SerializedName("sepa_credit_transfer") + SepaCreditTransfer sepaCreditTransfer; + + @SerializedName("sepa_debit") + SepaDebit sepaDebit; + + @SerializedName("sofort") + Sofort sofort; + + @SerializedName("stripe_account") + StripeAccount stripeAccount; + + @SerializedName("swish") + Swish swish; + + @SerializedName("twint") + Twint twint; + + /** + * The type of transaction-specific details of the payment method used in the payment. See 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. + */ + @SerializedName("type") + String type; + + @SerializedName("us_bank_account") + UsBankAccount usBankAccount; + + @SerializedName("wechat") + Wechat wechat; + + @SerializedName("wechat_pay") + WechatPay wechatPay; + + @SerializedName("zip") + Zip zip; + + /** + * For more details about AchCreditTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AchCreditTransfer extends StripeObject { + /** Account number to transfer funds to. */ + @SerializedName("account_number") + String accountNumber; + + /** Name of the bank associated with the routing number. */ + @SerializedName("bank_name") + String bankName; + + /** Routing transit number for the bank account to transfer funds to. */ + @SerializedName("routing_number") + String routingNumber; + + /** SWIFT code of the bank associated with the routing number. */ + @SerializedName("swift_code") + String swiftCode; + } + + /** + * For more details about AchDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AchDebit extends StripeObject { + /** + * Type of entity that holds the account. This can be either {@code individual} or {@code + * company}. + * + *

One of {@code company}, or {@code individual}. + */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** Routing transit number of the bank account. */ + @SerializedName("routing_number") + String routingNumber; + } + + /** + * For more details about AcssDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit extends StripeObject { + /** Name of the bank associated with the bank account. */ + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Institution number of the bank account. */ + @SerializedName("institution_number") + String institutionNumber; + + /** 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; + + /** Transit number of the bank account. */ + @SerializedName("transit_number") + String transitNumber; + } + + /** + * For more details about Affirm, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Affirm extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + + /** The Affirm transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about AfterpayClearpay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpay extends StripeObject { + /** The Afterpay order ID associated with this payment intent. */ + @SerializedName("order_id") + String orderId; + + /** Order identifier shown to the merchant in Afterpay’s online portal. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Alipay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alipay extends StripeObject { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check + * whether two Alipay accounts are the same. + */ + @SerializedName("buyer_id") + String buyerId; + + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check + * whether two Alipay accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Transaction ID of this particular Alipay transaction. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Alma, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alma extends StripeObject { + @SerializedName("installments") + Installments installments; + + /** The Alma transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * For more details about Installments, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Installments extends StripeObject { + /** The number of installments. */ + @SerializedName("count") + Long count; + } + } + + /** + * For more details about AmazonPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay extends StripeObject { + @SerializedName("funding") + Funding funding; + + /** The Amazon Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * For more details about Funding, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Funding extends StripeObject { + @SerializedName("card") + Card card; + + /** + * funding type of the underlying payment method. + * + *

Equal to {@code card}. + */ + @SerializedName("type") + String type; + + /** + * For more details about Card, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code + * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@code mastercard}, {@code + * unionpay}, {@code visa} or {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute + * to get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + } + } + } + + /** + * For more details about AuBecsDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** 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; + } + + /** + * For more details about BacsDebit, please refer to the API Reference. + */ + @Getter + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** 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; + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + @SerializedName("sort_code") + String sortCode; + } + + /** + * For more details about Bancontact, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Bancontact extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of {@code en}, {@code de}, {@code fr}, or {@code nl} + */ + @SerializedName("preferred_language") + String preferredLanguage; + + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about Billie, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Billie extends StripeObject { + /** The Billie transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** Billing details used by the customer for this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails extends StripeObject { + /** A representation of a physical address. */ + @SerializedName("address") + Address address; + + /** The billing email associated with the method of payment. */ + @SerializedName("email") + String email; + + /** The billing name associated with the method of payment. */ + @SerializedName("name") + String name; + + /** The billing phone number associated with the method of payment. */ + @SerializedName("phone") + String phone; + + /** A representation of a physical 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + } + } + + /** + * For more details about Blik, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Blik extends StripeObject { + /** A unique and immutable identifier assigned by BLIK to every buyer. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Boleto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Boleto extends StripeObject { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses + * consumers). + */ + @SerializedName("tax_id") + String taxId; + } + + /** Details of the card used for this payment attempt. */ + @Getter + @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 + * unionpay}, {@code visa} or {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * When using manual capture, a future timestamp at which the charge will be automatically + * refunded if uncaptured. + */ + @SerializedName("capture_before") + Long captureBefore; + + /** Check results by Card networks on Card address and CVC at time of payment. */ + @SerializedName("checks") + Checks checks; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @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; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @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; + + /** True if this payment was marked as MOTO and out of scope for SCA. */ + @SerializedName("moto") + Boolean moto; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @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. + */ + @SerializedName("network_token") + NetworkToken networkToken; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @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; + + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + @SerializedName("wallet") + Wallet wallet; + + /** + * For more details about Checks, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Checks extends StripeObject { + @SerializedName("address_line1_check") + String addressLine1Check; + + @SerializedName("address_postal_code_check") + String addressPostalCodeCheck; + + @SerializedName("cvc_check") + 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. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NetworkToken extends StripeObject { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when + * processing the transaction. + */ + @SerializedName("used") + Boolean used; + } + + /** + * For more details about ThreeDSecure, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ThreeDSecure extends StripeObject { + @SerializedName("authentication_flow") + String authenticationFlow; + + @SerializedName("result") + String result; + + @SerializedName("result_reason") + String resultReason; + + @SerializedName("version") + String version; + } + + /** + * For more details about Wallet, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wallet extends StripeObject { + @SerializedName("apple_pay") + ApplePay applePay; + + /** (For tokenized numbers only.) The last four digits of the device account number. */ + @SerializedName("dynamic_last4") + String dynamicLast4; + + @SerializedName("google_pay") + GooglePay googlePay; + + /** + * The type of the card wallet, one of {@code apple_pay} or {@code google_pay}. An + * additional hash is included on the Wallet subhash with a name matching this value. It + * contains additional information specific to the card wallet type. + */ + @SerializedName("type") + String type; + + /** + * For more details about ApplePay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ApplePay extends StripeObject { + /** + * Type of the apple_pay transaction, one of {@code apple_pay} or {@code apple_pay_later}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about GooglePay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GooglePay extends StripeObject {} + } + } + + /** + * For more details about CardPresent, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CardPresent extends StripeObject { + /** The authorized amount. */ + @SerializedName("amount_authorized") + Long amountAuthorized; + + /** + * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code + * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@code mastercard}, {@code + * unionpay}, {@code visa} or {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * The product code that identifies + * the specific program or product associated with a card. + */ + @SerializedName("brand_product") + String brandProduct; + + /** + * When using manual capture, a future timestamp after which the charge will be automatically + * refunded if uncaptured. + */ + @SerializedName("capture_before") + Long captureBefore; + + /** + * The cardholder name as read from the card, in ISO 7813 format. May include + * alphanumeric characters, special characters and first/last name separator ({@code /}). In + * some cases, the cardholder name may not be available depending on how the issuer has + * configured the card. Cardholder name is typically not available on swipe or contactless + * payments, such as those made with Apple Pay and Google Pay. + */ + @SerializedName("cardholder_name") + String cardholderName; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only + * and not typically available in standard API requests.) + */ + @SerializedName("description") + String description; + + /** Authorization response cryptogram. */ + @SerializedName("emv_auth_data") + String emvAuthData; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be + * attached to a Customer for future transactions. Only present if it was possible to generate + * a card PaymentMethod. + */ + @SerializedName("generated_card") + String generatedCard; + + /** + * Issuer identification number of the card. (For internal use only and not typically + * available in standard API requests.) + */ + @SerializedName("iin") + String iin; + + /** + * Whether this PaymentIntent is + * eligible for incremental authorizations. Request support using request_incremental_authorization_support. + */ + @SerializedName("incremental_authorization_supported") + Boolean incrementalAuthorizationSupported; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in + * standard API requests.) + */ + @SerializedName("issuer") + String issuer; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @SerializedName("network") + String network; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @SerializedName("network_transaction_id") + String networkTransactionId; + + /** Details about payments collected offline. */ + @SerializedName("offline") + Offline offline; + + /** Defines whether the authorized amount can be over-captured or not. */ + @SerializedName("overcapture_supported") + Boolean overcaptureSupported; + + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ + @SerializedName("preferred_locales") + List preferredLocales; + + /** + * How card details were read in this transaction. + * + *

One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode}, + * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}. + */ + @SerializedName("read_method") + String readMethod; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV + * transactions. + */ + @SerializedName("receipt") + Receipt receipt; + + @SerializedName("wallet") + Wallet wallet; + + /** + * For more details about Offline, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Offline extends StripeObject { + /** Time at which the payment was collected while offline. */ + @SerializedName("stored_at") + Long storedAt; + + /** + * The method used to process this payment method offline. Only deferred is allowed. + * + *

Equal to {@code deferred}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about Receipt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Receipt extends StripeObject { + /** + * The type of account being debited or credited + * + *

One of {@code checking}, {@code credit}, {@code prepaid}, or {@code unknown}. + */ + @SerializedName("account_type") + String accountType; + + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ + @SerializedName("application_cryptogram") + String applicationCryptogram; + + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ + @SerializedName("application_preferred_name") + String applicationPreferredName; + + /** Identifier for this transaction. */ + @SerializedName("authorization_code") + String authorizationCode; + + /** EMV tag 8A. A code returned by the card issuer. */ + @SerializedName("authorization_response_code") + String authorizationResponseCode; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the + * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code + * offline_pin_and_signature}, {@code online_pin}, or {@code signature}. + */ + @SerializedName("cardholder_verification_method") + String cardholderVerificationMethod; + + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. + */ + @SerializedName("dedicated_file_name") + String dedicatedFileName; + + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ + @SerializedName("terminal_verification_results") + String terminalVerificationResults; + + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ + @SerializedName("transaction_status_information") + String transactionStatusInformation; + } + + /** + * For more details about Wallet, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wallet extends StripeObject { + /** + * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code + * samsung_pay}, or {@code unknown}. + */ + @SerializedName("type") + String type; + } + } + + /** + * For more details about Cashapp, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Cashapp extends StripeObject { + /** A unique and immutable identifier assigned by Cash App to every buyer. */ + @SerializedName("buyer_id") + String buyerId; + + /** A public identifier for buyers using Cash App. */ + @SerializedName("cashtag") + String cashtag; + + /** A unique and immutable identifier of payments assigned by Cash App. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject { + /** The wallet address of the customer. */ + @SerializedName("buyer_address") + String buyerAddress; + + /** + * The blockchain network that the transaction was sent on. + * + *

One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}. + */ + @SerializedName("network") + String network; + + /** + * The token currency that the transaction was sent with. + * + *

One of {@code usdc}, {@code usdg}, or {@code usdp}. + */ + @SerializedName("token_currency") + String tokenCurrency; + + /** The blockchain transaction hash of the crypto payment. */ + @SerializedName("transaction_hash") + String transactionHash; + } + + /** + * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. + * This resource consists of details about the custom payment method used for this payment + * attempt. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + @SerializedName("display_name") + String displayName; + + /** The custom payment method type associated with this payment. */ + @SerializedName("type") + String type; + } + + /** + * For more details about CustomerBalance, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerBalance extends StripeObject {} + + /** + * For more details about Eps, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Eps extends StripeObject { + /** + * The customer's bank. Should be one of {@code arzte_und_apotheker_bank}, {@code + * austrian_anadi_bank_ag}, {@code bank_austria}, {@code bankhaus_carl_spangler}, {@code + * bankhaus_schelhammer_und_schattera_ag}, {@code bawag_psk_ag}, {@code bks_bank_ag}, {@code + * brull_kallmus_bank_ag}, {@code btv_vier_lander_bank}, {@code capital_bank_grawe_gruppe_ag}, + * {@code deutsche_bank_ag}, {@code dolomitenbank}, {@code easybank_ag}, {@code + * erste_bank_und_sparkassen}, {@code hypo_alpeadriabank_international_ag}, {@code + * hypo_noe_lb_fur_niederosterreich_u_wien}, {@code hypo_oberosterreich_salzburg_steiermark}, + * {@code hypo_tirol_bank_ag}, {@code hypo_vorarlberg_bank_ag}, {@code + * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag}, + * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code + * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code + * vr_bank_braunau}. + */ + @SerializedName("bank") + String bank; + + /** + * Owner's verified full name. Values are verified or provided by EPS directly (if supported) + * at the time of authorization or settlement. They cannot be set or mutated. EPS rarely + * provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about Fpx, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Fpx extends StripeObject { + /** Account holder type, if provided. Can be one of {@code individual} or {@code company}. */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** + * The customer's bank. Can be one of {@code affin_bank}, {@code agrobank}, {@code + * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code + * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code + * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code + * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code + * pb_enterprise}, or {@code bank_of_china}. + */ + @SerializedName("bank") + String bank; + + /** Unique transaction id generated by FPX for every request from the merchant. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Giropay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Giropay extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** + * Owner's verified full name. Values are verified or provided by Giropay directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about Grabpay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Grabpay extends StripeObject { + /** Unique transaction id generated by GrabPay. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Ideal, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ideal extends StripeObject { + /** + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code 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; + + /** + * The Bank Identifier Code of the customer's bank. + * + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code 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; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** Unique transaction ID generated by iDEAL. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about InteracPresent, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InteracPresent extends StripeObject { + /** Card brand. Can be {@code interac}, {@code mastercard} or {@code visa}. */ + @SerializedName("brand") + String brand; + + /** + * The cardholder name as read from the card, in ISO 7813 format. May include + * alphanumeric characters, special characters and first/last name separator ({@code /}). In + * some cases, the cardholder name may not be available depending on how the issuer has + * configured the card. Cardholder name is typically not available on swipe or contactless + * payments, such as those made with Apple Pay and Google Pay. + */ + @SerializedName("cardholder_name") + String cardholderName; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only + * and not typically available in standard API requests.) + */ + @SerializedName("description") + String description; + + /** Authorization response cryptogram. */ + @SerializedName("emv_auth_data") + String emvAuthData; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be + * attached to a Customer for future transactions. Only present if it was possible to generate + * a card PaymentMethod. + */ + @SerializedName("generated_card") + String generatedCard; + + /** + * Issuer identification number of the card. (For internal use only and not typically + * available in standard API requests.) + */ + @SerializedName("iin") + String iin; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in + * standard API requests.) + */ + @SerializedName("issuer") + String issuer; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @SerializedName("network") + String network; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @SerializedName("network_transaction_id") + String networkTransactionId; + + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ + @SerializedName("preferred_locales") + List preferredLocales; + + /** + * How card details were read in this transaction. + * + *

One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode}, + * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}. + */ + @SerializedName("read_method") + String readMethod; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV + * transactions. + */ + @SerializedName("receipt") + Receipt receipt; + + /** + * For more details about Receipt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Receipt extends StripeObject { + /** + * The type of account being debited or credited + * + *

One of {@code checking}, {@code savings}, or {@code unknown}. + */ + @SerializedName("account_type") + String accountType; + + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ + @SerializedName("application_cryptogram") + String applicationCryptogram; + + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ + @SerializedName("application_preferred_name") + String applicationPreferredName; + + /** Identifier for this transaction. */ + @SerializedName("authorization_code") + String authorizationCode; + + /** EMV tag 8A. A code returned by the card issuer. */ + @SerializedName("authorization_response_code") + String authorizationResponseCode; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the + * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code + * offline_pin_and_signature}, {@code online_pin}, or {@code signature}. + */ + @SerializedName("cardholder_verification_method") + String cardholderVerificationMethod; + + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. + */ + @SerializedName("dedicated_file_name") + String dedicatedFileName; + + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ + @SerializedName("terminal_verification_results") + String terminalVerificationResults; + + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ + @SerializedName("transaction_status_information") + String transactionStatusInformation; + } + } + + /** + * For more details about KakaoPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The Kakao Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Klarna, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Klarna extends StripeObject { + /** The payer details for this transaction. */ + @SerializedName("payer_details") + PayerDetails payerDetails; + + /** + * The Klarna payment method used for this transaction. Can be one of {@code pay_later}, + * {@code pay_now}, {@code pay_with_financing}, or {@code pay_in_installments} + */ + @SerializedName("payment_method_category") + String paymentMethodCategory; + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. Can + * be one of {@code de-AT}, {@code en-AT}, {@code nl-BE}, {@code fr-BE}, {@code en-BE}, {@code + * de-DE}, {@code en-DE}, {@code da-DK}, {@code en-DK}, {@code es-ES}, {@code en-ES}, {@code + * fi-FI}, {@code sv-FI}, {@code en-FI}, {@code en-GB}, {@code en-IE}, {@code it-IT}, {@code + * en-IT}, {@code nl-NL}, {@code en-NL}, {@code nb-NO}, {@code en-NO}, {@code sv-SE}, {@code + * en-SE}, {@code en-US}, {@code es-US}, {@code fr-FR}, {@code en-FR}, {@code cs-CZ}, {@code + * en-CZ}, {@code ro-RO}, {@code en-RO}, {@code el-GR}, {@code en-GR}, {@code en-AU}, {@code + * en-NZ}, {@code en-CA}, {@code fr-CA}, {@code pl-PL}, {@code en-PL}, {@code pt-PT}, {@code + * en-PT}, {@code de-CH}, {@code fr-CH}, {@code it-CH}, or {@code en-CH} + */ + @SerializedName("preferred_locale") + String preferredLocale; + + /** + * For more details about PayerDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayerDetails extends StripeObject { + /** The payer's address. */ + @SerializedName("address") + Address address; + + /** + * For more details about Address, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** The payer address country. */ + @SerializedName("country") + String country; + } + } + } + + /** + * For more details about Konbini, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Konbini extends StripeObject { + /** + * If the payment succeeded, this contains the details of the convenience store where the + * payment was completed. + */ + @SerializedName("store") + Store store; + + /** + * For more details about Store, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Store extends StripeObject { + /** + * The name of the convenience store chain where the payment was completed. + * + *

One of {@code familymart}, {@code lawson}, {@code ministop}, or {@code seicomart}. + */ + @SerializedName("chain") + String chain; + } + } + + /** + * For more details about KrCard, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KrCard extends StripeObject { + /** + * The local credit or debit card brand. + * + *

One of {@code bc}, {@code citi}, {@code hana}, {@code hyundai}, {@code jeju}, {@code + * jeonbuk}, {@code kakaobank}, {@code kbank}, {@code kdbbank}, {@code kookmin}, {@code + * kwangju}, {@code lotte}, {@code mg}, {@code nh}, {@code post}, {@code samsung}, {@code + * savingsbank}, {@code shinhan}, {@code shinhyup}, {@code suhyup}, {@code tossbank}, or + * {@code woori}. + */ + @SerializedName("brand") + String brand; + + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The last four digits of the card. This may not be present for American Express cards. */ + @SerializedName("last4") + String last4; + + /** The Korean Card transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Link, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Link extends StripeObject { + /** + * Two-letter ISO code representing the funding source country beneath the Link payment. You + * could use this attribute to get a sense of international fees. + */ + @SerializedName("country") + String country; + } + + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + + /** + * For more details about Mobilepay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay extends StripeObject { + /** Internal card details. */ + @SerializedName("card") + Card card; + + /** + * For more details about Card, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** Brand of the card used in the transaction. */ + @SerializedName("brand") + String brand; + + /** Two-letter ISO code representing the country of the card. */ + @SerializedName("country") + String country; + + /** Two digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Two digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** The last 4 digits of the card. */ + @SerializedName("last4") + String last4; + } + } + + /** + * For more details about Multibanco, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Multibanco extends StripeObject { + /** Entity number associated with this Multibanco payment. */ + @SerializedName("entity") + String entity; + + /** Reference number associated with this Multibanco payment. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about NaverPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NaverPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The Naver Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about NzBankAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NzBankAccount extends StripeObject { + /** + * The name on the bank account. Only present if the account holder name is different from the + * name of the authorized signatory collected in the PaymentMethod’s billing details. + */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The numeric code for the bank account's bank. */ + @SerializedName("bank_code") + String bankCode; + + /** The name of the bank. */ + @SerializedName("bank_name") + String bankName; + + /** The numeric code for the bank account's bank branch. */ + @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; + + /** The suffix of the bank account number. */ + @SerializedName("suffix") + String suffix; + } + + /** + * For more details about Oxxo, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Oxxo extends StripeObject { + /** OXXO reference number. */ + @SerializedName("number") + String number; + } + + /** + * For more details about P24, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class P24 extends StripeObject { + /** + * The customer's bank. Can be one of {@code ing}, {@code citi_handlowy}, {@code + * tmobile_usbugi_bankowe}, {@code plus_bank}, {@code etransfer_pocztowy24}, {@code + * banki_spbdzielcze}, {@code bank_nowy_bfg_sa}, {@code getin_bank}, {@code velobank}, {@code + * blik}, {@code noble_pay}, {@code ideabank}, {@code envelobank}, {@code + * santander_przelew24}, {@code nest_przelew}, {@code mbank_mtransfer}, {@code inteligo}, + * {@code pbac_z_ipko}, {@code bnp_paribas}, {@code credit_agricole}, {@code toyota_bank}, + * {@code bank_pekao_sa}, {@code volkswagen_bank}, {@code bank_millennium}, {@code + * alior_bank}, or {@code boz}. + */ + @SerializedName("bank") + String bank; + + /** Unique reference for this Przelewy24 payment. */ + @SerializedName("reference") + String reference; + + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about PayByBank, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + + /** + * For more details about Payco, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payco extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The Payco transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Paynow, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paynow extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + + /** Reference number associated with this PayNow payment. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Paypal, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypal extends StripeObject { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal + * directly (if supported) at the time of authorization or settlement. They cannot be set or + * mutated. + */ + @SerializedName("country") + String country; + + /** + * Owner's email. Values are provided by PayPal directly (if supported) at the time of + * authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("payer_email") + String payerEmail; + + /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */ + @SerializedName("payer_id") + String payerId; + + /** + * Owner's full name. Values provided by PayPal directly (if supported) at the time of + * authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("payer_name") + String payerName; + + /** + * The level of protection offered as defined by PayPal Seller Protection for Merchants, for + * this transaction. + */ + @SerializedName("seller_protection") + SellerProtection sellerProtection; + + /** A unique ID generated by PayPal for this transaction. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * For more details about SellerProtection, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SellerProtection extends StripeObject { + /** An array of conditions that are covered for the transaction, if applicable. */ + @SerializedName("dispute_categories") + List disputeCategories; + + /** + * Indicates whether the transaction is eligible for PayPal's seller protection. + * + *

One of {@code eligible}, {@code not_eligible}, or {@code partially_eligible}. + */ + @SerializedName("status") + String status; + } + } + + /** + * 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. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** Unique transaction id generated by BCB. */ + @SerializedName("bank_transaction_id") + String bankTransactionId; + } + + /** + * For more details about Promptpay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Promptpay extends StripeObject { + /** Bill reference generated by PromptPay. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about RevolutPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPay extends StripeObject { + @SerializedName("funding") + Funding funding; + + /** The Revolut Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * For more details about Funding, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Funding extends StripeObject { + @SerializedName("card") + Card card; + + /** + * funding type of the underlying payment method. + * + *

Equal to {@code card}. + */ + @SerializedName("type") + String type; + + /** + * For more details about Card, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code + * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@code mastercard}, {@code + * unionpay}, {@code visa} or {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute + * to get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + } + } + } + + /** + * For more details about SamsungPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The Samsung Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Satispay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Satispay extends StripeObject { + /** The Satispay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about SepaCreditTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaCreditTransfer extends StripeObject { + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** IBAN of the bank account to transfer funds to. */ + @SerializedName("iban") + String iban; + } + + /** + * For more details about SepaDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Branch code of bank associated with the bank account. */ + @SerializedName("branch_code") + String branchCode; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four characters of the IBAN. */ + @SerializedName("last4") + String last4; + + /** + * Find the ID of the mandate used for this payment under the payment_method_details.sepa_debit.mandate + * property on the Charge. Use this mandate ID to retrieve the Mandate. + */ + @SerializedName("mandate") + String mandate; + } + + /** + * For more details about Sofort, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sofort extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. Can + * be one of {@code de}, {@code en}, {@code es}, {@code fr}, {@code it}, {@code nl}, or {@code + * pl} + */ + @SerializedName("preferred_language") + String preferredLanguage; + + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about StripeAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StripeAccount extends StripeObject {} + + /** + * For more details about Swish, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Swish extends StripeObject { + /** + * Uniquely identifies the payer's Swish account. You can use this attribute to check whether + * two Swish transactions were paid for by the same payer + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Payer bank reference number for the payment. */ + @SerializedName("payment_reference") + String paymentReference; + + /** The last four digits of the Swish account phone number. */ + @SerializedName("verified_phone_last4") + String verifiedPhoneLast4; + } + + /** + * For more details about Twint, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Twint extends StripeObject {} + + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UsBankAccount extends StripeObject { + /** + * The type of entity that holds the account. This can be either 'individual' or 'company'. + * + *

One of {@code company}, or {@code individual}. + */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** + * The type of the bank account. This can be either 'checking' or 'savings'. + * + *

One of {@code checking}, or {@code savings}. + */ + @SerializedName("account_type") + String accountType; + + /** Name of the bank associated with the bank account. */ + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField mandate; + + /** The ACH payment reference for this transaction. */ + @SerializedName("payment_reference") + String paymentReference; + + /** The routing number for the bank account. */ + @SerializedName("routing_number") + String routingNumber; + + /** Get ID of expandable {@code mandate} object. */ + public String getMandate() { + return (this.mandate != null) ? this.mandate.getId() : null; + } + + public void setMandate(String id) { + this.mandate = ApiResource.setExpandableFieldId(id, this.mandate); + } + + /** Get expanded {@code mandate}. */ + public Mandate getMandateObject() { + return (this.mandate != null) ? this.mandate.getExpanded() : null; + } + + public void setMandateObject(Mandate expandableObject) { + this.mandate = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about Wechat, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wechat extends StripeObject {} + + /** + * For more details about WechatPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class WechatPay extends StripeObject { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check + * whether two WeChat accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + + /** Transaction ID of this particular WeChat Pay transaction. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Zip, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Zip extends StripeObject {} + } + + /** Processor information associated with this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProcessorDetails extends StripeObject { + /** + * Custom processors represent payment processors not modeled directly in the Stripe API. This + * resource consists of details about the custom processor used for this payment attempt. + */ + @SerializedName("custom") + Custom custom; + + /** + * The processor used for this payment attempt. + * + *

Equal to {@code custom}. + */ + @SerializedName("type") + String type; + + /** + * Custom processors represent payment processors not modeled directly in the Stripe API. This + * resource consists of details about the custom processor used for this payment attempt. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** + * An opaque string for manual reconciliation of this payment, for example a check number or a + * payment processor ID. + */ + @SerializedName("payment_reference") + String paymentReference; + } + } + + /** The customer's shipping information associated with this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails extends StripeObject { + /** A representation of a physical address. */ + @SerializedName("address") + Address address; + + /** The shipping recipient's name. */ + @SerializedName("name") + String name; + + /** The shipping recipient's phone number. */ + @SerializedName("phone") + String phone; + + /** A representation of a physical 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + String state; + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(amount, responseGetter); + trySetResponseGetter(amountAuthorized, responseGetter); + trySetResponseGetter(amountCanceled, responseGetter); + trySetResponseGetter(amountFailed, responseGetter); + trySetResponseGetter(amountGuaranteed, responseGetter); + trySetResponseGetter(amountRefunded, responseGetter); + trySetResponseGetter(amountRequested, responseGetter); + trySetResponseGetter(customerDetails, responseGetter); + trySetResponseGetter(paymentMethodDetails, responseGetter); + trySetResponseGetter(processorDetails, responseGetter); + trySetResponseGetter(shippingDetails, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecordCollection.java b/src/main/java/com/stripe/model/PaymentAttemptRecordCollection.java new file mode 100644 index 00000000000..4ed311a29ca --- /dev/null +++ b/src/main/java/com/stripe/model/PaymentAttemptRecordCollection.java @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec +package com.stripe.model; + +public class PaymentAttemptRecordCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 2be3c903202..c23183b74e7 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; @@ -179,6 +196,9 @@ public class PaymentIntent extends ApiResource implements HasId, MetadataStore

excludedPaymentMethodTypes; + @SerializedName("hooks") + Hooks hooks; + /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -192,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. */ @@ -209,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}) @@ -235,15 +255,19 @@ 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) @Setter(lombok.AccessLevel.NONE) ExpandableField onBehalfOf; + @SerializedName("payment_details") + PaymentDetails paymentDetails; + /** ID of the payment method used in this PaymentIntent. */ @SerializedName("payment_method") @Getter(lombok.AccessLevel.NONE) @@ -252,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") @@ -355,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") @@ -370,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") @@ -1516,9 +1540,109 @@ public PaymentIntent verifyMicrodeposits( @Setter @EqualsAndHashCode(callSuper = false) public static class AmountDetails extends StripeObject { + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + @SerializedName("discount_amount") + Long discountAmount; + + @SerializedName("error") + Errors error; + + /** + * A list of line items, each containing information about a product in the PaymentIntent. There + * is a maximum of 200 line items. + */ + @SerializedName("line_items") + PaymentIntentAmountDetailsLineItemCollection lineItems; + + @SerializedName("shipping") + Shipping shipping; + + @SerializedName("tax") + Tax tax; + @SerializedName("tip") Tip tip; + /** + * For more details about Errors, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errors extends StripeObject { + /** + * The code of the error that occurred when validating the current amount details. + * + *

One of {@code amount_details_amount_mismatch}, or {@code + * amount_details_tax_shipping_discount_greater_than_amount}. + */ + @SerializedName("code") + String code; + + /** A message providing more details about the error. */ + @SerializedName("message") + String message; + } + + /** + * For more details about Shipping, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Shipping extends StripeObject { + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + @SerializedName("amount") + Long amount; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("from_postal_code") + String fromPostalCode; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("to_postal_code") + String toPostalCode; + } + + /** + * For more details about Tax, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** + * The total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + } + /** * For more details about Tip, please refer to the API * Reference. @@ -1546,7 +1670,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. * @@ -1560,6 +1684,43 @@ public static class AutomaticPaymentMethods extends StripeObject { Boolean enabled; } + /** + * For more details about Hooks, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Hooks extends StripeObject { + @SerializedName("inputs") + Inputs inputs; + + /** + * For more details about Inputs, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Inputs extends StripeObject { + @SerializedName("tax") + Tax tax; + + /** + * For more details about Tax, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** The TaxCalculation id */ + @SerializedName("calculation") + String calculation; + } + } + } + /** * For more details about NextAction, please refer to the API Reference. @@ -2497,6 +2658,39 @@ public static class WechatPayRedirectToIosApp extends StripeObject { } } + /** + * For more details about PaymentDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDetails extends StripeObject { + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. + */ + @SerializedName("customer_reference") + String customerReference; + + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ + @SerializedName("order_reference") + String orderReference; + } + /** * For more details about PaymentMethodConfigurationDetails, please refer to the API Reference. @@ -2607,6 +2801,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("link") Link link; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("mobilepay") Mobilepay mobilepay; @@ -2637,6 +2834,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -3200,7 +3400,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; @@ -3218,7 +3418,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}. @@ -3228,7 +3428,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}. @@ -3237,7 +3437,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}. @@ -3246,7 +3446,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}. @@ -3257,11 +3457,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. * @@ -3477,9 +3677,17 @@ public static class MandateOptions extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class CardPresent extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

One of {@code manual}, or {@code manual_preferred}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * 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") @@ -3487,10 +3695,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") @@ -4097,6 +4305,39 @@ public static class Link extends StripeObject { String setupFutureUsage; } + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject { + /** + * 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. + * + *

Equal to {@code none}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } + /** * For more details about Mobilepay, please refer to the API Reference. @@ -4439,6 +4680,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. @@ -5057,7 +5394,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). */ @@ -5099,10 +5436,12 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(application, responseGetter); trySetResponseGetter(automaticPaymentMethods, responseGetter); trySetResponseGetter(customer, responseGetter); + trySetResponseGetter(hooks, responseGetter); trySetResponseGetter(lastPaymentError, responseGetter); trySetResponseGetter(latestCharge, responseGetter); trySetResponseGetter(nextAction, responseGetter); trySetResponseGetter(onBehalfOf, responseGetter); + trySetResponseGetter(paymentDetails, responseGetter); trySetResponseGetter(paymentMethod, responseGetter); trySetResponseGetter(paymentMethodConfigurationDetails, responseGetter); trySetResponseGetter(paymentMethodOptions, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java new file mode 100644 index 00000000000..0437e6385c0 --- /dev/null +++ b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItem.java @@ -0,0 +1,253 @@ +// File generated from our OpenAPI spec +package com.stripe.model; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +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.PaymentIntentAmountDetailsLineItemListParams; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PaymentIntentAmountDetailsLineItem extends ApiResource implements HasId { + /** + * The discount applied on this line item represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ + @SerializedName("discount_amount") + Long discountAmount; + + /** 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 payment_intent_amount_details_line_item}. + */ + @SerializedName("object") + String object; + + /** Payment method-specific information for line items. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters + * long. + */ + @SerializedName("product_code") + String productCode; + + /** + * The product name of the line item. Required for L3 rates. At most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to the + * card networks. For Paypal, this field is truncated to 127 characters. + */ + @SerializedName("product_name") + String productName; + + /** The quantity of items. Required for L3 rates. An integer greater than 0. */ + @SerializedName("quantity") + Long quantity; + + /** Contains information about the tax on the item. */ + @SerializedName("tax") + Tax tax; + + /** + * The unit cost of the line item represented in the smallest currency unit. Required for + * L3 rates. An integer greater than or equal to 0. + */ + @SerializedName("unit_cost") + Long unitCost; + + /** + * A unit of measure for the line item, such as gallons, feet, meters, etc. Required for L3 rates. + * At most 12 alphanumeric characters long. + */ + @SerializedName("unit_of_measure") + String unitOfMeasure; + + /** Lists all LineItems of a given PaymentIntent. */ + public static PaymentIntentAmountDetailsLineItemCollection list( + String intent, Map params) throws StripeException { + return list(intent, params, (RequestOptions) null); + } + + /** Lists all LineItems of a given PaymentIntent. */ + public static PaymentIntentAmountDetailsLineItemCollection list( + String intent, Map params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/payment_intents/%s/amount_details_line_items", ApiResource.urlEncodeId(intent)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter() + .request(request, PaymentIntentAmountDetailsLineItemCollection.class); + } + + /** Lists all LineItems of a given PaymentIntent. */ + public static PaymentIntentAmountDetailsLineItemCollection list( + String intent, PaymentIntentAmountDetailsLineItemListParams params) throws StripeException { + return list(intent, params, (RequestOptions) null); + } + + /** Lists all LineItems of a given PaymentIntent. */ + public static PaymentIntentAmountDetailsLineItemCollection list( + String intent, PaymentIntentAmountDetailsLineItemListParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_intents/%s/amount_details_line_items", ApiResource.urlEncodeId(intent)); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter() + .request(request, PaymentIntentAmountDetailsLineItemCollection.class); + } + + /** + * For more details about PaymentMethodOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions extends StripeObject { + @SerializedName("card") + Card card; + + @SerializedName("card_present") + CardPresent cardPresent; + + @SerializedName("klarna") + Klarna klarna; + + @SerializedName("paypal") + Paypal paypal; + + /** + * For more details about Card, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + @SerializedName("commodity_code") + String commodityCode; + } + + /** + * For more details about CardPresent, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CardPresent extends StripeObject { + @SerializedName("commodity_code") + String commodityCode; + } + + /** + * For more details about Klarna, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Klarna extends StripeObject { + @SerializedName("image_url") + String imageUrl; + + @SerializedName("product_url") + String productUrl; + + @SerializedName("reference") + String reference; + + @SerializedName("subscription_reference") + String subscriptionReference; + } + + /** + * For more details about Paypal, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypal extends StripeObject { + /** + * Type of the line item. + * + *

One of {@code digital_goods}, {@code donation}, or {@code physical_goods}. + */ + @SerializedName("category") + String category; + + /** Description of the line item. */ + @SerializedName("description") + String description; + + /** + * The Stripe account ID of the connected account that sells the item. This is only needed + * when using Separate Charges and + * Transfers. + */ + @SerializedName("sold_by") + String soldBy; + } + } + + /** + * For more details about Tax, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** + * The total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(paymentMethodOptions, responseGetter); + trySetResponseGetter(tax, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItemCollection.java b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItemCollection.java new file mode 100644 index 00000000000..a83124044e4 --- /dev/null +++ b/src/main/java/com/stripe/model/PaymentIntentAmountDetailsLineItemCollection.java @@ -0,0 +1,5 @@ +// File generated from our OpenAPI spec +package com.stripe.model; + +public class PaymentIntentAmountDetailsLineItemCollection + extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/PaymentLink.java b/src/main/java/com/stripe/model/PaymentLink.java index ba8c5adeca8..e2f564dab47 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 @@ -96,7 +96,7 @@ public class PaymentLink extends ApiResource implements HasId, MetadataStore customFields; @@ -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. */ @@ -145,6 +145,9 @@ public class PaymentLink extends ApiResource implements HasId, MetadataStore metadata; + @SerializedName("name_collection") + NameCollection nameCollection; + /** * String representing the object's type. Objects of the same type share the same value. * @@ -906,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. */ @@ -1040,6 +1043,61 @@ public static class RenderingOptions extends StripeObject { } } + /** + * For more details about NameCollection, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection extends StripeObject { + @SerializedName("business") + Business business; + + @SerializedName("individual") + Individual individual; + + /** + * For more details about Business, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Business extends StripeObject { + /** Indicates whether business name collection is enabled for the payment link. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before checking out. Defaults to + * {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + + /** + * For more details about Individual, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Individual extends StripeObject { + /** Indicates whether individual name collection is enabled for the payment link. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before checking out. Defaults to + * {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + } + /** * For more details about OptionalItem, please refer to the API Reference. @@ -1107,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") @@ -1140,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") @@ -1270,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") @@ -1433,6 +1491,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(customText, responseGetter); trySetResponseGetter(invoiceCreation, responseGetter); trySetResponseGetter(lineItems, responseGetter); + trySetResponseGetter(nameCollection, responseGetter); trySetResponseGetter(onBehalfOf, responseGetter); trySetResponseGetter(paymentIntentData, responseGetter); trySetResponseGetter(phoneNumberCollection, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 7189206d53e..cf0854766b7 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 @@ -99,6 +99,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

customer; + @SerializedName("customer_account") + String customerAccount; + @SerializedName("customer_balance") CustomerBalance customerBalance; @@ -156,8 +162,11 @@ 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. */ @@ -203,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") @@ -244,13 +256,14 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

One of {@code acss_debit}, {@code affirm}, {@code afterpay_clearpay}, {@code alipay}, {@code * alma}, {@code amazon_pay}, {@code au_becs_debit}, {@code bacs_debit}, {@code bancontact}, * {@code billie}, {@code blik}, {@code boleto}, {@code card}, {@code card_present}, {@code - * cashapp}, {@code crypto}, {@code customer_balance}, {@code eps}, {@code fpx}, {@code giropay}, - * {@code grabpay}, {@code ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna}, - * {@code konbini}, {@code kr_card}, {@code link}, {@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}. + * cashapp}, {@code crypto}, {@code custom}, {@code customer_balance}, {@code eps}, {@code fpx}, + * {@code giropay}, {@code grabpay}, {@code ideal}, {@code 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 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; @@ -282,6 +295,48 @@ public void setCustomerObject(Customer expandableObject) { this.customer = new ExpandableField(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. * @@ -520,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"; @@ -544,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"; @@ -1180,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; @@ -1765,6 +1800,44 @@ public static class Cashapp extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Crypto extends StripeObject {} + /** + * For more details about Custom, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** Display name of the Dashboard-only CustomPaymentMethodType. */ + @SerializedName("display_name") + String displayName; + + /** Contains information about the Dashboard-only CustomPaymentMethodType logo. */ + @SerializedName("logo") + Logo logo; + + /** ID of the Dashboard-only CustomPaymentMethodType. Not expandable. */ + @SerializedName("type") + String type; + + /** + * For more details about Logo, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Logo extends StripeObject { + /** Content type of the Dashboard-only CustomPaymentMethodType logo. */ + @SerializedName("content_type") + String contentType; + + /** URL of the Dashboard-only CustomPaymentMethodType logo. */ + @SerializedName("url") + String url; + } + } + /** * For more details about CustomerBalance, please refer to the API Reference. @@ -1851,10 +1924,11 @@ public static class Grabpay extends StripeObject {} @EqualsAndHashCode(callSuper = false) 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 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}. + * The customer's bank, if provided. Can be one of {@code abn_amro}, {@code adyen}, {@code + * asn_bank}, {@code bunq}, {@code 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; @@ -1862,10 +1936,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank, if the bank was provided. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@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}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code 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; @@ -2088,6 +2163,15 @@ public static class Link extends StripeObject { String persistentToken; } + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + /** * For more details about Mobilepay, please refer to the API * Reference. @@ -2252,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. @@ -2271,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 @@ -2279,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. */ @@ -2544,7 +2649,8 @@ public static class Blocked extends StripeObject { * *

One of {@code bank_account_closed}, {@code bank_account_frozen}, {@code * bank_account_invalid_details}, {@code bank_account_restricted}, {@code - * bank_account_unusable}, or {@code debit_not_authorized}. + * bank_account_unusable}, {@code debit_not_authorized}, or {@code + * tokenized_account_number_deactivated}. */ @SerializedName("reason") String reason; @@ -2590,6 +2696,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(cardPresent, responseGetter); trySetResponseGetter(cashapp, responseGetter); trySetResponseGetter(crypto, responseGetter); + trySetResponseGetter(custom, responseGetter); trySetResponseGetter(customer, responseGetter); trySetResponseGetter(customerBalance, responseGetter); trySetResponseGetter(eps, responseGetter); @@ -2603,6 +2710,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(konbini, responseGetter); trySetResponseGetter(krCard, responseGetter); trySetResponseGetter(link, responseGetter); + trySetResponseGetter(mbWay, responseGetter); trySetResponseGetter(mobilepay, responseGetter); trySetResponseGetter(multibanco, responseGetter); trySetResponseGetter(naverPay, responseGetter); @@ -2613,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 ad21e06edf3..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 @@ -108,6 +108,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("crypto") + Crypto crypto; + @SerializedName("customer_balance") CustomerBalance customerBalance; @@ -163,6 +166,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("livemode") Boolean livemode; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("mobilepay") Mobilepay mobilepay; @@ -209,6 +215,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -1215,6 +1224,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto 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 CustomerBalance, please refer to the API Reference. @@ -1878,6 +1938,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay 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 Mobilepay, please refer to the API * Reference. @@ -2388,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. @@ -3019,6 +3181,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(card, responseGetter); trySetResponseGetter(cartesBancaires, responseGetter); trySetResponseGetter(cashapp, responseGetter); + trySetResponseGetter(crypto, responseGetter); trySetResponseGetter(customerBalance, responseGetter); trySetResponseGetter(eps, responseGetter); trySetResponseGetter(fpx, responseGetter); @@ -3032,6 +3195,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(konbini, responseGetter); trySetResponseGetter(krCard, responseGetter); trySetResponseGetter(link, responseGetter); + trySetResponseGetter(mbWay, responseGetter); trySetResponseGetter(mobilepay, responseGetter); trySetResponseGetter(multibanco, responseGetter); trySetResponseGetter(naverPay, responseGetter); @@ -3042,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 new file mode 100644 index 00000000000..1fedb45b0da --- /dev/null +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -0,0 +1,3556 @@ +// File generated from our OpenAPI spec +package com.stripe.model; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +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.PaymentRecordReportPaymentAttemptCanceledParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptInformationalParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptParams; +import com.stripe.param.PaymentRecordReportPaymentParams; +import com.stripe.param.PaymentRecordReportRefundParams; +import com.stripe.param.PaymentRecordRetrieveParams; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A Payment Record is a resource that allows you to represent payments that occur on- or + * off-Stripe. For example, you can create a Payment Record to model a payment made on a different + * payment processor, in order to mark an Invoice as paid and a Subscription as active. Payment + * Records consist of one or more Payment Attempt Records, which represent individual attempts made + * on a payment network. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PaymentRecord extends ApiResource implements HasId { + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount") + Amount amount; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_authorized") + AmountAuthorized amountAuthorized; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_canceled") + AmountCanceled amountCanceled; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_failed") + AmountFailed amountFailed; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_guaranteed") + AmountGuaranteed amountGuaranteed; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_refunded") + AmountRefunded amountRefunded; + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @SerializedName("amount_requested") + AmountRequested amountRequested; + + /** ID of the Connect application that created the PaymentRecord. */ + @SerializedName("application") + String application; + + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + @SerializedName("created") + Long created; + + /** Customer information for this payment. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** + * Indicates whether the customer was present in your checkout flow during this payment. + * + *

One of {@code off_session}, or {@code on_session}. + */ + @SerializedName("customer_presence") + String customerPresence; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** ID of the latest Payment Attempt Record attached to this Payment Record. */ + @SerializedName("latest_payment_attempt_record") + String latestPaymentAttemptRecord; + + /** + * 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. + * + *

Equal to {@code payment_record}. + */ + @SerializedName("object") + String object; + + /** Information about the Payment Method debited for this payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** Processor information associated with this payment. */ + @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; + + /** + * Report a new Payment Record. You may report a Payment Record as it is initialized and later + * report updates through the other report_* methods, or report Payment Records in a terminal + * state directly, through this method. + */ + public static PaymentRecord reportPayment(Map params) throws StripeException { + return reportPayment(params, (RequestOptions) null); + } + + /** + * Report a new Payment Record. You may report a Payment Record as it is initialized and later + * report updates through the other report_* methods, or report Payment Records in a terminal + * state directly, through this method. + */ + public static PaymentRecord reportPayment(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/payment_records/report_payment"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, PaymentRecord.class); + } + + /** + * Report a new Payment Record. You may report a Payment Record as it is initialized and later + * report updates through the other report_* methods, or report Payment Records in a terminal + * state directly, through this method. + */ + public static PaymentRecord reportPayment(PaymentRecordReportPaymentParams params) + throws StripeException { + return reportPayment(params, (RequestOptions) null); + } + + /** + * Report a new Payment Record. You may report a Payment Record as it is initialized and later + * report updates through the other report_* methods, or report Payment Records in a terminal + * state directly, through this method. + */ + public static PaymentRecord reportPayment( + PaymentRecordReportPaymentParams params, RequestOptions options) throws StripeException { + String path = "/v1/payment_records/report_payment"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentRecord.class); + } + + /** + * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be + * specified if all other payment attempts are canceled or failed. + */ + public PaymentRecord reportPaymentAttempt(Map params) throws StripeException { + return reportPaymentAttempt(params, (RequestOptions) null); + } + + /** + * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be + * specified if all other payment attempts are canceled or failed. + */ + public PaymentRecord reportPaymentAttempt(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** + * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be + * specified if all other payment attempts are canceled or failed. + */ + public PaymentRecord reportPaymentAttempt(PaymentRecordReportPaymentAttemptParams params) + throws StripeException { + return reportPaymentAttempt(params, (RequestOptions) null); + } + + /** + * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be + * specified if all other payment attempts are canceled or failed. + */ + public PaymentRecord reportPaymentAttempt( + PaymentRecordReportPaymentAttemptParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled(Map params) + throws StripeException { + return reportPaymentAttemptCanceled(params, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled( + Map params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_canceled", + ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled( + PaymentRecordReportPaymentAttemptCanceledParams params) throws StripeException { + return reportPaymentAttemptCanceled(params, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled( + PaymentRecordReportPaymentAttemptCanceledParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_canceled", + ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed(Map params) + throws StripeException { + return reportPaymentAttemptFailed(params, (RequestOptions) null); + } + + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed( + Map params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_failed", + ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed( + PaymentRecordReportPaymentAttemptFailedParams params) throws StripeException { + return reportPaymentAttemptFailed(params, (RequestOptions) null); + } + + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed( + PaymentRecordReportPaymentAttemptFailedParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_failed", + ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed(Map params) + throws StripeException { + return reportPaymentAttemptGuaranteed(params, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed( + Map params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_guaranteed", + ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed( + PaymentRecordReportPaymentAttemptGuaranteedParams params) throws StripeException { + return reportPaymentAttemptGuaranteed(params, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed( + PaymentRecordReportPaymentAttemptGuaranteedParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_guaranteed", + ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational() throws StripeException { + return reportPaymentAttemptInformational((Map) null, (RequestOptions) null); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational(RequestOptions options) + throws StripeException { + return reportPaymentAttemptInformational((Map) null, options); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational(Map params) + throws StripeException { + return reportPaymentAttemptInformational(params, (RequestOptions) null); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + Map params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_informational", + ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + PaymentRecordReportPaymentAttemptInformationalParams params) throws StripeException { + return reportPaymentAttemptInformational(params, (RequestOptions) null); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + PaymentRecordReportPaymentAttemptInformationalParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_informational", + ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(Map params) throws StripeException { + return reportRefund(params, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(Map params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_refund", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(PaymentRecordReportRefundParams params) throws StripeException { + return reportRefund(params, (RequestOptions) null); + } + + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(PaymentRecordReportRefundParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_refund", ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Retrieves a Payment Record with the given ID. */ + public static PaymentRecord retrieve(String id) throws StripeException { + return retrieve(id, (Map) null, (RequestOptions) null); + } + + /** Retrieves a Payment Record with the given ID. */ + public static PaymentRecord retrieve(String id, RequestOptions options) throws StripeException { + return retrieve(id, (Map) null, options); + } + + /** Retrieves a Payment Record with the given ID. */ + public static PaymentRecord retrieve( + String id, Map params, RequestOptions options) throws StripeException { + String path = String.format("/v1/payment_records/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, PaymentRecord.class); + } + + /** Retrieves a Payment Record with the given ID. */ + public static PaymentRecord retrieve( + String id, PaymentRecordRetrieveParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/payment_records/%s", ApiResource.urlEncodeId(id)); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentRecord.class); + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @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 positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountAuthorized extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountCanceled extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountFailed extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountGuaranteed extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountRefunded extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** A representation of an amount of money, consisting of an amount and a currency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountRequested extends StripeObject { + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + } + + /** Information about the customer for this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails extends StripeObject { + /** ID of the Stripe Customer associated with this payment. */ + @SerializedName("customer") + String customer; + + /** The customer's email address. */ + @SerializedName("email") + String email; + + /** The customer's name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + } + + /** Details about the Payment Method used in this payment attempt. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails extends StripeObject { + @SerializedName("ach_credit_transfer") + AchCreditTransfer achCreditTransfer; + + @SerializedName("ach_debit") + AchDebit achDebit; + + @SerializedName("acss_debit") + AcssDebit acssDebit; + + @SerializedName("affirm") + Affirm affirm; + + @SerializedName("afterpay_clearpay") + AfterpayClearpay afterpayClearpay; + + @SerializedName("alipay") + Alipay alipay; + + @SerializedName("alma") + Alma alma; + + @SerializedName("amazon_pay") + AmazonPay amazonPay; + + @SerializedName("au_becs_debit") + AuBecsDebit auBecsDebit; + + @SerializedName("bacs_debit") + BacsDebit bacsDebit; + + @SerializedName("bancontact") + Bancontact bancontact; + + @SerializedName("billie") + Billie billie; + + /** The billing details associated with the method of payment. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + @SerializedName("blik") + Blik blik; + + @SerializedName("boleto") + Boleto boleto; + + /** Details of the card used for this payment attempt. */ + @SerializedName("card") + Card card; + + @SerializedName("card_present") + CardPresent cardPresent; + + @SerializedName("cashapp") + Cashapp cashapp; + + @SerializedName("crypto") + Crypto crypto; + + /** + * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. + * This resource consists of details about the custom payment method used for this payment + * attempt. + */ + @SerializedName("custom") + Custom custom; + + @SerializedName("customer_balance") + CustomerBalance customerBalance; + + @SerializedName("eps") + Eps eps; + + @SerializedName("fpx") + Fpx fpx; + + @SerializedName("giropay") + Giropay giropay; + + @SerializedName("grabpay") + Grabpay grabpay; + + @SerializedName("ideal") + Ideal ideal; + + @SerializedName("interac_present") + InteracPresent interacPresent; + + @SerializedName("kakao_pay") + KakaoPay kakaoPay; + + @SerializedName("klarna") + Klarna klarna; + + @SerializedName("konbini") + Konbini konbini; + + @SerializedName("kr_card") + KrCard krCard; + + @SerializedName("link") + Link link; + + @SerializedName("mb_way") + MbWay mbWay; + + @SerializedName("mobilepay") + Mobilepay mobilepay; + + @SerializedName("multibanco") + Multibanco multibanco; + + @SerializedName("naver_pay") + NaverPay naverPay; + + @SerializedName("nz_bank_account") + NzBankAccount nzBankAccount; + + @SerializedName("oxxo") + Oxxo oxxo; + + @SerializedName("p24") + P24 p24; + + @SerializedName("pay_by_bank") + PayByBank payByBank; + + @SerializedName("payco") + Payco payco; + + /** ID of the Stripe PaymentMethod used to make this payment. */ + @SerializedName("payment_method") + String paymentMethod; + + @SerializedName("paynow") + Paynow paynow; + + @SerializedName("paypal") + Paypal paypal; + + @SerializedName("payto") + Payto payto; + + @SerializedName("pix") + Pix pix; + + @SerializedName("promptpay") + Promptpay promptpay; + + @SerializedName("revolut_pay") + RevolutPay revolutPay; + + @SerializedName("samsung_pay") + SamsungPay samsungPay; + + @SerializedName("satispay") + Satispay satispay; + + @SerializedName("sepa_credit_transfer") + SepaCreditTransfer sepaCreditTransfer; + + @SerializedName("sepa_debit") + SepaDebit sepaDebit; + + @SerializedName("sofort") + Sofort sofort; + + @SerializedName("stripe_account") + StripeAccount stripeAccount; + + @SerializedName("swish") + Swish swish; + + @SerializedName("twint") + Twint twint; + + /** + * The type of transaction-specific details of the payment method used in the payment. See 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. + */ + @SerializedName("type") + String type; + + @SerializedName("us_bank_account") + UsBankAccount usBankAccount; + + @SerializedName("wechat") + Wechat wechat; + + @SerializedName("wechat_pay") + WechatPay wechatPay; + + @SerializedName("zip") + Zip zip; + + /** + * For more details about AchCreditTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AchCreditTransfer extends StripeObject { + /** Account number to transfer funds to. */ + @SerializedName("account_number") + String accountNumber; + + /** Name of the bank associated with the routing number. */ + @SerializedName("bank_name") + String bankName; + + /** Routing transit number for the bank account to transfer funds to. */ + @SerializedName("routing_number") + String routingNumber; + + /** SWIFT code of the bank associated with the routing number. */ + @SerializedName("swift_code") + String swiftCode; + } + + /** + * For more details about AchDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AchDebit extends StripeObject { + /** + * Type of entity that holds the account. This can be either {@code individual} or {@code + * company}. + * + *

One of {@code company}, or {@code individual}. + */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** + * Uniquely identifies this particular bank account. You can use this attribute to check + * whether two bank accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** Routing transit number of the bank account. */ + @SerializedName("routing_number") + String routingNumber; + } + + /** + * For more details about AcssDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit extends StripeObject { + /** Name of the bank associated with the bank account. */ + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Institution number of the bank account. */ + @SerializedName("institution_number") + String institutionNumber; + + /** 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; + + /** Transit number of the bank account. */ + @SerializedName("transit_number") + String transitNumber; + } + + /** + * For more details about Affirm, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Affirm extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + + /** The Affirm transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about AfterpayClearpay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AfterpayClearpay extends StripeObject { + /** The Afterpay order ID associated with this payment intent. */ + @SerializedName("order_id") + String orderId; + + /** Order identifier shown to the merchant in Afterpay’s online portal. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Alipay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alipay extends StripeObject { + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check + * whether two Alipay accounts are the same. + */ + @SerializedName("buyer_id") + String buyerId; + + /** + * Uniquely identifies this particular Alipay account. You can use this attribute to check + * whether two Alipay accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Transaction ID of this particular Alipay transaction. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Alma, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alma extends StripeObject { + @SerializedName("installments") + Installments installments; + + /** The Alma transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * For more details about Installments, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Installments extends StripeObject { + /** The number of installments. */ + @SerializedName("count") + Long count; + } + } + + /** + * For more details about AmazonPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmazonPay extends StripeObject { + @SerializedName("funding") + Funding funding; + + /** The Amazon Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * For more details about Funding, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Funding extends StripeObject { + @SerializedName("card") + Card card; + + /** + * funding type of the underlying payment method. + * + *

Equal to {@code card}. + */ + @SerializedName("type") + String type; + + /** + * For more details about Card, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code + * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@code mastercard}, {@code + * unionpay}, {@code visa} or {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute + * to get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + } + } + } + + /** + * For more details about AuBecsDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AuBecsDebit extends StripeObject { + /** Bank-State-Branch number of the bank account. */ + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** 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; + } + + /** + * For more details about BacsDebit, please refer to the API Reference. + */ + @Getter + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** 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; + + /** Sort code of the bank account. (e.g., {@code 10-20-30}) */ + @SerializedName("sort_code") + String sortCode; + } + + /** + * For more details about Bancontact, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Bancontact extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Preferred language of the Bancontact authorization page that the customer is redirected to. + * Can be one of {@code en}, {@code de}, {@code fr}, or {@code nl} + */ + @SerializedName("preferred_language") + String preferredLanguage; + + /** + * Owner's verified full name. Values are verified or provided by Bancontact directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about Billie, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Billie extends StripeObject { + /** The Billie transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** Billing details used by the customer for this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails extends StripeObject { + /** A representation of a physical address. */ + @SerializedName("address") + Address address; + + /** The billing email associated with the method of payment. */ + @SerializedName("email") + String email; + + /** The billing name associated with the method of payment. */ + @SerializedName("name") + String name; + + /** The billing phone number associated with the method of payment. */ + @SerializedName("phone") + String phone; + + /** A representation of a physical 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + } + } + + /** + * For more details about Blik, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Blik extends StripeObject { + /** A unique and immutable identifier assigned by BLIK to every buyer. */ + @SerializedName("buyer_id") + String buyerId; + } + + /** + * For more details about Boleto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Boleto extends StripeObject { + /** + * The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses + * consumers). + */ + @SerializedName("tax_id") + String taxId; + } + + /** Details of the card used for this payment attempt. */ + @Getter + @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 + * unionpay}, {@code visa} or {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * When using manual capture, a future timestamp at which the charge will be automatically + * refunded if uncaptured. + */ + @SerializedName("capture_before") + Long captureBefore; + + /** Check results by Card networks on Card address and CVC at time of payment. */ + @SerializedName("checks") + Checks checks; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @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; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @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; + + /** True if this payment was marked as MOTO and out of scope for SCA. */ + @SerializedName("moto") + Boolean moto; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @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. + */ + @SerializedName("network_token") + NetworkToken networkToken; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @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; + + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + @SerializedName("wallet") + Wallet wallet; + + /** + * For more details about Checks, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Checks extends StripeObject { + @SerializedName("address_line1_check") + String addressLine1Check; + + @SerializedName("address_postal_code_check") + String addressPostalCodeCheck; + + @SerializedName("cvc_check") + 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. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NetworkToken extends StripeObject { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when + * processing the transaction. + */ + @SerializedName("used") + Boolean used; + } + + /** + * For more details about ThreeDSecure, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ThreeDSecure extends StripeObject { + @SerializedName("authentication_flow") + String authenticationFlow; + + @SerializedName("result") + String result; + + @SerializedName("result_reason") + String resultReason; + + @SerializedName("version") + String version; + } + + /** + * For more details about Wallet, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wallet extends StripeObject { + @SerializedName("apple_pay") + ApplePay applePay; + + /** (For tokenized numbers only.) The last four digits of the device account number. */ + @SerializedName("dynamic_last4") + String dynamicLast4; + + @SerializedName("google_pay") + GooglePay googlePay; + + /** + * The type of the card wallet, one of {@code apple_pay} or {@code google_pay}. An + * additional hash is included on the Wallet subhash with a name matching this value. It + * contains additional information specific to the card wallet type. + */ + @SerializedName("type") + String type; + + /** + * For more details about ApplePay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ApplePay extends StripeObject { + /** + * Type of the apple_pay transaction, one of {@code apple_pay} or {@code apple_pay_later}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about GooglePay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GooglePay extends StripeObject {} + } + } + + /** + * For more details about CardPresent, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CardPresent extends StripeObject { + /** The authorized amount. */ + @SerializedName("amount_authorized") + Long amountAuthorized; + + /** + * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code + * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@code mastercard}, {@code + * unionpay}, {@code visa} or {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * The product code that identifies + * the specific program or product associated with a card. + */ + @SerializedName("brand_product") + String brandProduct; + + /** + * When using manual capture, a future timestamp after which the charge will be automatically + * refunded if uncaptured. + */ + @SerializedName("capture_before") + Long captureBefore; + + /** + * The cardholder name as read from the card, in ISO 7813 format. May include + * alphanumeric characters, special characters and first/last name separator ({@code /}). In + * some cases, the cardholder name may not be available depending on how the issuer has + * configured the card. Cardholder name is typically not available on swipe or contactless + * payments, such as those made with Apple Pay and Google Pay. + */ + @SerializedName("cardholder_name") + String cardholderName; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only + * and not typically available in standard API requests.) + */ + @SerializedName("description") + String description; + + /** Authorization response cryptogram. */ + @SerializedName("emv_auth_data") + String emvAuthData; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be + * attached to a Customer for future transactions. Only present if it was possible to generate + * a card PaymentMethod. + */ + @SerializedName("generated_card") + String generatedCard; + + /** + * Issuer identification number of the card. (For internal use only and not typically + * available in standard API requests.) + */ + @SerializedName("iin") + String iin; + + /** + * Whether this PaymentIntent is + * eligible for incremental authorizations. Request support using request_incremental_authorization_support. + */ + @SerializedName("incremental_authorization_supported") + Boolean incrementalAuthorizationSupported; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in + * standard API requests.) + */ + @SerializedName("issuer") + String issuer; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @SerializedName("network") + String network; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @SerializedName("network_transaction_id") + String networkTransactionId; + + /** Details about payments collected offline. */ + @SerializedName("offline") + Offline offline; + + /** Defines whether the authorized amount can be over-captured or not. */ + @SerializedName("overcapture_supported") + Boolean overcaptureSupported; + + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ + @SerializedName("preferred_locales") + List preferredLocales; + + /** + * How card details were read in this transaction. + * + *

One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode}, + * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}. + */ + @SerializedName("read_method") + String readMethod; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV + * transactions. + */ + @SerializedName("receipt") + Receipt receipt; + + @SerializedName("wallet") + Wallet wallet; + + /** + * For more details about Offline, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Offline extends StripeObject { + /** Time at which the payment was collected while offline. */ + @SerializedName("stored_at") + Long storedAt; + + /** + * The method used to process this payment method offline. Only deferred is allowed. + * + *

Equal to {@code deferred}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about Receipt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Receipt extends StripeObject { + /** + * The type of account being debited or credited + * + *

One of {@code checking}, {@code credit}, {@code prepaid}, or {@code unknown}. + */ + @SerializedName("account_type") + String accountType; + + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ + @SerializedName("application_cryptogram") + String applicationCryptogram; + + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ + @SerializedName("application_preferred_name") + String applicationPreferredName; + + /** Identifier for this transaction. */ + @SerializedName("authorization_code") + String authorizationCode; + + /** EMV tag 8A. A code returned by the card issuer. */ + @SerializedName("authorization_response_code") + String authorizationResponseCode; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the + * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code + * offline_pin_and_signature}, {@code online_pin}, or {@code signature}. + */ + @SerializedName("cardholder_verification_method") + String cardholderVerificationMethod; + + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. + */ + @SerializedName("dedicated_file_name") + String dedicatedFileName; + + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ + @SerializedName("terminal_verification_results") + String terminalVerificationResults; + + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ + @SerializedName("transaction_status_information") + String transactionStatusInformation; + } + + /** + * For more details about Wallet, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wallet extends StripeObject { + /** + * The type of mobile wallet, one of {@code apple_pay}, {@code google_pay}, {@code + * samsung_pay}, or {@code unknown}. + */ + @SerializedName("type") + String type; + } + } + + /** + * For more details about Cashapp, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Cashapp extends StripeObject { + /** A unique and immutable identifier assigned by Cash App to every buyer. */ + @SerializedName("buyer_id") + String buyerId; + + /** A public identifier for buyers using Cash App. */ + @SerializedName("cashtag") + String cashtag; + + /** A unique and immutable identifier of payments assigned by Cash App. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject { + /** The wallet address of the customer. */ + @SerializedName("buyer_address") + String buyerAddress; + + /** + * The blockchain network that the transaction was sent on. + * + *

One of {@code base}, {@code ethereum}, {@code polygon}, or {@code solana}. + */ + @SerializedName("network") + String network; + + /** + * The token currency that the transaction was sent with. + * + *

One of {@code usdc}, {@code usdg}, or {@code usdp}. + */ + @SerializedName("token_currency") + String tokenCurrency; + + /** The blockchain transaction hash of the crypto payment. */ + @SerializedName("transaction_hash") + String transactionHash; + } + + /** + * Custom Payment Methods represent Payment Method types not modeled directly in the Stripe API. + * This resource consists of details about the custom payment method used for this payment + * attempt. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + @SerializedName("display_name") + String displayName; + + /** The custom payment method type associated with this payment. */ + @SerializedName("type") + String type; + } + + /** + * For more details about CustomerBalance, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerBalance extends StripeObject {} + + /** + * For more details about Eps, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Eps extends StripeObject { + /** + * The customer's bank. Should be one of {@code arzte_und_apotheker_bank}, {@code + * austrian_anadi_bank_ag}, {@code bank_austria}, {@code bankhaus_carl_spangler}, {@code + * bankhaus_schelhammer_und_schattera_ag}, {@code bawag_psk_ag}, {@code bks_bank_ag}, {@code + * brull_kallmus_bank_ag}, {@code btv_vier_lander_bank}, {@code capital_bank_grawe_gruppe_ag}, + * {@code deutsche_bank_ag}, {@code dolomitenbank}, {@code easybank_ag}, {@code + * erste_bank_und_sparkassen}, {@code hypo_alpeadriabank_international_ag}, {@code + * hypo_noe_lb_fur_niederosterreich_u_wien}, {@code hypo_oberosterreich_salzburg_steiermark}, + * {@code hypo_tirol_bank_ag}, {@code hypo_vorarlberg_bank_ag}, {@code + * hypo_bank_burgenland_aktiengesellschaft}, {@code marchfelder_bank}, {@code oberbank_ag}, + * {@code raiffeisen_bankengruppe_osterreich}, {@code schoellerbank_ag}, {@code + * sparda_bank_wien}, {@code volksbank_gruppe}, {@code volkskreditbank_ag}, or {@code + * vr_bank_braunau}. + */ + @SerializedName("bank") + String bank; + + /** + * Owner's verified full name. Values are verified or provided by EPS directly (if supported) + * at the time of authorization or settlement. They cannot be set or mutated. EPS rarely + * provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about Fpx, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Fpx extends StripeObject { + /** Account holder type, if provided. Can be one of {@code individual} or {@code company}. */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** + * The customer's bank. Can be one of {@code affin_bank}, {@code agrobank}, {@code + * alliance_bank}, {@code ambank}, {@code bank_islam}, {@code bank_muamalat}, {@code + * bank_rakyat}, {@code bsn}, {@code cimb}, {@code hong_leong_bank}, {@code hsbc}, {@code + * kfh}, {@code maybank2u}, {@code ocbc}, {@code public_bank}, {@code rhb}, {@code + * standard_chartered}, {@code uob}, {@code deutsche_bank}, {@code maybank2e}, {@code + * pb_enterprise}, or {@code bank_of_china}. + */ + @SerializedName("bank") + String bank; + + /** Unique transaction id generated by FPX for every request from the merchant. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Giropay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Giropay extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** + * Owner's verified full name. Values are verified or provided by Giropay directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about Grabpay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Grabpay extends StripeObject { + /** Unique transaction id generated by GrabPay. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Ideal, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Ideal extends StripeObject { + /** + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code 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; + + /** + * The Bank Identifier Code of the customer's bank. + * + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code 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; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** Unique transaction ID generated by iDEAL. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * Owner's verified full name. Values are verified or provided by iDEAL directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about InteracPresent, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class InteracPresent extends StripeObject { + /** Card brand. Can be {@code interac}, {@code mastercard} or {@code visa}. */ + @SerializedName("brand") + String brand; + + /** + * The cardholder name as read from the card, in ISO 7813 format. May include + * alphanumeric characters, special characters and first/last name separator ({@code /}). In + * some cases, the cardholder name may not be available depending on how the issuer has + * configured the card. Cardholder name is typically not available on swipe or contactless + * payments, such as those made with Apple Pay and Google Pay. + */ + @SerializedName("cardholder_name") + String cardholderName; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute to + * get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** + * A high-level description of the type of cards issued in this range. (For internal use only + * and not typically available in standard API requests.) + */ + @SerializedName("description") + String description; + + /** Authorization response cryptogram. */ + @SerializedName("emv_auth_data") + String emvAuthData; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Uniquely identifies this particular card number. You can use this attribute to check + * whether two customers who’ve signed up with you are using the same card number, for + * example. For payment methods that tokenize card information (Apple Pay, Google Pay), the + * tokenized number might be provided instead of the underlying card number. + * + *

As of May 1, 2021, card fingerprint in India for Connect changed to allow two + * fingerprints for the same card---one for India and one for the rest of the world. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** + * ID of a card PaymentMethod generated from the card_present PaymentMethod that may be + * attached to a Customer for future transactions. Only present if it was possible to generate + * a card PaymentMethod. + */ + @SerializedName("generated_card") + String generatedCard; + + /** + * Issuer identification number of the card. (For internal use only and not typically + * available in standard API requests.) + */ + @SerializedName("iin") + String iin; + + /** + * The name of the card's issuing bank. (For internal use only and not typically available in + * standard API requests.) + */ + @SerializedName("issuer") + String issuer; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + + /** + * Identifies which network this charge was processed on. Can be {@code amex}, {@code + * cartes_bancaires}, {@code diners}, {@code discover}, {@code eftpos_au}, {@code interac}, + * {@code jcb}, {@code link}, {@code mastercard}, {@code unionpay}, {@code visa}, or {@code + * unknown}. + */ + @SerializedName("network") + String network; + + /** + * This is used by the financial networks to identify a transaction. Visa calls this the + * Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. This value will be present if it is returned by the financial + * network in the authorization response, and null otherwise. + */ + @SerializedName("network_transaction_id") + String networkTransactionId; + + /** + * The languages that the issuing bank recommends using for localizing any customer-facing + * text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip. + */ + @SerializedName("preferred_locales") + List preferredLocales; + + /** + * How card details were read in this transaction. + * + *

One of {@code contact_emv}, {@code contactless_emv}, {@code contactless_magstripe_mode}, + * {@code magnetic_stripe_fallback}, or {@code magnetic_stripe_track2}. + */ + @SerializedName("read_method") + String readMethod; + + /** + * A collection of fields required to be displayed on receipts. Only required for EMV + * transactions. + */ + @SerializedName("receipt") + Receipt receipt; + + /** + * For more details about Receipt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Receipt extends StripeObject { + /** + * The type of account being debited or credited + * + *

One of {@code checking}, {@code savings}, or {@code unknown}. + */ + @SerializedName("account_type") + String accountType; + + /** + * The Application Cryptogram, a unique value generated by the card to authenticate the + * transaction with issuers. + */ + @SerializedName("application_cryptogram") + String applicationCryptogram; + + /** + * The Application Identifier (AID) on the card used to determine which networks are + * eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the + * card's chip. + */ + @SerializedName("application_preferred_name") + String applicationPreferredName; + + /** Identifier for this transaction. */ + @SerializedName("authorization_code") + String authorizationCode; + + /** EMV tag 8A. A code returned by the card issuer. */ + @SerializedName("authorization_response_code") + String authorizationResponseCode; + + /** + * Describes the method used by the cardholder to verify ownership of the card. One of the + * following: {@code approval}, {@code failure}, {@code none}, {@code offline_pin}, {@code + * offline_pin_and_signature}, {@code online_pin}, or {@code signature}. + */ + @SerializedName("cardholder_verification_method") + String cardholderVerificationMethod; + + /** + * Similar to the application_preferred_name, identifying the applications (AIDs) available + * on the card. Referenced from EMV tag 84. + */ + @SerializedName("dedicated_file_name") + String dedicatedFileName; + + /** + * A 5-byte string that records the checks and validations that occur between the card and + * the terminal. These checks determine how the terminal processes the transaction and what + * risk tolerance is acceptable. Referenced from EMV Tag 95. + */ + @SerializedName("terminal_verification_results") + String terminalVerificationResults; + + /** + * An indication of which steps were completed during the card read process. Referenced from + * EMV Tag 9B. + */ + @SerializedName("transaction_status_information") + String transactionStatusInformation; + } + } + + /** + * For more details about KakaoPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KakaoPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The Kakao Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Klarna, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Klarna extends StripeObject { + /** The payer details for this transaction. */ + @SerializedName("payer_details") + PayerDetails payerDetails; + + /** + * The Klarna payment method used for this transaction. Can be one of {@code pay_later}, + * {@code pay_now}, {@code pay_with_financing}, or {@code pay_in_installments} + */ + @SerializedName("payment_method_category") + String paymentMethodCategory; + + /** + * Preferred language of the Klarna authorization page that the customer is redirected to. Can + * be one of {@code de-AT}, {@code en-AT}, {@code nl-BE}, {@code fr-BE}, {@code en-BE}, {@code + * de-DE}, {@code en-DE}, {@code da-DK}, {@code en-DK}, {@code es-ES}, {@code en-ES}, {@code + * fi-FI}, {@code sv-FI}, {@code en-FI}, {@code en-GB}, {@code en-IE}, {@code it-IT}, {@code + * en-IT}, {@code nl-NL}, {@code en-NL}, {@code nb-NO}, {@code en-NO}, {@code sv-SE}, {@code + * en-SE}, {@code en-US}, {@code es-US}, {@code fr-FR}, {@code en-FR}, {@code cs-CZ}, {@code + * en-CZ}, {@code ro-RO}, {@code en-RO}, {@code el-GR}, {@code en-GR}, {@code en-AU}, {@code + * en-NZ}, {@code en-CA}, {@code fr-CA}, {@code pl-PL}, {@code en-PL}, {@code pt-PT}, {@code + * en-PT}, {@code de-CH}, {@code fr-CH}, {@code it-CH}, or {@code en-CH} + */ + @SerializedName("preferred_locale") + String preferredLocale; + + /** + * For more details about PayerDetails, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayerDetails extends StripeObject { + /** The payer's address. */ + @SerializedName("address") + Address address; + + /** + * For more details about Address, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Address extends StripeObject { + /** The payer address country. */ + @SerializedName("country") + String country; + } + } + } + + /** + * For more details about Konbini, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Konbini extends StripeObject { + /** + * If the payment succeeded, this contains the details of the convenience store where the + * payment was completed. + */ + @SerializedName("store") + Store store; + + /** + * For more details about Store, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Store extends StripeObject { + /** + * The name of the convenience store chain where the payment was completed. + * + *

One of {@code familymart}, {@code lawson}, {@code ministop}, or {@code seicomart}. + */ + @SerializedName("chain") + String chain; + } + } + + /** + * For more details about KrCard, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class KrCard extends StripeObject { + /** + * The local credit or debit card brand. + * + *

One of {@code bc}, {@code citi}, {@code hana}, {@code hyundai}, {@code jeju}, {@code + * jeonbuk}, {@code kakaobank}, {@code kbank}, {@code kdbbank}, {@code kookmin}, {@code + * kwangju}, {@code lotte}, {@code mg}, {@code nh}, {@code post}, {@code samsung}, {@code + * savingsbank}, {@code shinhan}, {@code shinhyup}, {@code suhyup}, {@code tossbank}, or + * {@code woori}. + */ + @SerializedName("brand") + String brand; + + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The last four digits of the card. This may not be present for American Express cards. */ + @SerializedName("last4") + String last4; + + /** The Korean Card transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Link, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Link extends StripeObject { + /** + * Two-letter ISO code representing the funding source country beneath the Link payment. You + * could use this attribute to get a sense of international fees. + */ + @SerializedName("country") + String country; + } + + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject {} + + /** + * For more details about Mobilepay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Mobilepay extends StripeObject { + /** Internal card details. */ + @SerializedName("card") + Card card; + + /** + * For more details about Card, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** Brand of the card used in the transaction. */ + @SerializedName("brand") + String brand; + + /** Two-letter ISO code representing the country of the card. */ + @SerializedName("country") + String country; + + /** Two digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Two digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** The last 4 digits of the card. */ + @SerializedName("last4") + String last4; + } + } + + /** + * For more details about Multibanco, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Multibanco extends StripeObject { + /** Entity number associated with this Multibanco payment. */ + @SerializedName("entity") + String entity; + + /** Reference number associated with this Multibanco payment. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about NaverPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NaverPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The Naver Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about NzBankAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NzBankAccount extends StripeObject { + /** + * The name on the bank account. Only present if the account holder name is different from the + * name of the authorized signatory collected in the PaymentMethod’s billing details. + */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The numeric code for the bank account's bank. */ + @SerializedName("bank_code") + String bankCode; + + /** The name of the bank. */ + @SerializedName("bank_name") + String bankName; + + /** The numeric code for the bank account's bank branch. */ + @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; + + /** The suffix of the bank account number. */ + @SerializedName("suffix") + String suffix; + } + + /** + * For more details about Oxxo, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Oxxo extends StripeObject { + /** OXXO reference number. */ + @SerializedName("number") + String number; + } + + /** + * For more details about P24, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class P24 extends StripeObject { + /** + * The customer's bank. Can be one of {@code ing}, {@code citi_handlowy}, {@code + * tmobile_usbugi_bankowe}, {@code plus_bank}, {@code etransfer_pocztowy24}, {@code + * banki_spbdzielcze}, {@code bank_nowy_bfg_sa}, {@code getin_bank}, {@code velobank}, {@code + * blik}, {@code noble_pay}, {@code ideabank}, {@code envelobank}, {@code + * santander_przelew24}, {@code nest_przelew}, {@code mbank_mtransfer}, {@code inteligo}, + * {@code pbac_z_ipko}, {@code bnp_paribas}, {@code credit_agricole}, {@code toyota_bank}, + * {@code bank_pekao_sa}, {@code volkswagen_bank}, {@code bank_millennium}, {@code + * alior_bank}, or {@code boz}. + */ + @SerializedName("bank") + String bank; + + /** Unique reference for this Przelewy24 payment. */ + @SerializedName("reference") + String reference; + + /** + * Owner's verified full name. Values are verified or provided by Przelewy24 directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + * Przelewy24 rarely provides this information so the attribute is usually empty. + */ + @SerializedName("verified_name") + String verifiedName; + } + + /** + * For more details about PayByBank, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PayByBank extends StripeObject {} + + /** + * For more details about Payco, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Payco extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The Payco transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Paynow, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paynow extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + + /** Reference number associated with this PayNow payment. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about Paypal, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypal extends StripeObject { + /** + * Two-letter ISO code representing the buyer's country. Values are provided by PayPal + * directly (if supported) at the time of authorization or settlement. They cannot be set or + * mutated. + */ + @SerializedName("country") + String country; + + /** + * Owner's email. Values are provided by PayPal directly (if supported) at the time of + * authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("payer_email") + String payerEmail; + + /** PayPal account PayerID. This identifier uniquely identifies the PayPal customer. */ + @SerializedName("payer_id") + String payerId; + + /** + * Owner's full name. Values provided by PayPal directly (if supported) at the time of + * authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("payer_name") + String payerName; + + /** + * The level of protection offered as defined by PayPal Seller Protection for Merchants, for + * this transaction. + */ + @SerializedName("seller_protection") + SellerProtection sellerProtection; + + /** A unique ID generated by PayPal for this transaction. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * For more details about SellerProtection, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SellerProtection extends StripeObject { + /** An array of conditions that are covered for the transaction, if applicable. */ + @SerializedName("dispute_categories") + List disputeCategories; + + /** + * Indicates whether the transaction is eligible for PayPal's seller protection. + * + *

One of {@code eligible}, {@code not_eligible}, or {@code partially_eligible}. + */ + @SerializedName("status") + String status; + } + } + + /** + * 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. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** Unique transaction id generated by BCB. */ + @SerializedName("bank_transaction_id") + String bankTransactionId; + } + + /** + * For more details about Promptpay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Promptpay extends StripeObject { + /** Bill reference generated by PromptPay. */ + @SerializedName("reference") + String reference; + } + + /** + * For more details about RevolutPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RevolutPay extends StripeObject { + @SerializedName("funding") + Funding funding; + + /** The Revolut Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + + /** + * For more details about Funding, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Funding extends StripeObject { + @SerializedName("card") + Card card; + + /** + * funding type of the underlying payment method. + * + *

Equal to {@code card}. + */ + @SerializedName("type") + String type; + + /** + * For more details about Card, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Card brand. Can be {@code amex}, {@code cartes_bancaires}, {@code diners}, {@code + * discover}, {@code eftpos_au}, {@code jcb}, {@code link}, {@code mastercard}, {@code + * unionpay}, {@code visa} or {@code unknown}. + */ + @SerializedName("brand") + String brand; + + /** + * Two-letter ISO code representing the country of the card. You could use this attribute + * to get a sense of the international breakdown of cards you've collected. + */ + @SerializedName("country") + String country; + + /** Two-digit number representing the card's expiration month. */ + @SerializedName("exp_month") + Long expMonth; + + /** Four-digit number representing the card's expiration year. */ + @SerializedName("exp_year") + Long expYear; + + /** + * Card funding type. Can be {@code credit}, {@code debit}, {@code prepaid}, or {@code + * unknown}. + */ + @SerializedName("funding") + String funding; + + /** The last four digits of the card. */ + @SerializedName("last4") + String last4; + } + } + } + + /** + * For more details about SamsungPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPay extends StripeObject { + /** A unique identifier for the buyer as determined by the local payment processor. */ + @SerializedName("buyer_id") + String buyerId; + + /** The Samsung Pay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Satispay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Satispay extends StripeObject { + /** The Satispay transaction ID associated with this payment. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about SepaCreditTransfer, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaCreditTransfer extends StripeObject { + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** IBAN of the bank account to transfer funds to. */ + @SerializedName("iban") + String iban; + } + + /** + * For more details about SepaDebit, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebit extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Branch code of bank associated with the bank account. */ + @SerializedName("branch_code") + String branchCode; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four characters of the IBAN. */ + @SerializedName("last4") + String last4; + + /** + * Find the ID of the mandate used for this payment under the payment_method_details.sepa_debit.mandate + * property on the Charge. Use this mandate ID to retrieve the Mandate. + */ + @SerializedName("mandate") + String mandate; + } + + /** + * For more details about Sofort, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Sofort extends StripeObject { + /** Bank code of bank associated with the bank account. */ + @SerializedName("bank_code") + String bankCode; + + /** Name of the bank associated with the bank account. */ + @SerializedName("bank_name") + String bankName; + + /** Bank Identifier Code of the bank associated with the bank account. */ + @SerializedName("bic") + String bic; + + /** Two-letter ISO code representing the country the bank account is located in. */ + @SerializedName("country") + String country; + + /** The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebit; + + /** The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + @SerializedName("generated_sepa_debit_mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField generatedSepaDebitMandate; + + /** Last four characters of the IBAN. */ + @SerializedName("iban_last4") + String ibanLast4; + + /** + * Preferred language of the SOFORT authorization page that the customer is redirected to. Can + * be one of {@code de}, {@code en}, {@code es}, {@code fr}, {@code it}, {@code nl}, or {@code + * pl} + */ + @SerializedName("preferred_language") + String preferredLanguage; + + /** + * Owner's verified full name. Values are verified or provided by SOFORT directly (if + * supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + @SerializedName("verified_name") + String verifiedName; + + /** Get ID of expandable {@code generatedSepaDebit} object. */ + public String getGeneratedSepaDebit() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getId() : null; + } + + public void setGeneratedSepaDebit(String id) { + this.generatedSepaDebit = ApiResource.setExpandableFieldId(id, this.generatedSepaDebit); + } + + /** Get expanded {@code generatedSepaDebit}. */ + public PaymentMethod getGeneratedSepaDebitObject() { + return (this.generatedSepaDebit != null) ? this.generatedSepaDebit.getExpanded() : null; + } + + public void setGeneratedSepaDebitObject(PaymentMethod expandableObject) { + this.generatedSepaDebit = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Get ID of expandable {@code generatedSepaDebitMandate} object. */ + public String getGeneratedSepaDebitMandate() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getId() + : null; + } + + public void setGeneratedSepaDebitMandate(String id) { + this.generatedSepaDebitMandate = + ApiResource.setExpandableFieldId(id, this.generatedSepaDebitMandate); + } + + /** Get expanded {@code generatedSepaDebitMandate}. */ + public Mandate getGeneratedSepaDebitMandateObject() { + return (this.generatedSepaDebitMandate != null) + ? this.generatedSepaDebitMandate.getExpanded() + : null; + } + + public void setGeneratedSepaDebitMandateObject(Mandate expandableObject) { + this.generatedSepaDebitMandate = + new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about StripeAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StripeAccount extends StripeObject {} + + /** + * For more details about Swish, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Swish extends StripeObject { + /** + * Uniquely identifies the payer's Swish account. You can use this attribute to check whether + * two Swish transactions were paid for by the same payer + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Payer bank reference number for the payment. */ + @SerializedName("payment_reference") + String paymentReference; + + /** The last four digits of the Swish account phone number. */ + @SerializedName("verified_phone_last4") + String verifiedPhoneLast4; + } + + /** + * For more details about Twint, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Twint extends StripeObject {} + + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UsBankAccount extends StripeObject { + /** + * The type of entity that holds the account. This can be either 'individual' or 'company'. + * + *

One of {@code company}, or {@code individual}. + */ + @SerializedName("account_holder_type") + String accountHolderType; + + /** + * The type of the bank account. This can be either 'checking' or 'savings'. + * + *

One of {@code checking}, or {@code savings}. + */ + @SerializedName("account_type") + String accountType; + + /** Name of the bank associated with the bank account. */ + @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. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** Last four digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** ID of the mandate used to make this payment. */ + @SerializedName("mandate") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField mandate; + + /** The ACH payment reference for this transaction. */ + @SerializedName("payment_reference") + String paymentReference; + + /** The routing number for the bank account. */ + @SerializedName("routing_number") + String routingNumber; + + /** Get ID of expandable {@code mandate} object. */ + public String getMandate() { + return (this.mandate != null) ? this.mandate.getId() : null; + } + + public void setMandate(String id) { + this.mandate = ApiResource.setExpandableFieldId(id, this.mandate); + } + + /** Get expanded {@code mandate}. */ + public Mandate getMandateObject() { + return (this.mandate != null) ? this.mandate.getExpanded() : null; + } + + public void setMandateObject(Mandate expandableObject) { + this.mandate = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** + * For more details about Wechat, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wechat extends StripeObject {} + + /** + * For more details about WechatPay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class WechatPay extends StripeObject { + /** + * Uniquely identifies this particular WeChat Pay account. You can use this attribute to check + * whether two WeChat accounts are the same. + */ + @SerializedName("fingerprint") + String fingerprint; + + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + + /** Transaction ID of this particular WeChat Pay transaction. */ + @SerializedName("transaction_id") + String transactionId; + } + + /** + * For more details about Zip, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Zip extends StripeObject {} + } + + /** Processor information associated with this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProcessorDetails extends StripeObject { + /** + * Custom processors represent payment processors not modeled directly in the Stripe API. This + * resource consists of details about the custom processor used for this payment attempt. + */ + @SerializedName("custom") + Custom custom; + + /** + * The processor used for this payment attempt. + * + *

Equal to {@code custom}. + */ + @SerializedName("type") + String type; + + /** + * Custom processors represent payment processors not modeled directly in the Stripe API. This + * resource consists of details about the custom processor used for this payment attempt. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** + * An opaque string for manual reconciliation of this payment, for example a check number or a + * payment processor ID. + */ + @SerializedName("payment_reference") + String paymentReference; + } + } + + /** The customer's shipping information associated with this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails extends StripeObject { + /** A representation of a physical address. */ + @SerializedName("address") + Address address; + + /** The shipping recipient's name. */ + @SerializedName("name") + String name; + + /** The shipping recipient's phone number. */ + @SerializedName("phone") + String phone; + + /** A representation of a physical 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + String state; + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(amount, responseGetter); + trySetResponseGetter(amountAuthorized, responseGetter); + trySetResponseGetter(amountCanceled, responseGetter); + trySetResponseGetter(amountFailed, responseGetter); + trySetResponseGetter(amountGuaranteed, responseGetter); + trySetResponseGetter(amountRefunded, responseGetter); + trySetResponseGetter(amountRequested, responseGetter); + trySetResponseGetter(customerDetails, responseGetter); + trySetResponseGetter(paymentMethodDetails, responseGetter); + trySetResponseGetter(processorDetails, responseGetter); + trySetResponseGetter(shippingDetails, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/Payout.java b/src/main/java/com/stripe/model/Payout.java index 8285426488d..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}. @@ -573,8 +573,8 @@ public static Payout retrieve(String payout, PayoutRetrieveParams params, Reques /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -586,8 +586,8 @@ public Payout reverse() throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -599,8 +599,8 @@ public Payout reverse(RequestOptions options) throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -612,8 +612,8 @@ public Payout reverse(Map params) throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -628,8 +628,8 @@ public Payout reverse(Map params, RequestOptions options) throws /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -641,8 +641,8 @@ public Payout reverse(PayoutReverseParams params) throws StripeException { /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and diff --git a/src/main/java/com/stripe/model/Person.java b/src/main/java/com/stripe/model/Person.java index e5ec6fbc793..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") @@ -541,14 +543,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@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_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@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_signator}, {@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 @@ -567,29 +569,30 @@ public static class Errors extends StripeObject { * 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_value_other}, {@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_authorizer_authority}, {@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 + * {@code invalid_value_other}, {@code unsupported_business_type}, {@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_authorizer_authority}, {@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_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -681,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; @@ -710,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; @@ -734,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") @@ -757,14 +763,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@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_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@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_signator}, {@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 @@ -783,29 +789,30 @@ public static class Errors extends StripeObject { * 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_value_other}, {@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_authorizer_authority}, {@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 + * {@code invalid_value_other}, {@code unsupported_business_type}, {@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_authorizer_authority}, {@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_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -927,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") @@ -942,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") @@ -972,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") @@ -1026,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") @@ -1056,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 f7269e5afb7..5761b50a8b5 100644 --- a/src/main/java/com/stripe/model/PromotionCode.java +++ b/src/main/java/com/stripe/model/PromotionCode.java @@ -19,12 +19,11 @@ import lombok.Setter; /** - * A Promotion Code represents a customer-redeemable code for a coupon. You can create multiple codes for a single - * coupon. + * A Promotion Code represents a customer-redeemable code for an underlying promotion. You can + * 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. @@ -48,29 +47,20 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore

subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with - * conventional one-off charges or payment intents. - */ - @SerializedName("coupon") - Coupon coupon; - /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @SerializedName("created") Long created; - /** The customer that this promotion code can be used by. */ + /** The customer who can use this promotion code. */ @SerializedName("customer") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField 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; @@ -92,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. */ @@ -108,6 +98,9 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore

params) throws StripeException { return create(params, (RequestOptions) null); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public static PromotionCode create(Map params, RequestOptions options) throws StripeException { @@ -154,16 +147,16 @@ public static PromotionCode create(Map params, RequestOptions op } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public static PromotionCode create(PromotionCodeCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public static PromotionCode create(PromotionCodeCreateParams params, RequestOptions options) throws StripeException { @@ -315,6 +308,47 @@ public PromotionCode update(PromotionCodeUpdateParams params, RequestOptions opt return getResponseGetter().request(request, PromotionCode.class); } + /** + * For more details about Promotion, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Promotion extends StripeObject { + /** If promotion {@code type} is {@code coupon}, the coupon for this promotion. */ + @SerializedName("coupon") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField coupon; + + /** + * The type of promotion. + * + *

Equal to {@code coupon}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code coupon} object. */ + public String getCoupon() { + return (this.coupon != null) ? this.coupon.getId() : null; + } + + public void setCoupon(String id) { + this.coupon = ApiResource.setExpandableFieldId(id, this.coupon); + } + + /** Get expanded {@code coupon}. */ + public Coupon getCouponObject() { + return (this.coupon != null) ? this.coupon.getExpanded() : null; + } + + public void setCouponObject(Coupon expandableObject) { + this.coupon = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** * For more details about Restrictions, please refer to the API Reference. @@ -369,8 +403,8 @@ public static class CurrencyOption extends StripeObject { @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); - trySetResponseGetter(coupon, responseGetter); trySetResponseGetter(customer, responseGetter); + trySetResponseGetter(promotion, responseGetter); trySetResponseGetter(restrictions, responseGetter); } } diff --git a/src/main/java/com/stripe/model/Quote.java b/src/main/java/com/stripe/model/Quote.java index 98666a51950..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, @@ -1466,6 +1473,9 @@ public static class SubscriptionData extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BillingMode extends StripeObject { + @SerializedName("flexible") + Flexible flexible; + /** * Controls how prorations and invoices for subscriptions are calculated and orchestrated. * @@ -1473,6 +1483,23 @@ public static class BillingMode extends StripeObject { */ @SerializedName("type") String type; + + /** + * For more details about Flexible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flexible extends StripeObject { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + * + *

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } } } @@ -1529,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 d4fde53341b..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; @@ -625,6 +625,9 @@ public static class DestinationDetails extends StripeObject { @SerializedName("cashapp") Cashapp cashapp; + @SerializedName("crypto") + Crypto crypto; + @SerializedName("customer_cash_balance") CustomerCashBalance customerCashBalance; @@ -649,6 +652,9 @@ public static class DestinationDetails extends StripeObject { @SerializedName("klarna") Klarna klarna; + @SerializedName("mb_way") + MbWay mbWay; + @SerializedName("multibanco") Multibanco multibanco; @@ -682,6 +688,9 @@ public static class DestinationDetails extends StripeObject { @SerializedName("th_bank_transfer") ThBankTransfer thBankTransfer; + @SerializedName("twint") + Twint twint; + /** * The type of transaction-specific details of the payment method used in the refund (e.g., * {@code card}). An additional hash is included on {@code destination_details} with a name @@ -841,6 +850,19 @@ public static class Card extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Cashapp extends StripeObject {} + /** + * For more details about Crypto, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Crypto extends StripeObject { + /** The transaction hash of the refund. */ + @SerializedName("reference") + String reference; + } + /** * For more details about CustomerCashBalance, please refer to the API Reference. @@ -946,6 +968,26 @@ public static class JpBankTransfer extends StripeObject { @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject {} + /** + * For more details about MbWay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MbWay extends StripeObject { + /** The reference assigned to the refund. */ + @SerializedName("reference") + String reference; + + /** + * Status of the reference on the refund. This can be {@code pending}, {@code available} or + * {@code unavailable}. + */ + @SerializedName("reference_status") + String referenceStatus; + } + /** * For more details about Multibanco, please refer to the API Reference. @@ -1114,6 +1156,15 @@ public static class ThBankTransfer extends StripeObject { String referenceStatus; } + /** + * For more details about Twint, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Twint extends StripeObject {} + /** * For more details about UsBankTransfer, please refer to the API Reference. 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 1127c8a5486..3d7a6f58788 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; @@ -662,7 +673,7 @@ public static class ThreeDSecure extends StripeObject { /** * The version of 3D Secure that was used. * - *

One of {@code 1.0.2}, {@code 2.1.0}, or {@code 2.2.0}. + *

One of {@code 1.0.2}, {@code 2.1.0}, {@code 2.2.0}, {@code 2.3.0}, or {@code 2.3.1}. */ @SerializedName("version") String version; @@ -787,10 +798,11 @@ public static class Cashapp extends StripeObject {} @EqualsAndHashCode(callSuper = false) 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 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}. + * The customer's bank. Can be one of {@code abn_amro}, {@code adyen}, {@code asn_bank}, + * {@code bunq}, {@code 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; @@ -798,10 +810,11 @@ public static class Ideal extends StripeObject { /** * The Bank Identifier Code of the customer's bank. * - *

One of {@code ABNANL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code BUNQNL2A}, {@code - * BUUTNL2A}, {@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}. + *

One of {@code ABNANL2A}, {@code ADYBNL2A}, {@code ASNBNL21}, {@code BITSNL2A}, {@code + * BUNQNL2A}, {@code BUUTNL2A}, {@code FNOMNL22}, {@code FVLBNL22}, {@code HANDNL2A}, {@code + * INGBNL2A}, {@code 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 7593c837533..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,10 +107,23 @@ 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; + /** Payment method types that are excluded from this SetupIntent. */ + @SerializedName("excluded_payment_method_types") + List excludedPaymentMethodTypes; + /** * Indicates the directions of money movement for which this payment method is intended to be * used. @@ -153,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. */ @@ -195,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") @@ -220,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}. */ @@ -839,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. * @@ -1031,6 +1042,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -1165,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. * @@ -1309,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 d02f94fcd5a..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; @@ -1146,8 +1146,8 @@ public static class Redirect extends StripeObject { /** * The status of the redirect, either {@code pending} (ready to be used by your customer to - * authenticate the transaction), {@code succeeded} (succesful authentication, cannot be reused) - * or {@code not_required} (redirect should not be used) or {@code failed} (failed + * authenticate the transaction), {@code succeeded} (successful authentication, cannot be + * reused) or {@code not_required} (redirect should not be used) or {@code failed} (failed * authentication, cannot be reused). */ @SerializedName("status") 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/StripeContextDeserializer.java b/src/main/java/com/stripe/model/StripeContextDeserializer.java new file mode 100644 index 00000000000..3f9c21d5943 --- /dev/null +++ b/src/main/java/com/stripe/model/StripeContextDeserializer.java @@ -0,0 +1,26 @@ +package com.stripe.model; + +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonParseException; +import com.stripe.StripeContext; +import java.lang.reflect.Type; + +public class StripeContextDeserializer implements JsonDeserializer { + + @Override + public StripeContext deserialize( + JsonElement json, Type typeOfT, JsonDeserializationContext context) + throws JsonParseException { + if (json == null || json.isJsonNull()) { + return null; + } + + String contextString = json.getAsString().trim(); + if (contextString.isEmpty()) { + return null; + } + return StripeContext.parse(contextString); + } +} diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index e287d7944bf..9b94fbe4faf 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}, @@ -46,11 +47,13 @@ public class StripeError extends StripeObject { * customer_max_payment_methods}, {@code customer_max_subscriptions}, {@code * customer_session_expired}, {@code customer_tax_location_invalid}, {@code debit_not_authorized}, * {@code email_invalid}, {@code expired_card}, {@code financial_connections_account_inactive}, - * {@code financial_connections_no_successful_transaction_refresh}, {@code - * forwarding_api_inactive}, {@code forwarding_api_invalid_parameter}, {@code - * forwarding_api_retryable_upstream_error}, {@code forwarding_api_upstream_connection_error}, - * {@code forwarding_api_upstream_connection_timeout}, {@code forwarding_api_upstream_error}, - * {@code idempotency_key_in_use}, {@code incorrect_address}, {@code incorrect_cvc}, {@code + * {@code financial_connections_account_pending_account_numbers}, {@code + * financial_connections_account_unavailable_account_numbers}, {@code + * financial_connections_no_successful_transaction_refresh}, {@code forwarding_api_inactive}, + * {@code forwarding_api_invalid_parameter}, {@code forwarding_api_retryable_upstream_error}, + * {@code forwarding_api_upstream_connection_error}, {@code + * forwarding_api_upstream_connection_timeout}, {@code forwarding_api_upstream_error}, {@code + * idempotency_key_in_use}, {@code incorrect_address}, {@code incorrect_cvc}, {@code * incorrect_number}, {@code incorrect_zip}, {@code india_recurring_payment_mandate_canceled}, * {@code instant_payouts_config_disabled}, {@code instant_payouts_currency_disabled}, {@code * instant_payouts_limit_exceeded}, {@code instant_payouts_unsupported}, {@code @@ -72,12 +75,12 @@ public class StripeError extends StripeObject { * {@code payment_intent_invalid_parameter}, {@code * payment_intent_konbini_rejected_confirmation_number}, {@code payment_intent_mandate_invalid}, * {@code payment_intent_payment_attempt_expired}, {@code payment_intent_payment_attempt_failed}, - * {@code payment_intent_unexpected_state}, {@code payment_method_bank_account_already_verified}, - * {@code payment_method_bank_account_blocked}, {@code - * payment_method_billing_details_address_missing}, {@code payment_method_configuration_failures}, - * {@code payment_method_currency_mismatch}, {@code payment_method_customer_decline}, {@code - * payment_method_invalid_parameter}, {@code payment_method_invalid_parameter_testmode}, {@code - * payment_method_microdeposit_failed}, {@code + * {@code payment_intent_rate_limit_exceeded}, {@code payment_intent_unexpected_state}, {@code + * payment_method_bank_account_already_verified}, {@code payment_method_bank_account_blocked}, + * {@code payment_method_billing_details_address_missing}, {@code + * payment_method_configuration_failures}, {@code payment_method_currency_mismatch}, {@code + * payment_method_customer_decline}, {@code payment_method_invalid_parameter}, {@code + * payment_method_invalid_parameter_testmode}, {@code payment_method_microdeposit_failed}, {@code * payment_method_microdeposit_verification_amounts_invalid}, {@code * payment_method_microdeposit_verification_amounts_mismatch}, {@code * payment_method_microdeposit_verification_attempts_exceeded}, {@code @@ -89,15 +92,16 @@ public class StripeError extends StripeObject { * payouts_limit_exceeded}, {@code payouts_not_allowed}, {@code platform_account_required}, {@code * platform_api_key_expired}, {@code postal_code_invalid}, {@code processing_error}, {@code * product_inactive}, {@code progressive_onboarding_limit_exceeded}, {@code rate_limit}, {@code - * refer_to_customer}, {@code refund_disputed_payment}, {@code resource_already_exists}, {@code - * resource_missing}, {@code return_intent_already_processed}, {@code routing_number_invalid}, - * {@code secret_key_required}, {@code sepa_unsupported_account}, {@code setup_attempt_failed}, - * {@code setup_intent_authentication_failure}, {@code setup_intent_invalid_parameter}, {@code - * setup_intent_mandate_invalid}, {@code setup_intent_mobile_wallet_unsupported}, {@code - * setup_intent_setup_attempt_expired}, {@code setup_intent_unexpected_state}, {@code - * shipping_address_invalid}, {@code shipping_calculation_failed}, {@code sku_inactive}, {@code - * state_unsupported}, {@code status_transition_invalid}, {@code stripe_tax_inactive}, {@code - * tax_id_invalid}, {@code tax_id_prohibited}, {@code taxes_calculation_failed}, {@code + * refer_to_customer}, {@code refund_disputed_payment}, {@code request_blocked}, {@code + * resource_already_exists}, {@code resource_missing}, {@code return_intent_already_processed}, + * {@code routing_number_invalid}, {@code secret_key_required}, {@code sepa_unsupported_account}, + * {@code setup_attempt_failed}, {@code setup_intent_authentication_failure}, {@code + * setup_intent_invalid_parameter}, {@code setup_intent_mandate_invalid}, {@code + * setup_intent_mobile_wallet_unsupported}, {@code setup_intent_setup_attempt_expired}, {@code + * setup_intent_unexpected_state}, {@code shipping_address_invalid}, {@code + * shipping_calculation_failed}, {@code sku_inactive}, {@code state_unsupported}, {@code + * status_transition_invalid}, {@code stripe_tax_inactive}, {@code tax_id_invalid}, {@code + * tax_id_prohibited}, {@code taxes_calculation_failed}, {@code * terminal_location_country_unsupported}, {@code terminal_reader_busy}, {@code * terminal_reader_hardware_fault}, {@code terminal_reader_invalid_location_for_activation}, * {@code terminal_reader_invalid_location_for_payment}, {@code terminal_reader_offline}, {@code @@ -111,14 +115,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") @@ -159,11 +163,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") @@ -171,11 +175,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") @@ -196,8 +200,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 @@ -211,11 +214,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 4649031b54d..e5486348fe1 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) @@ -202,7 +206,10 @@ 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 +249,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 +260,7 @@ public class Subscription extends ApiResource implements HasId, MetadataStorepausing + * about pausing * collection. */ @SerializedName("pause_collection") @@ -265,18 +272,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 +292,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 +327,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} @@ -1401,6 +1408,10 @@ public static class BillingCycleAnchorConfig extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BillingMode extends StripeObject { + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Controls how prorations and invoices for subscriptions are calculated and orchestrated. * @@ -1412,6 +1423,23 @@ public static class BillingMode extends StripeObject { /** Details on when the current billing_mode was adopted. */ @SerializedName("updated_at") Long updatedAt; + + /** + * For more details about Flexible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flexible extends StripeObject { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + * + *

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } } /** @@ -1670,6 +1698,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. @@ -1760,10 +1795,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. * @@ -1869,6 +1904,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. @@ -2006,7 +2088,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 f014e1895f4..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}. @@ -564,6 +568,10 @@ public SubscriptionSchedule update( @Setter @EqualsAndHashCode(callSuper = false) public static class BillingMode extends StripeObject { + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Controls how prorations and invoices for subscriptions are calculated and orchestrated. * @@ -575,6 +583,23 @@ public static class BillingMode extends StripeObject { /** Details on when the current billing_mode was adopted. */ @SerializedName("updated_at") Long updatedAt; + + /** + * For more details about Flexible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flexible extends StripeObject { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + * + *

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } } /** @@ -618,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}. */ @@ -995,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}. */ @@ -1076,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}. @@ -1168,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. */ @@ -1674,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..fc29f689840 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; @@ -87,13 +91,13 @@ public class TaxId extends ApiResource implements HasId { * kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code * my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, - * {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, - * {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code - * us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code - * za_vat}, {@code zm_tin}, or {@code zw_tin}. Note that some legacy tax IDs have type {@code - * unknown} + * {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, + * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code + * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code + * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin}. Note that some legacy tax IDs have + * type {@code unknown} */ @SerializedName("type") String type; @@ -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/ThinEvent.java b/src/main/java/com/stripe/model/ThinEvent.java deleted file mode 100644 index 5b7bd129c17..00000000000 --- a/src/main/java/com/stripe/model/ThinEvent.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.stripe.model; - -import com.google.gson.annotations.SerializedName; -import java.time.Instant; -import lombok.Getter; - -/** - * ThinEvent represents the json that's delivered from an Event Destination. It's a basic class with - * no additional methods or properties. Use it to check basic information about a delivered event. - * If you want more details, use `stripeClient.v2().core().events().retrieve(thin_event.id)` to - * fetch the full event object. - */ -@Getter -public class ThinEvent { - /** Unique identifier for the event. */ - @SerializedName("id") - public String id; - - /** The type of the event. */ - @SerializedName("type") - public String type; - - /** Time at which the object was created. */ - @SerializedName("created") - public Instant created; - - /** Livemode indicates if the event is from a production(true) or test(false) account. */ - @SerializedName("livemode") - public Boolean livemode; - - /** [Optional] Authentication context needed to fetch the event or related object. */ - @SerializedName("context") - public String context; - - /** [Optional] Object containing the reference to API resource relevant to the event. */ - @SerializedName("related_object") - public ThinEventRelatedObject relatedObject; - - /** [Optional] Reason for the event. */ - @SerializedName("reason") - public com.stripe.model.v2.Event.Reason reason; -} diff --git a/src/main/java/com/stripe/model/ThinEventRelatedObject.java b/src/main/java/com/stripe/model/ThinEventRelatedObject.java deleted file mode 100644 index 48ea526eca3..00000000000 --- a/src/main/java/com/stripe/model/ThinEventRelatedObject.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.stripe.model; - -import com.google.gson.annotations.SerializedName; -import lombok.Getter; - -@Getter -public class ThinEventRelatedObject { - @SerializedName("id") - public String id; - - @SerializedName("type") - public String type; - - @SerializedName("url") - public String url; -} 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 29ef889e4f0..39265c25e8a 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -24,7 +24,11 @@ import lombok.Getter; import lombok.Setter; -/** A portal configuration describes the functionality and behavior of a portal session. */ +/** + * A portal configuration describes the functionality and behavior you embed in a portal session. + * Related guide: Configure the + * customer portal. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -49,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") @@ -82,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. */ @@ -361,6 +365,15 @@ public static class PaymentMethodUpdate extends StripeObject { /** Whether the feature is enabled. */ @SerializedName("enabled") Boolean enabled; + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able to + * update their payment method to one of the options specified by the payment method + * configuration. If not set, the default payment method configuration is used. + */ + @SerializedName("payment_method_configuration") + String paymentMethodConfiguration; } /** @@ -421,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. @@ -449,6 +474,16 @@ public static class SubscriptionUpdate extends StripeObject { @SerializedName("schedule_at_period_end") ScheduleAtPeriodEnd scheduleAtPeriodEnd; + /** + * Determines how handle updates to trialing subscriptions. Valid values are {@code end_trial} + * and {@code continue_trial}. Defaults to a value of {@code end_trial} if you don't set it + * during creation. + * + *

One of {@code continue_trial}, or {@code end_trial}. + */ + @SerializedName("trial_update_behavior") + String trialUpdateBehavior; + /** * For more details about Product, please refer to the API Reference. @@ -544,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 d767167fe2d..acdb3b0d847 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 @@ -94,6 +94,9 @@ public class Session extends ApiResource implements HasId, MetadataStoreinitCheckout on your + * secret with initCheckout on your * front end. */ @SerializedName("client_secret") @@ -154,7 +157,7 @@ public class Session extends ApiResource implements HasId, MetadataStore customFields; @@ -173,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. * @@ -201,6 +208,15 @@ public class Session extends ApiResource implements HasId, MetadataStore discounts; + /** + * A list of the types of payment methods (e.g., {@code card}) that should be excluded from this + * Checkout Session. This should only be used when payment methods for this Checkout Session are + * managed through the Stripe + * Dashboard. + */ + @SerializedName("excluded_payment_method_types") + List excludedPaymentMethodTypes; + /** The timestamp at which the Checkout Session will expire. */ @SerializedName("expires_at") Long expiresAt; @@ -246,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. */ @@ -262,6 +278,9 @@ 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") @@ -357,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}. @@ -383,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") @@ -422,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") @@ -455,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. */ @@ -817,8 +836,8 @@ public static Session retrieve( /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ @Override public Session update(Map params) throws StripeException { @@ -828,8 +847,8 @@ public Session update(Map params) throws StripeException { /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ @Override public Session update(Map params, RequestOptions options) throws StripeException { @@ -842,8 +861,8 @@ public Session update(Map params, RequestOptions options) throws /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(SessionUpdateParams params) throws StripeException { return update(params, (RequestOptions) null); @@ -852,8 +871,8 @@ public Session update(SessionUpdateParams params) throws StripeException { /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(SessionUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v1/checkout/sessions/%s", ApiResource.urlEncodeId(this.getId())); @@ -1007,6 +1026,106 @@ public void setAccountObject(Account expandableObject) { } } + /** + * For more details about BrandingSettings, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BrandingSettings extends StripeObject { + /** + * A hex color value starting with {@code #} representing the background color for the Checkout + * Session. + */ + @SerializedName("background_color") + String backgroundColor; + + /** + * The border style for the Checkout Session. Must be one of {@code rounded}, {@code + * rectangular}, or {@code pill}. + */ + @SerializedName("border_style") + String borderStyle; + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + @SerializedName("button_color") + String buttonColor; + + /** The display name shown on the Checkout Session. */ + @SerializedName("display_name") + String displayName; + + /** + * The font family for the Checkout Session. Must be one of the supported + * font families. + */ + @SerializedName("font_family") + String fontFamily; + + /** The icon for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("icon") + Icon icon; + + /** The logo for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("logo") + Logo logo; + + /** + * For more details about Icon, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Icon extends StripeObject { + /** + * The ID of a File upload representing the + * icon. Purpose must be {@code business_icon}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** The type of image for the icon. Must be one of {@code file} or {@code url}. */ + @SerializedName("type") + String type; + + /** The URL of the image. Present when {@code type} is {@code url}. */ + @SerializedName("url") + String url; + } + + /** + * For more details about Logo, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Logo extends StripeObject { + /** + * The ID of a File upload representing the + * logo. Purpose must be {@code business_logo}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** The type of image for the logo. Must be one of {@code file} or {@code url}. */ + @SerializedName("type") + String type; + + /** The URL of the image. Present when {@code type} is {@code url}. */ + @SerializedName("url") + String url; + } + } + /** * For more details about CollectedInformation, please refer to the API Reference. @@ -1015,6 +1134,14 @@ public void setAccountObject(Account expandableObject) { @Setter @EqualsAndHashCode(callSuper = false) public static class CollectedInformation extends StripeObject { + /** Customer’s business name for this Checkout Session. */ + @SerializedName("business_name") + String businessName; + + /** Customer’s individual name for this Checkout Session. */ + @SerializedName("individual_name") + String individualName; + /** Shipping information for this Checkout Session. */ @SerializedName("shipping_details") ShippingDetails shippingDetails; @@ -1394,6 +1521,10 @@ public static class CustomerDetails extends StripeObject { @SerializedName("address") Address address; + /** The customer's business name after a completed Checkout Session. */ + @SerializedName("business_name") + String businessName; + /** * The email associated with the Customer, if one exists, on the Checkout Session after a * completed Checkout Session or at time of session expiry. Otherwise, if the customer has @@ -1403,6 +1534,10 @@ public static class CustomerDetails extends StripeObject { @SerializedName("email") String email; + /** The customer's individual name after a completed Checkout Session. */ + @SerializedName("individual_name") + String individualName; + /** * The customer's name after a completed Checkout Session. Note: This property is populated only * for sessions on or after March 30, 2022. @@ -1442,20 +1577,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code - * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, - * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code - * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, - * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code - * ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, - * {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code - * md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code + * ca_qst}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, + * {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code + * id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, + * {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code + * eg_tin}, {@code ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, + * {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code + * uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; @@ -1571,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. */ @@ -1705,6 +1840,61 @@ public static class RenderingOptions extends StripeObject { } } + /** + * For more details about NameCollection, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection extends StripeObject { + @SerializedName("business") + Business business; + + @SerializedName("individual") + Individual individual; + + /** + * For more details about Business, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Business extends StripeObject { + /** Indicates whether business name collection is enabled for the session. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + + /** + * For more details about Individual, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Individual extends StripeObject { + /** Indicates whether individual name collection is enabled for the session. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + } + /** * For more details about OptionalItem, please refer to the API Reference. @@ -1790,6 +1980,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("alipay") Alipay alipay; + @SerializedName("alma") + Alma alma; + @SerializedName("amazon_pay") AmazonPay amazonPay; @@ -1802,6 +1995,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("bancontact") Bancontact bancontact; + @SerializedName("billie") + Billie billie; + @SerializedName("boleto") Boleto boleto; @@ -1868,6 +2064,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("payto") + Payto payto; + @SerializedName("pix") Pix pix; @@ -1877,6 +2076,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("samsung_pay") SamsungPay samsungPay; + @SerializedName("satispay") + Satispay satispay; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -1886,6 +2088,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("swish") Swish swish; + @SerializedName("twint") + Twint twint; + @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -2000,6 +2205,14 @@ public static class MandateOptions extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Affirm extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2033,6 +2246,14 @@ public static class Affirm extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class AfterpayClearpay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2091,6 +2312,23 @@ public static class Alipay extends StripeObject { String setupFutureUsage; } + /** + * For more details about Alma, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Alma extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about AmazonPay, please refer to the API Reference. @@ -2099,6 +2337,14 @@ public static class Alipay extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class AmazonPay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2259,6 +2505,23 @@ public static class Bancontact extends StripeObject { String setupFutureUsage; } + /** + * For more details about Billie, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Billie extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about Boleto, please refer to the API * Reference. @@ -2308,6 +2571,14 @@ public static class Boleto extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Card extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + @SerializedName("installments") Installments installments; @@ -2351,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. * @@ -2449,6 +2720,14 @@ public static class Restrictions extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Cashapp extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2784,6 +3063,14 @@ public static class KakaoPay extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2900,6 +3187,14 @@ public static class KrCard extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Link extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -2933,6 +3228,14 @@ public static class Link extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Mobilepay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -3209,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. @@ -3262,6 +3668,14 @@ public static class Pix extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class RevolutPay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -3304,6 +3718,23 @@ public static class SamsungPay extends StripeObject { String captureMethod; } + /** + * For more details about Satispay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Satispay extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about SepaDebit, please refer to the API Reference. @@ -3414,6 +3845,39 @@ public static class Swish extends StripeObject { String reference; } + /** + * For more details about Twint, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Twint extends StripeObject { + /** + * 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. + * + *

Equal to {@code none}. + */ + @SerializedName("setup_future_usage") + String setupFutureUsage; + } + /** * For more details about UsBankAccount, please refer to the API Reference. @@ -3826,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") @@ -3917,6 +4381,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(adaptivePricing, responseGetter); trySetResponseGetter(afterExpiration, responseGetter); trySetResponseGetter(automaticTax, responseGetter); + trySetResponseGetter(brandingSettings, responseGetter); trySetResponseGetter(collectedInformation, responseGetter); trySetResponseGetter(consent, responseGetter); trySetResponseGetter(consentCollection, responseGetter); @@ -3927,6 +4392,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(invoice, responseGetter); trySetResponseGetter(invoiceCreation, responseGetter); trySetResponseGetter(lineItems, responseGetter); + trySetResponseGetter(nameCollection, responseGetter); trySetResponseGetter(paymentIntent, responseGetter); trySetResponseGetter(paymentLink, responseGetter); trySetResponseGetter(paymentMethodConfigurationDetails, responseGetter); 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 3e79be1330e..a12b1e9c935 100644 --- a/src/main/java/com/stripe/model/financialconnections/Account.java +++ b/src/main/java/com/stripe/model/financialconnections/Account.java @@ -38,6 +38,10 @@ public class Account extends ApiResource implements HasId { @SerializedName("account_holder") AccountHolder accountHolder; + /** Details about the account numbers. */ + @SerializedName("account_numbers") + List accountNumbers; + /** The most recent information about the account's balance. */ @SerializedName("balance") Balance balance; @@ -135,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") @@ -393,7 +397,7 @@ public static com.stripe.model.financialconnections.Account retrieve( /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public com.stripe.model.financialconnections.Account subscribe(Map params) throws StripeException { @@ -402,7 +406,7 @@ public com.stripe.model.financialconnections.Account subscribe(Map params, RequestOptions options) throws StripeException { @@ -418,7 +422,7 @@ public com.stripe.model.financialconnections.Account subscribe( /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public com.stripe.model.financialconnections.Account subscribe(AccountSubscribeParams params) throws StripeException { @@ -427,7 +431,7 @@ public com.stripe.model.financialconnections.Account subscribe(AccountSubscribeP /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public com.stripe.model.financialconnections.Account subscribe( AccountSubscribeParams params, RequestOptions options) throws StripeException { @@ -512,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") @@ -521,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. * @@ -575,6 +582,39 @@ public void setCustomerObject(Customer expandableObject) { } } + /** + * For more details about AccountNumber, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountNumber extends StripeObject { + /** When the account number is expected to expire, if applicable. */ + @SerializedName("expected_expiry_date") + Long expectedExpiryDate; + + /** + * The type of account number associated with the account. + * + *

One of {@code account_number}, or {@code tokenized_account_number}. + */ + @SerializedName("identifier_type") + String identifierType; + + /** + * Whether the account number is currently active and usable for transactions. + * + *

One of {@code deactivated}, or {@code transactable}. + */ + @SerializedName("status") + String status; + + /** The payment networks that the account number can be used for. */ + @SerializedName("supported_networks") + List supportedNetworks; + } + /** * For more details about Balance, please refer to the API * Reference. 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 979aff4b95e..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") @@ -104,6 +104,13 @@ public class Card extends ApiResource implements HasId, MetadataStore { @SerializedName("last4") String last4; + /** + * Stripe’s assessment of whether this card’s details have been compromised. If this property + * isn't null, cancel and reissue the card to prevent fraudulent activity risk. + */ + @SerializedName("latest_fraud_warning") + LatestFraudWarning latestFraudWarning; + /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. @@ -112,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. */ @@ -123,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") @@ -165,6 +172,10 @@ public class Card extends ApiResource implements HasId, MetadataStore { @SerializedName("replacement_reason") String replacementReason; + /** Text separate from cardholder name, printed on the card. */ + @SerializedName("second_line") + String secondLine; + /** Where and how the card will be shipped. */ @SerializedName("shipping") Shipping shipping; @@ -408,6 +419,30 @@ public Card update(CardUpdateParams params, RequestOptions options) throws Strip return getResponseGetter().request(request, Card.class); } + /** + * For more details about LatestFraudWarning, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LatestFraudWarning extends StripeObject { + /** Timestamp of the most recent fraud warning. */ + @SerializedName("started_at") + Long startedAt; + + /** + * The type of fraud warning that most recently took place on this card. This field updates with + * every new fraud warning, so the value changes over time. If populated, cancel and reissue the + * card. + * + *

One of {@code card_testing_exposure}, {@code fraud_dispute_filed}, {@code + * third_party_reported}, or {@code user_indicated_fraud}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Shipping, please refer to the API * Reference. @@ -556,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}. */ @@ -574,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}. */ @@ -614,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") @@ -1037,6 +1072,7 @@ public Card submitCard(CardSubmitCardParams params, RequestOptions options) public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(cardholder, responseGetter); + trySetResponseGetter(latestFraudWarning, responseGetter); trySetResponseGetter(personalizationDesign, responseGetter); trySetResponseGetter(replacedBy, responseGetter); trySetResponseGetter(replacementFor, responseGetter); 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/PaymentEvaluation.java b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java new file mode 100644 index 00000000000..87e169804d9 --- /dev/null +++ b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java @@ -0,0 +1,800 @@ +// File generated from our OpenAPI spec +package com.stripe.model.radar; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.ExpandableField; +import com.stripe.model.HasId; +import com.stripe.model.PaymentMethod; +import com.stripe.model.StripeObject; +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.radar.PaymentEvaluationCreateParams; +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * Payment Evaluations represent the risk lifecycle of an externally processed payment. It includes + * the Radar risk score from Stripe, payment outcome taken by the merchant or processor, and any + * post transaction events, such as refunds or disputes. See the Radar API guide for integration steps. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class PaymentEvaluation extends ApiResource implements HasId { + /** Client device metadata attached to this payment evaluation. */ + @SerializedName("client_device_metadata_details") + ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ + @SerializedName("created_at") + Long createdAt; + + /** Customer details attached to this payment evaluation. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** + * Event information associated with the payment evaluation, such as refunds, dispute, early fraud + * warnings, or user interventions. + */ + @SerializedName("events") + List events; + + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** Collection of scores and insights for this payment evaluation. */ + @SerializedName("insights") + Insights insights; + + /** + * 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. + * + *

Equal to {@code radar.payment_evaluation}. + */ + @SerializedName("object") + String object; + + /** Indicates the final outcome for the payment evaluation. */ + @SerializedName("outcome") + Outcome outcome; + + /** Payment details attached to this payment evaluation. */ + @SerializedName("payment_details") + PaymentDetails paymentDetails; + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create(Map params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/radar/payment_evaluations"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, PaymentEvaluation.class); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create(PaymentEvaluationCreateParams params) + throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public static PaymentEvaluation create( + PaymentEvaluationCreateParams params, RequestOptions options) throws StripeException { + String path = "/v1/radar/payment_evaluations"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentEvaluation.class); + } + + /** Client device metadata attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ClientDeviceMetadataDetails extends StripeObject { + /** + * ID for the Radar Session associated with the payment evaluation. A Radar Session is a snapshot of the + * browser metadata and device details that help Radar make more accurate predictions on your + * payments. + */ + @SerializedName("radar_session") + String radarSession; + } + + /** Customer details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails extends StripeObject { + /** The ID of the customer associated with the payment evaluation. */ + @SerializedName("customer") + String customer; + + /** The ID of the Account representing the customer associated with the payment evaluation. */ + @SerializedName("customer_account") + String customerAccount; + + /** The customer's email address. */ + @SerializedName("email") + String email; + + /** The customer's full name or business name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + } + + /** Event reported for this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Event extends StripeObject { + /** Dispute opened event details attached to this payment evaluation. */ + @SerializedName("dispute_opened") + DisputeOpened disputeOpened; + + /** Early Fraud Warning Received event details attached to this payment evaluation. */ + @SerializedName("early_fraud_warning_received") + EarlyFraudWarningReceived earlyFraudWarningReceived; + + /** Timestamp when the event occurred. */ + @SerializedName("occurred_at") + Long occurredAt; + + /** Refunded Event details attached to this payment evaluation. */ + @SerializedName("refunded") + Refunded refunded; + + /** + * Indicates the type of event attached to the payment evaluation. + * + *

One of {@code dispute_opened}, {@code early_fraud_warning_received}, {@code refunded}, + * {@code user_intervention_raised}, or {@code user_intervention_resolved}. + */ + @SerializedName("type") + String type; + + /** User intervention raised event details attached to this payment evaluation. */ + @SerializedName("user_intervention_raised") + UserInterventionRaised userInterventionRaised; + + /** User Intervention Resolved Event details attached to this payment evaluation. */ + @SerializedName("user_intervention_resolved") + UserInterventionResolved userInterventionResolved; + + /** Dispute opened event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisputeOpened extends StripeObject { + /** + * Amount to dispute for this payment. A positive integer representing how much to charge in + * the smallest currency unit + * (for example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal + * currency). + */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Reason given by cardholder for dispute. + * + *

One of {@code account_not_available}, {@code credit_not_processed}, {@code + * customer_initiated}, {@code duplicate}, {@code fraudulent}, {@code general}, {@code + * noncompliant}, {@code product_not_received}, {@code product_unacceptable}, {@code + * subscription_canceled}, or {@code unrecognized}. + */ + @SerializedName("reason") + String reason; + } + + /** Early Fraud Warning Received event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EarlyFraudWarningReceived extends StripeObject { + /** + * The type of fraud labeled by the issuer. + * + *

One of {@code made_with_lost_card}, {@code made_with_stolen_card}, {@code other}, or + * {@code unauthorized_use_of_card}. + */ + @SerializedName("fraud_type") + String fraudType; + } + + /** Refunded Event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Refunded extends StripeObject { + /** + * Amount refunded for this payment. A positive integer representing how much to charge in the smallest currency unit (for + * example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** + * Indicates the reason for the refund. + * + *

One of {@code duplicate}, {@code fraudulent}, {@code other}, or {@code + * requested_by_customer}. + */ + @SerializedName("reason") + String reason; + } + + /** User intervention raised event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserInterventionRaised extends StripeObject { + /** User intervention raised custom event details attached to this payment evaluation. */ + @SerializedName("custom") + Custom custom; + + /** Unique identifier for the user intervention event. */ + @SerializedName("key") + String key; + + /** + * Type of user intervention raised. + * + *

One of {@code 3ds}, {@code captcha}, or {@code custom}. + */ + @SerializedName("type") + String type; + + /** User intervention raised custom event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Custom extends StripeObject { + /** + * Custom type of user intervention raised. The string must use a snake case description for + * the type of intervention performed. + */ + @SerializedName("type") + String type; + } + } + + /** User Intervention Resolved Event details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserInterventionResolved extends StripeObject { + /** Unique ID of this intervention. Use this to provide the result. */ + @SerializedName("key") + String key; + + /** + * Result of the intervention if it has been completed. + * + *

One of {@code abandoned}, {@code failed}, or {@code passed}. + */ + @SerializedName("outcome") + String outcome; + } + } + + /** Collection of scores and insights for this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Insights extends StripeObject { + /** Stripe Radar's evaluation of the likelihood of a card issuer decline on this payment. */ + @SerializedName("card_issuer_decline") + CardIssuerDecline cardIssuerDecline; + + /** The timestamp when the evaluation was performed. */ + @SerializedName("evaluated_at") + Long evaluatedAt; + + /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */ + @SerializedName("fraudulent_dispute") + FraudulentDispute fraudulentDispute; + + /** + * Provides Stripe Radar's evaluation of the likelihood that a payment will be declined by the + * card issuer. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CardIssuerDecline extends StripeObject { + /** + * Stripe Radar's evaluation of the likelihood that the payment will be declined by the card + * issuer. Scores range from 0 to 100, with higher values indicating a higher likelihood of + * decline. + */ + @SerializedName("model_score") + BigDecimal modelScore; + + /** + * Recommended action based on the model score. Possible values are {@code block} and {@code + * continue}. + * + *

One of {@code block}, or {@code continue}. + */ + @SerializedName("recommended_action") + String recommendedAction; + } + + /** Scores, insights and recommended action for one scorer for this PaymentEvaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FraudulentDispute extends StripeObject { + /** + * Recommended action based on the risk score. Possible values are {@code block} and {@code + * continue}. + * + *

One of {@code block}, or {@code continue}. + */ + @SerializedName("recommended_action") + String recommendedAction; + + /** + * Stripe Radar’s evaluation of the risk level of the payment. Possible values for evaluated + * payments are between 0 and 100, with higher scores indicating higher risk. + */ + @SerializedName("risk_score") + Long riskScore; + } + } + + /** Outcome details for this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Outcome extends StripeObject { + /** Details of a merchant_blocked outcome attached to this payment evaluation. */ + @SerializedName("merchant_blocked") + MerchantBlocked merchantBlocked; + + /** The PaymentIntent ID associated with the payment evaluation. */ + @SerializedName("payment_intent_id") + String paymentIntentId; + + /** Details of an rejected outcome attached to this payment evaluation. */ + @SerializedName("rejected") + Rejected rejected; + + /** Details of a succeeded outcome attached to this payment evaluation. */ + @SerializedName("succeeded") + Succeeded succeeded; + + /** + * Indicates the outcome of the payment evaluation. + * + *

One of {@code failed}, {@code merchant_blocked}, {@code rejected}, or {@code succeeded}. + */ + @SerializedName("type") + String type; + + /** Details of a merchant_blocked outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MerchantBlocked extends StripeObject { + /** + * The reason the payment was blocked by the merchant. + * + *

One of {@code authentication_required}, {@code blocked_for_fraud}, {@code + * invalid_payment}, or {@code other}. + */ + @SerializedName("reason") + String reason; + } + + /** Details of an rejected outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Rejected extends StripeObject { + /** Details of an rejected card outcome attached to this payment evaluation. */ + @SerializedName("card") + Card card; + + /** Details of an rejected card outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Result of the address line 1 check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_line1_check") + String addressLine1Check; + + /** + * Indicates whether the cardholder provided a postal code and if it matched the + * cardholder’s billing address. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_postal_code_check") + String addressPostalCodeCheck; + + /** + * Result of the CVC check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("cvc_check") + String cvcCheck; + + /** + * Card issuer's reason for the network decline. + * + *

One of {@code authentication_failed}, {@code do_not_honor}, {@code expired}, {@code + * incorrect_cvc}, {@code incorrect_number}, {@code incorrect_postal_code}, {@code + * insufficient_funds}, {@code invalid_account}, {@code lost_card}, {@code other}, {@code + * processing_error}, {@code reported_stolen}, or {@code try_again_later}. + */ + @SerializedName("reason") + String reason; + } + } + + /** Details of a succeeded outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Succeeded extends StripeObject { + /** Details of an succeeded card outcome attached to this payment evaluation. */ + @SerializedName("card") + Card card; + + /** Details of an succeeded card outcome attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Result of the address line 1 check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_line1_check") + String addressLine1Check; + + /** + * Indicates whether the cardholder provided a postal code and if it matched the + * cardholder’s billing address. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("address_postal_code_check") + String addressPostalCodeCheck; + + /** + * Result of the CVC check. + * + *

One of {@code fail}, {@code pass}, {@code unavailable}, or {@code unchecked}. + */ + @SerializedName("cvc_check") + String cvcCheck; + } + } + } + + /** Payment details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDetails extends StripeObject { + /** + * Amount intended to be collected by this payment. A positive integer representing how 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 + * charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 + * for a USD charge of $999,999.99). + */ + @SerializedName("amount") + Long amount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String description; + + /** Details about the payment's customer presence and type. */ + @SerializedName("money_movement_details") + MoneyMovementDetails moneyMovementDetails; + + /** Details about the payment method used for the payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** Shipping details for the payment evaluation. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + /** Payment statement descriptor. */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + /** Money Movement details attached to this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MoneyMovementDetails extends StripeObject { + /** Describes card money movement details for the payment evaluation. */ + @SerializedName("card") + Card card; + + /** + * Describes the type of money movement. Currently only {@code card} is supported. + * + *

Equal to {@code card}. + */ + @SerializedName("money_movement_type") + String moneyMovementType; + + /** Money Movement card details attached to this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** + * Describes the presence of the customer during the payment. + * + *

One of {@code off_session}, or {@code on_session}. + */ + @SerializedName("customer_presence") + String customerPresence; + + /** + * Describes the type of payment. + * + *

One of {@code one_off}, {@code recurring}, {@code setup_one_off}, or {@code + * setup_recurring}. + */ + @SerializedName("payment_type") + String paymentType; + } + } + + /** Payment method details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails extends StripeObject { + /** Billing information associated with the payment evaluation. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** The payment method used in this payment evaluation. */ + @SerializedName("payment_method") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField paymentMethod; + + /** Get ID of expandable {@code paymentMethod} object. */ + public String getPaymentMethod() { + return (this.paymentMethod != null) ? this.paymentMethod.getId() : null; + } + + public void setPaymentMethod(String id) { + this.paymentMethod = ApiResource.setExpandableFieldId(id, this.paymentMethod); + } + + /** Get expanded {@code paymentMethod}. */ + public PaymentMethod getPaymentMethodObject() { + return (this.paymentMethod != null) ? this.paymentMethod.getExpanded() : null; + } + + public void setPaymentMethodObject(PaymentMethod expandableObject) { + this.paymentMethod = + new ExpandableField(expandableObject.getId(), expandableObject); + } + + /** Billing details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails extends StripeObject { + /** Address data. */ + @SerializedName("address") + Address address; + + /** Email address. */ + @SerializedName("email") + String email; + + /** Full name. */ + @SerializedName("name") + String name; + + /** Billing phone number (including extension). */ + @SerializedName("phone") + String phone; + + /** Address data. */ + @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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + } + } + } + + /** Shipping details attached to this payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails extends StripeObject { + /** Address data. */ + @SerializedName("address") + Address address; + + /** Shipping name. */ + @SerializedName("name") + String name; + + /** Shipping phone number. */ + @SerializedName("phone") + String phone; + + /** Address data. */ + @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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @SerializedName("state") + String state; + } + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(clientDeviceMetadataDetails, responseGetter); + trySetResponseGetter(customerDetails, responseGetter); + trySetResponseGetter(insights, responseGetter); + trySetResponseGetter(outcome, responseGetter); + trySetResponseGetter(paymentDetails, responseGetter); + } +} 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 new file mode 100644 index 00000000000..09d9454ff42 --- /dev/null +++ b/src/main/java/com/stripe/model/tax/Association.java @@ -0,0 +1,147 @@ +// 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.HasId; +import com.stripe.model.StripeObject; +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.param.tax.AssociationFindParams; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** + * A Tax Association exposes the Tax Transactions that Stripe attempted to create on your behalf + * based on the PaymentIntent input. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Association extends ApiResource implements HasId { + /** + * The Tax Calculation that was + * included in PaymentIntent. + */ + @SerializedName("calculation") + String calculation; + + /** 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.association}. + */ + @SerializedName("object") + String object; + + /** + * The PaymentIntent that this + * Tax Association is tracking. + */ + @SerializedName("payment_intent") + String paymentIntent; + + /** Information about the tax transactions linked to this payment intent. */ + @SerializedName("tax_transaction_attempts") + List taxTransactionAttempts; + + /** Finds a tax association object by PaymentIntent id. */ + public static Association find(Map params) throws StripeException { + return find(params, (RequestOptions) null); + } + + /** Finds a tax association object by PaymentIntent id. */ + public static Association find(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/associations/find"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, Association.class); + } + + /** Finds a tax association object by PaymentIntent id. */ + public static Association find(AssociationFindParams params) throws StripeException { + return find(params, (RequestOptions) null); + } + + /** Finds a tax association object by PaymentIntent id. */ + public static Association find(AssociationFindParams params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/associations/find"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, Association.class); + } + + /** + * For more details about TaxTransactionAttempt, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TaxTransactionAttempt extends StripeObject { + @SerializedName("committed") + Committed committed; + + @SerializedName("errored") + Errored errored; + + /** The source of the tax transaction attempt. This is either a refund or a payment intent. */ + @SerializedName("source") + String source; + + /** The status of the transaction attempt. This can be {@code errored} or {@code committed}. */ + @SerializedName("status") + String status; + + /** + * For more details about Committed, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Committed extends StripeObject { + /** The Tax Transaction. */ + @SerializedName("transaction") + String transaction; + } + + /** + * For more details about Errored, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Errored extends StripeObject { + /** + * Details on why we couldn't commit the tax transaction. + * + *

One of {@code another_payment_associated_with_calculation}, {@code calculation_expired}, + * {@code currency_mismatch}, {@code original_transaction_voided}, or {@code + * unique_reference_violation}. + */ + @SerializedName("reason") + String reason; + } + } +} diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 97a756ab956..8dc6f167c73 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") @@ -290,11 +290,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -304,7 +304,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -326,20 +326,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code - * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, - * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code - * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, - * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code - * ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, - * {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code - * md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code + * ca_qst}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, + * {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code + * id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, + * {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code + * eg_tin}, {@code ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, + * {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code + * uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; @@ -380,11 +380,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -394,7 +394,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -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 9c69492f51e..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 @@ -522,6 +522,9 @@ public static class CountryOptions extends StripeObject { @SerializedName("tr") Tr tr; + @SerializedName("tw") + Tw tw; + @SerializedName("tz") Tz tz; @@ -2784,6 +2787,23 @@ public static class Tr extends StripeObject { String type; } + /** + * For more details about Tw, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tw extends StripeObject { + /** + * Type of registration in {@code country}. + * + *

Equal to {@code simplified}. + */ + @SerializedName("type") + String type; + } + /** * For more details about Tz, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/tax/Settings.java b/src/main/java/com/stripe/model/tax/Settings.java index b5090fc8d20..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 @@ -149,6 +149,15 @@ public static Settings update(SettingsUpdateParams params, RequestOptions option @Setter @EqualsAndHashCode(callSuper = false) public static class Defaults extends StripeObject { + /** + * The tax calculation provider this account uses. Defaults to {@code stripe} when not using a + * third-party provider. + * + *

One of {@code anrok}, {@code avalara}, {@code sphere}, or {@code stripe}. + */ + @SerializedName("provider") + String provider; + /** * Default tax diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index fd628992398..ff821c03f95 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. */ @@ -335,11 +335,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -349,7 +349,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -371,20 +371,20 @@ public static class TaxId extends StripeObject { * {@code gb_vat}, {@code nz_gst}, {@code au_abn}, {@code au_arn}, {@code in_gst}, {@code * no_vat}, {@code no_voec}, {@code za_vat}, {@code ch_vat}, {@code mx_rfc}, {@code sg_uen}, * {@code ru_inn}, {@code ru_kpp}, {@code ca_bn}, {@code hk_br}, {@code es_cif}, {@code - * tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code li_uid}, - * {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code ca_qst}, {@code - * ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, {@code my_sst}, - * {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code id_npwp}, {@code - * my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, {@code bg_uic}, - * {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code eg_tin}, {@code - * ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, {@code om_vat}, - * {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code uz_tin}, {@code - * md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, {@code bb_tin}, - * {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code ba_tin}, {@code - * gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, {@code np_pan}, - * {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code aw_tin}, {@code - * az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, {@code la_tin}, - * {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. + * pl_nip}, {@code tw_vat}, {@code th_vat}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, + * {@code li_uid}, {@code li_vat}, {@code my_itn}, {@code us_ein}, {@code kr_brn}, {@code + * ca_qst}, {@code ca_gst_hst}, {@code ca_pst_bc}, {@code ca_pst_mb}, {@code ca_pst_sk}, + * {@code my_sst}, {@code sg_gst}, {@code ae_trn}, {@code cl_tin}, {@code sa_vat}, {@code + * id_npwp}, {@code my_frp}, {@code il_vat}, {@code ge_vat}, {@code ua_vat}, {@code is_vat}, + * {@code bg_uic}, {@code hu_tin}, {@code si_tin}, {@code ke_pin}, {@code tr_tin}, {@code + * eg_tin}, {@code ph_tin}, {@code al_tin}, {@code bh_vat}, {@code kz_bin}, {@code ng_tin}, + * {@code om_vat}, {@code de_stn}, {@code ch_uid}, {@code tz_vat}, {@code uz_vat}, {@code + * uz_tin}, {@code md_vat}, {@code ma_vat}, {@code by_tin}, {@code ao_tin}, {@code bs_tin}, + * {@code bb_tin}, {@code cd_nif}, {@code mr_nif}, {@code me_pib}, {@code zw_tin}, {@code + * ba_tin}, {@code gn_nif}, {@code mk_vat}, {@code sr_fin}, {@code sn_ninea}, {@code am_tin}, + * {@code np_pan}, {@code tj_tin}, {@code ug_tin}, {@code zm_tin}, {@code kh_tin}, {@code + * aw_tin}, {@code az_tin}, {@code bd_bin}, {@code bj_ifu}, {@code et_tin}, {@code kg_tin}, + * {@code la_tin}, {@code cm_niu}, {@code cv_nif}, {@code bf_ifu}, or {@code unknown}. */ @SerializedName("type") String type; @@ -438,11 +438,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -452,7 +452,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -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/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index afa388f1568..d6d5456c9ae 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -33,6 +33,9 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Configuration extends ApiResource implements HasId { + @SerializedName("bbpos_wisepad3") + BbposWisepad3 bbposWisepad3; + @SerializedName("bbpos_wisepos_e") BbposWiseposE bbposWiseposE; @@ -255,6 +258,39 @@ public Configuration update(ConfigurationUpdateParams params, RequestOptions opt return getResponseGetter().request(request, Configuration.class); } + /** + * For more details about BbposWisepad3, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BbposWisepad3 extends StripeObject { + /** A File ID representing an image to display on the reader. */ + @SerializedName("splashscreen") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField splashscreen; + + /** Get ID of expandable {@code splashscreen} object. */ + public String getSplashscreen() { + return (this.splashscreen != null) ? this.splashscreen.getId() : null; + } + + public void setSplashscreen(String id) { + this.splashscreen = ApiResource.setExpandableFieldId(id, this.splashscreen); + } + + /** Get expanded {@code splashscreen}. */ + public File getSplashscreenObject() { + return (this.splashscreen != null) ? this.splashscreen.getExpanded() : null; + } + + public void setSplashscreenObject(File expandableObject) { + this.splashscreen = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** * For more details about BbposWiseposE, please refer to the API Reference. @@ -371,9 +407,6 @@ public static class Tipping extends StripeObject { @SerializedName("aud") Aud aud; - @SerializedName("bgn") - Bgn bgn; - @SerializedName("cad") Cad cad; @@ -392,6 +425,9 @@ public static class Tipping extends StripeObject { @SerializedName("gbp") Gbp gbp; + @SerializedName("gip") + Gip gip; + @SerializedName("hkd") Hkd hkd; @@ -477,13 +513,13 @@ public static class Aud extends StripeObject { } /** - * For more details about Bgn, please refer to the API + * For more details about Cad, please refer to the API * Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Bgn extends StripeObject { + public static class Cad extends StripeObject { /** Fixed amounts displayed when collecting a tip. */ @SerializedName("fixed_amounts") List fixedAmounts; @@ -501,13 +537,13 @@ public static class Bgn extends StripeObject { } /** - * For more details about Cad, please refer to the API + * For more details about Chf, please refer to the API * Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Cad extends StripeObject { + public static class Chf extends StripeObject { /** Fixed amounts displayed when collecting a tip. */ @SerializedName("fixed_amounts") List fixedAmounts; @@ -525,13 +561,13 @@ public static class Cad extends StripeObject { } /** - * For more details about Chf, please refer to the API + * For more details about Czk, please refer to the API * Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Chf extends StripeObject { + public static class Czk extends StripeObject { /** Fixed amounts displayed when collecting a tip. */ @SerializedName("fixed_amounts") List fixedAmounts; @@ -549,13 +585,13 @@ public static class Chf extends StripeObject { } /** - * For more details about Czk, please refer to the API + * For more details about Dkk, please refer to the API * Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Czk extends StripeObject { + public static class Dkk extends StripeObject { /** Fixed amounts displayed when collecting a tip. */ @SerializedName("fixed_amounts") List fixedAmounts; @@ -573,13 +609,13 @@ public static class Czk extends StripeObject { } /** - * For more details about Dkk, please refer to the API + * For more details about Eur, please refer to the API * Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Dkk extends StripeObject { + public static class Eur extends StripeObject { /** Fixed amounts displayed when collecting a tip. */ @SerializedName("fixed_amounts") List fixedAmounts; @@ -597,13 +633,13 @@ public static class Dkk extends StripeObject { } /** - * For more details about Eur, please refer to the API + * For more details about Gbp, please refer to the API * Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Eur extends StripeObject { + public static class Gbp extends StripeObject { /** Fixed amounts displayed when collecting a tip. */ @SerializedName("fixed_amounts") List fixedAmounts; @@ -621,13 +657,13 @@ public static class Eur extends StripeObject { } /** - * For more details about Gbp, please refer to the API + * For more details about Gip, please refer to the API * Reference. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) - public static class Gbp extends StripeObject { + public static class Gip extends StripeObject { /** Fixed amounts displayed when collecting a tip. */ @SerializedName("fixed_amounts") List fixedAmounts; @@ -1067,6 +1103,7 @@ public static class PersonalPsk extends StripeObject { @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); + trySetResponseGetter(bbposWisepad3, responseGetter); trySetResponseGetter(bbposWiseposE, responseGetter); trySetResponseGetter(offline, responseGetter); trySetResponseGetter(rebootWindow, responseGetter); 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 93969929030..d8e2ec39dd6 100644 --- a/src/main/java/com/stripe/model/terminal/Location.java +++ b/src/main/java/com/stripe/model/terminal/Location.java @@ -6,6 +6,7 @@ import com.stripe.model.Address; import com.stripe.model.HasId; import com.stripe.model.MetadataStore; +import com.stripe.model.StripeObject; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -24,7 +25,7 @@ /** * A Location represents a grouping of readers. * - *

Related guide: Fleet management + *

Related guide: Fleet management */ @Getter @Setter @@ -33,6 +34,12 @@ 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. */ @@ -74,6 +89,10 @@ public class Location extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AddressKana extends StripeObject { + /** City/Ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Block/Building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town/cho-me. */ + @SerializedName("town") + String town; + } + + /** + * For more details about AddressKanji, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AddressKanji extends StripeObject { + /** City/Ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Block/Building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town/cho-me. */ + @SerializedName("town") + String town; + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(address, responseGetter); + trySetResponseGetter(addressKana, responseGetter); + trySetResponseGetter(addressKanji, responseGetter); } } diff --git a/src/main/java/com/stripe/model/terminal/OnboardingLink.java b/src/main/java/com/stripe/model/terminal/OnboardingLink.java new file mode 100644 index 00000000000..2ebaf0badc9 --- /dev/null +++ b/src/main/java/com/stripe/model/terminal/OnboardingLink.java @@ -0,0 +1,122 @@ +// File generated from our OpenAPI spec +package com.stripe.model.terminal; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.StripeObject; +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.terminal.OnboardingLinkCreateParams; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** Returns redirect links used for onboarding onto Tap to Pay on iPhone. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class OnboardingLink extends ApiResource { + /** Link type options associated with the current onboarding link object. */ + @SerializedName("link_options") + LinkOptions linkOptions; + + /** + * The type of link being generated. + * + *

Equal to {@code apple_terms_and_conditions}. + */ + @SerializedName("link_type") + String linkType; + + @SerializedName("object") + String object; + + /** Stripe account ID to generate the link for. */ + @SerializedName("on_behalf_of") + String onBehalfOf; + + /** The link passed back to the user for their onboarding. */ + @SerializedName("redirect_url") + String redirectUrl; + + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public static OnboardingLink create(Map params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public static OnboardingLink create(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/terminal/onboarding_links"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getGlobalResponseGetter().request(request, OnboardingLink.class); + } + + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public static OnboardingLink create(OnboardingLinkCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + + /** + * Creates a new {@code OnboardingLink} object that contains a redirect_url used for onboarding + * onto Tap to Pay on iPhone. + */ + public static OnboardingLink create(OnboardingLinkCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/terminal/onboarding_links"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, OnboardingLink.class); + } + + /** Link type options associated with the current onboarding link object. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LinkOptions extends StripeObject { + /** The options associated with the Apple Terms and Conditions link type. */ + @SerializedName("apple_terms_and_conditions") + AppleTermsAndConditions appleTermsAndConditions; + + /** Options associated with the Apple Terms and Conditions link type. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AppleTermsAndConditions extends StripeObject { + /** Whether the link should also support users relinking their Apple account. */ + @SerializedName("allow_relinking") + Boolean allowRelinking; + + /** The business name of the merchant accepting Apple's Terms and Conditions. */ + @SerializedName("merchant_display_name") + String merchantDisplayName; + } + } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(linkOptions, responseGetter); + } +} diff --git a/src/main/java/com/stripe/model/terminal/Reader.java b/src/main/java/com/stripe/model/terminal/Reader.java index 578dab1b198..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,6 +84,14 @@ public class Reader extends ApiResource implements HasId, MetadataStore @SerializedName("label") String label; + /** + * 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; + /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. @@ -98,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. */ @@ -145,22 +153,38 @@ public void setLocationObject(Location expandableObject) { this.location = new ExpandableField(expandableObject.getId(), expandableObject); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction() throws StripeException { return cancelAction((Map) null, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(RequestOptions options) throws StripeException { return cancelAction((Map) null, options); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(Map params) throws StripeException { return cancelAction(params, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(Map params, RequestOptions options) throws StripeException { String path = @@ -171,12 +195,20 @@ public Reader cancelAction(Map params, RequestOptions options) return getResponseGetter().request(request, Reader.class); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(ReaderCancelActionParams params) throws StripeException { return cancelAction(params, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(ReaderCancelActionParams params, RequestOptions options) throws StripeException { String path = @@ -193,12 +225,20 @@ public Reader cancelAction(ReaderCancelActionParams params, RequestOptions optio return getResponseGetter().request(request, Reader.class); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(Map params) throws StripeException { return collectInputs(params, (RequestOptions) null); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(Map params, RequestOptions options) throws StripeException { String path = @@ -209,12 +249,20 @@ public Reader collectInputs(Map params, RequestOptions options) return getResponseGetter().request(request, Reader.class); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(ReaderCollectInputsParams params) throws StripeException { return collectInputs(params, (RequestOptions) null); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(ReaderCollectInputsParams params, RequestOptions options) throws StripeException { String path = @@ -233,7 +281,9 @@ public Reader collectInputs(ReaderCollectInputsParams params, RequestOptions opt /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod(Map params) throws StripeException { return collectPaymentMethod(params, (RequestOptions) null); @@ -241,7 +291,9 @@ public Reader collectPaymentMethod(Map params) throws StripeExce /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod(Map params, RequestOptions options) throws StripeException { @@ -256,7 +308,9 @@ public Reader collectPaymentMethod(Map params, RequestOptions op /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod(ReaderCollectPaymentMethodParams params) throws StripeException { @@ -265,7 +319,9 @@ public Reader collectPaymentMethod(ReaderCollectPaymentMethodParams params) /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod( ReaderCollectPaymentMethodParams params, RequestOptions options) throws StripeException { @@ -284,12 +340,20 @@ public Reader collectPaymentMethod( return getResponseGetter().request(request, Reader.class); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent(Map params) throws StripeException { return confirmPaymentIntent(params, (RequestOptions) null); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent(Map params, RequestOptions options) throws StripeException { String path = @@ -301,13 +365,21 @@ public Reader confirmPaymentIntent(Map params, RequestOptions op return getResponseGetter().request(request, Reader.class); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent(ReaderConfirmPaymentIntentParams params) throws StripeException { return confirmPaymentIntent(params, (RequestOptions) null); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent( ReaderConfirmPaymentIntentParams params, RequestOptions options) throws StripeException { String path = @@ -416,12 +488,20 @@ public static ReaderCollection list(ReaderListParams params, RequestOptions opti return getGlobalResponseGetter().request(request, ReaderCollection.class); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent(Map params) throws StripeException { return processPaymentIntent(params, (RequestOptions) null); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent(Map params, RequestOptions options) throws StripeException { String path = @@ -433,13 +513,21 @@ public Reader processPaymentIntent(Map params, RequestOptions op return getResponseGetter().request(request, Reader.class); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent(ReaderProcessPaymentIntentParams params) throws StripeException { return processPaymentIntent(params, (RequestOptions) null); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent( ReaderProcessPaymentIntentParams params, RequestOptions options) throws StripeException { String path = @@ -457,12 +545,20 @@ public Reader processPaymentIntent( return getResponseGetter().request(request, Reader.class); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(Map params) throws StripeException { return processSetupIntent(params, (RequestOptions) null); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(Map params, RequestOptions options) throws StripeException { String path = @@ -473,12 +569,20 @@ public Reader processSetupIntent(Map params, RequestOptions opti return getResponseGetter().request(request, Reader.class); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(ReaderProcessSetupIntentParams params) throws StripeException { return processSetupIntent(params, (RequestOptions) null); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(ReaderProcessSetupIntentParams params, RequestOptions options) throws StripeException { String path = @@ -495,22 +599,38 @@ public Reader processSetupIntent(ReaderProcessSetupIntentParams params, RequestO return getResponseGetter().request(request, Reader.class); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment() throws StripeException { return refundPayment((Map) null, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(RequestOptions options) throws StripeException { return refundPayment((Map) null, options); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(Map params) throws StripeException { return refundPayment(params, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(Map params, RequestOptions options) throws StripeException { String path = @@ -521,12 +641,20 @@ public Reader refundPayment(Map params, RequestOptions options) return getResponseGetter().request(request, Reader.class); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(ReaderRefundPaymentParams params) throws StripeException { return refundPayment(params, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(ReaderRefundPaymentParams params, RequestOptions options) throws StripeException { String path = @@ -577,12 +705,18 @@ public static Reader retrieve(String reader, ReaderRetrieveParams params, Reques return getGlobalResponseGetter().request(request, Reader.class); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(Map params) throws StripeException { return setReaderDisplay(params, (RequestOptions) null); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(Map params, RequestOptions options) throws StripeException { String path = @@ -593,12 +727,18 @@ public Reader setReaderDisplay(Map params, RequestOptions option return getResponseGetter().request(request, Reader.class); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(ReaderSetReaderDisplayParams params) throws StripeException { return setReaderDisplay(params, (RequestOptions) null); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(ReaderSetReaderDisplayParams params, RequestOptions options) throws StripeException { String path = @@ -730,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. */ @@ -866,20 +1006,16 @@ public static class Selection extends StripeObject implements HasId { @Setter @EqualsAndHashCode(callSuper = false) public static class Choice extends StripeObject implements HasId { - /** The id to be selected. */ + /** The identifier for the selected choice. Maximum 50 characters. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") String id; - /** - * The button style for the choice - * - *

One of {@code primary}, or {@code secondary}. - */ + /** The button style for the choice. Can be {@code primary} or {@code secondary}. */ @SerializedName("style") String style; - /** The text to be selected. */ + /** The text to be selected. Maximum 30 characters. */ @SerializedName("text") String text; } @@ -910,27 +1046,19 @@ public static class Text extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Toggle extends StripeObject { - /** - * The toggle's default value - * - *

One of {@code disabled}, or {@code enabled}. - */ + /** The toggle's default value. Can be {@code enabled} or {@code disabled}. */ @SerializedName("default_value") String defaultValue; - /** The toggle's description text. */ + /** The toggle's description text. Maximum 50 characters. */ @SerializedName("description") String description; - /** The toggle's title text. */ + /** The toggle's title text. Maximum 50 characters. */ @SerializedName("title") String title; - /** - * The toggle's collected value - * - *

One of {@code disabled}, or {@code enabled}. - */ + /** The toggle's collected value. Can be {@code enabled} or {@code disabled}. */ @SerializedName("value") String value; } @@ -954,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") @@ -1207,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. */ @@ -1328,12 +1456,13 @@ public static class RefundPaymentConfig extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class SetReaderDisplay extends StripeObject { - /** Cart object to be displayed by the reader. */ + /** Cart object to be displayed by the reader, including line items, amounts, and currency. */ @SerializedName("cart") Cart cart; /** - * Type of information to be displayed by the reader. + * Type of information to be displayed by the reader. Only {@code cart} is currently + * supported. * *

Equal to {@code cart}. */ @@ -1359,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; @@ -1378,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..6e7c5fb5b4f 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,24 +350,31 @@ 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; + + /** + * Set if the ReceivedDebit was created due to a Topup object. + */ + @SerializedName("topup") + String topup; } /** 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/DeletedObject.java b/src/main/java/com/stripe/model/v2/DeletedObject.java new file mode 100644 index 00000000000..11c7fb566f3 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/DeletedObject.java @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class DeletedObject extends StripeObject implements HasId { + /** The ID of the object that's being deleted. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + + /** + * String representing the type of the object that has been deleted. Objects of the same type + * share the same value of the object field. + */ + @SerializedName("object") + String object; +} diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index 89a21e070ea..4acab7f5e44 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -2,6 +2,7 @@ package com.stripe.model.v2; import com.stripe.model.StripeObject; +import com.stripe.model.v2.core.Event; import java.util.HashMap; import java.util.Map; @@ -25,14 +26,67 @@ public final class EventDataClassLookup { classLookup.put( "v2.billing.meter_event_session", com.stripe.model.v2.billing.MeterEventSession.class); - classLookup.put("v2.core.event", com.stripe.model.v2.Event.class); - classLookup.put("v2.core.event_destination", com.stripe.model.v2.EventDestination.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); eventClassLookup.put( "v1.billing.meter.error_report_triggered", com.stripe.events.V1BillingMeterErrorReportTriggeredEvent.class); eventClassLookup.put( "v1.billing.meter.no_meter_found", com.stripe.events.V1BillingMeterNoMeterFoundEvent.class); + eventClassLookup.put( + "v2.core.account.closed", com.stripe.events.V2CoreAccountClosedEvent.class); + eventClassLookup.put( + "v2.core.account.created", com.stripe.events.V2CoreAccountCreatedEvent.class); + eventClassLookup.put( + "v2.core.account.updated", com.stripe.events.V2CoreAccountUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[configuration.customer].capability_status_updated", + com.stripe.events.V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent + .class); + eventClassLookup.put( + "v2.core.account[configuration.customer].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[configuration.merchant].capability_status_updated", + com.stripe.events.V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent + .class); + eventClassLookup.put( + "v2.core.account[configuration.merchant].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[configuration.recipient].capability_status_updated", + com.stripe.events.V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent + .class); + eventClassLookup.put( + "v2.core.account[configuration.recipient].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[defaults].updated", + com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[future_requirements].updated", + com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[identity].updated", + com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account[requirements].updated", + com.stripe.events.V2CoreAccountIncludingRequirementsUpdatedEvent.class); + eventClassLookup.put( + "v2.core.account_link.returned", com.stripe.events.V2CoreAccountLinkReturnedEvent.class); + eventClassLookup.put( + "v2.core.account_person.created", com.stripe.events.V2CoreAccountPersonCreatedEvent.class); + eventClassLookup.put( + "v2.core.account_person.deleted", com.stripe.events.V2CoreAccountPersonDeletedEvent.class); + eventClassLookup.put( + "v2.core.account_person.updated", com.stripe.events.V2CoreAccountPersonUpdatedEvent.class); eventClassLookup.put( "v2.core.event_destination.ping", com.stripe.events.V2CoreEventDestinationPingEvent.class); } diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java new file mode 100644 index 00000000000..50c66ed6ae1 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -0,0 +1,86 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2; + +import com.stripe.model.v2.core.EventNotification; +import java.util.HashMap; +import java.util.Map; + +/** + * Event data class look up used in event deserialization. The key to look up is `object` string of + * the model. + * + *

For internal use by Stripe SDK only. + */ +public final class EventNotificationClassLookup { + public static final Map> eventClassLookup = + new HashMap<>(); + + static { + eventClassLookup.put( + "v1.billing.meter.error_report_triggered", + com.stripe.events.V1BillingMeterErrorReportTriggeredEventNotification.class); + eventClassLookup.put( + "v1.billing.meter.no_meter_found", + com.stripe.events.V1BillingMeterNoMeterFoundEventNotification.class); + eventClassLookup.put( + "v2.core.account.closed", com.stripe.events.V2CoreAccountClosedEventNotification.class); + eventClassLookup.put( + "v2.core.account.created", com.stripe.events.V2CoreAccountCreatedEventNotification.class); + eventClassLookup.put( + "v2.core.account.updated", com.stripe.events.V2CoreAccountUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[configuration.customer].capability_status_updated", + com.stripe.events + .V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.customer].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.merchant].capability_status_updated", + com.stripe.events + .V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.merchant].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.recipient].capability_status_updated", + com.stripe.events + .V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[configuration.recipient].updated", + com.stripe.events.V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification + .class); + eventClassLookup.put( + "v2.core.account[defaults].updated", + com.stripe.events.V2CoreAccountIncludingDefaultsUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[future_requirements].updated", + com.stripe.events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[identity].updated", + com.stripe.events.V2CoreAccountIncludingIdentityUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account[requirements].updated", + com.stripe.events.V2CoreAccountIncludingRequirementsUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.account_link.returned", + com.stripe.events.V2CoreAccountLinkReturnedEventNotification.class); + eventClassLookup.put( + "v2.core.account_person.created", + com.stripe.events.V2CoreAccountPersonCreatedEventNotification.class); + eventClassLookup.put( + "v2.core.account_person.deleted", + com.stripe.events.V2CoreAccountPersonDeletedEventNotification.class); + eventClassLookup.put( + "v2.core.account_person.updated", + com.stripe.events.V2CoreAccountPersonUpdatedEventNotification.class); + eventClassLookup.put( + "v2.core.event_destination.ping", + com.stripe.events.V2CoreEventDestinationPingEventNotification.class); + } +} diff --git a/src/main/java/com/stripe/model/v2/EventTypeAdapterFactory.java b/src/main/java/com/stripe/model/v2/EventTypeAdapterFactory.java index d8d56fc567a..343bd810c9e 100644 --- a/src/main/java/com/stripe/model/v2/EventTypeAdapterFactory.java +++ b/src/main/java/com/stripe/model/v2/EventTypeAdapterFactory.java @@ -4,6 +4,7 @@ import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.stripe.model.v2.core.Event; import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; diff --git a/src/main/java/com/stripe/model/v2/billing/MeterEvent.java b/src/main/java/com/stripe/model/v2/billing/MeterEvent.java index 854478014d2..ac2b0fa94ad 100644 --- a/src/main/java/com/stripe/model/v2/billing/MeterEvent.java +++ b/src/main/java/com/stripe/model/v2/billing/MeterEvent.java @@ -9,6 +9,7 @@ import lombok.Getter; import lombok.Setter; +/** Fix me empty_doc_string. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -47,7 +48,8 @@ public class MeterEvent extends StripeObject { /** * 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. + * value_settings.event_payload_key} (default is {@code value}). Read more about the payload.. */ @SerializedName("payload") Map payload; diff --git a/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java b/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java index 6fbad825d02..a81435ddf07 100644 --- a/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java +++ b/src/main/java/com/stripe/model/v2/billing/MeterEventAdjustment.java @@ -63,10 +63,7 @@ public class MeterEventAdjustment extends StripeObject implements HasId { @SerializedName("type") String type; - /** - * For more details about Cancel, please refer to the API - * Reference. - */ + /** Specifies which event to cancel. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) 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..b5c960ad6f7 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -0,0 +1,5852 @@ +// 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; + + /** The default contact phone for the Account. */ + @SerializedName("contact_phone") + String contactPhone; + + /** + * 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; + + /** When the business was incorporated or registered. */ + @SerializedName("registration_date") + RegistrationDate registrationDate; + + /** 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 gb_vat}, {@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; + } + } + + /** When the business was incorporated or registered. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationDate extends StripeObject { + /** The day of registration, between 1 and 31. */ + @SerializedName("day") + Long day; + + /** The month of registration, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** The four-digit year of registration. */ + @SerializedName("year") + Long year; + } + + /** 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/Event.java b/src/main/java/com/stripe/model/v2/core/Event.java similarity index 78% rename from src/main/java/com/stripe/model/v2/Event.java rename to src/main/java/com/stripe/model/v2/core/Event.java index 85586a20a09..1c9b0fed797 100644 --- a/src/main/java/com/stripe/model/v2/Event.java +++ b/src/main/java/com/stripe/model/v2/core/Event.java @@ -1,5 +1,5 @@ // File generated from our OpenAPI spec -package com.stripe.model.v2; +package com.stripe.model.v2.core; import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; @@ -7,20 +7,38 @@ import com.stripe.model.StripeActiveObject; import com.stripe.model.StripeObject; import com.stripe.model.StripeRawJsonObject; +import com.stripe.model.v2.EventDataClassLookup; import com.stripe.net.ApiRequest; import com.stripe.net.ApiResource; import com.stripe.net.BaseAddress; 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; +/** + * Events are generated to keep you informed of activity in your business account. APIs in the /v2 + * namespace generate thin events which + * have small, unversioned payloads that include a reference to the ID of the object that has + * changed. The Events v2 API returns these new thin events. Retrieve the event object for + * additional data about the event. Use the related object ID in the event payload to fetch + * the API resource of the object associated with the event. Comparatively, events generated by + * most API v1 include a versioned snapshot of an API object in their payload. + */ @Getter @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; @@ -121,10 +139,7 @@ public static class RelatedObject extends StripeObject implements HasId { String url; } - /** - * For more details about Reason, please refer to the API - * Reference. - */ + /** Reason for the event. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -141,10 +156,7 @@ public static class Reason extends StripeObject { @SerializedName("type") String type; - /** - * For more details about Request, please refer to the API - * Reference. - */ + /** Information on the API request that instigated the event. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/v2/EventDestination.java b/src/main/java/com/stripe/model/v2/core/EventDestination.java similarity index 85% rename from src/main/java/com/stripe/model/v2/EventDestination.java rename to src/main/java/com/stripe/model/v2/core/EventDestination.java index 401cf4666c0..0aee20d9e9b 100644 --- a/src/main/java/com/stripe/model/v2/EventDestination.java +++ b/src/main/java/com/stripe/model/v2/core/EventDestination.java @@ -1,5 +1,5 @@ // File generated from our OpenAPI spec -package com.stripe.model.v2; +package com.stripe.model.v2.core; import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; @@ -11,6 +11,13 @@ import lombok.Getter; import lombok.Setter; +/** + * Set up an event destination to receive events from Stripe across multiple destination types, + * including webhook endpoints and Amazon EventBridge. Event + * destinations support receiving thin events + * and snapshot events. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -104,10 +111,7 @@ public class EventDestination extends StripeObject implements HasId { @SerializedName("webhook_endpoint") WebhookEndpoint webhookEndpoint; - /** - * For more details about AmazonEventbridge, please refer to the API Reference. - */ + /** Amazon EventBridge configuration. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -129,10 +133,7 @@ public static class AmazonEventbridge extends StripeObject { String awsEventSourceStatus; } - /** - * For more details about StatusDetails, please refer to the API Reference. - */ + /** Additional information about event destination status. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -141,10 +142,7 @@ public static class StatusDetails extends StripeObject { @SerializedName("disabled") Disabled disabled; - /** - * For more details about Disabled, please refer to the API Reference. - */ + /** Details about why the event destination has been disabled. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -159,10 +157,7 @@ public static class Disabled extends StripeObject { } } - /** - * For more details about WebhookEndpoint, please refer to the API Reference. - */ + /** Webhook endpoint configuration. */ @Getter @Setter @EqualsAndHashCode(callSuper = false) diff --git a/src/main/java/com/stripe/model/v2/core/EventNotification.java b/src/main/java/com/stripe/model/v2/core/EventNotification.java new file mode 100644 index 00000000000..99c99b13fb7 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/core/EventNotification.java @@ -0,0 +1,140 @@ +package com.stripe.model.v2.core; + +import com.google.gson.JsonObject; +import com.google.gson.annotations.SerializedName; +import com.stripe.StripeClient; +import com.stripe.StripeContext; +import com.stripe.events.UnknownEventNotification; +import com.stripe.exception.StripeException; +import com.stripe.model.StripeObject; +import com.stripe.model.v2.EventNotificationClassLookup; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.net.ApiMode; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiResource.RequestMethod; +import com.stripe.net.RawRequestOptions; +import com.stripe.net.StripeResponse; +import java.time.Instant; +import lombok.AccessLevel; +import lombok.Getter; + +/** + * `EventNotification` represents the common properties for json that's delivered from an Event + * Destination. A concrete child of `EventNotification` will be returned from + * `StripeClient.parseEventNotificaion()`. You will likely want to cast that object to a more + * specific child of `EventNotification`, like `PushedV1BillingMeterErrorReportTriggeredEvent` + */ +@Getter +public abstract class EventNotification { + /** + * For more details about Request, please refer to the API + * Reference. + */ + @Getter + public static class Request { + /** ID of the API request that caused the event. */ + @SerializedName("id") + String id; + + /** The idempotency key transmitted during the request. */ + @SerializedName("idempotency_key") + String idempotencyKey; + } + + @Getter + public static class Reason { + /** Information on the API request that instigated the event. */ + @SerializedName("request") + Request request; + + /** + * Event reason type. + * + *

Equal to {@code request}. + */ + @SerializedName("type") + String type; + } + + /** Unique identifier for the event. */ + @SerializedName("id") + public String id; + + /** The type of the event. */ + @SerializedName("type") + public String type; + + /** Time at which the object was created. */ + @SerializedName("created") + public Instant created; + + /** Livemode indicates if the event is from a production(true) or test(false) account. */ + @SerializedName("livemode") + public Boolean livemode; + + /** [Optional] Authentication context needed to fetch the event or related object. */ + @SerializedName("context") + public StripeContext context; + + /** [Optional] Reason for the event. */ + @SerializedName("reason") + public Reason reason; + + @Getter(AccessLevel.NONE) + protected transient StripeClient client; + + /** + * Helper for constructing an Event Notification. Doesn't perform signature validation, so you + * should use {@link com.stripe.StripeClient#parseEventNotification} instead for initial handling. + * This is useful in unit tests and working with EventNotifications that you've already validated + * the authenticity of. + */ + public static EventNotification fromJson(String payload, StripeClient client) { + // don't love the double json parse here, but I don't think we can avoid it? + JsonObject jsonObject = ApiResource.GSON.fromJson(payload, JsonObject.class).getAsJsonObject(); + + Class cls = + EventNotificationClassLookup.eventClassLookup.get(jsonObject.get("type").getAsString()); + if (cls == null) { + cls = UnknownEventNotification.class; + } + + EventNotification e = ApiResource.GSON.fromJson(payload, cls); + e.client = client; + + return e; + } + + private RawRequestOptions getRequestOptions() { + if (context == null) { + return null; + } + return new RawRequestOptions.RawRequestOptionsBuilder() + .setStripeContext(context.toString()) + .build(); + } + + /* retrieves the full payload for an event. Protected because individual push classes use it, but type it correctly */ + protected Event fetchEvent() throws StripeException { + StripeResponse response = + client.rawRequest( + RequestMethod.GET, String.format("/v2/core/events/%s", id), null, getRequestOptions()); + + return (Event) client.deserialize(response.body(), ApiMode.V2); + } + + /** Retrieves the object associated with the event. */ + protected StripeObject fetchRelatedObject(RelatedObject relatedObject) throws StripeException { + if (relatedObject == null) { + // used by UnknownEventNotification, so be a little defensive + return null; + } + + String relativeUrl = relatedObject.getUrl(); + + StripeResponse response = + client.rawRequest(RequestMethod.GET, relativeUrl, null, getRequestOptions()); + + return client.deserialize(response.body(), ApiMode.getMode(relativeUrl)); + } +} diff --git a/src/main/java/com/stripe/net/ApiMode.java b/src/main/java/com/stripe/net/ApiMode.java index f9c7e340500..164af7b848a 100644 --- a/src/main/java/com/stripe/net/ApiMode.java +++ b/src/main/java/com/stripe/net/ApiMode.java @@ -2,5 +2,15 @@ public enum ApiMode { V1, - V2 + V2; + + public static ApiMode getMode(String url) { + if (url.startsWith("/v2")) { + return ApiMode.V2; + } + + // some urls, like `/oauth`, don't start with `/v1`. So just assume anything without `/v2` is + // v1. + return ApiMode.V1; + } } diff --git a/src/main/java/com/stripe/net/ApiRequest.java b/src/main/java/com/stripe/net/ApiRequest.java index cc318fb9f46..4125444bb01 100644 --- a/src/main/java/com/stripe/net/ApiRequest.java +++ b/src/main/java/com/stripe/net/ApiRequest.java @@ -19,7 +19,7 @@ private ApiRequest( Map params) { super(baseAddress, method, path, options, usage); this.params = params; - this.apiMode = path.startsWith("/v2") ? ApiMode.V2 : ApiMode.V1; + this.apiMode = ApiMode.getMode(path); } public ApiRequest( diff --git a/src/main/java/com/stripe/net/ApiResource.java b/src/main/java/com/stripe/net/ApiResource.java index 214803bcca7..d23ce045463 100644 --- a/src/main/java/com/stripe/net/ApiResource.java +++ b/src/main/java/com/stripe/net/ApiResource.java @@ -1,6 +1,7 @@ package com.stripe.net; import com.google.gson.*; +import com.stripe.StripeContext; import com.stripe.exception.InvalidRequestException; import com.stripe.model.*; import com.stripe.model.v2.EventTypeAdapterFactory; @@ -54,6 +55,7 @@ private static Gson createGson(boolean shouldSetResponseGetter) { .registerTypeAdapter(EphemeralKey.class, new EphemeralKeyDeserializer()) .registerTypeAdapter(Event.Data.class, new EventDataDeserializer()) .registerTypeAdapter(Event.Request.class, new EventRequestDeserializer()) + .registerTypeAdapter(StripeContext.class, new StripeContextDeserializer()) .registerTypeAdapter(ExpandableField.class, new ExpandableFieldDeserializer()) .registerTypeAdapter(Instant.class, new InstantDeserializer()) .registerTypeAdapterFactory(new EventTypeAdapterFactory()) diff --git a/src/main/java/com/stripe/net/ApiService.java b/src/main/java/com/stripe/net/ApiService.java index e2383b97705..8c9d22f7809 100644 --- a/src/main/java/com/stripe/net/ApiService.java +++ b/src/main/java/com/stripe/net/ApiService.java @@ -1,7 +1,7 @@ package com.stripe.net; import com.stripe.exception.StripeException; -import com.stripe.model.StripeObjectInterface; +import com.stripe.model.StripeObject; import java.io.InputStream; import java.lang.reflect.Type; import lombok.AccessLevel; @@ -17,7 +17,7 @@ protected ApiService(StripeResponseGetter responseGetter) { } @SuppressWarnings("TypeParameterUnusedInFormals") - protected T request(ApiRequest request, Type typeToken) + protected T request(ApiRequest request, Type typeToken) throws StripeException { return this.getResponseGetter().request(request.addUsage("stripe_client"), typeToken); } diff --git a/src/main/java/com/stripe/net/BearerTokenAuthenticator.java b/src/main/java/com/stripe/net/BearerTokenAuthenticator.java index 03c9faa8d8b..44bf2e21819 100644 --- a/src/main/java/com/stripe/net/BearerTokenAuthenticator.java +++ b/src/main/java/com/stripe/net/BearerTokenAuthenticator.java @@ -1,5 +1,6 @@ package com.stripe.net; +import com.stripe.exception.ApiKeyMissingException; import com.stripe.exception.AuthenticationException; import com.stripe.exception.StripeException; import com.stripe.util.StringUtils; @@ -11,7 +12,7 @@ public final class BearerTokenAuthenticator implements Authenticator { public BearerTokenAuthenticator(String apiKey) { if (apiKey == null) { - throw new IllegalArgumentException("apiKey should be not-null"); + throw new ApiKeyMissingException("API key cannot be null. Set Stripe.apiKey"); } this.apiKey = apiKey; } diff --git a/src/main/java/com/stripe/net/FormEncoder.java b/src/main/java/com/stripe/net/FormEncoder.java index d05e4be6ee3..ec608236a3d 100644 --- a/src/main/java/com/stripe/net/FormEncoder.java +++ b/src/main/java/com/stripe/net/FormEncoder.java @@ -22,7 +22,7 @@ public static HttpContent createHttpContent(Map params) throws I return HttpContent.buildFormURLEncodedContent(new ArrayList>()); } - Collection> flatParams = flattenParams(params, false); + Collection> flatParams = flattenParams(params); // If all parameters have been encoded as strings, then the content can be represented // with application/x-www-form-url-encoded encoding. Otherwise, use @@ -46,24 +46,12 @@ public static HttpContent createHttpContent(Map params) throws I * @return The query string. */ public static String createQueryString(Map params) { - return FormEncoder.createQueryString(params, false); - } - - /** - * Creates the HTTP query string for a given map of parameters. - * - * @param params The map of parameters. - * @param arraysAsRepeated Whether to encode arrays as repeated value ({@code a=1&a=2}) defaults - * to brackets encoding ({@code a[]=1,2}). - * @return The query string. - */ - public static String createQueryString(Map params, boolean arraysAsRepeated) { if (params == null) { return ""; } Collection> flatParams = - flattenParams(params, arraysAsRepeated).stream() + flattenParams(params).stream() .filter(kvp -> kvp.getValue() instanceof String) .map(kvp -> new KeyValuePair(kvp.getKey(), (String) kvp.getValue())) .collect(Collectors.toList()); @@ -117,13 +105,10 @@ public static String createQueryString( * } * * @param params The map of parameters. - * @param arraysAsRepeated Whether to encode arrays as repeated value ({@code a=1&a=2}) defaults - * to brackets encoding ({@code a[]=1,2}). * @return The flattened list of parameters. */ - public static List> flattenParams( - Map params, boolean arraysAsRepeated) { - return flattenParamsValue(params, null, arraysAsRepeated); + public static List> flattenParams(Map params) { + return flattenParamsValue(params, null); } /** @@ -157,12 +142,10 @@ private static String urlEncode(String value) { * * @param value The value for which to create the list of parameters. * @param keyPrefix The key under which new keys should be nested, if any. - * @param arraysAsRepeated Whether to encode arrays as repeated value ({@code a=1&a=2}) defaults - * to brackets encoding ({@code a[]=1,2}). * @return The list of parameters. */ private static List> flattenParamsValue( - Object value, String keyPrefix, boolean arraysAsRepeated) { + Object value, String keyPrefix) { List> flatParams = null; // I wish Java had pattern matching :( @@ -171,7 +154,7 @@ private static List> flattenParamsValue( flatParams = singleParam(keyPrefix, ""); } else if (value instanceof Map) { - flatParams = flattenParamsMap((Map) value, keyPrefix, arraysAsRepeated); + flatParams = flattenParamsMap((Map) value, keyPrefix); } else if (value instanceof String) { flatParams = singleParam(keyPrefix, value); @@ -183,12 +166,12 @@ private static List> flattenParamsValue( flatParams = singleParam(keyPrefix, value); } else if (value instanceof Collection) { - flatParams = flattenParamsCollection((Collection) value, keyPrefix, arraysAsRepeated); + flatParams = flattenParamsCollection((Collection) value, keyPrefix); } else if (value.getClass().isArray()) { Object[] array = getArrayForObject(value); Collection collection = Arrays.stream(array).collect(Collectors.toList()); - flatParams = flattenParamsCollection(collection, keyPrefix, arraysAsRepeated); + flatParams = flattenParamsCollection(collection, keyPrefix); } else if (value.getClass().isEnum()) { flatParams = @@ -211,7 +194,7 @@ private static List> flattenParamsValue( * @return The list of parameters. */ private static List> flattenParamsMap( - Map map, String keyPrefix, boolean arraysAsRepeated) { + Map map, String keyPrefix) { List> flatParams = new ArrayList>(); if (map == null) { return flatParams; @@ -223,7 +206,7 @@ private static List> flattenParamsMap( String newPrefix = newPrefix(key, keyPrefix); - flatParams.addAll(flattenParamsValue(value, newPrefix, arraysAsRepeated)); + flatParams.addAll(flattenParamsValue(value, newPrefix)); } return flatParams; @@ -236,12 +219,10 @@ private static List> flattenParamsMap( * * @param collection The collection for which to create the list of parameters. * @param keyPrefix The key under which new keys should be nested. - * @param arraysAsRepeated Whether to encode arrays as repeated value ({@code a=1&a=2}) defaults - * to brackets encoding ({@code a[]=1,2}). * @return The list of parameters. */ private static List> flattenParamsCollection( - Collection collection, String keyPrefix, boolean arraysAsRepeated) { + Collection collection, String keyPrefix) { List> flatParams = new ArrayList>(); if (collection == null) { return flatParams; @@ -249,15 +230,16 @@ private static List> flattenParamsCollection( int index = 0; for (Object value : collection) { - String newPrefix = arraysAsRepeated ? keyPrefix : String.format("%s[%d]", keyPrefix, index); - flatParams.addAll(flattenParamsValue(value, newPrefix, arraysAsRepeated)); + // Always use indexed format for arrays + String newPrefix = String.format("%s[%d]", keyPrefix, index); + flatParams.addAll(flattenParamsValue(value, newPrefix)); index += 1; } /* Because application/x-www-form-urlencoded cannot represent an empty list, convention * is to take the list parameter and just set it to an empty string. (E.g. A regular * list might look like `a[0]=1&b[1]=2`. Emptying it would look like `a=`.) */ - if (!arraysAsRepeated && flatParams.isEmpty()) { + if (flatParams.isEmpty()) { flatParams.add(new KeyValuePair(keyPrefix, "")); } diff --git a/src/main/java/com/stripe/net/HttpClient.java b/src/main/java/com/stripe/net/HttpClient.java index f012b688298..2d4942d9964 100644 --- a/src/main/java/com/stripe/net/HttpClient.java +++ b/src/main/java/com/stripe/net/HttpClient.java @@ -1,13 +1,17 @@ package com.stripe.net; +import com.google.gson.Gson; import com.stripe.Stripe; import com.stripe.exception.ApiConnectionException; import com.stripe.exception.StripeException; +import java.io.InputStream; import java.net.ConnectException; import java.net.SocketTimeoutException; import java.time.Duration; import java.util.HashMap; import java.util.Map; +import java.util.Optional; +import java.util.Properties; import java.util.concurrent.ThreadLocalRandom; /** Base abstract class for HTTP clients used to send requests to Stripe's API. */ @@ -176,10 +180,31 @@ protected static String buildXStripeClientUserAgentString() { if (Stripe.getAppInfo() != null) { propertyMap.put("application", ApiResource.INTERNAL_GSON.toJson(Stripe.getAppInfo())); } + getGsonVersion().ifPresent(ver -> propertyMap.put("gson.version", ver)); return ApiResource.INTERNAL_GSON.toJson(propertyMap); } + /** + * Gets the Gson version being used at runtime. + * + * @return the Gson version string, or Optional.empty() if it cannot be determined + */ + private static Optional getGsonVersion() { + try (InputStream in = + Gson.class.getResourceAsStream( + "/META-INF/maven/com.google.code.gson/gson/pom.properties")) { + if (in != null) { + Properties props = new Properties(); + props.load(in); + return Optional.ofNullable(props.getProperty("version")); + } + } catch (Exception ignore) { + // Silently ignore - we'll just not include the version + } + return Optional.empty(); + } + private static String formatAppInfo(Map info) { String str = info.get("name"); diff --git a/src/main/java/com/stripe/net/LiveStripeResponseGetter.java b/src/main/java/com/stripe/net/LiveStripeResponseGetter.java index 0df78fddf24..cbfa82d64e8 100644 --- a/src/main/java/com/stripe/net/LiveStripeResponseGetter.java +++ b/src/main/java/com/stripe/net/LiveStripeResponseGetter.java @@ -118,7 +118,7 @@ private StripeRequest toRawStripeRequest(RawApiRequest apiRequest, RequestOption @Override @SuppressWarnings({"TypeParameterUnusedInFormals", "unchecked"}) - public T request(ApiRequest apiRequest, Type typeToken) + public T request(ApiRequest apiRequest, Type typeToken) throws StripeException { RequestOptions mergedOptions = RequestOptions.merge(this.options, apiRequest.getOptions()); @@ -230,7 +230,7 @@ public StripeResponse rawRequest(RawApiRequest apiRequest) throws StripeExceptio @Override @SuppressWarnings({"TypeParameterUnusedInFormals", "deprecation"}) - public T request( + public T request( BaseAddress baseAddress, ApiResource.RequestMethod method, String path, diff --git a/src/main/java/com/stripe/net/RawApiRequest.java b/src/main/java/com/stripe/net/RawApiRequest.java index 10ff94aafdd..78a2bc207b8 100644 --- a/src/main/java/com/stripe/net/RawApiRequest.java +++ b/src/main/java/com/stripe/net/RawApiRequest.java @@ -22,7 +22,7 @@ private RawApiRequest( super(baseAddress, method, path, options, usage); this.rawContent = rawContent; this.options = options; - this.apiMode = path.startsWith("/v2") ? ApiMode.V2 : ApiMode.V1; + this.apiMode = ApiMode.getMode(path); } public RawApiRequest( diff --git a/src/main/java/com/stripe/net/RawRequestOptions.java b/src/main/java/com/stripe/net/RawRequestOptions.java index abad1823552..ba0384c338e 100644 --- a/src/main/java/com/stripe/net/RawRequestOptions.java +++ b/src/main/java/com/stripe/net/RawRequestOptions.java @@ -1,5 +1,6 @@ package com.stripe.net; +import com.stripe.StripeContext; import java.net.PasswordAuthentication; import java.net.Proxy; import java.util.Map; @@ -81,6 +82,12 @@ public RawRequestOptionsBuilder setStripeContext(String stripeContext) { return this; } + @Override + public RawRequestOptionsBuilder setStripeContext(StripeContext stripeContext) { + super.setStripeContext(stripeContext); + return this; + } + @Override public RawRequestOptionsBuilder setStripeAccount(String stripeAccount) { super.setStripeAccount(stripeAccount); diff --git a/src/main/java/com/stripe/net/RequestOptions.java b/src/main/java/com/stripe/net/RequestOptions.java index db1e836db32..42c910777a2 100644 --- a/src/main/java/com/stripe/net/RequestOptions.java +++ b/src/main/java/com/stripe/net/RequestOptions.java @@ -235,6 +235,17 @@ public RequestOptionsBuilder setStripeContext(String context) { return this; } + public RequestOptionsBuilder setStripeContext(com.stripe.StripeContext context) { + this.stripeContext = context != null ? context.toString() : null; + return this; + } + + /** + * Empties the current builder value for StripeContext, which will defer to the client options. + * + *

To send no context at all, call `setContext(new StripeContext())`or set the context to an + * empty string. + */ public RequestOptionsBuilder clearStripeContext() { this.stripeContext = null; return this; @@ -472,15 +483,28 @@ static RequestOptions merge(StripeResponseGetterOptions clientOptions, RequestOp clientOptions.getProxyCredential() // proxyCredential ); } + + // callers need to be able to explicitly unset context per-request + // an empty StripeContext serializes to a "", so check for that and empty context out if it's + // there. + String stripeContext; + if (options.getStripeContext() != null) { + String requestContext = options.getStripeContext().trim(); + if (requestContext.isEmpty()) { + stripeContext = null; + } else { + stripeContext = requestContext; + } + } else { + stripeContext = clientOptions.getStripeContext(); + } return new RequestOptions( options.getAuthenticator() != null ? options.getAuthenticator() : clientOptions.getAuthenticator(), options.getClientId() != null ? options.getClientId() : clientOptions.getClientId(), options.getIdempotencyKey(), - options.getStripeContext() != null - ? options.getStripeContext() - : clientOptions.getStripeContext(), + stripeContext, options.getStripeAccount() != null ? options.getStripeAccount() : clientOptions.getStripeAccount(), diff --git a/src/main/java/com/stripe/net/StripeRequest.java b/src/main/java/com/stripe/net/StripeRequest.java index d30d3e4fc6a..89433bfde9f 100644 --- a/src/main/java/com/stripe/net/StripeRequest.java +++ b/src/main/java/com/stripe/net/StripeRequest.java @@ -71,7 +71,7 @@ private StripeRequest( this.params = (params != null) ? Collections.unmodifiableMap(params) : null; this.options = (options != null) ? options : RequestOptions.getDefault(); this.method = method; - this.url = buildURL(method, url, params, apiMode); + this.url = buildURL(method, url, params); this.headers = buildHeaders(method, this.options, this.content, apiMode); this.apiMode = apiMode; } catch (IOException e) { @@ -107,7 +107,7 @@ private StripeRequest( this.params = (params != null) ? Collections.unmodifiableMap(params) : null; this.options = options; this.method = method; - this.url = buildURL(method, url, params, apiMode); + this.url = buildURL(method, url, params); this.content = buildContent(method, params, apiMode); this.headers = buildHeaders(method, this.options, this.content, apiMode); this.apiMode = apiMode; @@ -219,7 +219,7 @@ public StripeRequest withAdditionalHeader(String name, String value) { } private static URL buildURL( - ApiResource.RequestMethod method, String spec, Map params, ApiMode apiMode) + ApiResource.RequestMethod method, String spec, Map params) throws IOException { StringBuilder sb = new StringBuilder(); @@ -229,8 +229,7 @@ private static URL buildURL( String specQueryString = specUrl.getQuery(); if ((method != ApiResource.RequestMethod.POST) && (params != null)) { - String queryString = - FormEncoder.createQueryString(params, apiMode == ApiMode.V2 ? true : false); + String queryString = FormEncoder.createQueryString(params); if (queryString != null && !queryString.isEmpty()) { if (specQueryString != null && !specQueryString.isEmpty()) { diff --git a/src/main/java/com/stripe/net/StripeResponseGetter.java b/src/main/java/com/stripe/net/StripeResponseGetter.java index cb6b54cf10d..c55d9958661 100644 --- a/src/main/java/com/stripe/net/StripeResponseGetter.java +++ b/src/main/java/com/stripe/net/StripeResponseGetter.java @@ -1,7 +1,7 @@ package com.stripe.net; import com.stripe.exception.StripeException; -import com.stripe.model.StripeObjectInterface; +import com.stripe.model.StripeObject; import java.io.InputStream; import java.lang.reflect.Type; import java.util.Map; @@ -10,7 +10,7 @@ public interface StripeResponseGetter { /** @deprecated Use {@link #request(ApiRequest, Type)} instead. */ @SuppressWarnings("TypeParameterUnusedInFormals") @Deprecated - T request( + T request( BaseAddress baseAddress, ApiResource.RequestMethod method, String path, @@ -21,7 +21,7 @@ T request( throws StripeException; @SuppressWarnings("TypeParameterUnusedInFormals") - default T request(ApiRequest request, Type typeToken) + default T request(ApiRequest request, Type typeToken) throws StripeException { return request( request.getBaseAddress(), diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index f9852718f76..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}. @@ -1114,11 +1114,11 @@ public static class SupportAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -1221,13 +1224,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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; @@ -1412,6 +1418,10 @@ public static class Capabilities { @SerializedName("link_payments") LinkPayments linkPayments; + /** The mb_way_payments capability. */ + @SerializedName("mb_way_payments") + MbWayPayments mbWayPayments; + /** The mobilepay_payments capability. */ @SerializedName("mobilepay_payments") MobilepayPayments mobilepayPayments; @@ -1452,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; @@ -1554,6 +1568,7 @@ private Capabilities( KrCardPayments krCardPayments, LegacyPayments legacyPayments, LinkPayments linkPayments, + MbWayPayments mbWayPayments, MobilepayPayments mobilepayPayments, MultibancoPayments multibancoPayments, MxBankTransferPayments mxBankTransferPayments, @@ -1564,6 +1579,7 @@ private Capabilities( PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, + PaytoPayments paytoPayments, PixPayments pixPayments, PromptpayPayments promptpayPayments, RevolutPayPayments revolutPayPayments, @@ -1614,6 +1630,7 @@ private Capabilities( this.krCardPayments = krCardPayments; this.legacyPayments = legacyPayments; this.linkPayments = linkPayments; + this.mbWayPayments = mbWayPayments; this.mobilepayPayments = mobilepayPayments; this.multibancoPayments = multibancoPayments; this.mxBankTransferPayments = mxBankTransferPayments; @@ -1624,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; @@ -1714,6 +1732,8 @@ public static class Builder { private LinkPayments linkPayments; + private MbWayPayments mbWayPayments; + private MobilepayPayments mobilepayPayments; private MultibancoPayments multibancoPayments; @@ -1734,6 +1754,8 @@ public static class Builder { private PaynowPayments paynowPayments; + private PaytoPayments paytoPayments; + private PixPayments pixPayments; private PromptpayPayments promptpayPayments; @@ -1804,6 +1826,7 @@ public AccountCreateParams.Capabilities build() { this.krCardPayments, this.legacyPayments, this.linkPayments, + this.mbWayPayments, this.mobilepayPayments, this.multibancoPayments, this.mxBankTransferPayments, @@ -1814,6 +1837,7 @@ public AccountCreateParams.Capabilities build() { this.payByBankPayments, this.paycoPayments, this.paynowPayments, + this.paytoPayments, this.pixPayments, this.promptpayPayments, this.revolutPayPayments, @@ -2075,6 +2099,13 @@ public Builder setLinkPayments(AccountCreateParams.Capabilities.LinkPayments lin return this; } + /** The mb_way_payments capability. */ + public Builder setMbWayPayments( + AccountCreateParams.Capabilities.MbWayPayments mbWayPayments) { + this.mbWayPayments = mbWayPayments; + return this; + } + /** The mobilepay_payments capability. */ public Builder setMobilepayPayments( AccountCreateParams.Capabilities.MobilepayPayments mobilepayPayments) { @@ -2144,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; @@ -4816,6 +4854,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWayPayments(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.MbWayPayments build() { + return new AccountCreateParams.Capabilities.MbWayPayments( + 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.MbWayPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.MbWayPayments#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 MobilepayPayments { @@ -5617,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 { @@ -7089,6 +7287,13 @@ public static class Company { @SerializedName("registration_number") String registrationNumber; + /** + * 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; + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -7138,6 +7343,7 @@ private Company( String phone, Object registrationDate, String registrationNumber, + RepresentativeDeclaration representativeDeclaration, ApiRequestParams.EnumParam structure, String taxId, String taxIdRegistrar, @@ -7161,6 +7367,7 @@ private Company( this.phone = phone; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; + this.representativeDeclaration = representativeDeclaration; this.structure = structure; this.taxId = taxId; this.taxIdRegistrar = taxIdRegistrar; @@ -7209,6 +7416,8 @@ public static class Builder { private String registrationNumber; + private RepresentativeDeclaration representativeDeclaration; + private ApiRequestParams.EnumParam structure; private String taxId; @@ -7240,6 +7449,7 @@ public AccountCreateParams.Company build() { this.phone, this.registrationDate, this.registrationNumber, + this.representativeDeclaration, this.structure, this.taxId, this.taxIdRegistrar, @@ -7433,6 +7643,16 @@ public Builder setRegistrationNumber(String registrationNumber) { 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.Company.RepresentativeDeclaration representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -7507,11 +7727,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -7519,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; @@ -7614,13 +7837,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -7632,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; @@ -8283,6 +8509,111 @@ public Builder setYear(Long year) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** The Unix timestamp marking when the representative declaration attestation was made. */ + @SerializedName("date") + Long 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 declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + @SerializedName("user_agent") + String userAgent; + + private RepresentativeDeclaration( + Long 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 Long date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Company.RepresentativeDeclaration build() { + return new AccountCreateParams.Company.RepresentativeDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the representative declaration attestation was made. */ + public Builder setDate(Long 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.Company.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.Company.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 declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Verification { @@ -8357,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; @@ -8377,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; @@ -8410,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; @@ -8450,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; @@ -9238,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; @@ -9339,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; @@ -9434,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; @@ -9532,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; @@ -9630,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; @@ -9730,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; @@ -9828,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; @@ -9923,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() { @@ -9944,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); } /** @@ -10003,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; + } + } } } @@ -10019,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() { @@ -10041,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); } /** @@ -10104,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; + } + } } } } @@ -10122,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") @@ -10175,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) { @@ -10185,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) { @@ -10284,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}. @@ -10656,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}. @@ -10667,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}. @@ -10743,11 +11237,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -10755,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; @@ -10850,13 +11347,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -10868,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; @@ -11339,11 +11839,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -11351,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; @@ -11446,13 +11949,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -11464,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; @@ -11725,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. @@ -11744,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. @@ -11776,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. @@ -11817,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. @@ -11833,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. @@ -11852,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. @@ -11884,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. @@ -11923,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. @@ -12855,8 +13361,9 @@ public static class Invoices { Map extraParams; /** - * Whether payment methods should be saved when a payment is completed for a one-time invoices - * on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or a + * subscription invoice when the customer already has a default payment method on the hosted + * invoice page. */ @SerializedName("hosted_payment_method_save") HostedPaymentMethodSave hostedPaymentMethodSave; @@ -12911,8 +13418,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Whether payment methods should be saved when a payment is completed for a one-time - * invoices on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or + * a subscription invoice when the customer already has a default payment method on the + * hosted invoice page. */ public Builder setHostedPaymentMethodSave( AccountCreateParams.Settings.Invoices.HostedPaymentMethodSave hostedPaymentMethodSave) { @@ -13264,16 +13772,15 @@ public static class Schedule { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code weekly}. */ @SerializedName("weekly_anchor") WeeklyAnchor weeklyAnchor; /** * The days of the week when available funds are paid out, specified as an array, e.g., - * [{@code monday}, {@code tuesday}]. (required and applicable only if {@code interval} is - * {@code weekly} and {@code weekly_anchor} is not set.) + * [{@code monday}, {@code tuesday}]. Required and applicable only if {@code interval} is + * {@code weekly}. */ @SerializedName("weekly_payout_days") List weeklyPayoutDays; @@ -13433,8 +13940,8 @@ public Builder addAllMonthlyPayoutDay(List elements) { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code + * weekly}. */ public Builder setWeeklyAnchor( AccountCreateParams.Settings.Payouts.Schedule.WeeklyAnchor weeklyAnchor) { @@ -13543,12 +14050,6 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @SerializedName("monday") MONDAY("monday"), - @SerializedName("saturday") - SATURDAY("saturday"), - - @SerializedName("sunday") - SUNDAY("sunday"), - @SerializedName("thursday") THURSDAY("thursday"), 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 419ba8b52c3..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}. @@ -884,11 +884,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -989,13 +992,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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; @@ -1872,11 +1875,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -1978,13 +1984,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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 45fad2e0a32..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}. @@ -1001,11 +1001,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -1121,25 +1124,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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; @@ -2118,11 +2124,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -2239,25 +2248,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index 6cda259d079..6c8ddb4ce12 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -153,14 +153,6 @@ public static class Components { @SerializedName("account_onboarding") AccountOnboarding accountOnboarding; - /** - * Configuration for the balance - * report embedded component. - */ - @SerializedName("balance_report") - BalanceReport balanceReport; - /** * Configuration for the balances @@ -274,14 +266,6 @@ public static class Components { @SerializedName("payout_details") PayoutDetails payoutDetails; - /** - * Configuration for the payout - * reconciliation report embedded component. - */ - @SerializedName("payout_reconciliation_report") - PayoutReconciliationReport payoutReconciliationReport; - /** * Configuration for the payouts embedded @@ -317,7 +301,6 @@ public static class Components { private Components( AccountManagement accountManagement, AccountOnboarding accountOnboarding, - BalanceReport balanceReport, Balances balances, DisputesList disputesList, Documents documents, @@ -332,14 +315,12 @@ private Components( PaymentDisputes paymentDisputes, Payments payments, PayoutDetails payoutDetails, - PayoutReconciliationReport payoutReconciliationReport, Payouts payouts, PayoutsList payoutsList, TaxRegistrations taxRegistrations, TaxSettings taxSettings) { this.accountManagement = accountManagement; this.accountOnboarding = accountOnboarding; - this.balanceReport = balanceReport; this.balances = balances; this.disputesList = disputesList; this.documents = documents; @@ -354,7 +335,6 @@ private Components( this.paymentDisputes = paymentDisputes; this.payments = payments; this.payoutDetails = payoutDetails; - this.payoutReconciliationReport = payoutReconciliationReport; this.payouts = payouts; this.payoutsList = payoutsList; this.taxRegistrations = taxRegistrations; @@ -370,8 +350,6 @@ public static class Builder { private AccountOnboarding accountOnboarding; - private BalanceReport balanceReport; - private Balances balances; private DisputesList disputesList; @@ -400,8 +378,6 @@ public static class Builder { private PayoutDetails payoutDetails; - private PayoutReconciliationReport payoutReconciliationReport; - private Payouts payouts; private PayoutsList payoutsList; @@ -415,7 +391,6 @@ public AccountSessionCreateParams.Components build() { return new AccountSessionCreateParams.Components( this.accountManagement, this.accountOnboarding, - this.balanceReport, this.balances, this.disputesList, this.documents, @@ -430,7 +405,6 @@ public AccountSessionCreateParams.Components build() { this.paymentDisputes, this.payments, this.payoutDetails, - this.payoutReconciliationReport, this.payouts, this.payoutsList, this.taxRegistrations, @@ -459,17 +433,6 @@ public Builder setAccountOnboarding( return this; } - /** - * Configuration for the balance - * report embedded component. - */ - public Builder setBalanceReport( - AccountSessionCreateParams.Components.BalanceReport balanceReport) { - this.balanceReport = balanceReport; - return this; - } - /** * Configuration for the balances @@ -636,18 +599,6 @@ public Builder setPayoutDetails( return this; } - /** - * Configuration for the payout - * reconciliation report embedded component. - */ - public Builder setPayoutReconciliationReport( - AccountSessionCreateParams.Components.PayoutReconciliationReport - payoutReconciliationReport) { - this.payoutReconciliationReport = payoutReconciliationReport; - return this; - } - /** * Configuration for the payouts @@ -1098,154 +1049,6 @@ public Builder putAllExtraParam(Map map) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class BalanceReport { - /** Required. Whether the embedded component is enabled. */ - @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; - - /** An empty list, because this embedded component has no features. */ - @SerializedName("features") - Features features; - - private BalanceReport(Boolean enabled, Map extraParams, Features features) { - this.enabled = enabled; - this.extraParams = extraParams; - this.features = features; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Boolean enabled; - - private Map extraParams; - - private Features features; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountSessionCreateParams.Components.BalanceReport build() { - return new AccountSessionCreateParams.Components.BalanceReport( - this.enabled, this.extraParams, this.features); - } - - /** Required. Whether the embedded component is enabled. */ - 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 AccountSessionCreateParams.Components.BalanceReport#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link AccountSessionCreateParams.Components.BalanceReport#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** An empty list, because this embedded component has no features. */ - public Builder setFeatures( - AccountSessionCreateParams.Components.BalanceReport.Features features) { - this.features = features; - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Features { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Features(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountSessionCreateParams.Components.BalanceReport.Features build() { - return new AccountSessionCreateParams.Components.BalanceReport.Features( - this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * AccountSessionCreateParams.Components.BalanceReport.Features#extraParams} for the field - * documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * AccountSessionCreateParams.Components.BalanceReport.Features#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 Balances { @@ -1371,11 +1174,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -1493,11 +1292,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; return this; @@ -2408,11 +2203,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -2504,11 +2295,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; return this; @@ -3976,157 +3763,6 @@ public Builder putAllExtraParam(Map map) { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PayoutReconciliationReport { - /** Required. Whether the embedded component is enabled. */ - @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; - - /** An empty list, because this embedded component has no features. */ - @SerializedName("features") - Features features; - - private PayoutReconciliationReport( - Boolean enabled, Map extraParams, Features features) { - this.enabled = enabled; - this.extraParams = extraParams; - this.features = features; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Boolean enabled; - - private Map extraParams; - - private Features features; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountSessionCreateParams.Components.PayoutReconciliationReport build() { - return new AccountSessionCreateParams.Components.PayoutReconciliationReport( - this.enabled, this.extraParams, this.features); - } - - /** Required. Whether the embedded component is enabled. */ - 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 - * AccountSessionCreateParams.Components.PayoutReconciliationReport#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * AccountSessionCreateParams.Components.PayoutReconciliationReport#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - - /** An empty list, because this embedded component has no features. */ - public Builder setFeatures( - AccountSessionCreateParams.Components.PayoutReconciliationReport.Features features) { - this.features = features; - return this; - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Features { - /** - * Map of extra parameters for custom features not available in this client library. The - * content in this map is not serialized under this field's {@code @SerializedName} value. - * Instead, each key/value pair is serialized as if the key is a root-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 Features(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public AccountSessionCreateParams.Components.PayoutReconciliationReport.Features build() { - return new AccountSessionCreateParams.Components.PayoutReconciliationReport.Features( - this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * AccountSessionCreateParams.Components.PayoutReconciliationReport.Features#extraParams} - * for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link - * AccountSessionCreateParams.Components.PayoutReconciliationReport.Features#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 Payouts { @@ -4252,11 +3888,7 @@ public static class Features { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ @SerializedName("instant_payouts") Boolean instantPayouts; @@ -4374,11 +4006,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Whether to allow creation of instant payouts. Defaults to {@code true} when {@code - * controller.losses.payments} is set to {@code stripe} for the account, otherwise {@code - * false}. - */ + /** Whether instant payouts are enabled for this component. */ public Builder setInstantPayouts(Boolean instantPayouts) { this.instantPayouts = instantPayouts; return this; diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 4470540bece..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}. @@ -1173,11 +1173,11 @@ public static class SupportAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -1295,25 +1298,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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; @@ -1510,6 +1519,10 @@ public static class Capabilities { @SerializedName("link_payments") LinkPayments linkPayments; + /** The mb_way_payments capability. */ + @SerializedName("mb_way_payments") + MbWayPayments mbWayPayments; + /** The mobilepay_payments capability. */ @SerializedName("mobilepay_payments") MobilepayPayments mobilepayPayments; @@ -1550,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; @@ -1652,6 +1669,7 @@ private Capabilities( KrCardPayments krCardPayments, LegacyPayments legacyPayments, LinkPayments linkPayments, + MbWayPayments mbWayPayments, MobilepayPayments mobilepayPayments, MultibancoPayments multibancoPayments, MxBankTransferPayments mxBankTransferPayments, @@ -1662,6 +1680,7 @@ private Capabilities( PayByBankPayments payByBankPayments, PaycoPayments paycoPayments, PaynowPayments paynowPayments, + PaytoPayments paytoPayments, PixPayments pixPayments, PromptpayPayments promptpayPayments, RevolutPayPayments revolutPayPayments, @@ -1712,6 +1731,7 @@ private Capabilities( this.krCardPayments = krCardPayments; this.legacyPayments = legacyPayments; this.linkPayments = linkPayments; + this.mbWayPayments = mbWayPayments; this.mobilepayPayments = mobilepayPayments; this.multibancoPayments = multibancoPayments; this.mxBankTransferPayments = mxBankTransferPayments; @@ -1722,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; @@ -1812,6 +1833,8 @@ public static class Builder { private LinkPayments linkPayments; + private MbWayPayments mbWayPayments; + private MobilepayPayments mobilepayPayments; private MultibancoPayments multibancoPayments; @@ -1832,6 +1855,8 @@ public static class Builder { private PaynowPayments paynowPayments; + private PaytoPayments paytoPayments; + private PixPayments pixPayments; private PromptpayPayments promptpayPayments; @@ -1902,6 +1927,7 @@ public AccountUpdateParams.Capabilities build() { this.krCardPayments, this.legacyPayments, this.linkPayments, + this.mbWayPayments, this.mobilepayPayments, this.multibancoPayments, this.mxBankTransferPayments, @@ -1912,6 +1938,7 @@ public AccountUpdateParams.Capabilities build() { this.payByBankPayments, this.paycoPayments, this.paynowPayments, + this.paytoPayments, this.pixPayments, this.promptpayPayments, this.revolutPayPayments, @@ -2173,6 +2200,13 @@ public Builder setLinkPayments(AccountUpdateParams.Capabilities.LinkPayments lin return this; } + /** The mb_way_payments capability. */ + public Builder setMbWayPayments( + AccountUpdateParams.Capabilities.MbWayPayments mbWayPayments) { + this.mbWayPayments = mbWayPayments; + return this; + } + /** The mobilepay_payments capability. */ public Builder setMobilepayPayments( AccountUpdateParams.Capabilities.MobilepayPayments mobilepayPayments) { @@ -2242,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; @@ -4914,6 +4955,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWayPayments(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.MbWayPayments build() { + return new AccountUpdateParams.Capabilities.MbWayPayments( + 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.MbWayPayments#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.MbWayPayments#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 MobilepayPayments { @@ -5715,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 { @@ -7186,6 +7387,13 @@ public static class Company { @SerializedName("registration_number") Object registrationNumber; + /** + * 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; + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -7235,6 +7443,7 @@ private Company( Object phone, Object registrationDate, Object registrationNumber, + RepresentativeDeclaration representativeDeclaration, ApiRequestParams.EnumParam structure, Object taxId, Object taxIdRegistrar, @@ -7258,6 +7467,7 @@ private Company( this.phone = phone; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; + this.representativeDeclaration = representativeDeclaration; this.structure = structure; this.taxId = taxId; this.taxIdRegistrar = taxIdRegistrar; @@ -7306,6 +7516,8 @@ public static class Builder { private Object registrationNumber; + private RepresentativeDeclaration representativeDeclaration; + private ApiRequestParams.EnumParam structure; private Object taxId; @@ -7337,6 +7549,7 @@ public AccountUpdateParams.Company build() { this.phone, this.registrationDate, this.registrationNumber, + this.representativeDeclaration, this.structure, this.taxId, this.taxIdRegistrar, @@ -7578,6 +7791,16 @@ public Builder setRegistrationNumber(EmptyParam registrationNumber) { 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.Company.RepresentativeDeclaration representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -7676,11 +7899,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -7688,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; @@ -7798,25 +8024,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -7834,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; @@ -8608,6 +8840,126 @@ public Builder setYear(Long year) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** The Unix timestamp marking when the representative declaration attestation was made. */ + @SerializedName("date") + Long 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 declaration attestation was made. */ + @SerializedName("ip") + Object ip; + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + @SerializedName("user_agent") + Object userAgent; + + private RepresentativeDeclaration( + Long 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 Long date; + + private Map extraParams; + + private Object ip; + + private Object userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Company.RepresentativeDeclaration build() { + return new AccountUpdateParams.Company.RepresentativeDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** The Unix timestamp marking when the representative declaration attestation was made. */ + public Builder setDate(Long 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.Company.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.Company.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 declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The IP address from which the representative declaration attestation was made. */ + public Builder setIp(EmptyParam ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + public Builder setUserAgent(EmptyParam userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Verification { @@ -8682,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; @@ -8702,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; @@ -8735,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; @@ -8747,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; @@ -8787,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; @@ -8799,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; @@ -9155,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; @@ -9256,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; @@ -9351,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; @@ -9449,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; @@ -9547,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; @@ -9647,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; @@ -9745,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; @@ -9840,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() { @@ -9861,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); } /** @@ -9920,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; + } + } } } @@ -9936,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() { @@ -9958,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); } /** @@ -10021,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; + } + } } } } @@ -10039,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") @@ -10092,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) { @@ -10102,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) { @@ -10201,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}. @@ -10651,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}. @@ -10662,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}. @@ -10750,11 +11275,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -10762,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; @@ -10872,25 +11400,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -10908,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; @@ -11475,11 +12009,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -11487,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; @@ -11597,25 +12134,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -11633,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; @@ -11906,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. @@ -11925,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. @@ -11957,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. @@ -11968,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. @@ -12009,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. @@ -12020,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. @@ -12036,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. @@ -12055,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. @@ -12087,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. @@ -12098,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. @@ -12137,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. @@ -12148,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. @@ -13151,8 +13694,9 @@ public static class Invoices { Map extraParams; /** - * Whether payment methods should be saved when a payment is completed for a one-time invoices - * on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or a + * subscription invoice when the customer already has a default payment method on the hosted + * invoice page. */ @SerializedName("hosted_payment_method_save") HostedPaymentMethodSave hostedPaymentMethodSave; @@ -13262,8 +13806,9 @@ public Builder putAllExtraParam(Map map) { } /** - * Whether payment methods should be saved when a payment is completed for a one-time - * invoices on a hosted invoice page. + * Whether to save the payment method after a payment is completed for a one-time invoice or + * a subscription invoice when the customer already has a default payment method on the + * hosted invoice page. */ public Builder setHostedPaymentMethodSave( AccountUpdateParams.Settings.Invoices.HostedPaymentMethodSave hostedPaymentMethodSave) { @@ -13661,16 +14206,15 @@ public static class Schedule { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code weekly}. */ @SerializedName("weekly_anchor") WeeklyAnchor weeklyAnchor; /** * The days of the week when available funds are paid out, specified as an array, e.g., - * [{@code monday}, {@code tuesday}]. (required and applicable only if {@code interval} is - * {@code weekly} and {@code weekly_anchor} is not set.) + * [{@code monday}, {@code tuesday}]. Required and applicable only if {@code interval} is + * {@code weekly}. */ @SerializedName("weekly_payout_days") List weeklyPayoutDays; @@ -13830,8 +14374,8 @@ public Builder addAllMonthlyPayoutDay(List elements) { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code + * weekly}. */ public Builder setWeeklyAnchor( AccountUpdateParams.Settings.Payouts.Schedule.WeeklyAnchor weeklyAnchor) { @@ -13940,12 +14484,6 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @SerializedName("monday") MONDAY("monday"), - @SerializedName("saturday") - SATURDAY("saturday"), - - @SerializedName("sunday") - SUNDAY("sunday"), - @SerializedName("thursday") THURSDAY("thursday"), 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/BalanceSettingsRetrieveParams.java b/src/main/java/com/stripe/param/BalanceSettingsRetrieveParams.java new file mode 100644 index 00000000000..f6d085f2939 --- /dev/null +++ b/src/main/java/com/stripe/param/BalanceSettingsRetrieveParams.java @@ -0,0 +1,100 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 BalanceSettingsRetrieveParams 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 BalanceSettingsRetrieveParams(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 BalanceSettingsRetrieveParams build() { + return new BalanceSettingsRetrieveParams(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 + * BalanceSettingsRetrieveParams#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 + * BalanceSettingsRetrieveParams#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 + * BalanceSettingsRetrieveParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link BalanceSettingsRetrieveParams#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/BalanceSettingsUpdateParams.java b/src/main/java/com/stripe/param/BalanceSettingsUpdateParams.java new file mode 100644 index 00000000000..ac0ee91cad5 --- /dev/null +++ b/src/main/java/com/stripe/param/BalanceSettingsUpdateParams.java @@ -0,0 +1,750 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 BalanceSettingsUpdateParams 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; + + /** + * Settings that apply to the Payments Balance. + */ + @SerializedName("payments") + Payments payments; + + private BalanceSettingsUpdateParams( + List expand, Map extraParams, Payments payments) { + this.expand = expand; + this.extraParams = extraParams; + this.payments = payments; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private Payments payments; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams build() { + return new BalanceSettingsUpdateParams(this.expand, this.extraParams, this.payments); + } + + /** + * 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 + * BalanceSettingsUpdateParams#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 + * BalanceSettingsUpdateParams#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 + * BalanceSettingsUpdateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link BalanceSettingsUpdateParams#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 that apply to the Payments + * Balance. + */ + public Builder setPayments(BalanceSettingsUpdateParams.Payments payments) { + this.payments = payments; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payments { + /** + * A Boolean indicating whether Stripe should try to reclaim negative balances from an attached + * bank account. For details, see Understanding Connect Account + * Balances. + */ + @SerializedName("debit_negative_balances") + Boolean debitNegativeBalances; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 the account's payouts. */ + @SerializedName("payouts") + Payouts payouts; + + /** Settings related to the account's balance settlement timing. */ + @SerializedName("settlement_timing") + SettlementTiming settlementTiming; + + private Payments( + Boolean debitNegativeBalances, + Map extraParams, + Payouts payouts, + SettlementTiming settlementTiming) { + this.debitNegativeBalances = debitNegativeBalances; + this.extraParams = extraParams; + this.payouts = payouts; + this.settlementTiming = settlementTiming; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean debitNegativeBalances; + + private Map extraParams; + + private Payouts payouts; + + private SettlementTiming settlementTiming; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams.Payments build() { + return new BalanceSettingsUpdateParams.Payments( + this.debitNegativeBalances, this.extraParams, this.payouts, this.settlementTiming); + } + + /** + * A Boolean indicating whether Stripe should try to reclaim negative balances from an + * attached bank account. For details, see Understanding Connect Account + * Balances. + */ + public Builder setDebitNegativeBalances(Boolean debitNegativeBalances) { + this.debitNegativeBalances = debitNegativeBalances; + 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 + * BalanceSettingsUpdateParams.Payments#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link BalanceSettingsUpdateParams.Payments#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 the account's payouts. */ + public Builder setPayouts(BalanceSettingsUpdateParams.Payments.Payouts payouts) { + this.payouts = payouts; + return this; + } + + /** Settings related to the account's balance settlement timing. */ + public Builder setSettlementTiming( + BalanceSettingsUpdateParams.Payments.SettlementTiming settlementTiming) { + this.settlementTiming = settlementTiming; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Payouts { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 minimum balance amount to retain per currency after automatic payouts. Only funds that + * exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + @SerializedName("minimum_balance_by_currency") + Object minimumBalanceByCurrency; + + /** + * Details on when funds from charges are available, and when they are paid out to an external + * account. For details, see our Setting Bank and Debit + * Card Payouts documentation. + */ + @SerializedName("schedule") + Schedule schedule; + + /** + * The text that appears on the bank account statement for payouts. If not set, this defaults + * to the platform's bank descriptor as set in the Dashboard. + */ + @SerializedName("statement_descriptor") + Object statementDescriptor; + + private Payouts( + Map extraParams, + Object minimumBalanceByCurrency, + Schedule schedule, + Object statementDescriptor) { + this.extraParams = extraParams; + this.minimumBalanceByCurrency = minimumBalanceByCurrency; + this.schedule = schedule; + this.statementDescriptor = statementDescriptor; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object minimumBalanceByCurrency; + + private Schedule schedule; + + private Object statementDescriptor; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams.Payments.Payouts build() { + return new BalanceSettingsUpdateParams.Payments.Payouts( + this.extraParams, + this.minimumBalanceByCurrency, + this.schedule, + this.statementDescriptor); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.Payouts#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.Payouts#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 a key/value pair to `minimumBalanceByCurrency` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * BalanceSettingsUpdateParams.Payments.Payouts#minimumBalanceByCurrency} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMinimumBalanceByCurrency(String key, Long value) { + if (this.minimumBalanceByCurrency == null + || this.minimumBalanceByCurrency instanceof EmptyParam) { + this.minimumBalanceByCurrency = new HashMap(); + } + ((Map) this.minimumBalanceByCurrency).put(key, value); + return this; + } + + /** + * Add a key/value pair to `minimumBalanceByCurrency` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * BalanceSettingsUpdateParams.Payments.Payouts#minimumBalanceByCurrency} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMinimumBalanceByCurrency(String key, EmptyParam value) { + if (this.minimumBalanceByCurrency == null + || this.minimumBalanceByCurrency instanceof EmptyParam) { + this.minimumBalanceByCurrency = new HashMap(); + } + ((Map) this.minimumBalanceByCurrency).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `minimumBalanceByCurrency` 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: `Long`, `EmptyParam`. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts#minimumBalanceByCurrency} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMinimumBalanceByCurrency(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof Long || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: Long, EmptyParam"); + } + if (this.minimumBalanceByCurrency == null + || this.minimumBalanceByCurrency instanceof EmptyParam) { + this.minimumBalanceByCurrency = new HashMap(); + } + ((Map) this.minimumBalanceByCurrency).putAll(map); + return this; + } + + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds + * that exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + public Builder setMinimumBalanceByCurrency(EmptyParam minimumBalanceByCurrency) { + this.minimumBalanceByCurrency = minimumBalanceByCurrency; + return this; + } + + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds + * that exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + public Builder setMinimumBalanceByCurrency(Map minimumBalanceByCurrency) { + this.minimumBalanceByCurrency = minimumBalanceByCurrency; + return this; + } + + /** + * Details on when funds from charges are available, and when they are paid out to an + * external account. For details, see our Setting Bank and + * Debit Card Payouts documentation. + */ + public Builder setSchedule(BalanceSettingsUpdateParams.Payments.Payouts.Schedule schedule) { + this.schedule = schedule; + return this; + } + + /** + * The text that appears on the bank account statement for payouts. If not set, this + * defaults to the platform's bank descriptor as set in the Dashboard. + */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + + /** + * The text that appears on the bank account statement for payouts. If not set, this + * defaults to the platform's bank descriptor as set in the Dashboard. + */ + public Builder setStatementDescriptor(EmptyParam statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Schedule { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * How frequently available funds are paid out. One of: {@code daily}, {@code manual}, + * {@code weekly}, or {@code monthly}. Default is {@code daily}. + */ + @SerializedName("interval") + Interval interval; + + /** + * The days of the month when available funds are paid out, specified as an array of numbers + * between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are + * instead sent on the last day of a shorter month. Required and applicable only if {@code + * interval} is {@code monthly}. + */ + @SerializedName("monthly_payout_days") + List monthlyPayoutDays; + + /** + * The days of the week when available funds are paid out, specified as an array, e.g., + * [{@code monday}, {@code tuesday}]. Required and applicable only if {@code interval} is + * {@code weekly}. + */ + @SerializedName("weekly_payout_days") + List + weeklyPayoutDays; + + private Schedule( + Map extraParams, + Interval interval, + List monthlyPayoutDays, + List + weeklyPayoutDays) { + this.extraParams = extraParams; + this.interval = interval; + this.monthlyPayoutDays = monthlyPayoutDays; + this.weeklyPayoutDays = weeklyPayoutDays; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private List monthlyPayoutDays; + + private List + weeklyPayoutDays; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams.Payments.Payouts.Schedule build() { + return new BalanceSettingsUpdateParams.Payments.Payouts.Schedule( + this.extraParams, this.interval, this.monthlyPayoutDays, this.weeklyPayoutDays); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * How frequently available funds are paid out. One of: {@code daily}, {@code manual}, + * {@code weekly}, or {@code monthly}. Default is {@code daily}. + */ + public Builder setInterval( + BalanceSettingsUpdateParams.Payments.Payouts.Schedule.Interval interval) { + this.interval = interval; + return this; + } + + /** + * Add an element to `monthlyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#monthlyPayoutDays} for + * the field documentation. + */ + public Builder addMonthlyPayoutDay(Long element) { + if (this.monthlyPayoutDays == null) { + this.monthlyPayoutDays = new ArrayList<>(); + } + this.monthlyPayoutDays.add(element); + return this; + } + + /** + * Add all elements to `monthlyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#monthlyPayoutDays} for + * the field documentation. + */ + public Builder addAllMonthlyPayoutDay(List elements) { + if (this.monthlyPayoutDays == null) { + this.monthlyPayoutDays = new ArrayList<>(); + } + this.monthlyPayoutDays.addAll(elements); + return this; + } + + /** + * Add an element to `weeklyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#weeklyPayoutDays} for + * the field documentation. + */ + public Builder addWeeklyPayoutDay( + BalanceSettingsUpdateParams.Payments.Payouts.Schedule.WeeklyPayoutDay element) { + if (this.weeklyPayoutDays == null) { + this.weeklyPayoutDays = new ArrayList<>(); + } + this.weeklyPayoutDays.add(element); + return this; + } + + /** + * Add all elements to `weeklyPayoutDays` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts.Schedule#weeklyPayoutDays} for + * the field documentation. + */ + public Builder addAllWeeklyPayoutDay( + List + elements) { + if (this.weeklyPayoutDays == null) { + this.weeklyPayoutDays = new ArrayList<>(); + } + this.weeklyPayoutDays.addAll(elements); + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("daily") + DAILY("daily"), + + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("weekly") + WEEKLY("weekly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + + public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { + @SerializedName("friday") + FRIDAY("friday"), + + @SerializedName("monday") + MONDAY("monday"), + + @SerializedName("thursday") + THURSDAY("thursday"), + + @SerializedName("tuesday") + TUESDAY("tuesday"), + + @SerializedName("wednesday") + WEDNESDAY("wednesday"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + WeeklyPayoutDay(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SettlementTiming { + /** + * Change {@code delay_days} for this account, which determines the number of days charge + * funds are held before becoming available. The maximum value is 31. Passing an empty string + * to {@code delay_days_override} will return {@code delay_days} to the default, which is the + * lowest available value for the account. Learn more about controlling delay + * days. + */ + @SerializedName("delay_days_override") + Object delayDaysOverride; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 SettlementTiming(Object delayDaysOverride, Map extraParams) { + this.delayDaysOverride = delayDaysOverride; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object delayDaysOverride; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public BalanceSettingsUpdateParams.Payments.SettlementTiming build() { + return new BalanceSettingsUpdateParams.Payments.SettlementTiming( + this.delayDaysOverride, this.extraParams); + } + + /** + * Change {@code delay_days} for this account, which determines the number of days charge + * funds are held before becoming available. The maximum value is 31. Passing an empty + * string to {@code delay_days_override} will return {@code delay_days} to the default, + * which is the lowest available value for the account. Learn more about controlling + * delay days. + */ + public Builder setDelayDaysOverride(Long delayDaysOverride) { + this.delayDaysOverride = delayDaysOverride; + return this; + } + + /** + * Change {@code delay_days} for this account, which determines the number of days charge + * funds are held before becoming available. The maximum value is 31. Passing an empty + * string to {@code delay_days_override} will return {@code delay_days} to the default, + * which is the lowest available value for the account. Learn more about controlling + * delay days. + */ + public Builder setDelayDaysOverride(EmptyParam delayDaysOverride) { + this.delayDaysOverride = delayDaysOverride; + 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 BalanceSettingsUpdateParams.Payments.SettlementTiming#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link BalanceSettingsUpdateParams.Payments.SettlementTiming#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/BalanceTransactionListParams.java b/src/main/java/com/stripe/param/BalanceTransactionListParams.java index 744b212f76d..e3e649ec359 100644 --- a/src/main/java/com/stripe/param/BalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/BalanceTransactionListParams.java @@ -61,7 +61,7 @@ public class BalanceTransactionListParams extends ApiRequestParams { @SerializedName("payout") String payout; - /** Only returns the original transaction. */ + /** Only returns transactions associated with the given object. */ @SerializedName("source") String source; @@ -85,11 +85,11 @@ public class BalanceTransactionListParams extends ApiRequestParams { * payment_network_reserve_release}, {@code payment_refund}, {@code payment_reversal}, {@code * payment_unreconciled}, {@code payout}, {@code payout_cancel}, {@code payout_failure}, {@code * payout_minimum_balance_hold}, {@code payout_minimum_balance_release}, {@code refund}, {@code - * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code stripe_fee}, - * {@code stripe_fx_fee}, {@code stripe_balance_payment_debit}, {@code - * stripe_balance_payment_debit_reversal}, {@code tax_fee}, {@code topup}, {@code topup_reversal}, - * {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or {@code - * transfer_refund}. + * refund_failure}, {@code reserve_transaction}, {@code reserved_funds}, {@code reserve_hold}, + * {@code reserve_release}, {@code stripe_fee}, {@code stripe_fx_fee}, {@code + * stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code tax_fee}, + * {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code + * transfer_failure}, or {@code transfer_refund}. */ @SerializedName("type") String type; @@ -260,7 +260,7 @@ public Builder setPayout(String payout) { return this; } - /** Only returns the original transaction. */ + /** Only returns transactions associated with the given object. */ public Builder setSource(String source) { this.source = source; return this; @@ -289,10 +289,11 @@ public Builder setStartingAfter(String startingAfter) { * payment_refund}, {@code payment_reversal}, {@code payment_unreconciled}, {@code payout}, * {@code payout_cancel}, {@code payout_failure}, {@code payout_minimum_balance_hold}, {@code * payout_minimum_balance_release}, {@code refund}, {@code refund_failure}, {@code - * reserve_transaction}, {@code reserved_funds}, {@code stripe_fee}, {@code stripe_fx_fee}, - * {@code stripe_balance_payment_debit}, {@code stripe_balance_payment_debit_reversal}, {@code - * tax_fee}, {@code topup}, {@code topup_reversal}, {@code transfer}, {@code transfer_cancel}, - * {@code transfer_failure}, or {@code transfer_refund}. + * reserve_transaction}, {@code reserved_funds}, {@code reserve_hold}, {@code reserve_release}, + * {@code stripe_fee}, {@code stripe_fx_fee}, {@code stripe_balance_payment_debit}, {@code + * stripe_balance_payment_debit_reversal}, {@code tax_fee}, {@code topup}, {@code + * topup_reversal}, {@code transfer}, {@code transfer_cancel}, {@code transfer_failure}, or + * {@code transfer_refund}. */ public Builder setType(String type) { this.type = type; 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 c824304cd10..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. */ @@ -907,11 +909,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -1014,13 +1019,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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 4413cb6a464..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) { @@ -619,11 +619,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -741,25 +744,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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 40045995471..ccdc86b5f71 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. */ @@ -421,7 +421,14 @@ public static class PaymentMethodData { Link link; /** - * Set of key-value pairs that you can attach + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -499,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. @@ -514,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") @@ -627,6 +641,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -638,6 +653,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -681,6 +697,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -692,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; @@ -771,6 +789,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -793,6 +813,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -853,6 +875,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -864,6 +887,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -1171,6 +1195,15 @@ public Builder setLink(ConfirmationTokenCreateParams.PaymentMethodData.Link link return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(ConfirmationTokenCreateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + 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 @@ -1293,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. @@ -1313,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( @@ -2296,11 +2338,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2308,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; @@ -2405,13 +2450,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -2423,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; @@ -3284,6 +3332,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -3293,6 +3344,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -3302,6 +3356,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -3805,6 +3862,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfirmationTokenCreateParams.PaymentMethodData.MbWay build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.MbWay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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 Mobilepay { @@ -4620,6 +4735,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 { @@ -4749,7 +4963,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. */ @@ -4805,7 +5019,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. */ @@ -5664,6 +5878,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -5694,6 +5911,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6245,11 +6465,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -6257,7 +6477,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; @@ -6352,13 +6575,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -6370,7 +6593,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..49d3d9a285f 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}. @@ -109,8 +109,9 @@ public class CouponCreateParams extends ApiRequestParams { BigDecimal percentOff; /** - * Unix timestamp specifying the last time at which the coupon can be redeemed. After the - * redeem_by date, the coupon can no longer be applied to new customers. + * Unix timestamp specifying the last time at which the coupon can be redeemed (cannot be set to + * more than 5 years in the future). After the redeem_by date, the coupon can no longer be applied + * to new customers. */ @SerializedName("redeem_by") Long redeemBy; @@ -367,7 +368,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 +379,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}. @@ -407,8 +408,9 @@ public Builder setPercentOff(BigDecimal percentOff) { } /** - * Unix timestamp specifying the last time at which the coupon can be redeemed. After the - * redeem_by date, the coupon can no longer be applied to new customers. + * Unix timestamp specifying the last time at which the coupon can be redeemed (cannot be set to + * more than 5 years in the future). After the redeem_by date, the coupon can no longer be + * applied to new customers. */ public Builder setRedeemBy(Long redeemBy) { this.redeemBy = redeemBy; 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 6c4828056bf..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}. @@ -883,6 +883,13 @@ public static class Refund { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + @SerializedName("payment_record_refund") + PaymentRecordRefund paymentRecordRefund; + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -890,10 +897,24 @@ public static class Refund { @SerializedName("refund") String refund; - private Refund(Long amountRefunded, Map extraParams, String refund) { + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + @SerializedName("type") + Type type; + + private Refund( + Long amountRefunded, + Map extraParams, + PaymentRecordRefund paymentRecordRefund, + String refund, + Type type) { this.amountRefunded = amountRefunded; this.extraParams = extraParams; + this.paymentRecordRefund = paymentRecordRefund; this.refund = refund; + this.type = type; } public static Builder builder() { @@ -905,12 +926,20 @@ public static class Builder { private Map extraParams; + private PaymentRecordRefund paymentRecordRefund; + private String refund; + private Type type; + /** Finalize and obtain parameter instance from this builder. */ public CreditNoteCreateParams.Refund build() { return new CreditNoteCreateParams.Refund( - this.amountRefunded, this.extraParams, this.refund); + this.amountRefunded, + this.extraParams, + this.paymentRecordRefund, + this.refund, + this.type); } /** @@ -948,6 +977,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + public Builder setPaymentRecordRefund( + CreditNoteCreateParams.Refund.PaymentRecordRefund paymentRecordRefund) { + this.paymentRecordRefund = paymentRecordRefund; + return this; + } + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -956,6 +995,132 @@ public Builder setRefund(String refund) { this.refund = refund; return this; } + + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + public Builder setType(CreditNoteCreateParams.Refund.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentRecordRefund { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 of the PaymentRecord with the refund to link to this + * credit note. + */ + @SerializedName("payment_record") + String paymentRecord; + + /** + * Required. The PaymentRecord refund group to link to this credit note. For + * refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on the + * PaymentRecord. + */ + @SerializedName("refund_group") + String refundGroup; + + private PaymentRecordRefund( + Map extraParams, String paymentRecord, String refundGroup) { + this.extraParams = extraParams; + this.paymentRecord = paymentRecord; + this.refundGroup = refundGroup; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String paymentRecord; + + private String refundGroup; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditNoteCreateParams.Refund.PaymentRecordRefund build() { + return new CreditNoteCreateParams.Refund.PaymentRecordRefund( + this.extraParams, this.paymentRecord, this.refundGroup); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNoteCreateParams.Refund.PaymentRecordRefund#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNoteCreateParams.Refund.PaymentRecordRefund#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 of the PaymentRecord with the refund to link to this + * credit note. + */ + public Builder setPaymentRecord(String paymentRecord) { + this.paymentRecord = paymentRecord; + return this; + } + + /** + * Required. The PaymentRecord refund group to link to this credit note. + * For refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on + * the PaymentRecord. + */ + public Builder setRefundGroup(String refundGroup) { + this.refundGroup = refundGroup; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("payment_record_refund") + PAYMENT_RECORD_REFUND("payment_record_refund"), + + @SerializedName("refund") + REFUND("refund"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } 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 dd6aeabb1ac..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}. @@ -956,6 +956,13 @@ public static class Refund { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + @SerializedName("payment_record_refund") + PaymentRecordRefund paymentRecordRefund; + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -963,10 +970,24 @@ public static class Refund { @SerializedName("refund") String refund; - private Refund(Long amountRefunded, Map extraParams, String refund) { + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + @SerializedName("type") + Type type; + + private Refund( + Long amountRefunded, + Map extraParams, + PaymentRecordRefund paymentRecordRefund, + String refund, + Type type) { this.amountRefunded = amountRefunded; this.extraParams = extraParams; + this.paymentRecordRefund = paymentRecordRefund; this.refund = refund; + this.type = type; } public static Builder builder() { @@ -978,12 +999,20 @@ public static class Builder { private Map extraParams; + private PaymentRecordRefund paymentRecordRefund; + private String refund; + private Type type; + /** Finalize and obtain parameter instance from this builder. */ public CreditNotePreviewLinesListParams.Refund build() { return new CreditNotePreviewLinesListParams.Refund( - this.amountRefunded, this.extraParams, this.refund); + this.amountRefunded, + this.extraParams, + this.paymentRecordRefund, + this.refund, + this.type); } /** @@ -1022,6 +1051,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + public Builder setPaymentRecordRefund( + CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund paymentRecordRefund) { + this.paymentRecordRefund = paymentRecordRefund; + return this; + } + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -1030,6 +1069,132 @@ public Builder setRefund(String refund) { this.refund = refund; return this; } + + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + public Builder setType(CreditNotePreviewLinesListParams.Refund.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentRecordRefund { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 of the PaymentRecord with the refund to link to this + * credit note. + */ + @SerializedName("payment_record") + String paymentRecord; + + /** + * Required. The PaymentRecord refund group to link to this credit note. For + * refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on the + * PaymentRecord. + */ + @SerializedName("refund_group") + String refundGroup; + + private PaymentRecordRefund( + Map extraParams, String paymentRecord, String refundGroup) { + this.extraParams = extraParams; + this.paymentRecord = paymentRecord; + this.refundGroup = refundGroup; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String paymentRecord; + + private String refundGroup; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund build() { + return new CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund( + this.extraParams, this.paymentRecord, this.refundGroup); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund#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 of the PaymentRecord with the refund to link to this + * credit note. + */ + public Builder setPaymentRecord(String paymentRecord) { + this.paymentRecord = paymentRecord; + return this; + } + + /** + * Required. The PaymentRecord refund group to link to this credit note. + * For refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on + * the PaymentRecord. + */ + public Builder setRefundGroup(String refundGroup) { + this.refundGroup = refundGroup; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("payment_record_refund") + PAYMENT_RECORD_REFUND("payment_record_refund"), + + @SerializedName("refund") + REFUND("refund"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } diff --git a/src/main/java/com/stripe/param/CreditNotePreviewParams.java b/src/main/java/com/stripe/param/CreditNotePreviewParams.java index 65db4a6c8cf..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}. @@ -883,6 +883,13 @@ public static class Refund { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + @SerializedName("payment_record_refund") + PaymentRecordRefund paymentRecordRefund; + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -890,10 +897,24 @@ public static class Refund { @SerializedName("refund") String refund; - private Refund(Long amountRefunded, Map extraParams, String refund) { + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + @SerializedName("type") + Type type; + + private Refund( + Long amountRefunded, + Map extraParams, + PaymentRecordRefund paymentRecordRefund, + String refund, + Type type) { this.amountRefunded = amountRefunded; this.extraParams = extraParams; + this.paymentRecordRefund = paymentRecordRefund; this.refund = refund; + this.type = type; } public static Builder builder() { @@ -905,12 +926,20 @@ public static class Builder { private Map extraParams; + private PaymentRecordRefund paymentRecordRefund; + private String refund; + private Type type; + /** Finalize and obtain parameter instance from this builder. */ public CreditNotePreviewParams.Refund build() { return new CreditNotePreviewParams.Refund( - this.amountRefunded, this.extraParams, this.refund); + this.amountRefunded, + this.extraParams, + this.paymentRecordRefund, + this.refund, + this.type); } /** @@ -948,6 +977,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + public Builder setPaymentRecordRefund( + CreditNotePreviewParams.Refund.PaymentRecordRefund paymentRecordRefund) { + this.paymentRecordRefund = paymentRecordRefund; + return this; + } + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -956,6 +995,132 @@ public Builder setRefund(String refund) { this.refund = refund; return this; } + + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + public Builder setType(CreditNotePreviewParams.Refund.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentRecordRefund { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 of the PaymentRecord with the refund to link to this + * credit note. + */ + @SerializedName("payment_record") + String paymentRecord; + + /** + * Required. The PaymentRecord refund group to link to this credit note. For + * refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on the + * PaymentRecord. + */ + @SerializedName("refund_group") + String refundGroup; + + private PaymentRecordRefund( + Map extraParams, String paymentRecord, String refundGroup) { + this.extraParams = extraParams; + this.paymentRecord = paymentRecord; + this.refundGroup = refundGroup; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String paymentRecord; + + private String refundGroup; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditNotePreviewParams.Refund.PaymentRecordRefund build() { + return new CreditNotePreviewParams.Refund.PaymentRecordRefund( + this.extraParams, this.paymentRecord, this.refundGroup); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNotePreviewParams.Refund.PaymentRecordRefund#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNotePreviewParams.Refund.PaymentRecordRefund#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 of the PaymentRecord with the refund to link to this + * credit note. + */ + public Builder setPaymentRecord(String paymentRecord) { + this.paymentRecord = paymentRecord; + return this; + } + + /** + * Required. The PaymentRecord refund group to link to this credit note. + * For refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on + * the PaymentRecord. + */ + public Builder setRefundGroup(String refundGroup) { + this.refundGroup = refundGroup; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("payment_record_refund") + PAYMENT_RECORD_REFUND("payment_record_refund"), + + @SerializedName("refund") + REFUND("refund"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } 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 7c68b8b5907..a6d58919467 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionCollectionListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerBalanceTransactionCollectionListParams extends ApiRequestParams { + /** Only return customer balance transactions that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * 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 @@ -35,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. @@ -52,14 +60,18 @@ public class CustomerBalanceTransactionCollectionListParams extends ApiRequestPa String startingAfter; private CustomerBalanceTransactionCollectionListParams( + Object created, 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; } @@ -69,12 +81,16 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; private Map extraParams; + private String invoice; + private Long limit; private String startingAfter; @@ -82,7 +98,29 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerBalanceTransactionCollectionListParams build() { return new CustomerBalanceTransactionCollectionListParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.invoice, + this.limit, + this.startingAfter); + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(CustomerBalanceTransactionCollectionListParams.Created created) { + this.created = created; + return this; + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(Long created) { + this.created = created; + return this; } /** @@ -149,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. @@ -169,4 +213,115 @@ public Builder setStartingAfter(String startingAfter) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerBalanceTransactionCollectionListParams.Created build() { + return new CustomerBalanceTransactionCollectionListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerBalanceTransactionCollectionListParams.Created#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerBalanceTransactionCollectionListParams.Created#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } } 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 2177805074e..6e9b6139559 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerBalanceTransactionListParams extends ApiRequestParams { + /** Only return customer balance transactions that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * 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 @@ -35,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. @@ -52,14 +60,18 @@ public class CustomerBalanceTransactionListParams extends ApiRequestParams { String startingAfter; private CustomerBalanceTransactionListParams( + Object created, 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; } @@ -69,12 +81,16 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; private Map extraParams; + private String invoice; + private Long limit; private String startingAfter; @@ -82,7 +98,29 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerBalanceTransactionListParams build() { return new CustomerBalanceTransactionListParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.invoice, + this.limit, + this.startingAfter); + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(CustomerBalanceTransactionListParams.Created created) { + this.created = created; + return this; + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(Long created) { + this.created = created; + return this; } /** @@ -148,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. @@ -168,4 +212,114 @@ public Builder setStartingAfter(String startingAfter) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerBalanceTransactionListParams.Created build() { + return new CustomerBalanceTransactionListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerBalanceTransactionListParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerBalanceTransactionListParams.Created#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } } 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 5bd309da028..8911b15a3a4 100644 --- a/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java +++ b/src/main/java/com/stripe/param/CustomerBalanceTransactionsParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class CustomerBalanceTransactionsParams extends ApiRequestParams { + /** Only return customer balance transactions that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * 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 @@ -35,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. @@ -52,14 +60,18 @@ public class CustomerBalanceTransactionsParams extends ApiRequestParams { String startingAfter; private CustomerBalanceTransactionsParams( + Object created, 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; } @@ -69,12 +81,16 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; private Map extraParams; + private String invoice; + private Long limit; private String startingAfter; @@ -82,7 +98,29 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerBalanceTransactionsParams build() { return new CustomerBalanceTransactionsParams( - this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.invoice, + this.limit, + this.startingAfter); + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(CustomerBalanceTransactionsParams.Created created) { + this.created = created; + return this; + } + + /** + * Only return customer balance transactions that were created during the given date interval. + */ + public Builder setCreated(Long created) { + this.created = created; + return this; } /** @@ -148,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. @@ -168,4 +212,114 @@ public Builder setStartingAfter(String startingAfter) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerBalanceTransactionsParams.Created build() { + return new CustomerBalanceTransactionsParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * CustomerBalanceTransactionsParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link CustomerBalanceTransactionsParams.Created#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } } 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 c64735c67a4..2a94319b861 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; @@ -27,6 +31,10 @@ public class CustomerCreateParams extends ApiRequestParams { @SerializedName("balance") Long balance; + /** The customer's business name. This may be up to 150 characters. */ + @SerializedName("business_name") + Object businessName; + /** Balance information and default balance settings for this customer. */ @SerializedName("cash_balance") CashBalance cashBalance; @@ -58,6 +66,10 @@ public class CustomerCreateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** The customer's full name. This may be up to 150 characters. */ + @SerializedName("individual_name") + Object individualName; + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -70,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}. @@ -126,11 +138,13 @@ public class CustomerCreateParams extends ApiRequestParams { private CustomerCreateParams( Object address, Long balance, + Object businessName, CashBalance cashBalance, String description, String email, List expand, Map extraParams, + Object individualName, String invoicePrefix, InvoiceSettings invoiceSettings, Object metadata, @@ -148,11 +162,13 @@ private CustomerCreateParams( Boolean validate) { this.address = address; this.balance = balance; + this.businessName = businessName; this.cashBalance = cashBalance; this.description = description; this.email = email; this.expand = expand; this.extraParams = extraParams; + this.individualName = individualName; this.invoicePrefix = invoicePrefix; this.invoiceSettings = invoiceSettings; this.metadata = metadata; @@ -179,6 +195,8 @@ public static class Builder { private Long balance; + private Object businessName; + private CashBalance cashBalance; private String description; @@ -189,6 +207,8 @@ public static class Builder { private Map extraParams; + private Object individualName; + private String invoicePrefix; private InvoiceSettings invoiceSettings; @@ -224,11 +244,13 @@ public CustomerCreateParams build() { return new CustomerCreateParams( this.address, this.balance, + this.businessName, this.cashBalance, this.description, this.email, this.expand, this.extraParams, + this.individualName, this.invoicePrefix, this.invoiceSettings, this.metadata, @@ -246,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; @@ -269,6 +299,18 @@ public Builder setBalance(Long balance) { return this; } + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(EmptyParam businessName) { + this.businessName = businessName; + return this; + } + /** Balance information and default balance settings for this customer. */ public Builder setCashBalance(CustomerCreateParams.CashBalance cashBalance) { this.cashBalance = cashBalance; @@ -345,6 +387,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(String individualName) { + this.individualName = individualName; + return this; + } + + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(EmptyParam individualName) { + this.individualName = individualName; + return this; + } + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -389,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}. @@ -400,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}. @@ -556,11 +610,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -568,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; @@ -662,13 +719,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -680,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; @@ -778,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; @@ -835,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) { @@ -1382,11 +1442,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1394,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; @@ -1490,13 +1553,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1508,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; @@ -1672,12 +1738,12 @@ public static class TaxIdData { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -1751,11 +1817,12 @@ public Builder putAllExtraParam(Map map) { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code + * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ public Builder setType(CustomerCreateParams.TaxIdData.Type type) { this.type = type; @@ -2019,6 +2086,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), 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 588caebbb85..9402cf8bf71 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -285,6 +285,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -318,6 +321,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -348,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 fb75adf70d3..517eae5b7fe 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -285,6 +285,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -318,6 +321,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -348,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 40a075540cf..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}. @@ -563,11 +563,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -685,25 +688,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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 d69fb2456b9..0c261c015d1 100644 --- a/src/main/java/com/stripe/param/CustomerSessionCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerSessionCreateParams.java @@ -14,19 +14,20 @@ @EqualsAndHashCode(callSuper = false) public class CustomerSessionCreateParams extends ApiRequestParams { /** - * Required. Configuration for each component. Exactly 1 component must be + * Required. Configuration for each component. At least 1 component must be * enabled. */ @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,11 +72,11 @@ 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); } /** - * Required. Configuration for each component. Exactly 1 component must be + * Required. Configuration for each component. At least 1 component must be * enabled. */ public Builder setComponents(CustomerSessionCreateParams.Components components) { @@ -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 @@ -148,6 +156,10 @@ public static class Components { @SerializedName("buy_button") BuyButton buyButton; + /** Configuration for the customer sheet. */ + @SerializedName("customer_sheet") + CustomerSheet customerSheet; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -157,6 +169,10 @@ public static class Components { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configuration for the mobile payment element. */ + @SerializedName("mobile_payment_element") + MobilePaymentElement mobilePaymentElement; + /** Configuration for the Payment Element. */ @SerializedName("payment_element") PaymentElement paymentElement; @@ -167,11 +183,15 @@ public static class Components { private Components( BuyButton buyButton, + CustomerSheet customerSheet, Map extraParams, + MobilePaymentElement mobilePaymentElement, PaymentElement paymentElement, PricingTable pricingTable) { this.buyButton = buyButton; + this.customerSheet = customerSheet; this.extraParams = extraParams; + this.mobilePaymentElement = mobilePaymentElement; this.paymentElement = paymentElement; this.pricingTable = pricingTable; } @@ -183,8 +203,12 @@ public static Builder builder() { public static class Builder { private BuyButton buyButton; + private CustomerSheet customerSheet; + private Map extraParams; + private MobilePaymentElement mobilePaymentElement; + private PaymentElement paymentElement; private PricingTable pricingTable; @@ -192,7 +216,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CustomerSessionCreateParams.Components build() { return new CustomerSessionCreateParams.Components( - this.buyButton, this.extraParams, this.paymentElement, this.pricingTable); + this.buyButton, + this.customerSheet, + this.extraParams, + this.mobilePaymentElement, + this.paymentElement, + this.pricingTable); } /** Configuration for buy button. */ @@ -201,6 +230,13 @@ public Builder setBuyButton(CustomerSessionCreateParams.Components.BuyButton buy return this; } + /** Configuration for the customer sheet. */ + public Builder setCustomerSheet( + CustomerSessionCreateParams.Components.CustomerSheet customerSheet) { + this.customerSheet = customerSheet; + 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 @@ -227,6 +263,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configuration for the mobile payment element. */ + public Builder setMobilePaymentElement( + CustomerSessionCreateParams.Components.MobilePaymentElement mobilePaymentElement) { + this.mobilePaymentElement = mobilePaymentElement; + return this; + } + /** Configuration for the Payment Element. */ public Builder setPaymentElement( CustomerSessionCreateParams.Components.PaymentElement paymentElement) { @@ -314,6 +357,707 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerSheet { + /** Required. Whether the customer sheet is enabled. */ + @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; + + /** This hash defines whether the customer sheet supports certain features. */ + @SerializedName("features") + Features features; + + private CustomerSheet(Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.CustomerSheet build() { + return new CustomerSessionCreateParams.Components.CustomerSheet( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the customer sheet is enabled. */ + 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 CustomerSessionCreateParams.Components.CustomerSheet#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CustomerSessionCreateParams.Components.CustomerSheet#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 defines whether the customer sheet supports certain features. */ + public Builder setFeatures( + CustomerSessionCreateParams.Components.CustomerSheet.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Features { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 {@code + * allow_redisplay} values that controls which saved payment methods the customer sheet + * displays by filtering to only show payment methods with an {@code allow_redisplay} value + * that is present in this list. + * + *

If not specified, defaults to ["always"]. In order to display all saved + * payment methods, specify ["always", "limited", + * "unspecified"]. + */ + @SerializedName("payment_method_allow_redisplay_filters") + List< + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters; + + /** + * Controls whether the customer sheet displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + */ + @SerializedName("payment_method_remove") + PaymentMethodRemove paymentMethodRemove; + + private Features( + Map extraParams, + List< + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters, + PaymentMethodRemove paymentMethodRemove) { + this.extraParams = extraParams; + this.paymentMethodAllowRedisplayFilters = paymentMethodAllowRedisplayFilters; + this.paymentMethodRemove = paymentMethodRemove; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List< + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters; + + private PaymentMethodRemove paymentMethodRemove; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.CustomerSheet.Features build() { + return new CustomerSessionCreateParams.Components.CustomerSheet.Features( + this.extraParams, + this.paymentMethodAllowRedisplayFilters, + this.paymentMethodRemove); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerSessionCreateParams.Components.CustomerSheet.Features#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerSessionCreateParams.Components.CustomerSheet.Features#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 `paymentMethodAllowRedisplayFilters` list. A list is initialized for + * the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * CustomerSessionCreateParams.Components.CustomerSheet.Features#paymentMethodAllowRedisplayFilters} + * for the field documentation. + */ + public Builder addPaymentMethodAllowRedisplayFilter( + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter + element) { + if (this.paymentMethodAllowRedisplayFilters == null) { + this.paymentMethodAllowRedisplayFilters = new ArrayList<>(); + } + this.paymentMethodAllowRedisplayFilters.add(element); + return this; + } + + /** + * Add all elements to `paymentMethodAllowRedisplayFilters` list. A list is initialized + * for the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * CustomerSessionCreateParams.Components.CustomerSheet.Features#paymentMethodAllowRedisplayFilters} + * for the field documentation. + */ + public Builder addAllPaymentMethodAllowRedisplayFilter( + List< + CustomerSessionCreateParams.Components.CustomerSheet.Features + .PaymentMethodAllowRedisplayFilter> + elements) { + if (this.paymentMethodAllowRedisplayFilters == null) { + this.paymentMethodAllowRedisplayFilters = new ArrayList<>(); + } + this.paymentMethodAllowRedisplayFilters.addAll(elements); + return this; + } + + /** + * Controls whether the customer sheet displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + */ + public Builder setPaymentMethodRemove( + CustomerSessionCreateParams.Components.CustomerSheet.Features.PaymentMethodRemove + paymentMethodRemove) { + this.paymentMethodRemove = paymentMethodRemove; + return this; + } + } + + public enum PaymentMethodAllowRedisplayFilter implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodAllowRedisplayFilter(String value) { + this.value = value; + } + } + + public enum PaymentMethodRemove implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodRemove(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MobilePaymentElement { + /** Required. Whether the mobile payment element is enabled. */ + @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; + + /** This hash defines whether the mobile payment element supports certain features. */ + @SerializedName("features") + Features features; + + private MobilePaymentElement( + Boolean enabled, Map extraParams, Features features) { + this.enabled = enabled; + this.extraParams = extraParams; + this.features = features; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Features features; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.MobilePaymentElement build() { + return new CustomerSessionCreateParams.Components.MobilePaymentElement( + this.enabled, this.extraParams, this.features); + } + + /** Required. Whether the mobile payment element is enabled. */ + 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 CustomerSessionCreateParams.Components.MobilePaymentElement#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CustomerSessionCreateParams.Components.MobilePaymentElement#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 defines whether the mobile payment element supports certain features. */ + public Builder setFeatures( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features features) { + this.features = features; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Features { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 {@code + * allow_redisplay} values that controls which saved payment methods the mobile payment + * element displays by filtering to only show payment methods with an {@code + * allow_redisplay} value that is present in this list. + * + *

If not specified, defaults to ["always"]. In order to display all saved + * payment methods, specify ["always", "limited", + * "unspecified"]. + */ + @SerializedName("payment_method_allow_redisplay_filters") + List< + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters; + + /** Controls whether or not the mobile payment element shows saved payment methods. */ + @SerializedName("payment_method_redisplay") + PaymentMethodRedisplay paymentMethodRedisplay; + + /** + * Controls whether the mobile payment element displays the option to remove a saved payment + * method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + */ + @SerializedName("payment_method_remove") + PaymentMethodRemove paymentMethodRemove; + + /** + * Controls whether the mobile payment element displays a checkbox offering to save a new + * payment method. + * + *

If a customer checks the box, the {@code + * allow_redisplay} value on the PaymentMethod is set to {@code 'always'} at + * confirmation time. For PaymentIntents, the {@code + * setup_future_usage} value is also set to the value defined in {@code + * payment_method_save_usage}. + */ + @SerializedName("payment_method_save") + PaymentMethodSave paymentMethodSave; + + /** + * Allows overriding the value of allow_override when saving a new payment method when + * payment_method_save is set to disabled. Use values: "always", + * "limited", or "unspecified". + * + *

If not specified, defaults to {@code nil} (no override value). + */ + @SerializedName("payment_method_save_allow_redisplay_override") + PaymentMethodSaveAllowRedisplayOverride paymentMethodSaveAllowRedisplayOverride; + + private Features( + Map extraParams, + List< + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters, + PaymentMethodRedisplay paymentMethodRedisplay, + PaymentMethodRemove paymentMethodRemove, + PaymentMethodSave paymentMethodSave, + PaymentMethodSaveAllowRedisplayOverride paymentMethodSaveAllowRedisplayOverride) { + this.extraParams = extraParams; + this.paymentMethodAllowRedisplayFilters = paymentMethodAllowRedisplayFilters; + this.paymentMethodRedisplay = paymentMethodRedisplay; + this.paymentMethodRemove = paymentMethodRemove; + this.paymentMethodSave = paymentMethodSave; + this.paymentMethodSaveAllowRedisplayOverride = paymentMethodSaveAllowRedisplayOverride; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List< + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter> + paymentMethodAllowRedisplayFilters; + + private PaymentMethodRedisplay paymentMethodRedisplay; + + private PaymentMethodRemove paymentMethodRemove; + + private PaymentMethodSave paymentMethodSave; + + private PaymentMethodSaveAllowRedisplayOverride paymentMethodSaveAllowRedisplayOverride; + + /** Finalize and obtain parameter instance from this builder. */ + public CustomerSessionCreateParams.Components.MobilePaymentElement.Features build() { + return new CustomerSessionCreateParams.Components.MobilePaymentElement.Features( + this.extraParams, + this.paymentMethodAllowRedisplayFilters, + this.paymentMethodRedisplay, + this.paymentMethodRemove, + this.paymentMethodSave, + this.paymentMethodSaveAllowRedisplayOverride); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerSessionCreateParams.Components.MobilePaymentElement.Features#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CustomerSessionCreateParams.Components.MobilePaymentElement.Features#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 `paymentMethodAllowRedisplayFilters` list. A list is initialized for + * the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * CustomerSessionCreateParams.Components.MobilePaymentElement.Features#paymentMethodAllowRedisplayFilters} + * for the field documentation. + */ + public Builder addPaymentMethodAllowRedisplayFilter( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter + element) { + if (this.paymentMethodAllowRedisplayFilters == null) { + this.paymentMethodAllowRedisplayFilters = new ArrayList<>(); + } + this.paymentMethodAllowRedisplayFilters.add(element); + return this; + } + + /** + * Add all elements to `paymentMethodAllowRedisplayFilters` list. A list is initialized + * for the first `add/addAll` call, and subsequent calls adds additional elements to the + * original list. See {@link + * CustomerSessionCreateParams.Components.MobilePaymentElement.Features#paymentMethodAllowRedisplayFilters} + * for the field documentation. + */ + public Builder addAllPaymentMethodAllowRedisplayFilter( + List< + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodAllowRedisplayFilter> + elements) { + if (this.paymentMethodAllowRedisplayFilters == null) { + this.paymentMethodAllowRedisplayFilters = new ArrayList<>(); + } + this.paymentMethodAllowRedisplayFilters.addAll(elements); + return this; + } + + /** Controls whether or not the mobile payment element shows saved payment methods. */ + public Builder setPaymentMethodRedisplay( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodRedisplay + paymentMethodRedisplay) { + this.paymentMethodRedisplay = paymentMethodRedisplay; + return this; + } + + /** + * Controls whether the mobile payment element displays the option to remove a saved + * payment method." + * + *

Allowing buyers to remove their saved payment methods impacts subscriptions that + * depend on that payment method. Removing the payment method detaches the {@code + * customer} object from that PaymentMethod. + */ + public Builder setPaymentMethodRemove( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodRemove + paymentMethodRemove) { + this.paymentMethodRemove = paymentMethodRemove; + return this; + } + + /** + * Controls whether the mobile payment element displays a checkbox offering to save a new + * payment method. + * + *

If a customer checks the box, the {@code + * allow_redisplay} value on the PaymentMethod is set to {@code 'always'} at + * confirmation time. For PaymentIntents, the {@code + * setup_future_usage} value is also set to the value defined in {@code + * payment_method_save_usage}. + */ + public Builder setPaymentMethodSave( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features.PaymentMethodSave + paymentMethodSave) { + this.paymentMethodSave = paymentMethodSave; + return this; + } + + /** + * Allows overriding the value of allow_override when saving a new payment method when + * payment_method_save is set to disabled. Use values: "always", + * "limited", or "unspecified". + * + *

If not specified, defaults to {@code nil} (no override value). + */ + public Builder setPaymentMethodSaveAllowRedisplayOverride( + CustomerSessionCreateParams.Components.MobilePaymentElement.Features + .PaymentMethodSaveAllowRedisplayOverride + paymentMethodSaveAllowRedisplayOverride) { + this.paymentMethodSaveAllowRedisplayOverride = paymentMethodSaveAllowRedisplayOverride; + return this; + } + } + + public enum PaymentMethodAllowRedisplayFilter implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodAllowRedisplayFilter(String value) { + this.value = value; + } + } + + public enum PaymentMethodRedisplay implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodRedisplay(String value) { + this.value = value; + } + } + + public enum PaymentMethodRemove implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodRemove(String value) { + this.value = value; + } + } + + public enum PaymentMethodSave implements ApiRequestParams.EnumParam { + @SerializedName("disabled") + DISABLED("disabled"), + + @SerializedName("enabled") + ENABLED("enabled"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodSave(String value) { + this.value = value; + } + } + + public enum PaymentMethodSaveAllowRedisplayOverride implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("limited") + LIMITED("limited"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodSaveAllowRedisplayOverride(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PaymentElement { diff --git a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java index b135c6adc4c..a2a30ff9124 100644 --- a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java @@ -42,11 +42,11 @@ public class CustomerTaxIdCreateParams extends ApiRequestParams { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, + * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -149,12 +149,12 @@ public Builder putAllExtraParam(Map map) { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(CustomerTaxIdCreateParams.Type type) { this.type = type; @@ -418,6 +418,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/CustomerUpdateParams.java b/src/main/java/com/stripe/param/CustomerUpdateParams.java index ad19ad87e2a..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; @@ -27,20 +31,24 @@ public class CustomerUpdateParams extends ApiRequestParams { @SerializedName("balance") Long balance; + /** The customer's business name. This may be up to 150 characters. */ + @SerializedName("business_name") + Object businessName; + /** Balance information and default balance settings for this customer. */ @SerializedName("cash_balance") 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 property. + * href="https://docs.stripe.com/api/customers/update#update_customer-source">source property. */ @SerializedName("default_source") Object defaultSource; @@ -72,6 +80,10 @@ public class CustomerUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** The customer's full name. This may be up to 150 characters. */ + @SerializedName("individual_name") + Object individualName; + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -84,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}. @@ -129,12 +141,14 @@ public class CustomerUpdateParams extends ApiRequestParams { private CustomerUpdateParams( Object address, Long balance, + Object businessName, CashBalance cashBalance, Object defaultSource, Object description, Object email, List expand, Map extraParams, + Object individualName, Object invoicePrefix, InvoiceSettings invoiceSettings, Object metadata, @@ -149,12 +163,14 @@ private CustomerUpdateParams( Boolean validate) { this.address = address; this.balance = balance; + this.businessName = businessName; this.cashBalance = cashBalance; this.defaultSource = defaultSource; this.description = description; this.email = email; this.expand = expand; this.extraParams = extraParams; + this.individualName = individualName; this.invoicePrefix = invoicePrefix; this.invoiceSettings = invoiceSettings; this.metadata = metadata; @@ -178,6 +194,8 @@ public static class Builder { private Long balance; + private Object businessName; + private CashBalance cashBalance; private Object defaultSource; @@ -190,6 +208,8 @@ public static class Builder { private Map extraParams; + private Object individualName; + private Object invoicePrefix; private InvoiceSettings invoiceSettings; @@ -219,12 +239,14 @@ public CustomerUpdateParams build() { return new CustomerUpdateParams( this.address, this.balance, + this.businessName, this.cashBalance, this.defaultSource, this.description, this.email, this.expand, this.extraParams, + this.individualName, this.invoicePrefix, this.invoiceSettings, this.metadata, @@ -239,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; @@ -262,6 +292,18 @@ public Builder setBalance(Long balance) { return this; } + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(EmptyParam businessName) { + this.businessName = businessName; + return this; + } + /** Balance information and default balance settings for this customer. */ public Builder setCashBalance(CustomerUpdateParams.CashBalance cashBalance) { this.cashBalance = cashBalance; @@ -270,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) { @@ -287,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) { @@ -390,6 +432,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(String individualName) { + this.individualName = individualName; + return this; + } + + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(EmptyParam individualName) { + this.individualName = individualName; + return this; + } + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -443,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}. @@ -454,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}. @@ -590,11 +644,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -602,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; @@ -712,25 +769,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -748,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; @@ -852,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; @@ -909,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) { @@ -1506,11 +1569,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1518,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; @@ -1630,25 +1696,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1666,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 1cd05ee3485..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}. @@ -1581,11 +1581,11 @@ public static class ShippingAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -1708,25 +1711,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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; @@ -2067,11 +2076,11 @@ public static class ShippingAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -2194,25 +2206,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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 55026b17719..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}. @@ -361,6 +361,9 @@ public enum Purpose implements ApiRequestParams.EnumParam { @SerializedName("pci_document") PCI_DOCUMENT("pci_document"), + @SerializedName("platform_terms_of_service") + PLATFORM_TERMS_OF_SERVICE("platform_terms_of_service"), + @SerializedName("tax_document_user_upload") TAX_DOCUMENT_USER_UPLOAD("tax_document_user_upload"), 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/FileListParams.java b/src/main/java/com/stripe/param/FileListParams.java index ad1192cacea..f0085ee3138 100644 --- a/src/main/java/com/stripe/param/FileListParams.java +++ b/src/main/java/com/stripe/param/FileListParams.java @@ -363,6 +363,9 @@ public enum Purpose implements ApiRequestParams.EnumParam { @SerializedName("pci_document") PCI_DOCUMENT("pci_document"), + @SerializedName("platform_terms_of_service") + PLATFORM_TERMS_OF_SERVICE("platform_terms_of_service"), + @SerializedName("selfie") SELFIE("selfie"), diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java index 56eb39240e7..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,23 +1118,32 @@ public static class ProductData { @SerializedName("name") String name; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String 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") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String 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() { @@ -1154,6 +1163,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceAddLinesParams.Line.PriceData.ProductData build() { return new InvoiceAddLinesParams.Line.PriceData.ProductData( @@ -1162,7 +1173,8 @@ public InvoiceAddLinesParams.Line.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1265,11 +1277,20 @@ 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; } + + /** + * 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; + } } } diff --git a/src/main/java/com/stripe/param/InvoiceAttachPaymentParams.java b/src/main/java/com/stripe/param/InvoiceAttachPaymentParams.java index 3cfd7b21ed9..50caccd07a0 100644 --- a/src/main/java/com/stripe/param/InvoiceAttachPaymentParams.java +++ b/src/main/java/com/stripe/param/InvoiceAttachPaymentParams.java @@ -30,11 +30,19 @@ public class InvoiceAttachPaymentParams extends ApiRequestParams { @SerializedName("payment_intent") String paymentIntent; + /** The ID of the PaymentRecord to attach to the invoice. */ + @SerializedName("payment_record") + String paymentRecord; + private InvoiceAttachPaymentParams( - List expand, Map extraParams, String paymentIntent) { + List expand, + Map extraParams, + String paymentIntent, + String paymentRecord) { this.expand = expand; this.extraParams = extraParams; this.paymentIntent = paymentIntent; + this.paymentRecord = paymentRecord; } public static Builder builder() { @@ -48,9 +56,12 @@ public static class Builder { private String paymentIntent; + private String paymentRecord; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceAttachPaymentParams build() { - return new InvoiceAttachPaymentParams(this.expand, this.extraParams, this.paymentIntent); + return new InvoiceAttachPaymentParams( + this.expand, this.extraParams, this.paymentIntent, this.paymentRecord); } /** @@ -110,5 +121,11 @@ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; } + + /** The ID of the PaymentRecord to attach to the invoice. */ + public Builder setPaymentRecord(String paymentRecord) { + this.paymentRecord = paymentRecord; + return this; + } } } diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index d9e51691e0d..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) { @@ -1536,7 +1551,6 @@ public static class PaymentSettings { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ @SerializedName("payment_method_types") Object paymentMethodTypes; @@ -1667,7 +1681,6 @@ public Builder addAllPaymentMethodType( * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { this.paymentMethodTypes = paymentMethodTypes; @@ -1680,7 +1693,6 @@ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes( List paymentMethodTypes) { @@ -1736,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. @@ -1757,6 +1776,7 @@ private PaymentMethodOptions( Object customerBalance, Map extraParams, Object konbini, + Object payto, Object sepaDebit, Object usBankAccount) { this.acssDebit = acssDebit; @@ -1765,6 +1785,7 @@ private PaymentMethodOptions( this.customerBalance = customerBalance; this.extraParams = extraParams; this.konbini = konbini; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -1786,6 +1807,8 @@ public static class Builder { private Object konbini; + private Object payto; + private Object sepaDebit; private Object usBankAccount; @@ -1799,6 +1822,7 @@ public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions build() { this.customerBalance, this.extraParams, this.konbini, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -1926,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. @@ -2293,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; @@ -2301,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. */ @@ -2371,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( @@ -2384,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. */ @@ -3032,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 { @@ -3622,6 +3888,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -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) { @@ -5041,11 +5313,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -5148,13 +5423,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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 48f858575e5..8797706e760 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; @@ -844,11 +881,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -951,13 +991,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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; @@ -1101,11 +1144,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -1211,13 +1257,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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; @@ -1360,11 +1409,12 @@ public static class TaxId { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code + * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ @SerializedName("type") Type type; @@ -1441,12 +1491,12 @@ public Builder putAllExtraParam(Map map) { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, * {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code - * ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, - * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code - * zw_tin} + * ph_tin}, {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, + * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, + * or {@code zw_tin} */ public Builder setType(InvoiceCreatePreviewParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -1710,6 +1760,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), @@ -1966,7 +2019,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 +2030,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 +2043,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 +2055,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 +2064,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 +2328,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 +2339,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 +2352,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 +2369,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 +2385,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 +2397,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 +2697,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 +2814,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 @@ -3101,15 +3154,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -3120,12 +3178,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public InvoiceCreatePreviewParams.ScheduleDetails.BillingMode build() { return new InvoiceCreatePreviewParams.ScheduleDetails.BillingMode( - this.extraParams, this.type); + this.extraParams, this.flexible, this.type); } /** @@ -3156,9 +3216,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Type type) { this.type = type; @@ -3166,6 +3233,102 @@ public Builder setType(InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Ty } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -3211,7 +3374,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; @@ -3250,11 +3413,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") @@ -3283,7 +3446,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") @@ -3310,17 +3473,7 @@ public static class Phase { List items; /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. Use - * {@code duration} instead. - */ - @SerializedName("iterations") - Long iterations; - - /** - * 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} @@ -3340,10 +3493,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. */ @@ -3395,7 +3548,6 @@ private Phase( Map extraParams, InvoiceSettings invoiceSettings, List items, - Long iterations, Map metadata, String onBehalfOf, ProrationBehavior prorationBehavior, @@ -3419,7 +3571,6 @@ private Phase( this.extraParams = extraParams; this.invoiceSettings = invoiceSettings; this.items = items; - this.iterations = iterations; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.prorationBehavior = prorationBehavior; @@ -3467,8 +3618,6 @@ public static class Builder { private List items; - private Long iterations; - private Map metadata; private String onBehalfOf; @@ -3502,7 +3651,6 @@ public InvoiceCreatePreviewParams.ScheduleDetails.Phase build() { this.extraParams, this.invoiceSettings, this.items, - this.iterations, this.metadata, this.onBehalfOf, this.prorationBehavior, @@ -3566,7 +3714,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 @@ -3658,11 +3806,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) { @@ -3671,11 +3819,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) { @@ -3768,8 +3916,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; @@ -3777,8 +3925,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) { @@ -3848,18 +3996,6 @@ public Builder addAllItem( return this; } - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. - * Use {@code duration} instead. - */ - public Builder setIterations(Long iterations) { - this.iterations = iterations; - 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 @@ -3898,10 +4034,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. */ @@ -3987,7 +4123,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}. @@ -3996,8 +4132,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -4007,7 +4144,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") @@ -4170,8 +4307,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to + * {@code min_item_period_end}. */ public Builder setPeriod( InvoiceCreatePreviewParams.ScheduleDetails.Phase.AddInvoiceItem.Period period) { @@ -4186,7 +4324,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( @@ -4721,7 +4859,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} @@ -4843,7 +4981,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 @@ -5715,7 +5853,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 @@ -5739,7 +5877,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") @@ -5753,9 +5891,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. */ @@ -5961,7 +6099,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( @@ -6010,9 +6148,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. */ @@ -6022,9 +6160,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. */ @@ -6050,7 +6188,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") @@ -6110,7 +6248,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) { @@ -6264,7 +6402,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} @@ -6400,7 +6538,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 @@ -6802,7 +6940,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}. @@ -6857,7 +6995,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}. @@ -6976,7 +7114,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}. @@ -6989,7 +7127,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}. @@ -7017,6 +7155,17 @@ public Builder setCancelAt(Long cancelAt) { return this; } + /** + * A timestamp at which the subscription should cancel. If set to a date before the current + * period ends, this will cause a proration if prorations have been enabled using {@code + * proration_behavior}. If set during a future period, this will always cause a proration for + * that period. + */ + public Builder setCancelAt(InvoiceCreatePreviewParams.SubscriptionDetails.CancelAt cancelAt) { + this.cancelAt = cancelAt; + return this; + } + /** * A timestamp at which the subscription should cancel. If set to a date before the current * period ends, this will cause a proration if prorations have been enabled using {@code @@ -7149,7 +7298,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}. @@ -7222,15 +7371,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -7241,12 +7395,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode build() { return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode( - this.extraParams, this.type); + this.extraParams, this.flexible, this.type); } /** @@ -7277,9 +7433,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType( InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Type type) { @@ -7288,6 +7451,102 @@ public Builder setType( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible build() { + return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -7344,7 +7603,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}. @@ -7365,7 +7624,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") @@ -7376,9 +7635,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. */ @@ -7608,7 +7867,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}. @@ -7619,7 +7878,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}. @@ -7646,7 +7905,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( @@ -7692,9 +7951,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. */ @@ -7704,9 +7963,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. */ @@ -7732,7 +7991,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") @@ -7791,7 +8050,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) { @@ -7941,7 +8200,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 @@ -8076,7 +8335,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} @@ -8270,6 +8529,21 @@ public enum BillingCycleAnchor implements ApiRequestParams.EnumParam { } } + public enum CancelAt implements ApiRequestParams.EnumParam { + @SerializedName("max_period_end") + MAX_PERIOD_END("max_period_end"), + + @SerializedName("min_period_end") + MIN_PERIOD_END("min_period_end"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CancelAt(String value) { + this.value = value; + } + } + public enum ProrationBehavior implements ApiRequestParams.EnumParam { @SerializedName("always_invoice") ALWAYS_INVOICE("always_invoice"), 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 0a4443dd488..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,23 +1002,32 @@ public static class ProductData { @SerializedName("name") Object name; - /** A tax code ID. */ + /** 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 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() { @@ -1038,6 +1047,8 @@ public static class Builder { private Object taxCode; + private Object unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceLineItemUpdateParams.PriceData.ProductData build() { return new InvoiceLineItemUpdateParams.PriceData.ProductData( @@ -1046,7 +1057,8 @@ public InvoiceLineItemUpdateParams.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1166,17 +1178,35 @@ 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; } + + /** + * 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; + } } } 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/InvoicePaymentListParams.java b/src/main/java/com/stripe/param/InvoicePaymentListParams.java index 40853b0e930..2a8bef332a1 100644 --- a/src/main/java/com/stripe/param/InvoicePaymentListParams.java +++ b/src/main/java/com/stripe/param/InvoicePaymentListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class InvoicePaymentListParams extends ApiRequestParams { + /** Only return invoice payments that were created during the given date interval. */ + @SerializedName("created") + Object created; + /** * 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,6 +68,7 @@ public class InvoicePaymentListParams extends ApiRequestParams { Status status; private InvoicePaymentListParams( + Object created, String endingBefore, List expand, Map extraParams, @@ -72,6 +77,7 @@ private InvoicePaymentListParams( Payment payment, String startingAfter, Status status) { + this.created = created; this.endingBefore = endingBefore; this.expand = expand; this.extraParams = extraParams; @@ -87,6 +93,8 @@ public static Builder builder() { } public static class Builder { + private Object created; + private String endingBefore; private List expand; @@ -106,6 +114,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public InvoicePaymentListParams build() { return new InvoicePaymentListParams( + this.created, this.endingBefore, this.expand, this.extraParams, @@ -116,6 +125,18 @@ public InvoicePaymentListParams build() { this.status); } + /** Only return invoice payments that were created during the given date interval. */ + public Builder setCreated(InvoicePaymentListParams.Created created) { + this.created = created; + return this; + } + + /** Only return invoice payments that were created during the given date interval. */ + public Builder setCreated(Long created) { + this.created = created; + 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 @@ -218,6 +239,115 @@ public Builder setStatus(InvoicePaymentListParams.Status status) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Minimum value to filter by (exclusive). */ + @SerializedName("gt") + Long gt; + + /** Minimum value to filter by (inclusive). */ + @SerializedName("gte") + Long gte; + + /** Maximum value to filter by (exclusive). */ + @SerializedName("lt") + Long lt; + + /** Maximum value to filter by (inclusive). */ + @SerializedName("lte") + Long lte; + + private Created(Map extraParams, Long gt, Long gte, Long lt, Long lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long gt; + + private Long gte; + + private Long lt; + + private Long lte; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoicePaymentListParams.Created build() { + return new InvoicePaymentListParams.Created( + this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InvoicePaymentListParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InvoicePaymentListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Minimum value to filter by (exclusive). */ + public Builder setGt(Long gt) { + this.gt = gt; + return this; + } + + /** Minimum value to filter by (inclusive). */ + public Builder setGte(Long gte) { + this.gte = gte; + return this; + } + + /** Maximum value to filter by (exclusive). */ + public Builder setLt(Long lt) { + this.lt = lt; + return this; + } + + /** Maximum value to filter by (inclusive). */ + public Builder setLte(Long lte) { + this.lte = lte; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Payment { @@ -234,13 +364,19 @@ public static class Payment { @SerializedName("payment_intent") String paymentIntent; + /** Only return invoice payments associated by this payment record ID. */ + @SerializedName("payment_record") + String paymentRecord; + /** Required. Only return invoice payments associated by this payment type. */ @SerializedName("type") Type type; - private Payment(Map extraParams, String paymentIntent, Type type) { + private Payment( + Map extraParams, String paymentIntent, String paymentRecord, Type type) { this.extraParams = extraParams; this.paymentIntent = paymentIntent; + this.paymentRecord = paymentRecord; this.type = type; } @@ -253,12 +389,14 @@ public static class Builder { private String paymentIntent; + private String paymentRecord; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public InvoicePaymentListParams.Payment build() { return new InvoicePaymentListParams.Payment( - this.extraParams, this.paymentIntent, this.type); + this.extraParams, this.paymentIntent, this.paymentRecord, this.type); } /** @@ -293,6 +431,12 @@ public Builder setPaymentIntent(String paymentIntent) { return this; } + /** Only return invoice payments associated by this payment record ID. */ + public Builder setPaymentRecord(String paymentRecord) { + this.paymentRecord = paymentRecord; + return this; + } + /** * Required. Only return invoice payments associated by this payment type. */ @@ -304,7 +448,10 @@ public Builder setType(InvoicePaymentListParams.Payment.Type type) { public enum Type implements ApiRequestParams.EnumParam { @SerializedName("payment_intent") - PAYMENT_INTENT("payment_intent"); + PAYMENT_INTENT("payment_intent"), + + @SerializedName("payment_record") + PAYMENT_RECORD("payment_record"); @Getter(onMethod_ = {@Override}) private final String value; 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 8126abb27a0..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,23 +1142,32 @@ public static class ProductData { @SerializedName("name") String name; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String 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") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String 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() { @@ -1178,6 +1187,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceUpdateLinesParams.Line.PriceData.ProductData build() { return new InvoiceUpdateLinesParams.Line.PriceData.ProductData( @@ -1186,7 +1197,8 @@ public InvoiceUpdateLinesParams.Line.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1291,11 +1303,20 @@ 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; } + + /** + * 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; + } } } diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index 77b8e756e09..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) { @@ -1516,7 +1516,6 @@ public static class PaymentSettings { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ @SerializedName("payment_method_types") Object paymentMethodTypes; @@ -1647,7 +1646,6 @@ public Builder addAllPaymentMethodType( * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { this.paymentMethodTypes = paymentMethodTypes; @@ -1660,7 +1658,6 @@ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes( List paymentMethodTypes) { @@ -1716,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. @@ -1737,6 +1741,7 @@ private PaymentMethodOptions( Object customerBalance, Map extraParams, Object konbini, + Object payto, Object sepaDebit, Object usBankAccount) { this.acssDebit = acssDebit; @@ -1745,6 +1750,7 @@ private PaymentMethodOptions( this.customerBalance = customerBalance; this.extraParams = extraParams; this.konbini = konbini; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -1766,6 +1772,8 @@ public static class Builder { private Object konbini; + private Object payto; + private Object sepaDebit; private Object usBankAccount; @@ -1779,6 +1787,7 @@ public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.customerBalance, this.extraParams, this.konbini, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -1906,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. @@ -2273,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; @@ -2281,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. */ @@ -2351,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( @@ -2364,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. */ @@ -3041,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 { @@ -3631,6 +3882,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -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) { @@ -5097,11 +5354,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -5219,25 +5479,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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/PaymentAttemptRecordListParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordListParams.java new file mode 100644 index 00000000000..3a68f81ca90 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentAttemptRecordListParams.java @@ -0,0 +1,161 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentAttemptRecordListParams 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; + + /** + * 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; + + /** Required. The ID of the Payment Record. */ + @SerializedName("payment_record") + String paymentRecord; + + /** + * 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; + + private PaymentAttemptRecordListParams( + List expand, + Map extraParams, + Long limit, + String paymentRecord, + String startingAfter) { + this.expand = expand; + this.extraParams = extraParams; + this.limit = limit; + this.paymentRecord = paymentRecord; + this.startingAfter = startingAfter; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private Long limit; + + private String paymentRecord; + + private String startingAfter; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentAttemptRecordListParams build() { + return new PaymentAttemptRecordListParams( + this.expand, this.extraParams, this.limit, this.paymentRecord, this.startingAfter); + } + + /** + * 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 + * PaymentAttemptRecordListParams#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 + * PaymentAttemptRecordListParams#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 + * PaymentAttemptRecordListParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordListParams#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; + } + + /** Required. The ID of the Payment Record. */ + public Builder setPaymentRecord(String paymentRecord) { + this.paymentRecord = paymentRecord; + 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; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentAttemptRecordRetrieveParams.java b/src/main/java/com/stripe/param/PaymentAttemptRecordRetrieveParams.java new file mode 100644 index 00000000000..8fa6681e502 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentAttemptRecordRetrieveParams.java @@ -0,0 +1,100 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentAttemptRecordRetrieveParams 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 PaymentAttemptRecordRetrieveParams(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 PaymentAttemptRecordRetrieveParams build() { + return new PaymentAttemptRecordRetrieveParams(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 + * PaymentAttemptRecordRetrieveParams#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 + * PaymentAttemptRecordRetrieveParams#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 + * PaymentAttemptRecordRetrieveParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentAttemptRecordRetrieveParams#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/PaymentIntentAmountDetailsLineItemListParams.java b/src/main/java/com/stripe/param/PaymentIntentAmountDetailsLineItemListParams.java new file mode 100644 index 00000000000..d7cb7e21ee7 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentIntentAmountDetailsLineItemListParams.java @@ -0,0 +1,172 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentIntentAmountDetailsLineItemListParams 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; + + private PaymentIntentAmountDetailsLineItemListParams( + String endingBefore, + List expand, + Map extraParams, + Long limit, + String startingAfter) { + this.endingBefore = endingBefore; + this.expand = expand; + this.extraParams = extraParams; + this.limit = limit; + this.startingAfter = startingAfter; + } + + 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; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentAmountDetailsLineItemListParams build() { + return new PaymentIntentAmountDetailsLineItemListParams( + this.endingBefore, this.expand, this.extraParams, this.limit, this.startingAfter); + } + + /** + * 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 + * PaymentIntentAmountDetailsLineItemListParams#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 + * PaymentIntentAmountDetailsLineItemListParams#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 + * PaymentIntentAmountDetailsLineItemListParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentAmountDetailsLineItemListParams#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; + } + } +} 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 554c0d016ec..7aec63f319b 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -14,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class PaymentIntentCaptureParams extends ApiRequestParams { + /** Provides industry-specific information about the amount. */ + @SerializedName("amount_details") + AmountDetails amountDetails; + /** * The amount to capture from the PaymentIntent, which must be less than or equal to the original * amount. Defaults to the full {@code amount_capturable} if it's not provided. @@ -25,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") @@ -48,14 +52,18 @@ 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") Boolean finalCapture; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + 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}. @@ -63,6 +71,10 @@ public class PaymentIntentCaptureParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** Provides industry-specific information about the charge. */ + @SerializedName("payment_details") + Object paymentDetails; + /** * Text that appears on the customer's statement as the statement descriptor for a non-card * charge. This value overrides the account's default statement descriptor. For information about @@ -89,27 +101,33 @@ 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; private PaymentIntentCaptureParams( + AmountDetails amountDetails, Long amountToCapture, Long applicationFeeAmount, List expand, Map extraParams, Boolean finalCapture, + Hooks hooks, Object metadata, + Object paymentDetails, String statementDescriptor, String statementDescriptorSuffix, TransferData transferData) { + this.amountDetails = amountDetails; this.amountToCapture = amountToCapture; this.applicationFeeAmount = applicationFeeAmount; this.expand = expand; this.extraParams = extraParams; this.finalCapture = finalCapture; + this.hooks = hooks; this.metadata = metadata; + this.paymentDetails = paymentDetails; this.statementDescriptor = statementDescriptor; this.statementDescriptorSuffix = statementDescriptorSuffix; this.transferData = transferData; @@ -120,6 +138,8 @@ public static Builder builder() { } public static class Builder { + private AmountDetails amountDetails; + private Long amountToCapture; private Long applicationFeeAmount; @@ -130,8 +150,12 @@ public static class Builder { private Boolean finalCapture; + private Hooks hooks; + private Object metadata; + private Object paymentDetails; + private String statementDescriptor; private String statementDescriptorSuffix; @@ -141,17 +165,26 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams build() { return new PaymentIntentCaptureParams( + this.amountDetails, this.amountToCapture, this.applicationFeeAmount, this.expand, this.extraParams, this.finalCapture, + this.hooks, this.metadata, + this.paymentDetails, this.statementDescriptor, this.statementDescriptorSuffix, this.transferData); } + /** Provides industry-specific information about the amount. */ + public Builder setAmountDetails(PaymentIntentCaptureParams.AmountDetails amountDetails) { + this.amountDetails = amountDetails; + return this; + } + /** * The amount to capture from the PaymentIntent, which must be less than or equal to the * original amount. Defaults to the full {@code amount_capturable} if it's not provided. @@ -165,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) { @@ -229,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) { @@ -237,6 +270,12 @@ public Builder setFinalCapture(Boolean finalCapture) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentCaptureParams.Hooks hooks) { + this.hooks = hooks; + 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 @@ -266,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}. @@ -277,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}. @@ -287,6 +326,18 @@ public Builder setMetadata(Map metadata) { return this; } + /** Provides industry-specific information about the charge. */ + public Builder setPaymentDetails(PaymentIntentCaptureParams.PaymentDetails paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + + /** Provides industry-specific information about the charge. */ + public Builder setPaymentDetails(EmptyParam paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + /** * Text that appears on the customer's statement as the statement descriptor for a non-card * charge. This value overrides the account's default statement descriptor. For information @@ -317,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) { @@ -326,6 +377,1742 @@ public Builder setTransferData(PaymentIntentCaptureParams.TransferData transferD } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AmountDetails { + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + @SerializedName("discount_amount") + Object discountAmount; + + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 line items, each containing information about a product in the PaymentIntent. There + * is a maximum of 200 line items. + */ + @SerializedName("line_items") + Object lineItems; + + /** Contains information about the shipping portion of the amount. */ + @SerializedName("shipping") + Object shipping; + + /** Contains information about the tax portion of the amount. */ + @SerializedName("tax") + Object tax; + + private AmountDetails( + Object discountAmount, + Boolean enforceArithmeticValidation, + Map extraParams, + Object lineItems, + Object shipping, + Object tax) { + this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; + this.extraParams = extraParams; + this.lineItems = lineItems; + this.shipping = shipping; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object discountAmount; + + private Boolean enforceArithmeticValidation; + + private Map extraParams; + + private Object lineItems; + + private Object shipping; + + private Object tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails build() { + return new PaymentIntentCaptureParams.AmountDetails( + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); + } + + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + public Builder setDiscountAmount(EmptyParam discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + 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 + * PaymentIntentCaptureParams.AmountDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentCaptureParams.AmountDetails#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 `lineItems` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentCaptureParams.AmountDetails#lineItems} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLineItem(PaymentIntentCaptureParams.AmountDetails.LineItem element) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = new ArrayList(); + } + ((List) 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 + * PaymentIntentCaptureParams.AmountDetails#lineItems} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLineItem( + List elements) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = new ArrayList(); + } + ((List) this.lineItems).addAll(elements); + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems(EmptyParam lineItems) { + this.lineItems = lineItems; + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems( + List lineItems) { + this.lineItems = lineItems; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(PaymentIntentCaptureParams.AmountDetails.Shipping shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(EmptyParam shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(PaymentIntentCaptureParams.AmountDetails.Tax tax) { + this.tax = tax; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(EmptyParam tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LineItem { + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ + @SerializedName("discount_amount") + Long discountAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Payment method-specific information for line items. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ + @SerializedName("product_code") + String productCode; + + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ + @SerializedName("product_name") + String productName; + + /** + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. + */ + @SerializedName("quantity") + Long quantity; + + /** Contains information about the tax on the item. */ + @SerializedName("tax") + Tax tax; + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ + @SerializedName("unit_cost") + Long unitCost; + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + @SerializedName("unit_of_measure") + String unitOfMeasure; + + private LineItem( + Long discountAmount, + Map extraParams, + PaymentMethodOptions paymentMethodOptions, + String productCode, + String productName, + Long quantity, + Tax tax, + Long unitCost, + String unitOfMeasure) { + this.discountAmount = discountAmount; + this.extraParams = extraParams; + this.paymentMethodOptions = paymentMethodOptions; + this.productCode = productCode; + this.productName = productName; + this.quantity = quantity; + this.tax = tax; + this.unitCost = unitCost; + this.unitOfMeasure = unitOfMeasure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long discountAmount; + + private Map extraParams; + + private PaymentMethodOptions paymentMethodOptions; + + private String productCode; + + private String productName; + + private Long quantity; + + private Tax tax; + + private Long unitCost; + + private String unitOfMeasure; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.LineItem build() { + return new PaymentIntentCaptureParams.AmountDetails.LineItem( + this.discountAmount, + this.extraParams, + this.paymentMethodOptions, + this.productCode, + this.productName, + this.quantity, + this.tax, + this.unitCost, + this.unitOfMeasure); + } + + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + 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 PaymentIntentCaptureParams.AmountDetails.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 PaymentIntentCaptureParams.AmountDetails.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; + } + + /** Payment method-specific information for line items. */ + public Builder setPaymentMethodOptions( + PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions + paymentMethodOptions) { + this.paymentMethodOptions = paymentMethodOptions; + return this; + } + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ + public Builder setProductCode(String productCode) { + this.productCode = productCode; + return this; + } + + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ + public Builder setProductName(String productName) { + this.productName = productName; + return this; + } + + /** + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. + */ + public Builder setQuantity(Long quantity) { + this.quantity = quantity; + return this; + } + + /** Contains information about the tax on the item. */ + public Builder setTax(PaymentIntentCaptureParams.AmountDetails.LineItem.Tax tax) { + this.tax = tax; + return this; + } + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ + public Builder setUnitCost(Long unitCost) { + this.unitCost = unitCost; + return this; + } + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + public Builder setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions { + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + @SerializedName("card") + Card card; + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + @SerializedName("card_present") + CardPresent cardPresent; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + @SerializedName("klarna") + Klarna klarna; + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + @SerializedName("paypal") + Paypal paypal; + + private PaymentMethodOptions( + Card card, + CardPresent cardPresent, + Map extraParams, + Klarna klarna, + Paypal paypal) { + this.card = card; + this.cardPresent = cardPresent; + this.extraParams = extraParams; + this.klarna = klarna; + this.paypal = paypal; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Card card; + + private CardPresent cardPresent; + + private Map extraParams; + + private Klarna klarna; + + private Paypal paypal; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions build() { + return new PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions( + this.card, this.cardPresent, this.extraParams, this.klarna, this.paypal); + } + + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + public Builder setCard( + PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card card) { + this.card = card; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + public Builder setCardPresent( + PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent + cardPresent) { + this.cardPresent = cardPresent; + 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 + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions#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 sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + public Builder setKlarna( + PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna + klarna) { + this.klarna = klarna; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + public Builder setPaypal( + PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + paypal) { + this.paypal = paypal; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + String commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Card(String commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card + build() { + return new PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions + .Card(this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + 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 + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Card#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 CardPresent { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + String commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 CardPresent(String commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions + .CardPresent + build() { + return new PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions + .CardPresent(this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + 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 + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#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 Klarna { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** URL to an image for the product. Max length, 4096 characters. */ + @SerializedName("image_url") + String imageUrl; + + /** URL to the product page. Max length, 4096 characters. */ + @SerializedName("product_url") + String productUrl; + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + String reference; + + /** Reference for the subscription this line item is for. */ + @SerializedName("subscription_reference") + String subscriptionReference; + + private Klarna( + Map extraParams, + String imageUrl, + String productUrl, + String reference, + String subscriptionReference) { + this.extraParams = extraParams; + this.imageUrl = imageUrl; + this.productUrl = productUrl; + this.reference = reference; + this.subscriptionReference = subscriptionReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String imageUrl; + + private String productUrl; + + private String reference; + + private String subscriptionReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna + build() { + return new PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions + .Klarna( + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** URL to an image for the product. Max length, 4096 characters. */ + public Builder setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** URL to the product page. Max length, 4096 characters. */ + public Builder setProductUrl(String productUrl) { + this.productUrl = productUrl; + return this; + } + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** Reference for the subscription this line item is for. */ + public Builder setSubscriptionReference(String subscriptionReference) { + this.subscriptionReference = subscriptionReference; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { + /** Type of the line item. */ + @SerializedName("category") + Category category; + + /** Description of the line item. */ + @SerializedName("description") + String 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; + + /** The Stripe account ID of the connected account that sells the item. */ + @SerializedName("sold_by") + String soldBy; + + private Paypal( + Category category, + String description, + Map extraParams, + String soldBy) { + this.category = category; + this.description = description; + this.extraParams = extraParams; + this.soldBy = soldBy; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Category category; + + private String description; + + private Map extraParams; + + private String soldBy; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + build() { + return new PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions + .Paypal(this.category, this.description, this.extraParams, this.soldBy); + } + + /** Type of the line item. */ + public Builder setCategory( + PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + .Category + category) { + this.category = category; + return this; + } + + /** Description of the line item. */ + public Builder setDescription(String 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 + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentCaptureParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal#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 Stripe account ID of the connected account that sells the item. */ + public Builder setSoldBy(String soldBy) { + this.soldBy = soldBy; + return this; + } + } + + public enum Category implements ApiRequestParams.EnumParam { + @SerializedName("digital_goods") + DIGITAL_GOODS("digital_goods"), + + @SerializedName("donation") + DONATION("donation"), + + @SerializedName("physical_goods") + PHYSICAL_GOODS("physical_goods"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Category(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.LineItem.Tax build() { + return new PaymentIntentCaptureParams.AmountDetails.LineItem.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.AmountDetails.LineItem.Tax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.AmountDetails.LineItem.Tax#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 total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shipping { + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + @SerializedName("amount") + Object 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; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("from_postal_code") + Object fromPostalCode; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("to_postal_code") + Object toPostalCode; + + private Shipping( + Object amount, + Map extraParams, + Object fromPostalCode, + Object toPostalCode) { + this.amount = amount; + this.extraParams = extraParams; + this.fromPostalCode = fromPostalCode; + this.toPostalCode = toPostalCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private Map extraParams; + + private Object fromPostalCode; + + private Object toPostalCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.Shipping build() { + return new PaymentIntentCaptureParams.AmountDetails.Shipping( + this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(EmptyParam 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 PaymentIntentCaptureParams.AmountDetails.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 PaymentIntentCaptureParams.AmountDetails.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; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(String fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(EmptyParam fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(String toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(EmptyParam toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.AmountDetails.Tax build() { + return new PaymentIntentCaptureParams.AmountDetails.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.AmountDetails.Tax#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.AmountDetails.Tax#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 total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Arguments passed in automations. */ + @SerializedName("inputs") + Inputs inputs; + + private Hooks(Map extraParams, Inputs inputs) { + this.extraParams = extraParams; + this.inputs = inputs; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Inputs inputs; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.Hooks build() { + return new PaymentIntentCaptureParams.Hooks(this.extraParams, this.inputs); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentCaptureParams.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentCaptureParams.Hooks#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Arguments passed in automations. */ + public Builder setInputs(PaymentIntentCaptureParams.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Inputs { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Tax arguments for automations. */ + @SerializedName("tax") + Tax tax; + + private Inputs(Map extraParams, Tax tax) { + this.extraParams = extraParams; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.Hooks.Inputs build() { + return new PaymentIntentCaptureParams.Hooks.Inputs(this.extraParams, this.tax); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.Hooks.Inputs#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.Hooks.Inputs#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Tax arguments for automations. */ + public Builder setTax(PaymentIntentCaptureParams.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Required. The TaxCalculation id + */ + @SerializedName("calculation") + Object calculation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Tax(Object calculation, Map extraParams) { + this.calculation = calculation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object calculation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.Hooks.Inputs.Tax build() { + return new PaymentIntentCaptureParams.Hooks.Inputs.Tax( + this.calculation, this.extraParams); + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(String calculation) { + this.calculation = calculation; + return this; + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(EmptyParam calculation) { + this.calculation = calculation; + 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 PaymentIntentCaptureParams.Hooks.Inputs.Tax#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCaptureParams.Hooks.Inputs.Tax#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 PaymentDetails { + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. + */ + @SerializedName("customer_reference") + Object customerReference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ + @SerializedName("order_reference") + Object orderReference; + + private PaymentDetails( + Object customerReference, Map extraParams, Object orderReference) { + this.customerReference = customerReference; + this.extraParams = extraParams; + this.orderReference = orderReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object customerReference; + + private Map extraParams; + + private Object orderReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCaptureParams.PaymentDetails build() { + return new PaymentIntentCaptureParams.PaymentDetails( + this.customerReference, this.extraParams, this.orderReference); + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(String customerReference) { + this.customerReference = customerReference; + return this; + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(EmptyParam customerReference) { + this.customerReference = customerReference; + 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 + * PaymentIntentCaptureParams.PaymentDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentCaptureParams.PaymentDetails#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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(String orderReference) { + this.orderReference = orderReference; + return this; + } + + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(EmptyParam orderReference) { + this.orderReference = orderReference; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class TransferData { diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index 2f014205a73..669e9aff1b0 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -14,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class PaymentIntentConfirmParams extends ApiRequestParams { + /** Provides industry-specific information about the amount. */ + @SerializedName("amount_details") + Object amountDetails; + /** Controls when the funds will be captured from the customer's account. */ @SerializedName("capture_method") CaptureMethod captureMethod; @@ -31,12 +35,16 @@ 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") Boolean errorOnRequiresAction; + /** The list of payment method types to exclude from use with this payment. */ + @SerializedName("excluded_payment_method_types") + Object excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -50,6 +58,10 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + Hooks hooks; + /** ID of the mandate that's used for this payment. */ @SerializedName("mandate") String mandate; @@ -60,19 +72,23 @@ 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") Object offSession; + /** Provides industry-specific information about the charge. */ + @SerializedName("payment_details") + Object 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. */ @SerializedName("payment_method") String paymentMethod; @@ -80,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") @@ -102,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; @@ -161,14 +177,18 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { Boolean useStripeSdk; private PaymentIntentConfirmParams( + Object amountDetails, CaptureMethod captureMethod, String confirmationToken, Boolean errorOnRequiresAction, + Object excludedPaymentMethodTypes, List expand, Map extraParams, + Hooks hooks, String mandate, Object mandateData, Object offSession, + Object paymentDetails, String paymentMethod, PaymentMethodData paymentMethodData, PaymentMethodOptions paymentMethodOptions, @@ -179,14 +199,18 @@ private PaymentIntentConfirmParams( ApiRequestParams.EnumParam setupFutureUsage, Object shipping, Boolean useStripeSdk) { + this.amountDetails = amountDetails; this.captureMethod = captureMethod; this.confirmationToken = confirmationToken; this.errorOnRequiresAction = errorOnRequiresAction; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; + this.hooks = hooks; this.mandate = mandate; this.mandateData = mandateData; this.offSession = offSession; + this.paymentDetails = paymentDetails; this.paymentMethod = paymentMethod; this.paymentMethodData = paymentMethodData; this.paymentMethodOptions = paymentMethodOptions; @@ -204,22 +228,30 @@ public static Builder builder() { } public static class Builder { + private Object amountDetails; + private CaptureMethod captureMethod; private String confirmationToken; private Boolean errorOnRequiresAction; + private Object excludedPaymentMethodTypes; + private List expand; private Map extraParams; + private Hooks hooks; + private String mandate; private Object mandateData; private Object offSession; + private Object paymentDetails; + private String paymentMethod; private PaymentMethodData paymentMethodData; @@ -243,14 +275,18 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams build() { return new PaymentIntentConfirmParams( + this.amountDetails, this.captureMethod, this.confirmationToken, this.errorOnRequiresAction, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, + this.hooks, this.mandate, this.mandateData, this.offSession, + this.paymentDetails, this.paymentMethod, this.paymentMethodData, this.paymentMethodOptions, @@ -263,6 +299,18 @@ public PaymentIntentConfirmParams build() { this.useStripeSdk); } + /** Provides industry-specific information about the amount. */ + public Builder setAmountDetails(PaymentIntentConfirmParams.AmountDetails amountDetails) { + this.amountDetails = amountDetails; + return this; + } + + /** Provides industry-specific information about the amount. */ + public Builder setAmountDetails(EmptyParam amountDetails) { + this.amountDetails = amountDetails; + return this; + } + /** Controls when the funds will be captured from the customer's account. */ public Builder setCaptureMethod(PaymentIntentConfirmParams.CaptureMethod captureMethod) { this.captureMethod = captureMethod; @@ -285,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) { @@ -293,6 +341,55 @@ public Builder setErrorOnRequiresAction(Boolean errorOnRequiresAction) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentConfirmParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addExcludedPaymentMethodType( + PaymentIntentConfirmParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentConfirmParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes(EmptyParam excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes( + List excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + 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 @@ -345,6 +442,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentConfirmParams.Hooks hooks) { + this.hooks = hooks; + return this; + } + /** ID of the mandate that's used for this payment. */ public Builder setMandate(String mandate) { this.mandate = mandate; @@ -364,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) { @@ -375,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) { @@ -383,13 +486,25 @@ public Builder setOffSession(PaymentIntentConfirmParams.OffSession offSession) { return this; } + /** Provides industry-specific information about the charge. */ + public Builder setPaymentDetails(PaymentIntentConfirmParams.PaymentDetails paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + + /** Provides industry-specific information about the charge. */ + public Builder setPaymentDetails(EmptyParam paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + /** * 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; @@ -399,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( @@ -443,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; @@ -562,10 +677,32 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) { @Getter @EqualsAndHashCode(callSuper = false) - public static class MandateData { - /** This hash contains details about the customer acceptance of the Mandate. */ - @SerializedName("customer_acceptance") - CustomerAcceptance customerAcceptance; + public static class AmountDetails { + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + @SerializedName("discount_amount") + Object discountAmount; + + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; /** * Map of extra parameters for custom features not available in this client library. The content @@ -576,9 +713,34 @@ public static class MandateData { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private MandateData(CustomerAcceptance customerAcceptance, Map extraParams) { - this.customerAcceptance = customerAcceptance; + /** + * A list of line items, each containing information about a product in the PaymentIntent. There + * is a maximum of 200 line items. + */ + @SerializedName("line_items") + Object lineItems; + + /** Contains information about the shipping portion of the amount. */ + @SerializedName("shipping") + Object shipping; + + /** Contains information about the tax portion of the amount. */ + @SerializedName("tax") + Object tax; + + private AmountDetails( + Object discountAmount, + Boolean enforceArithmeticValidation, + Map extraParams, + Object lineItems, + Object shipping, + Object tax) { + this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; + this.lineItems = lineItems; + this.shipping = shipping; + this.tax = tax; } public static Builder builder() { @@ -586,27 +748,76 @@ public static Builder builder() { } public static class Builder { - private CustomerAcceptance customerAcceptance; + private Object discountAmount; + + private Boolean enforceArithmeticValidation; private Map extraParams; + private Object lineItems; + + private Object shipping; + + private Object tax; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.MandateData build() { - return new PaymentIntentConfirmParams.MandateData( - this.customerAcceptance, this.extraParams); + public PaymentIntentConfirmParams.AmountDetails build() { + return new PaymentIntentConfirmParams.AmountDetails( + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } - /** This hash contains details about the customer acceptance of the Mandate. */ - public Builder setCustomerAcceptance( - PaymentIntentConfirmParams.MandateData.CustomerAcceptance customerAcceptance) { - this.customerAcceptance = customerAcceptance; + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + public Builder setDiscountAmount(EmptyParam discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; 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.MandateData#extraParams} for the field documentation. + * PaymentIntentConfirmParams.AmountDetails#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -619,7 +830,8 @@ 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 PaymentIntentConfirmParams.MandateData#extraParams} for the field documentation. + * See {@link PaymentIntentConfirmParams.AmountDetails#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -628,14 +840,92 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(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 + * PaymentIntentConfirmParams.AmountDetails#lineItems} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLineItem(PaymentIntentConfirmParams.AmountDetails.LineItem element) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = new ArrayList(); + } + ((List) 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 + * PaymentIntentConfirmParams.AmountDetails#lineItems} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLineItem( + List elements) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = new ArrayList(); + } + ((List) this.lineItems).addAll(elements); + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems(EmptyParam lineItems) { + this.lineItems = lineItems; + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems( + List lineItems) { + this.lineItems = lineItems; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(PaymentIntentConfirmParams.AmountDetails.Shipping shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(EmptyParam shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(PaymentIntentConfirmParams.AmountDetails.Tax tax) { + this.tax = tax; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(EmptyParam tax) { + this.tax = tax; + return this; + } } @Getter @EqualsAndHashCode(callSuper = false) - public static class CustomerAcceptance { - /** The time at which the customer accepted the Mandate. */ - @SerializedName("accepted_at") - Long acceptedAt; + public static class LineItem { + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ + @SerializedName("discount_amount") + Long discountAmount; /** * Map of extra parameters for custom features not available in this client library. The @@ -646,38 +936,69 @@ public static class CustomerAcceptance { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Payment method-specific information for line items. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + /** - * If this is a Mandate accepted offline, this hash contains details about the offline - * acceptance. + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. */ - @SerializedName("offline") - Offline offline; + @SerializedName("product_code") + String productCode; /** - * If this is a Mandate accepted online, this hash contains details about the online - * acceptance. + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. */ - @SerializedName("online") - Online online; + @SerializedName("product_name") + String productName; /** - * Required. The type of customer acceptance information included with the - * Mandate. One of {@code online} or {@code offline}. + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. */ - @SerializedName("type") - Type type; + @SerializedName("quantity") + Long quantity; - private CustomerAcceptance( - Long acceptedAt, + /** Contains information about the tax on the item. */ + @SerializedName("tax") + Tax tax; + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ + @SerializedName("unit_cost") + Long unitCost; + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + @SerializedName("unit_of_measure") + String unitOfMeasure; + + private LineItem( + Long discountAmount, Map extraParams, - Offline offline, - Online online, - Type type) { - this.acceptedAt = acceptedAt; + PaymentMethodOptions paymentMethodOptions, + String productCode, + String productName, + Long quantity, + Tax tax, + Long unitCost, + String unitOfMeasure) { + this.discountAmount = discountAmount; this.extraParams = extraParams; - this.offline = offline; - this.online = online; - this.type = type; + this.paymentMethodOptions = paymentMethodOptions; + this.productCode = productCode; + this.productName = productName; + this.quantity = quantity; + this.tax = tax; + this.unitCost = unitCost; + this.unitOfMeasure = unitOfMeasure; } public static Builder builder() { @@ -685,33 +1006,56 @@ public static Builder builder() { } public static class Builder { - private Long acceptedAt; + private Long discountAmount; private Map extraParams; - private Offline offline; + private PaymentMethodOptions paymentMethodOptions; - private Online online; + private String productCode; - private Type type; + private String productName; + + private Long quantity; + + private Tax tax; + + private Long unitCost; + + private String unitOfMeasure; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.MandateData.CustomerAcceptance build() { - return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance( - this.acceptedAt, this.extraParams, this.offline, this.online, this.type); + public PaymentIntentConfirmParams.AmountDetails.LineItem build() { + return new PaymentIntentConfirmParams.AmountDetails.LineItem( + this.discountAmount, + this.extraParams, + this.paymentMethodOptions, + this.productCode, + this.productName, + this.quantity, + this.tax, + this.unitCost, + this.unitOfMeasure); } - /** The time at which the customer accepted the Mandate. */ - public Builder setAcceptedAt(Long acceptedAt) { - this.acceptedAt = acceptedAt; + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; 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.MandateData.CustomerAcceptance#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.AmountDetails.LineItem#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -724,8 +1068,8 @@ 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 PaymentIntentConfirmParams.MandateData.CustomerAcceptance#extraParams} - * for the field documentation. + * map. See {@link PaymentIntentConfirmParams.AmountDetails.LineItem#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -735,40 +1079,84 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Payment method-specific information for line items. */ + public Builder setPaymentMethodOptions( + PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions + paymentMethodOptions) { + this.paymentMethodOptions = paymentMethodOptions; + return this; + } + /** - * If this is a Mandate accepted offline, this hash contains details about the offline - * acceptance. + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. */ - public Builder setOffline( - PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline offline) { - this.offline = offline; + public Builder setProductCode(String productCode) { + this.productCode = productCode; return this; } /** - * If this is a Mandate accepted online, this hash contains details about the online - * acceptance. + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. */ - public Builder setOnline( - PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online online) { - this.online = online; + public Builder setProductName(String productName) { + this.productName = productName; return this; } /** - * Required. The type of customer acceptance information included with the - * Mandate. One of {@code online} or {@code offline}. + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. */ - public Builder setType( - PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Type type) { - this.type = type; + public Builder setQuantity(Long quantity) { + this.quantity = quantity; + return this; + } + + /** Contains information about the tax on the item. */ + public Builder setTax(PaymentIntentConfirmParams.AmountDetails.LineItem.Tax tax) { + this.tax = tax; + return this; + } + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ + public Builder setUnitCost(Long unitCost) { + this.unitCost = unitCost; + return this; + } + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + public Builder setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class Offline { + public static class PaymentMethodOptions { + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + @SerializedName("card") + Card card; + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + @SerializedName("card_present") + CardPresent cardPresent; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -779,8 +1167,31 @@ public static class Offline { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Offline(Map extraParams) { + /** + * This sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + @SerializedName("klarna") + Klarna klarna; + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + @SerializedName("paypal") + Paypal paypal; + + private PaymentMethodOptions( + Card card, + CardPresent cardPresent, + Map extraParams, + Klarna klarna, + Paypal paypal) { + this.card = card; + this.cardPresent = cardPresent; this.extraParams = extraParams; + this.klarna = klarna; + this.paypal = paypal; } public static Builder builder() { @@ -788,20 +1199,49 @@ public static Builder builder() { } public static class Builder { + private Card card; + + private CardPresent cardPresent; + private Map extraParams; + private Klarna klarna; + + private Paypal paypal; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline build() { - return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline( - this.extraParams); + public PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions build() { + return new PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions( + this.card, this.cardPresent, this.extraParams, this.klarna, this.paypal); + } + + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + public Builder setCard( + PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Card card) { + this.card = card; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + public Builder setCardPresent( + PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent + cardPresent) { + this.cardPresent = cardPresent; + 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.MandateData.CustomerAcceptance.Offline#extraParams} for the - * field documentation. + * PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -815,8 +1255,1274 @@ 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 - * PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline#extraParams} for the - * field documentation. + * PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions#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 sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + public Builder setKlarna( + PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna + klarna) { + this.klarna = klarna; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + public Builder setPaypal( + PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + paypal) { + this.paypal = paypal; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + String commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Card(String commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Card + build() { + return new PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions + .Card(this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + 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.AmountDetails.LineItem.PaymentMethodOptions.Card#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Card#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 CardPresent { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + String commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 CardPresent(String commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions + .CardPresent + build() { + return new PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions + .CardPresent(this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + 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.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#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 Klarna { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** URL to an image for the product. Max length, 4096 characters. */ + @SerializedName("image_url") + String imageUrl; + + /** URL to the product page. Max length, 4096 characters. */ + @SerializedName("product_url") + String productUrl; + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + String reference; + + /** Reference for the subscription this line item is for. */ + @SerializedName("subscription_reference") + String subscriptionReference; + + private Klarna( + Map extraParams, + String imageUrl, + String productUrl, + String reference, + String subscriptionReference) { + this.extraParams = extraParams; + this.imageUrl = imageUrl; + this.productUrl = productUrl; + this.reference = reference; + this.subscriptionReference = subscriptionReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String imageUrl; + + private String productUrl; + + private String reference; + + private String subscriptionReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna + build() { + return new PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions + .Klarna( + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); + } + + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** URL to an image for the product. Max length, 4096 characters. */ + public Builder setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** URL to the product page. Max length, 4096 characters. */ + public Builder setProductUrl(String productUrl) { + this.productUrl = productUrl; + return this; + } + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** Reference for the subscription this line item is for. */ + public Builder setSubscriptionReference(String subscriptionReference) { + this.subscriptionReference = subscriptionReference; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { + /** Type of the line item. */ + @SerializedName("category") + Category category; + + /** Description of the line item. */ + @SerializedName("description") + String 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; + + /** The Stripe account ID of the connected account that sells the item. */ + @SerializedName("sold_by") + String soldBy; + + private Paypal( + Category category, + String description, + Map extraParams, + String soldBy) { + this.category = category; + this.description = description; + this.extraParams = extraParams; + this.soldBy = soldBy; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Category category; + + private String description; + + private Map extraParams; + + private String soldBy; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + build() { + return new PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions + .Paypal(this.category, this.description, this.extraParams, this.soldBy); + } + + /** Type of the line item. */ + public Builder setCategory( + PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + .Category + category) { + this.category = category; + return this; + } + + /** Description of the line item. */ + public Builder setDescription(String 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 + * PaymentIntentConfirmParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Paypal#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 Stripe account ID of the connected account that sells the item. */ + public Builder setSoldBy(String soldBy) { + this.soldBy = soldBy; + return this; + } + } + + public enum Category implements ApiRequestParams.EnumParam { + @SerializedName("digital_goods") + DIGITAL_GOODS("digital_goods"), + + @SerializedName("donation") + DONATION("donation"), + + @SerializedName("physical_goods") + PHYSICAL_GOODS("physical_goods"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Category(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.AmountDetails.LineItem.Tax build() { + return new PaymentIntentConfirmParams.AmountDetails.LineItem.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails.LineItem.Tax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.Tax#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 total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shipping { + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + @SerializedName("amount") + Object 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; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("from_postal_code") + Object fromPostalCode; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("to_postal_code") + Object toPostalCode; + + private Shipping( + Object amount, + Map extraParams, + Object fromPostalCode, + Object toPostalCode) { + this.amount = amount; + this.extraParams = extraParams; + this.fromPostalCode = fromPostalCode; + this.toPostalCode = toPostalCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private Map extraParams; + + private Object fromPostalCode; + + private Object toPostalCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.AmountDetails.Shipping build() { + return new PaymentIntentConfirmParams.AmountDetails.Shipping( + this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(EmptyParam 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 PaymentIntentConfirmParams.AmountDetails.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 PaymentIntentConfirmParams.AmountDetails.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; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(String fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(EmptyParam fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(String toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(EmptyParam toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.AmountDetails.Tax build() { + return new PaymentIntentConfirmParams.AmountDetails.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails.Tax#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.Tax#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 total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Arguments passed in automations. */ + @SerializedName("inputs") + Inputs inputs; + + private Hooks(Map extraParams, Inputs inputs) { + this.extraParams = extraParams; + this.inputs = inputs; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Inputs inputs; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.Hooks build() { + return new PaymentIntentConfirmParams.Hooks(this.extraParams, this.inputs); + } + + /** + * Add a key/value pair to `extraParams` map. 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.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Hooks#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Arguments passed in automations. */ + public Builder setInputs(PaymentIntentConfirmParams.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Inputs { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Tax arguments for automations. */ + @SerializedName("tax") + Tax tax; + + private Inputs(Map extraParams, Tax tax) { + this.extraParams = extraParams; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.Hooks.Inputs build() { + return new PaymentIntentConfirmParams.Hooks.Inputs(this.extraParams, this.tax); + } + + /** + * Add a key/value pair to `extraParams` map. 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.Hooks.Inputs#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Hooks.Inputs#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Tax arguments for automations. */ + public Builder setTax(PaymentIntentConfirmParams.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Required. The TaxCalculation id + */ + @SerializedName("calculation") + Object calculation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Tax(Object calculation, Map extraParams) { + this.calculation = calculation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object calculation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.Hooks.Inputs.Tax build() { + return new PaymentIntentConfirmParams.Hooks.Inputs.Tax( + this.calculation, this.extraParams); + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(String calculation) { + this.calculation = calculation; + return this; + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(EmptyParam calculation) { + this.calculation = calculation; + 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.Hooks.Inputs.Tax#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Hooks.Inputs.Tax#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 MandateData { + /** This hash contains details about the customer acceptance of the Mandate. */ + @SerializedName("customer_acceptance") + CustomerAcceptance customerAcceptance; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 MandateData(CustomerAcceptance customerAcceptance, Map extraParams) { + this.customerAcceptance = customerAcceptance; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CustomerAcceptance customerAcceptance; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.MandateData build() { + return new PaymentIntentConfirmParams.MandateData( + this.customerAcceptance, this.extraParams); + } + + /** This hash contains details about the customer acceptance of the Mandate. */ + public Builder setCustomerAcceptance( + PaymentIntentConfirmParams.MandateData.CustomerAcceptance customerAcceptance) { + this.customerAcceptance = customerAcceptance; + 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.MandateData#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MandateData#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 CustomerAcceptance { + /** The time at which the customer accepted the Mandate. */ + @SerializedName("accepted_at") + Long acceptedAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * If this is a Mandate accepted offline, this hash contains details about the offline + * acceptance. + */ + @SerializedName("offline") + Offline offline; + + /** + * If this is a Mandate accepted online, this hash contains details about the online + * acceptance. + */ + @SerializedName("online") + Online online; + + /** + * Required. The type of customer acceptance information included with the + * Mandate. One of {@code online} or {@code offline}. + */ + @SerializedName("type") + Type type; + + private CustomerAcceptance( + Long acceptedAt, + Map extraParams, + Offline offline, + Online online, + Type type) { + this.acceptedAt = acceptedAt; + this.extraParams = extraParams; + this.offline = offline; + this.online = online; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long acceptedAt; + + private Map extraParams; + + private Offline offline; + + private Online online; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.MandateData.CustomerAcceptance build() { + return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance( + this.acceptedAt, this.extraParams, this.offline, this.online, this.type); + } + + /** The time at which the customer accepted the Mandate. */ + public Builder setAcceptedAt(Long acceptedAt) { + this.acceptedAt = acceptedAt; + 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.MandateData.CustomerAcceptance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MandateData.CustomerAcceptance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * If this is a Mandate accepted offline, this hash contains details about the offline + * acceptance. + */ + public Builder setOffline( + PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline offline) { + this.offline = offline; + return this; + } + + /** + * If this is a Mandate accepted online, this hash contains details about the online + * acceptance. + */ + public Builder setOnline( + PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Online online) { + this.online = online; + return this; + } + + /** + * Required. The type of customer acceptance information included with the + * Mandate. One of {@code online} or {@code offline}. + */ + public Builder setType( + PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Offline { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Offline(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline build() { + return new PaymentIntentConfirmParams.MandateData.CustomerAcceptance.Offline( + this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.MandateData.CustomerAcceptance.Offline#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MandateData.CustomerAcceptance.Offline#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -923,12 +2629,157 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("online") ONLINE("online"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDetails { + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. + */ + @SerializedName("customer_reference") + Object customerReference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ + @SerializedName("order_reference") + Object orderReference; + + private PaymentDetails( + Object customerReference, Map extraParams, Object orderReference) { + this.customerReference = customerReference; + this.extraParams = extraParams; + this.orderReference = orderReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object customerReference; + + private Map extraParams; + + private Object orderReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentDetails build() { + return new PaymentIntentConfirmParams.PaymentDetails( + this.customerReference, this.extraParams, this.orderReference); + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(String customerReference) { + this.customerReference = customerReference; + return this; + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(EmptyParam customerReference) { + this.customerReference = customerReference; + 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.PaymentDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.PaymentDetails#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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(String orderReference) { + this.orderReference = orderReference; + return this; + } - Type(String value) { - this.value = value; - } + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(EmptyParam orderReference) { + this.orderReference = orderReference; + return this; } } } @@ -1143,7 +2994,14 @@ public static class PaymentMethodData { Link link; /** - * Set of key-value pairs that you can attach + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1221,6 +3079,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. @@ -1236,7 +3101,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") @@ -1349,6 +3214,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1360,6 +3226,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1403,6 +3270,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1414,6 +3282,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -1493,6 +3362,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1515,6 +3386,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -1575,6 +3448,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1586,6 +3460,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -1892,6 +3767,15 @@ public Builder setLink(PaymentIntentConfirmParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(PaymentIntentConfirmParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + 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 @@ -2013,6 +3897,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. @@ -2033,7 +3926,7 @@ public Builder setPromptpay( } /** - * Options to configure Radar. See Radar + * Options to configure Radar. See Radar * Session for more information. */ public Builder setRadarOptions( @@ -3013,11 +4906,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3025,7 +4918,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; @@ -3122,13 +5018,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3140,7 +5036,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; @@ -3996,6 +5895,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -4005,6 +5907,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -4014,6 +5919,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -4514,6 +6422,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.MbWay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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 Mobilepay { @@ -5326,6 +7292,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 { @@ -5455,7 +7520,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. */ @@ -5511,7 +7576,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. */ @@ -6368,6 +8433,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6398,6 +8466,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6648,6 +8719,13 @@ public static class PaymentMethodOptions { @SerializedName("link") Object link; + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + @SerializedName("mb_way") + Object mbWay; + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -6718,6 +8796,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. @@ -6832,6 +8917,7 @@ private PaymentMethodOptions( Object konbini, Object krCard, Object link, + Object mbWay, Object mobilepay, Object multibanco, Object naverPay, @@ -6842,6 +8928,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object payto, Object pix, Object promptpay, Object revolutPay, @@ -6883,6 +8970,7 @@ private PaymentMethodOptions( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.naverPay = naverPay; @@ -6893,6 +8981,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -6970,6 +9059,8 @@ public static class Builder { private Object link; + private Object mbWay; + private Object mobilepay; private Object multibanco; @@ -6990,6 +9081,8 @@ public static class Builder { private Object paypal; + private Object payto; + private Object pix; private Object promptpay; @@ -7046,6 +9139,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.naverPay, @@ -7056,6 +9150,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -7605,6 +9700,24 @@ public Builder setLink(EmptyParam link) { return this; } + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(PaymentIntentConfirmParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; + } + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -7790,6 +9903,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. @@ -10591,7 +12722,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; @@ -10617,7 +12748,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") @@ -10625,21 +12756,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") @@ -10648,11 +12779,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. */ @@ -10890,7 +13021,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) { @@ -10927,7 +13058,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( @@ -10939,7 +13070,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( @@ -10950,7 +13081,7 @@ public Builder setRequestIncrementalAuthorization( } /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. */ public Builder setRequestMulticapture( @@ -10961,7 +13092,7 @@ public Builder setRequestMulticapture( } /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. */ public Builder setRequestOvercapture( @@ -10974,11 +13105,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. */ @@ -12259,7 +14390,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; @@ -12430,6 +14567,19 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12441,7 +14591,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") @@ -12449,10 +14599,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") @@ -12466,10 +14616,12 @@ public static class CardPresent { Routing routing; private CardPresent( + CaptureMethod captureMethod, Map extraParams, Boolean requestExtendedAuthorization, Boolean requestIncrementalAuthorizationSupport, Routing routing) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.requestExtendedAuthorization = requestExtendedAuthorization; this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; @@ -12481,6 +14633,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Boolean requestExtendedAuthorization; @@ -12492,12 +14646,30 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent( + this.captureMethod, this.extraParams, this.requestExtendedAuthorization, this.requestIncrementalAuthorizationSupport, this.routing); } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + 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 @@ -12528,7 +14700,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) { @@ -12538,10 +14710,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( @@ -12652,6 +14824,21 @@ public enum RequestedPriority implements ApiRequestParams.EnumParam { } } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter @@ -16083,6 +18270,137 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.MbWay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.MbWay( + this.extraParams, 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.MbWay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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( + PaymentIntentConfirmParams.PaymentMethodOptions.MbWay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -17276,14 +19594,145 @@ public Builder putAllExtraParam(Map map) { } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paynow { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paynow(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Paynow build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Paynow( + this.extraParams, 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.Paynow#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Paynow#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( + PaymentIntentConfirmParams.PaymentMethodOptions.Paynow.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); @Getter(onMethod_ = {@Override}) private final String value; - CaptureMethod(String value) { + SetupFutureUsage(String value) { this.value = value; } } @@ -17291,7 +19740,11 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Paynow { + public static class Paypal { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -17301,6 +19754,25 @@ public static class Paynow { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Preferred locale of + * the PayPal checkout page that the customer is redirected to. + */ + @SerializedName("preferred_locale") + PreferredLocale preferredLocale; + + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's + * invoice ID. This must be a globally unique ID if you have configured in your PayPal + * settings to block multiple payments per invoice ID. + */ + @SerializedName("reference") + String reference; + + /** The risk correlation ID for an on-session payment using a saved PayPal payment method. */ + @SerializedName("risk_correlation_id") + String riskCorrelationId; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -17325,10 +19797,20 @@ public static class Paynow { * off_session}. */ @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + ApiRequestParams.EnumParam setupFutureUsage; - private Paynow(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Paypal( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + PreferredLocale preferredLocale, + String reference, + String riskCorrelationId, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; + this.preferredLocale = preferredLocale; + this.reference = reference; + this.riskCorrelationId = riskCorrelationId; this.setupFutureUsage = setupFutureUsage; } @@ -17337,20 +19819,46 @@ public static Builder builder() { } public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + private Map extraParams; - private SetupFutureUsage setupFutureUsage; + private PreferredLocale preferredLocale; + + private String reference; + + private String riskCorrelationId; + + private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Paynow build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Paynow( - this.extraParams, this.setupFutureUsage); + public PaymentIntentConfirmParams.PaymentMethodOptions.Paypal build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Paypal( + this.captureMethod, + this.extraParams, + this.preferredLocale, + this.reference, + this.riskCorrelationId, + this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + PaymentIntentConfirmParams.PaymentMethodOptions.Paypal.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + 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.Paynow#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Paypal#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -17364,7 +19872,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 PaymentIntentConfirmParams.PaymentMethodOptions.Paynow#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Paypal#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -17375,6 +19883,35 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Preferred locale + * of the PayPal checkout page that the customer is redirected to. + */ + public Builder setPreferredLocale( + PaymentIntentConfirmParams.PaymentMethodOptions.Paypal.PreferredLocale + preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's + * invoice ID. This must be a globally unique ID if you have configured in your PayPal + * settings to block multiple payments per invoice ID. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * The risk correlation ID for an on-session payment using a saved PayPal payment method. + */ + public Builder setRiskCorrelationId(String riskCorrelationId) { + this.riskCorrelationId = riskCorrelationId; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -17400,16 +19937,132 @@ public Builder putAllExtraParam(Map map) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentConfirmParams.PaymentMethodOptions.Paynow.SetupFutureUsage + PaymentIntentConfirmParams.PaymentMethodOptions.Paypal.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; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum PreferredLocale implements ApiRequestParams.EnumParam { + @SerializedName("cs-CZ") + CS_CZ("cs-CZ"), + + @SerializedName("da-DK") + DA_DK("da-DK"), + + @SerializedName("de-AT") + DE_AT("de-AT"), + + @SerializedName("de-DE") + DE_DE("de-DE"), + + @SerializedName("de-LU") + DE_LU("de-LU"), + + @SerializedName("el-GR") + EL_GR("el-GR"), + + @SerializedName("en-GB") + EN_GB("en-GB"), + + @SerializedName("en-US") + EN_US("en-US"), + + @SerializedName("es-ES") + ES_ES("es-ES"), + + @SerializedName("fi-FI") + FI_FI("fi-FI"), + + @SerializedName("fr-BE") + FR_BE("fr-BE"), + + @SerializedName("fr-FR") + FR_FR("fr-FR"), + + @SerializedName("fr-LU") + FR_LU("fr-LU"), + + @SerializedName("hu-HU") + HU_HU("hu-HU"), + + @SerializedName("it-IT") + IT_IT("it-IT"), + + @SerializedName("nl-BE") + NL_BE("nl-BE"), + + @SerializedName("nl-NL") + NL_NL("nl-NL"), + + @SerializedName("pl-PL") + PL_PL("pl-PL"), + + @SerializedName("pt-PT") + PT_PT("pt-PT"), + + @SerializedName("sk-SK") + SK_SK("sk-SK"), + + @SerializedName("sv-SE") + SV_SE("sv-SE"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLocale(String value) { + this.value = value; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -17422,11 +20075,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Paypal { - /** Controls when the funds will be captured from the customer's account. */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + 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. @@ -17436,24 +20085,13 @@ public static class Paypal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Preferred locale of - * the PayPal checkout page that the customer is redirected to. - */ - @SerializedName("preferred_locale") - PreferredLocale preferredLocale; - - /** - * A reference of the PayPal transaction visible to customer which is mapped to PayPal's - * invoice ID. This must be a globally unique ID if you have configured in your PayPal - * settings to block multiple payments per invoice ID. - */ - @SerializedName("reference") - String reference; - - /** The risk correlation ID for an on-session payment using a saved PayPal payment method. */ - @SerializedName("risk_correlation_id") - String riskCorrelationId; + /** + * 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. @@ -17481,18 +20119,12 @@ public static class Paypal { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; - private Paypal( - ApiRequestParams.EnumParam captureMethod, + private Payto( Map extraParams, - PreferredLocale preferredLocale, - String reference, - String riskCorrelationId, + MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; this.extraParams = extraParams; - this.preferredLocale = preferredLocale; - this.reference = reference; - this.riskCorrelationId = riskCorrelationId; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -17501,46 +20133,22 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; - private PreferredLocale preferredLocale; - - private String reference; - - private String riskCorrelationId; + private MandateOptions mandateOptions; private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentMethodOptions.Paypal build() { - return new PaymentIntentConfirmParams.PaymentMethodOptions.Paypal( - this.captureMethod, - this.extraParams, - this.preferredLocale, - this.reference, - this.riskCorrelationId, - this.setupFutureUsage); - } - - /** Controls when the funds will be captured from the customer's account. */ - public Builder setCaptureMethod( - PaymentIntentConfirmParams.PaymentMethodOptions.Paypal.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** Controls when the funds will be captured from the customer's account. */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + 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.Paypal#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Payto#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -17554,7 +20162,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 PaymentIntentConfirmParams.PaymentMethodOptions.Paypal#extraParams} for + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Payto#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -17566,176 +20174,409 @@ public Builder putAllExtraParam(Map map) { } /** - * Preferred locale - * of the PayPal checkout page that the customer is redirected to. + * 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 setPreferredLocale( - PaymentIntentConfirmParams.PaymentMethodOptions.Paypal.PreferredLocale - preferredLocale) { - this.preferredLocale = preferredLocale; + public Builder setMandateOptions( + PaymentIntentConfirmParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; return this; } /** - * A reference of the PayPal transaction visible to customer which is mapped to PayPal's - * invoice ID. This must be a globally unique ID if you have configured in your PayPal - * settings to block multiple payments per invoice ID. + * 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 setReference(String reference) { - this.reference = reference; + public Builder setSetupFutureUsage( + PaymentIntentConfirmParams.PaymentMethodOptions.Payto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * The risk correlation ID for an on-session payment using a saved PayPal payment method. + * 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 setRiskCorrelationId(String riskCorrelationId) { - this.riskCorrelationId = riskCorrelationId; + 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; + } - /** - * 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.Paypal.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - 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; + } - /** - * 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; + /** + * 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 CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("maximum") + MAXIMUM("maximum"); - CaptureMethod(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } } - } - public enum PreferredLocale implements ApiRequestParams.EnumParam { - @SerializedName("cs-CZ") - CS_CZ("cs-CZ"), + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), - @SerializedName("da-DK") - DA_DK("da-DK"), + @SerializedName("annual") + ANNUAL("annual"), - @SerializedName("de-AT") - DE_AT("de-AT"), + @SerializedName("daily") + DAILY("daily"), - @SerializedName("de-DE") - DE_DE("de-DE"), + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), - @SerializedName("de-LU") - DE_LU("de-LU"), + @SerializedName("monthly") + MONTHLY("monthly"), - @SerializedName("el-GR") - EL_GR("el-GR"), + @SerializedName("quarterly") + QUARTERLY("quarterly"), - @SerializedName("en-GB") - EN_GB("en-GB"), + @SerializedName("semi_annual") + SEMI_ANNUAL("semi_annual"), - @SerializedName("en-US") - EN_US("en-US"), + @SerializedName("weekly") + WEEKLY("weekly"); - @SerializedName("es-ES") - ES_ES("es-ES"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("fi-FI") - FI_FI("fi-FI"), + PaymentSchedule(String value) { + this.value = value; + } + } - @SerializedName("fr-BE") - FR_BE("fr-BE"), + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), - @SerializedName("fr-FR") - FR_FR("fr-FR"), + @SerializedName("government") + GOVERNMENT("government"), - @SerializedName("fr-LU") - FR_LU("fr-LU"), + @SerializedName("loan") + LOAN("loan"), - @SerializedName("hu-HU") - HU_HU("hu-HU"), + @SerializedName("mortgage") + MORTGAGE("mortgage"), - @SerializedName("it-IT") - IT_IT("it-IT"), + @SerializedName("other") + OTHER("other"), - @SerializedName("nl-BE") - NL_BE("nl-BE"), + @SerializedName("pension") + PENSION("pension"), - @SerializedName("nl-NL") - NL_NL("nl-NL"), + @SerializedName("personal") + PERSONAL("personal"), - @SerializedName("pl-PL") - PL_PL("pl-PL"), + @SerializedName("retail") + RETAIL("retail"), - @SerializedName("pt-PT") - PT_PT("pt-PT"), + @SerializedName("salary") + SALARY("salary"), - @SerializedName("sk-SK") - SK_SK("sk-SK"), + @SerializedName("tax") + TAX("tax"), - @SerializedName("sv-SE") - SV_SE("sv-SE"); + @SerializedName("utility") + UTILITY("utility"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - PreferredLocale(String value) { - this.value = value; + Purpose(String value) { + this.value = value; + } } } @@ -20597,7 +23438,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. */ @@ -20651,7 +23492,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. */ @@ -20823,11 +23664,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -20835,7 +23676,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; @@ -20930,13 +23774,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -20948,7 +23792,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; @@ -20975,6 +23822,162 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum OffSession implements ApiRequestParams.EnumParam { @SerializedName("one_off") ONE_OFF("one_off"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index f8ef09a66c0..f72c5652648 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -17,21 +17,25 @@ 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). */ @SerializedName("amount") Long amount; + /** Provides industry-specific information about the amount. */ + @SerializedName("amount_details") + AmountDetails 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 for + * PaymentIntents use case for * connected accounts. */ @SerializedName("application_fee_amount") @@ -50,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; @@ -88,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 @@ -99,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; @@ -107,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") @@ -132,9 +153,13 @@ public class PaymentIntentCreateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + 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}. */ @SerializedName("mandate") @@ -142,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}. @@ -160,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") @@ -170,14 +195,18 @@ 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; + /** Provides industry-specific information about the charge. */ + @SerializedName("payment_details") + PaymentDetails paymentDetails; + /** * 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 @@ -185,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") @@ -201,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") @@ -223,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; @@ -240,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") @@ -297,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") @@ -319,6 +348,7 @@ public class PaymentIntentCreateParams extends ApiRequestParams { private PaymentIntentCreateParams( Long amount, + AmountDetails amountDetails, Long applicationFeeAmount, AutomaticPaymentMethods automaticPaymentMethods, CaptureMethod captureMethod, @@ -327,16 +357,19 @@ private PaymentIntentCreateParams( String confirmationToken, String currency, String customer, + String customerAccount, String description, Boolean errorOnRequiresAction, List excludedPaymentMethodTypes, List expand, Map extraParams, + Hooks hooks, String mandate, Object mandateData, Map metadata, Object offSession, String onBehalfOf, + PaymentDetails paymentDetails, String paymentMethod, String paymentMethodConfiguration, PaymentMethodData paymentMethodData, @@ -353,6 +386,7 @@ private PaymentIntentCreateParams( String transferGroup, Boolean useStripeSdk) { this.amount = amount; + this.amountDetails = amountDetails; this.applicationFeeAmount = applicationFeeAmount; this.automaticPaymentMethods = automaticPaymentMethods; this.captureMethod = captureMethod; @@ -361,16 +395,19 @@ private PaymentIntentCreateParams( this.confirmationToken = confirmationToken; this.currency = currency; this.customer = customer; + this.customerAccount = customerAccount; this.description = description; this.errorOnRequiresAction = errorOnRequiresAction; this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; + this.hooks = hooks; this.mandate = mandate; this.mandateData = mandateData; this.metadata = metadata; this.offSession = offSession; this.onBehalfOf = onBehalfOf; + this.paymentDetails = paymentDetails; this.paymentMethod = paymentMethod; this.paymentMethodConfiguration = paymentMethodConfiguration; this.paymentMethodData = paymentMethodData; @@ -395,6 +432,8 @@ public static Builder builder() { public static class Builder { private Long amount; + private AmountDetails amountDetails; + private Long applicationFeeAmount; private AutomaticPaymentMethods automaticPaymentMethods; @@ -411,6 +450,8 @@ public static class Builder { private String customer; + private String customerAccount; + private String description; private Boolean errorOnRequiresAction; @@ -421,6 +462,8 @@ public static class Builder { private Map extraParams; + private Hooks hooks; + private String mandate; private Object mandateData; @@ -431,6 +474,8 @@ public static class Builder { private String onBehalfOf; + private PaymentDetails paymentDetails; + private String paymentMethod; private String paymentMethodConfiguration; @@ -465,6 +510,7 @@ public static class Builder { public PaymentIntentCreateParams build() { return new PaymentIntentCreateParams( this.amount, + this.amountDetails, this.applicationFeeAmount, this.automaticPaymentMethods, this.captureMethod, @@ -473,16 +519,19 @@ public PaymentIntentCreateParams build() { this.confirmationToken, this.currency, this.customer, + this.customerAccount, this.description, this.errorOnRequiresAction, this.excludedPaymentMethodTypes, this.expand, this.extraParams, + this.hooks, this.mandate, this.mandateData, this.metadata, this.offSession, this.onBehalfOf, + this.paymentDetails, this.paymentMethod, this.paymentMethodConfiguration, this.paymentMethodData, @@ -503,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). */ @@ -515,11 +564,17 @@ public Builder setAmount(Long amount) { return this; } + /** Provides industry-specific information about the amount. */ + public Builder setAmountDetails(PaymentIntentCreateParams.AmountDetails amountDetails) { + this.amountDetails = amountDetails; + return this; + } + /** * 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) { @@ -545,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; @@ -593,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 @@ -606,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; @@ -616,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) { @@ -706,9 +781,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentCreateParams.Hooks hooks) { + this.hooks = hooks; + return this; + } + /** * 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) { @@ -719,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) { @@ -730,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) { @@ -767,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) { @@ -780,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) { @@ -792,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) { @@ -800,9 +881,15 @@ public Builder setOnBehalfOf(String onBehalfOf) { return this; } + /** Provides industry-specific information about the charge. */ + public Builder setPaymentDetails(PaymentIntentCreateParams.PaymentDetails paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + /** * 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 @@ -810,8 +897,8 @@ public Builder setOnBehalfOf(String onBehalfOf) { * 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; @@ -819,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) { @@ -830,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( @@ -874,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; @@ -895,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) { @@ -963,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) { @@ -973,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) { @@ -993,22 +1080,32 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) { @Getter @EqualsAndHashCode(callSuper = false) - public static class AutomaticPaymentMethods { + public static class AmountDetails { /** - * Controls whether this PaymentIntent will accept redirect-based payment methods. + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. * - *

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, - * you may be required to provide a {@code return_url} to redirect customers back to your site - * after they authenticate or complete the payment. + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. */ - @SerializedName("allow_redirects") - AllowRedirects allowRedirects; + @SerializedName("discount_amount") + Object discountAmount; - /** Required. Whether this feature is enabled. */ - @SerializedName("enabled") - Boolean enabled; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; /** * Map of extra parameters for custom features not available in this client library. The content @@ -1019,11 +1116,34 @@ public static class AutomaticPaymentMethods { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private AutomaticPaymentMethods( - AllowRedirects allowRedirects, Boolean enabled, Map extraParams) { - this.allowRedirects = allowRedirects; - this.enabled = enabled; + /** + * A list of line items, each containing information about a product in the PaymentIntent. There + * is a maximum of 200 line items. + */ + @SerializedName("line_items") + Object lineItems; + + /** Contains information about the shipping portion of the amount. */ + @SerializedName("shipping") + Object shipping; + + /** Contains information about the tax portion of the amount. */ + @SerializedName("tax") + Object tax; + + private AmountDetails( + Object discountAmount, + Boolean enforceArithmeticValidation, + Map extraParams, + Object lineItems, + Object shipping, + Object tax) { + this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; this.extraParams = extraParams; + this.lineItems = lineItems; + this.shipping = shipping; + this.tax = tax; } public static Builder builder() { @@ -1031,43 +1151,76 @@ public static Builder builder() { } public static class Builder { - private AllowRedirects allowRedirects; + private Object discountAmount; - private Boolean enabled; + private Boolean enforceArithmeticValidation; private Map extraParams; + private Object lineItems; + + private Object shipping; + + private Object tax; + /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.AutomaticPaymentMethods build() { - return new PaymentIntentCreateParams.AutomaticPaymentMethods( - this.allowRedirects, this.enabled, this.extraParams); + public PaymentIntentCreateParams.AmountDetails build() { + return new PaymentIntentCreateParams.AmountDetails( + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); } /** - * Controls whether this PaymentIntent will accept redirect-based payment methods. + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. * - *

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, - * you may be required to provide a {@code return_url} to redirect customers back to your site - * after they authenticate or complete the payment. + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. */ - public Builder setAllowRedirects( - PaymentIntentCreateParams.AutomaticPaymentMethods.AllowRedirects allowRedirects) { - this.allowRedirects = allowRedirects; + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; return this; } - /** Required. Whether this feature is enabled. */ - public Builder setEnabled(Boolean enabled) { - this.enabled = enabled; + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + public Builder setDiscountAmount(EmptyParam discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; 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.AutomaticPaymentMethods#extraParams} for the field documentation. + * PaymentIntentCreateParams.AmountDetails#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -1080,7 +1233,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.AutomaticPaymentMethods#extraParams} for the field + * See {@link PaymentIntentCreateParams.AmountDetails#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1090,20 +1243,1542 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(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 + * PaymentIntentCreateParams.AmountDetails#lineItems} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLineItem(PaymentIntentCreateParams.AmountDetails.LineItem element) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = new ArrayList(); + } + ((List) 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 + * PaymentIntentCreateParams.AmountDetails#lineItems} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLineItem( + List elements) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = new ArrayList(); + } + ((List) this.lineItems).addAll(elements); + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems(EmptyParam lineItems) { + this.lineItems = lineItems; + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems( + List lineItems) { + this.lineItems = lineItems; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(PaymentIntentCreateParams.AmountDetails.Shipping shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(EmptyParam shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(PaymentIntentCreateParams.AmountDetails.Tax tax) { + this.tax = tax; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(EmptyParam tax) { + this.tax = tax; + return this; + } } - public enum AllowRedirects implements ApiRequestParams.EnumParam { - @SerializedName("always") - ALWAYS("always"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LineItem { + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ + @SerializedName("discount_amount") + Long discountAmount; - @SerializedName("never") - NEVER("never"); + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Payment method-specific information for line items. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ + @SerializedName("product_code") + String productCode; + + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ + @SerializedName("product_name") + String productName; + + /** + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. + */ + @SerializedName("quantity") + Long quantity; + + /** Contains information about the tax on the item. */ + @SerializedName("tax") + Tax tax; + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ + @SerializedName("unit_cost") + Long unitCost; + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + @SerializedName("unit_of_measure") + String unitOfMeasure; + + private LineItem( + Long discountAmount, + Map extraParams, + PaymentMethodOptions paymentMethodOptions, + String productCode, + String productName, + Long quantity, + Tax tax, + Long unitCost, + String unitOfMeasure) { + this.discountAmount = discountAmount; + this.extraParams = extraParams; + this.paymentMethodOptions = paymentMethodOptions; + this.productCode = productCode; + this.productName = productName; + this.quantity = quantity; + this.tax = tax; + this.unitCost = unitCost; + this.unitOfMeasure = unitOfMeasure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long discountAmount; + + private Map extraParams; + + private PaymentMethodOptions paymentMethodOptions; + + private String productCode; + + private String productName; + + private Long quantity; + + private Tax tax; + + private Long unitCost; + + private String unitOfMeasure; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.LineItem build() { + return new PaymentIntentCreateParams.AmountDetails.LineItem( + this.discountAmount, + this.extraParams, + this.paymentMethodOptions, + this.productCode, + this.productName, + this.quantity, + this.tax, + this.unitCost, + this.unitOfMeasure); + } + + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + 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.AmountDetails.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 PaymentIntentCreateParams.AmountDetails.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; + } + + /** Payment method-specific information for line items. */ + public Builder setPaymentMethodOptions( + PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions + paymentMethodOptions) { + this.paymentMethodOptions = paymentMethodOptions; + return this; + } + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ + public Builder setProductCode(String productCode) { + this.productCode = productCode; + return this; + } + + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ + public Builder setProductName(String productName) { + this.productName = productName; + return this; + } + + /** + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. + */ + public Builder setQuantity(Long quantity) { + this.quantity = quantity; + return this; + } + + /** Contains information about the tax on the item. */ + public Builder setTax(PaymentIntentCreateParams.AmountDetails.LineItem.Tax tax) { + this.tax = tax; + return this; + } + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ + public Builder setUnitCost(Long unitCost) { + this.unitCost = unitCost; + return this; + } + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + public Builder setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions { + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + @SerializedName("card") + Card card; + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + @SerializedName("card_present") + CardPresent cardPresent; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + @SerializedName("klarna") + Klarna klarna; + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + @SerializedName("paypal") + Paypal paypal; + + private PaymentMethodOptions( + Card card, + CardPresent cardPresent, + Map extraParams, + Klarna klarna, + Paypal paypal) { + this.card = card; + this.cardPresent = cardPresent; + this.extraParams = extraParams; + this.klarna = klarna; + this.paypal = paypal; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Card card; + + private CardPresent cardPresent; + + private Map extraParams; + + private Klarna klarna; + + private Paypal paypal; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions build() { + return new PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions( + this.card, this.cardPresent, this.extraParams, this.klarna, this.paypal); + } + + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + public Builder setCard( + PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card card) { + this.card = card; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + public Builder setCardPresent( + PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent + cardPresent) { + this.cardPresent = cardPresent; + 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.AmountDetails.LineItem.PaymentMethodOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions#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 sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + public Builder setKlarna( + PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna klarna) { + this.klarna = klarna; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + public Builder setPaypal( + PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal paypal) { + this.paypal = paypal; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + String commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Card(String commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card + build() { + return new PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Card( + this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + 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.AmountDetails.LineItem.PaymentMethodOptions.Card#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Card#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 CardPresent { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + String commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 CardPresent(String commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent + build() { + return new PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions + .CardPresent(this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + 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.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#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 Klarna { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** URL to an image for the product. Max length, 4096 characters. */ + @SerializedName("image_url") + String imageUrl; + + /** URL to the product page. Max length, 4096 characters. */ + @SerializedName("product_url") + String productUrl; + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + String reference; + + /** Reference for the subscription this line item is for. */ + @SerializedName("subscription_reference") + String subscriptionReference; + + private Klarna( + Map extraParams, + String imageUrl, + String productUrl, + String reference, + String subscriptionReference) { + this.extraParams = extraParams; + this.imageUrl = imageUrl; + this.productUrl = productUrl; + this.reference = reference; + this.subscriptionReference = subscriptionReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String imageUrl; + + private String productUrl; + + private String reference; + + private String subscriptionReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna + build() { + return new PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions + .Klarna( + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); + } + + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** URL to an image for the product. Max length, 4096 characters. */ + public Builder setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** URL to the product page. Max length, 4096 characters. */ + public Builder setProductUrl(String productUrl) { + this.productUrl = productUrl; + return this; + } + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** Reference for the subscription this line item is for. */ + public Builder setSubscriptionReference(String subscriptionReference) { + this.subscriptionReference = subscriptionReference; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { + /** Type of the line item. */ + @SerializedName("category") + Category category; + + /** Description of the line item. */ + @SerializedName("description") + String 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; + + /** The Stripe account ID of the connected account that sells the item. */ + @SerializedName("sold_by") + String soldBy; + + private Paypal( + Category category, + String description, + Map extraParams, + String soldBy) { + this.category = category; + this.description = description; + this.extraParams = extraParams; + this.soldBy = soldBy; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Category category; + + private String description; + + private Map extraParams; + + private String soldBy; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + build() { + return new PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions + .Paypal(this.category, this.description, this.extraParams, this.soldBy); + } + + /** Type of the line item. */ + public Builder setCategory( + PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + .Category + category) { + this.category = category; + return this; + } + + /** Description of the line item. */ + public Builder setDescription(String 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 + * PaymentIntentCreateParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Paypal#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 Stripe account ID of the connected account that sells the item. */ + public Builder setSoldBy(String soldBy) { + this.soldBy = soldBy; + return this; + } + } + + public enum Category implements ApiRequestParams.EnumParam { + @SerializedName("digital_goods") + DIGITAL_GOODS("digital_goods"), + + @SerializedName("donation") + DONATION("donation"), + + @SerializedName("physical_goods") + PHYSICAL_GOODS("physical_goods"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Category(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.LineItem.Tax build() { + return new PaymentIntentCreateParams.AmountDetails.LineItem.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails.LineItem.Tax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.Tax#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 total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shipping { + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + @SerializedName("amount") + Object 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; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("from_postal_code") + Object fromPostalCode; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("to_postal_code") + Object toPostalCode; + + private Shipping( + Object amount, + Map extraParams, + Object fromPostalCode, + Object toPostalCode) { + this.amount = amount; + this.extraParams = extraParams; + this.fromPostalCode = fromPostalCode; + this.toPostalCode = toPostalCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private Map extraParams; + + private Object fromPostalCode; + + private Object toPostalCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.Shipping build() { + return new PaymentIntentCreateParams.AmountDetails.Shipping( + this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(EmptyParam 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 PaymentIntentCreateParams.AmountDetails.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 PaymentIntentCreateParams.AmountDetails.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; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(String fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(EmptyParam fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(String toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(EmptyParam toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AmountDetails.Tax build() { + return new PaymentIntentCreateParams.AmountDetails.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails.Tax#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.Tax#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 total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AutomaticPaymentMethods { + /** + * Controls whether this PaymentIntent will accept redirect-based payment methods. + * + *

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, + * you may be required to provide a {@code return_url} to redirect customers back to your site + * after they authenticate or complete the payment. + */ + @SerializedName("allow_redirects") + AllowRedirects allowRedirects; + + /** Required. Whether this feature is enabled. */ + @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; + + private AutomaticPaymentMethods( + AllowRedirects allowRedirects, Boolean enabled, Map extraParams) { + this.allowRedirects = allowRedirects; + this.enabled = enabled; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AllowRedirects allowRedirects; + + private Boolean enabled; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.AutomaticPaymentMethods build() { + return new PaymentIntentCreateParams.AutomaticPaymentMethods( + this.allowRedirects, this.enabled, this.extraParams); + } + + /** + * Controls whether this PaymentIntent will accept redirect-based payment methods. + * + *

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, + * you may be required to provide a {@code return_url} to redirect customers back to your site + * after they authenticate or complete the payment. + */ + public Builder setAllowRedirects( + PaymentIntentCreateParams.AutomaticPaymentMethods.AllowRedirects allowRedirects) { + this.allowRedirects = allowRedirects; + return this; + } + + /** Required. Whether this feature is enabled. */ + 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 + * PaymentIntentCreateParams.AutomaticPaymentMethods#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AutomaticPaymentMethods#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 AllowRedirects implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowRedirects(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Arguments passed in automations. */ + @SerializedName("inputs") + Inputs inputs; + + private Hooks(Map extraParams, Inputs inputs) { + this.extraParams = extraParams; + this.inputs = inputs; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Inputs inputs; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.Hooks build() { + return new PaymentIntentCreateParams.Hooks(this.extraParams, this.inputs); + } + + /** + * Add a key/value pair to `extraParams` map. 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.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Hooks#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Arguments passed in automations. */ + public Builder setInputs(PaymentIntentCreateParams.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Inputs { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Tax arguments for automations. */ + @SerializedName("tax") + Tax tax; + + private Inputs(Map extraParams, Tax tax) { + this.extraParams = extraParams; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.Hooks.Inputs build() { + return new PaymentIntentCreateParams.Hooks.Inputs(this.extraParams, this.tax); + } + + /** + * Add a key/value pair to `extraParams` map. 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.Hooks.Inputs#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Hooks.Inputs#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Tax arguments for automations. */ + public Builder setTax(PaymentIntentCreateParams.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Required. The TaxCalculation id + */ + @SerializedName("calculation") + Object calculation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Tax(Object calculation, Map extraParams) { + this.calculation = calculation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object calculation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.Hooks.Inputs.Tax build() { + return new PaymentIntentCreateParams.Hooks.Inputs.Tax( + this.calculation, this.extraParams); + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(String calculation) { + this.calculation = calculation; + return this; + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(EmptyParam calculation) { + this.calculation = calculation; + return this; + } - @Getter(onMethod_ = {@Override}) - private final String 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 PaymentIntentCreateParams.Hooks.Inputs.Tax#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - AllowRedirects(String value) { - this.value = 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.Hooks.Inputs.Tax#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } } } } @@ -1497,6 +3172,151 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDetails { + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. + */ + @SerializedName("customer_reference") + Object customerReference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ + @SerializedName("order_reference") + Object orderReference; + + private PaymentDetails( + Object customerReference, Map extraParams, Object orderReference) { + this.customerReference = customerReference; + this.extraParams = extraParams; + this.orderReference = orderReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object customerReference; + + private Map extraParams; + + private Object orderReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentDetails build() { + return new PaymentIntentCreateParams.PaymentDetails( + this.customerReference, this.extraParams, this.orderReference); + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(String customerReference) { + this.customerReference = customerReference; + return this; + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(EmptyParam customerReference) { + this.customerReference = customerReference; + 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.PaymentDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.PaymentDetails#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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(String orderReference) { + this.orderReference = orderReference; + return this; + } + + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(EmptyParam orderReference) { + this.orderReference = orderReference; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PaymentMethodData { @@ -1707,7 +3527,14 @@ public static class PaymentMethodData { Link link; /** - * Set of key-value pairs that you can attach + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1785,6 +3612,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. @@ -1800,7 +3634,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") @@ -1913,6 +3747,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1924,6 +3759,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1967,6 +3803,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1978,6 +3815,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -2057,6 +3895,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -2079,6 +3919,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -2139,6 +3981,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -2150,6 +3993,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -2453,6 +4297,15 @@ public Builder setLink(PaymentIntentCreateParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(PaymentIntentCreateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + 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 @@ -2572,6 +4425,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. @@ -2591,7 +4453,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( @@ -3566,11 +5428,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3578,7 +5440,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; @@ -3675,13 +5540,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3693,7 +5558,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; @@ -4548,6 +6416,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -4557,6 +6428,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -4566,6 +6440,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -5065,6 +6942,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.MbWay build() { + return new PaymentIntentCreateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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 Mobilepay { @@ -5727,14 +7662,72 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Payco build() { - return new PaymentIntentCreateParams.PaymentMethodData.Payco(this.extraParams); + public PaymentIntentCreateParams.PaymentMethodData.Payco build() { + return new PaymentIntentCreateParams.PaymentMethodData.Payco(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.Payco#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Payco#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 Paynow { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paynow(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Paynow build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paynow(this.extraParams); } /** * Add a key/value pair to `extraParams` map. 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.Payco#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paynow#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5748,7 +7741,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.PaymentMethodData.Payco#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paynow#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5763,7 +7756,7 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Paynow { + public static class Paypal { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -5773,7 +7766,7 @@ public static class Paynow { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paynow(Map extraParams) { + private Paypal(Map extraParams) { this.extraParams = extraParams; } @@ -5785,14 +7778,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentMethodData.Paynow build() { - return new PaymentIntentCreateParams.PaymentMethodData.Paynow(this.extraParams); + public PaymentIntentCreateParams.PaymentMethodData.Paypal build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paypal(this.extraParams); } /** * Add a key/value pair to `extraParams` map. 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.Paynow#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypal#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5806,7 +7799,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.PaymentMethodData.Paynow#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypal#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5821,7 +7814,15 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Paypal { + 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. @@ -5831,8 +7832,16 @@ public static class Paypal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Paypal(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() { @@ -5840,17 +7849,36 @@ public static Builder 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.Paypal build() { - return new PaymentIntentCreateParams.PaymentMethodData.Paypal(this.extraParams); + 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.Paypal#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payto#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5864,7 +7892,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.PaymentMethodData.Paypal#extraParams} for the + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Payto#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5874,6 +7902,12 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** The PayID alias for the bank account. */ + public Builder setPayId(String payId) { + this.payId = payId; + return this; + } } } @@ -6006,7 +8040,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. */ @@ -6062,7 +8096,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. */ @@ -6919,6 +8953,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6949,6 +8986,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -7199,6 +9239,13 @@ public static class PaymentMethodOptions { @SerializedName("link") Object link; + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + @SerializedName("mb_way") + Object mbWay; + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -7269,6 +9316,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. @@ -7383,6 +9437,7 @@ private PaymentMethodOptions( Object konbini, Object krCard, Object link, + Object mbWay, Object mobilepay, Object multibanco, Object naverPay, @@ -7393,6 +9448,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object payto, Object pix, Object promptpay, Object revolutPay, @@ -7434,6 +9490,7 @@ private PaymentMethodOptions( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.naverPay = naverPay; @@ -7444,6 +9501,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -7521,6 +9579,8 @@ public static class Builder { private Object link; + private Object mbWay; + private Object mobilepay; private Object multibanco; @@ -7541,6 +9601,8 @@ public static class Builder { private Object paypal; + private Object payto; + private Object pix; private Object promptpay; @@ -7597,6 +9659,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.naverPay, @@ -7607,6 +9670,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -8155,6 +10219,24 @@ public Builder setLink(EmptyParam link) { return this; } + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(PaymentIntentCreateParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; + } + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -8339,6 +10421,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. @@ -11138,7 +13238,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; @@ -11164,7 +13264,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") @@ -11172,21 +13272,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") @@ -11195,11 +13295,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. */ @@ -11437,7 +13537,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) { @@ -11474,7 +13574,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( @@ -11486,7 +13586,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( @@ -11497,7 +13597,7 @@ public Builder setRequestIncrementalAuthorization( } /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. */ public Builder setRequestMulticapture( @@ -11508,7 +13608,7 @@ public Builder setRequestMulticapture( } /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. */ public Builder setRequestOvercapture( @@ -11521,11 +13621,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. */ @@ -12803,7 +14903,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; @@ -12974,6 +15080,19 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12985,7 +15104,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") @@ -12993,10 +15112,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") @@ -13010,10 +15129,12 @@ public static class CardPresent { Routing routing; private CardPresent( + CaptureMethod captureMethod, Map extraParams, Boolean requestExtendedAuthorization, Boolean requestIncrementalAuthorizationSupport, Routing routing) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.requestExtendedAuthorization = requestExtendedAuthorization; this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; @@ -13025,6 +15146,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Boolean requestExtendedAuthorization; @@ -13036,12 +15159,30 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.CardPresent build() { return new PaymentIntentCreateParams.PaymentMethodOptions.CardPresent( + this.captureMethod, this.extraParams, this.requestExtendedAuthorization, this.requestIncrementalAuthorizationSupport, this.routing); } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentCreateParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + 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 @@ -13072,7 +15213,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) { @@ -13082,10 +15223,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( @@ -13196,6 +15337,21 @@ public enum RequestedPriority implements ApiRequestParams.EnumParam { } } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter @@ -16623,6 +18779,137 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.MbWay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.MbWay( + this.extraParams, 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.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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.MbWay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { @@ -17974,7 +20261,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") @@ -18103,7 +20390,7 @@ public Builder putAllExtraParam(Map map) { } /** - * Preferred locale + * Preferred locale * of the PayPal checkout page that the customer is redirected to. */ public Builder setPreferredLocale( @@ -18123,10 +20410,282 @@ public Builder setReference(String reference) { } /** - * The risk correlation ID for an on-session payment using a saved PayPal payment method. + * The risk correlation ID for an on-session payment using a saved PayPal payment method. + */ + public Builder setRiskCorrelationId(String riskCorrelationId) { + this.riskCorrelationId = riskCorrelationId; + 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.Paypal.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; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum PreferredLocale implements ApiRequestParams.EnumParam { + @SerializedName("cs-CZ") + CS_CZ("cs-CZ"), + + @SerializedName("da-DK") + DA_DK("da-DK"), + + @SerializedName("de-AT") + DE_AT("de-AT"), + + @SerializedName("de-DE") + DE_DE("de-DE"), + + @SerializedName("de-LU") + DE_LU("de-LU"), + + @SerializedName("el-GR") + EL_GR("el-GR"), + + @SerializedName("en-GB") + EN_GB("en-GB"), + + @SerializedName("en-US") + EN_US("en-US"), + + @SerializedName("es-ES") + ES_ES("es-ES"), + + @SerializedName("fi-FI") + FI_FI("fi-FI"), + + @SerializedName("fr-BE") + FR_BE("fr-BE"), + + @SerializedName("fr-FR") + FR_FR("fr-FR"), + + @SerializedName("fr-LU") + FR_LU("fr-LU"), + + @SerializedName("hu-HU") + HU_HU("hu-HU"), + + @SerializedName("it-IT") + IT_IT("it-IT"), + + @SerializedName("nl-BE") + NL_BE("nl-BE"), + + @SerializedName("nl-NL") + NL_NL("nl-NL"), + + @SerializedName("pl-PL") + PL_PL("pl-PL"), + + @SerializedName("pt-PT") + PT_PT("pt-PT"), + + @SerializedName("sk-SK") + SK_SK("sk-SK"), + + @SerializedName("sv-SE") + SV_SE("sv-SE"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLocale(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 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 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.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.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 setRiskCorrelationId(String riskCorrelationId) { - this.riskCorrelationId = riskCorrelationId; + public Builder setMandateOptions( + PaymentIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; return this; } @@ -18155,7 +20714,7 @@ public Builder setRiskCorrelationId(String riskCorrelationId) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentCreateParams.PaymentMethodOptions.Paypal.SetupFutureUsage + PaymentIntentCreateParams.PaymentMethodOptions.Payto.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; @@ -18191,87 +20750,337 @@ public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + @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; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; - CaptureMethod(String value) { - this.value = value; + /** + * 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 enum PreferredLocale implements ApiRequestParams.EnumParam { - @SerializedName("cs-CZ") - CS_CZ("cs-CZ"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("da-DK") - DA_DK("da-DK"), + public static class Builder { + private Object amount; - @SerializedName("de-AT") - DE_AT("de-AT"), + private ApiRequestParams.EnumParam amountType; - @SerializedName("de-DE") - DE_DE("de-DE"), + private Object endDate; - @SerializedName("de-LU") - DE_LU("de-LU"), + private Map extraParams; - @SerializedName("el-GR") - EL_GR("el-GR"), + private ApiRequestParams.EnumParam paymentSchedule; - @SerializedName("en-GB") - EN_GB("en-GB"), + private Object paymentsPerPeriod; - @SerializedName("en-US") - EN_US("en-US"), + private ApiRequestParams.EnumParam purpose; - @SerializedName("es-ES") - ES_ES("es-ES"), + /** 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); + } - @SerializedName("fi-FI") - FI_FI("fi-FI"), + /** + * 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; + } - @SerializedName("fr-BE") - FR_BE("fr-BE"), + /** + * 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; + } - @SerializedName("fr-FR") - FR_FR("fr-FR"), + /** + * 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; + } - @SerializedName("fr-LU") - FR_LU("fr-LU"), + /** + * 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; + } - @SerializedName("hu-HU") - HU_HU("hu-HU"), + /** + * 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; + } - @SerializedName("it-IT") - IT_IT("it-IT"), + /** + * 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; + } - @SerializedName("nl-BE") - NL_BE("nl-BE"), + /** + * Add a key/value pair to `extraParams` map. 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; + } - @SerializedName("nl-NL") - NL_NL("nl-NL"), + /** + * Add all map key/value pairs to `extraParams` map. 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; + } - @SerializedName("pl-PL") - PL_PL("pl-PL"), + /** 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; + } - @SerializedName("pt-PT") - PT_PT("pt-PT"), + /** The periodicity at which payments will be collected. Defaults to {@code adhoc}. */ + public Builder setPaymentSchedule(EmptyParam paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } - @SerializedName("sk-SK") - SK_SK("sk-SK"), + /** + * 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; + } - @SerializedName("sv-SE") - SV_SE("sv-SE"); + /** + * 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; + } - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * 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; + } - PreferredLocale(String value) { - this.value = value; + /** + * 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; + } } } @@ -21129,7 +23938,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. */ @@ -21182,7 +23991,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. */ @@ -21354,11 +24163,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -21366,7 +24175,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; @@ -21461,13 +24273,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -21479,7 +24291,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; @@ -21497,7 +24312,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") @@ -21550,7 +24365,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) { @@ -21706,6 +24521,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("kr_card") KR_CARD("kr_card"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -21736,6 +24554,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 84768928401..5c6ed24b654 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -3,6 +3,7 @@ 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; @@ -20,11 +21,15 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams @SerializedName("amount") Long amount; + /** Provides industry-specific information about the amount. */ + @SerializedName("amount_details") + AmountDetails 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 for + * PaymentIntents use case for * connected accounts. */ @SerializedName("application_fee_amount") @@ -47,8 +52,12 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + 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}. @@ -56,6 +65,10 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams @SerializedName("metadata") Map metadata; + /** Provides industry-specific information about the charge. */ + @SerializedName("payment_details") + PaymentDetails paymentDetails; + /** * Text that appears on the customer's statement as the statement descriptor for a non-card or * card charge. This value overrides the account's default statement descriptor. For information @@ -68,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") @@ -76,19 +89,25 @@ public class PaymentIntentIncrementAuthorizationParams extends ApiRequestParams private PaymentIntentIncrementAuthorizationParams( Long amount, + AmountDetails amountDetails, Long applicationFeeAmount, String description, List expand, Map extraParams, + Hooks hooks, Map metadata, + PaymentDetails paymentDetails, String statementDescriptor, TransferData transferData) { this.amount = amount; + this.amountDetails = amountDetails; this.applicationFeeAmount = applicationFeeAmount; this.description = description; this.expand = expand; this.extraParams = extraParams; + this.hooks = hooks; this.metadata = metadata; + this.paymentDetails = paymentDetails; this.statementDescriptor = statementDescriptor; this.transferData = transferData; } @@ -100,6 +119,8 @@ public static Builder builder() { public static class Builder { private Long amount; + private AmountDetails amountDetails; + private Long applicationFeeAmount; private String description; @@ -108,8 +129,12 @@ public static class Builder { private Map extraParams; + private Hooks hooks; + private Map metadata; + private PaymentDetails paymentDetails; + private String statementDescriptor; private TransferData transferData; @@ -118,11 +143,14 @@ public static class Builder { public PaymentIntentIncrementAuthorizationParams build() { return new PaymentIntentIncrementAuthorizationParams( this.amount, + this.amountDetails, this.applicationFeeAmount, this.description, this.expand, this.extraParams, + this.hooks, this.metadata, + this.paymentDetails, this.statementDescriptor, this.transferData); } @@ -136,11 +164,18 @@ public Builder setAmount(Long amount) { return this; } + /** Provides industry-specific information about the amount. */ + public Builder setAmountDetails( + PaymentIntentIncrementAuthorizationParams.AmountDetails amountDetails) { + this.amountDetails = amountDetails; + return this; + } + /** * 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) { @@ -207,6 +242,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentIncrementAuthorizationParams.Hooks hooks) { + this.hooks = hooks; + 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 @@ -233,6 +274,13 @@ public Builder putAllMetadata(Map map) { return this; } + /** Provides industry-specific information about the charge. */ + public Builder setPaymentDetails( + PaymentIntentIncrementAuthorizationParams.PaymentDetails paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + /** * Text that appears on the customer's statement as the statement descriptor for a non-card or * card charge. This value overrides the account's default statement descriptor. For information @@ -247,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( @@ -257,6 +305,1773 @@ public Builder setTransferData( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AmountDetails { + /** + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + @SerializedName("discount_amount") + Object discountAmount; + + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. + */ + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 line items, each containing information about a product in the PaymentIntent. There + * is a maximum of 200 line items. + */ + @SerializedName("line_items") + Object lineItems; + + /** Contains information about the shipping portion of the amount. */ + @SerializedName("shipping") + Object shipping; + + /** Contains information about the tax portion of the amount. */ + @SerializedName("tax") + Object tax; + + private AmountDetails( + Object discountAmount, + Boolean enforceArithmeticValidation, + Map extraParams, + Object lineItems, + Object shipping, + Object tax) { + this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; + this.extraParams = extraParams; + this.lineItems = lineItems; + this.shipping = shipping; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object discountAmount; + + private Boolean enforceArithmeticValidation; + + private Map extraParams; + + private Object lineItems; + + private Object shipping; + + private Object tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails( + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); + } + + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + public Builder setDiscountAmount(EmptyParam discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + 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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentIncrementAuthorizationParams.AmountDetails#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 `lineItems` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails#lineItems} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLineItem( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem element) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = + new ArrayList(); + } + ((List) 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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails#lineItems} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLineItem( + List elements) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = + new ArrayList(); + } + ((List) this.lineItems) + .addAll(elements); + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems(EmptyParam lineItems) { + this.lineItems = lineItems; + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems( + List lineItems) { + this.lineItems = lineItems; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping( + PaymentIntentIncrementAuthorizationParams.AmountDetails.Shipping shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(EmptyParam shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(PaymentIntentIncrementAuthorizationParams.AmountDetails.Tax tax) { + this.tax = tax; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(EmptyParam tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LineItem { + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ + @SerializedName("discount_amount") + Long discountAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Payment method-specific information for line items. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ + @SerializedName("product_code") + String productCode; + + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ + @SerializedName("product_name") + String productName; + + /** + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. + */ + @SerializedName("quantity") + Long quantity; + + /** Contains information about the tax on the item. */ + @SerializedName("tax") + Tax tax; + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ + @SerializedName("unit_cost") + Long unitCost; + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + @SerializedName("unit_of_measure") + String unitOfMeasure; + + private LineItem( + Long discountAmount, + Map extraParams, + PaymentMethodOptions paymentMethodOptions, + String productCode, + String productName, + Long quantity, + Tax tax, + Long unitCost, + String unitOfMeasure) { + this.discountAmount = discountAmount; + this.extraParams = extraParams; + this.paymentMethodOptions = paymentMethodOptions; + this.productCode = productCode; + this.productName = productName; + this.quantity = quantity; + this.tax = tax; + this.unitCost = unitCost; + this.unitOfMeasure = unitOfMeasure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long discountAmount; + + private Map extraParams; + + private PaymentMethodOptions paymentMethodOptions; + + private String productCode; + + private String productName; + + private Long quantity; + + private Tax tax; + + private Long unitCost; + + private String unitOfMeasure; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem( + this.discountAmount, + this.extraParams, + this.paymentMethodOptions, + this.productCode, + this.productName, + this.quantity, + this.tax, + this.unitCost, + this.unitOfMeasure); + } + + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + 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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails.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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails.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; + } + + /** Payment method-specific information for line items. */ + public Builder setPaymentMethodOptions( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions + paymentMethodOptions) { + this.paymentMethodOptions = paymentMethodOptions; + return this; + } + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ + public Builder setProductCode(String productCode) { + this.productCode = productCode; + return this; + } + + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ + public Builder setProductName(String productName) { + this.productName = productName; + return this; + } + + /** + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. + */ + public Builder setQuantity(Long quantity) { + this.quantity = quantity; + return this; + } + + /** Contains information about the tax on the item. */ + public Builder setTax( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.Tax tax) { + this.tax = tax; + return this; + } + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ + public Builder setUnitCost(Long unitCost) { + this.unitCost = unitCost; + return this; + } + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + public Builder setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions { + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + @SerializedName("card") + Card card; + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + @SerializedName("card_present") + CardPresent cardPresent; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + @SerializedName("klarna") + Klarna klarna; + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + @SerializedName("paypal") + Paypal paypal; + + private PaymentMethodOptions( + Card card, + CardPresent cardPresent, + Map extraParams, + Klarna klarna, + Paypal paypal) { + this.card = card; + this.cardPresent = cardPresent; + this.extraParams = extraParams; + this.klarna = klarna; + this.paypal = paypal; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Card card; + + private CardPresent cardPresent; + + private Map extraParams; + + private Klarna klarna; + + private Paypal paypal; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions + build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions( + this.card, this.cardPresent, this.extraParams, this.klarna, this.paypal); + } + + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + public Builder setCard( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions + .Card + card) { + this.card = card; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + public Builder setCardPresent( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions + .CardPresent + cardPresent) { + this.cardPresent = cardPresent; + 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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions#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 sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + public Builder setKlarna( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions + .Klarna + klarna) { + this.klarna = klarna; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + public Builder setPaypal( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions + .Paypal + paypal) { + this.paypal = paypal; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + String commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Card(String commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card + build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Card(this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + 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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Card#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Card#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 CardPresent { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + String commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 CardPresent(String commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.CardPresent + build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.CardPresent(this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + 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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#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 Klarna { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** URL to an image for the product. Max length, 4096 characters. */ + @SerializedName("image_url") + String imageUrl; + + /** URL to the product page. Max length, 4096 characters. */ + @SerializedName("product_url") + String productUrl; + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + String reference; + + /** Reference for the subscription this line item is for. */ + @SerializedName("subscription_reference") + String subscriptionReference; + + private Klarna( + Map extraParams, + String imageUrl, + String productUrl, + String reference, + String subscriptionReference) { + this.extraParams = extraParams; + this.imageUrl = imageUrl; + this.productUrl = productUrl; + this.reference = reference; + this.subscriptionReference = subscriptionReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String imageUrl; + + private String productUrl; + + private String reference; + + private String subscriptionReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Klarna + build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Klarna( + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** URL to an image for the product. Max length, 4096 characters. */ + public Builder setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** URL to the product page. Max length, 4096 characters. */ + public Builder setProductUrl(String productUrl) { + this.productUrl = productUrl; + return this; + } + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** Reference for the subscription this line item is for. */ + public Builder setSubscriptionReference(String subscriptionReference) { + this.subscriptionReference = subscriptionReference; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { + /** Type of the line item. */ + @SerializedName("category") + Category category; + + /** Description of the line item. */ + @SerializedName("description") + String 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; + + /** The Stripe account ID of the connected account that sells the item. */ + @SerializedName("sold_by") + String soldBy; + + private Paypal( + Category category, + String description, + Map extraParams, + String soldBy) { + this.category = category; + this.description = description; + this.extraParams = extraParams; + this.soldBy = soldBy; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Category category; + + private String description; + + private Map extraParams; + + private String soldBy; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Paypal + build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Paypal( + this.category, this.description, this.extraParams, this.soldBy); + } + + /** Type of the line item. */ + public Builder setCategory( + PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem + .PaymentMethodOptions.Paypal.Category + category) { + this.category = category; + return this; + } + + /** Description of the line item. */ + public Builder setDescription(String 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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal#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 Stripe account ID of the connected account that sells the item. */ + public Builder setSoldBy(String soldBy) { + this.soldBy = soldBy; + return this; + } + } + + public enum Category implements ApiRequestParams.EnumParam { + @SerializedName("digital_goods") + DIGITAL_GOODS("digital_goods"), + + @SerializedName("donation") + DONATION("donation"), + + @SerializedName("physical_goods") + PHYSICAL_GOODS("physical_goods"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Category(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.Tax build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.Tax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentIntentIncrementAuthorizationParams.AmountDetails.LineItem.Tax#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 total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shipping { + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + @SerializedName("amount") + Object 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; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("from_postal_code") + Object fromPostalCode; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("to_postal_code") + Object toPostalCode; + + private Shipping( + Object amount, + Map extraParams, + Object fromPostalCode, + Object toPostalCode) { + this.amount = amount; + this.extraParams = extraParams; + this.fromPostalCode = fromPostalCode; + this.toPostalCode = toPostalCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private Map extraParams; + + private Object fromPostalCode; + + private Object toPostalCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.Shipping build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.Shipping( + this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(EmptyParam 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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails.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 + * PaymentIntentIncrementAuthorizationParams.AmountDetails.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; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(String fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(EmptyParam fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(String toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(EmptyParam toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.AmountDetails.Tax build() { + return new PaymentIntentIncrementAuthorizationParams.AmountDetails.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentIncrementAuthorizationParams.AmountDetails.Tax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentIncrementAuthorizationParams.AmountDetails.Tax#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 total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Arguments passed in automations. */ + @SerializedName("inputs") + Inputs inputs; + + private Hooks(Map extraParams, Inputs inputs) { + this.extraParams = extraParams; + this.inputs = inputs; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Inputs inputs; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.Hooks build() { + return new PaymentIntentIncrementAuthorizationParams.Hooks(this.extraParams, this.inputs); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentIntentIncrementAuthorizationParams.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentIncrementAuthorizationParams.Hooks#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Arguments passed in automations. */ + public Builder setInputs(PaymentIntentIncrementAuthorizationParams.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Inputs { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Tax arguments for automations. */ + @SerializedName("tax") + Tax tax; + + private Inputs(Map extraParams, Tax tax) { + this.extraParams = extraParams; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.Hooks.Inputs build() { + return new PaymentIntentIncrementAuthorizationParams.Hooks.Inputs( + this.extraParams, this.tax); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentIncrementAuthorizationParams.Hooks.Inputs#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentIncrementAuthorizationParams.Hooks.Inputs#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Tax arguments for automations. */ + public Builder setTax(PaymentIntentIncrementAuthorizationParams.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Required. The TaxCalculation id + */ + @SerializedName("calculation") + Object calculation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Tax(Object calculation, Map extraParams) { + this.calculation = calculation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object calculation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.Hooks.Inputs.Tax build() { + return new PaymentIntentIncrementAuthorizationParams.Hooks.Inputs.Tax( + this.calculation, this.extraParams); + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(String calculation) { + this.calculation = calculation; + return this; + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(EmptyParam calculation) { + this.calculation = calculation; + 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 PaymentIntentIncrementAuthorizationParams.Hooks.Inputs.Tax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentIncrementAuthorizationParams.Hooks.Inputs.Tax#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 PaymentDetails { + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. + */ + @SerializedName("customer_reference") + Object customerReference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ + @SerializedName("order_reference") + Object orderReference; + + private PaymentDetails( + Object customerReference, Map extraParams, Object orderReference) { + this.customerReference = customerReference; + this.extraParams = extraParams; + this.orderReference = orderReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object customerReference; + + private Map extraParams; + + private Object orderReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentIncrementAuthorizationParams.PaymentDetails build() { + return new PaymentIntentIncrementAuthorizationParams.PaymentDetails( + this.customerReference, this.extraParams, this.orderReference); + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(String customerReference) { + this.customerReference = customerReference; + return this; + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(EmptyParam customerReference) { + this.customerReference = customerReference; + 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 + * PaymentIntentIncrementAuthorizationParams.PaymentDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentIntentIncrementAuthorizationParams.PaymentDetails#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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(String orderReference) { + this.orderReference = orderReference; + return this; + } + + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(EmptyParam orderReference) { + this.orderReference = orderReference; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class TransferData { 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 fddc49d028e..9225d5c5a09 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -16,21 +16,25 @@ 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). */ @SerializedName("amount") Long amount; + /** Provides industry-specific information about the amount. */ + @SerializedName("amount_details") + Object 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 for + * PaymentIntents use case for * connected accounts. */ @SerializedName("application_fee_amount") @@ -53,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 @@ -64,10 +68,31 @@ 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; + /** The list of payment method types to exclude from use with this payment. */ + @SerializedName("excluded_payment_method_types") + Object excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -81,8 +106,12 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Automations to be run during the PaymentIntent lifecycle. */ + @SerializedName("hooks") + 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}. @@ -90,9 +119,13 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** Provides industry-specific information about the charge. */ + @SerializedName("payment_details") + Object 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. */ @@ -100,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") @@ -109,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") @@ -191,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") @@ -200,21 +233,26 @@ 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; private PaymentIntentUpdateParams( Long amount, + Object amountDetails, Object applicationFeeAmount, CaptureMethod captureMethod, Object currency, Object customer, + Object customerAccount, Object description, + Object excludedPaymentMethodTypes, List expand, Map extraParams, + Hooks hooks, Object metadata, + Object paymentDetails, Object paymentMethod, Object paymentMethodConfiguration, PaymentMethodData paymentMethodData, @@ -228,14 +266,19 @@ private PaymentIntentUpdateParams( TransferData transferData, Object transferGroup) { this.amount = amount; + this.amountDetails = amountDetails; this.applicationFeeAmount = applicationFeeAmount; this.captureMethod = captureMethod; this.currency = currency; this.customer = customer; + this.customerAccount = customerAccount; this.description = description; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; + this.hooks = hooks; this.metadata = metadata; + this.paymentDetails = paymentDetails; this.paymentMethod = paymentMethod; this.paymentMethodConfiguration = paymentMethodConfiguration; this.paymentMethodData = paymentMethodData; @@ -257,6 +300,8 @@ public static Builder builder() { public static class Builder { private Long amount; + private Object amountDetails; + private Object applicationFeeAmount; private CaptureMethod captureMethod; @@ -265,14 +310,22 @@ public static class Builder { private Object customer; + private Object customerAccount; + private Object description; + private Object excludedPaymentMethodTypes; + private List expand; private Map extraParams; + private Hooks hooks; + private Object metadata; + private Object paymentDetails; + private Object paymentMethod; private Object paymentMethodConfiguration; @@ -301,14 +354,19 @@ public static class Builder { public PaymentIntentUpdateParams build() { return new PaymentIntentUpdateParams( this.amount, + this.amountDetails, this.applicationFeeAmount, this.captureMethod, this.currency, this.customer, + this.customerAccount, this.description, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, + this.hooks, this.metadata, + this.paymentDetails, this.paymentMethod, this.paymentMethodConfiguration, this.paymentMethodData, @@ -325,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). */ @@ -337,11 +395,23 @@ public Builder setAmount(Long amount) { return this; } + /** Provides industry-specific information about the amount. */ + public Builder setAmountDetails(PaymentIntentUpdateParams.AmountDetails amountDetails) { + this.amountDetails = amountDetails; + return this; + } + + /** Provides industry-specific information about the amount. */ + public Builder setAmountDetails(EmptyParam amountDetails) { + this.amountDetails = amountDetails; + return this; + } + /** * 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) { @@ -353,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) { @@ -393,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 @@ -412,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 @@ -425,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; @@ -437,6 +547,55 @@ public Builder setDescription(EmptyParam description) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addExcludedPaymentMethodType( + PaymentIntentUpdateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes(EmptyParam excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes( + List excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + 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 @@ -489,6 +648,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Automations to be run during the PaymentIntent lifecycle. */ + public Builder setHooks(PaymentIntentUpdateParams.Hooks hooks) { + this.hooks = hooks; + 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 @@ -518,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}. @@ -529,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}. @@ -539,9 +704,21 @@ public Builder setMetadata(Map metadata) { return this; } + /** Provides industry-specific information about the charge. */ + public Builder setPaymentDetails(PaymentIntentUpdateParams.PaymentDetails paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + + /** Provides industry-specific information about the charge. */ + public Builder setPaymentDetails(EmptyParam paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + /** * 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. */ @@ -552,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. */ @@ -562,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) { @@ -571,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) { @@ -582,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( @@ -769,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) { @@ -780,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) { @@ -791,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) { @@ -802,152 +979,1969 @@ public Builder setTransferGroup(EmptyParam transferGroup) { @Getter @EqualsAndHashCode(callSuper = false) - public static class PaymentMethodData { + public static class AmountDetails { /** - * If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS - * Debit payment method. + * The total discount applied on the transaction represented in the smallest currency unit. An integer + * greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. */ - @SerializedName("acss_debit") - AcssDebit acssDebit; + @SerializedName("discount_amount") + Object discountAmount; /** - * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm - * payment method. + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic errors + * in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic validation + * error to card networks. */ - @SerializedName("affirm") - Affirm affirm; + @SerializedName("enforce_arithmetic_validation") + Boolean enforceArithmeticValidation; /** - * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the - * AfterpayClearpay payment method. + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. */ - @SerializedName("afterpay_clearpay") - AfterpayClearpay afterpayClearpay; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; /** - * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay - * payment method. + * A list of line items, each containing information about a product in the PaymentIntent. There + * is a maximum of 200 line items. */ - @SerializedName("alipay") - Alipay alipay; + @SerializedName("line_items") + Object lineItems; - /** - * 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. The field - * defaults to {@code unspecified}. - */ - @SerializedName("allow_redisplay") - AllowRedisplay allowRedisplay; + /** Contains information about the shipping portion of the amount. */ + @SerializedName("shipping") + Object shipping; - /** - * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - */ - @SerializedName("alma") - Alma alma; + /** Contains information about the tax portion of the amount. */ + @SerializedName("tax") + Object tax; - /** - * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment - * method. - */ - @SerializedName("amazon_pay") - AmazonPay amazonPay; + private AmountDetails( + Object discountAmount, + Boolean enforceArithmeticValidation, + Map extraParams, + Object lineItems, + Object shipping, + Object tax) { + this.discountAmount = discountAmount; + this.enforceArithmeticValidation = enforceArithmeticValidation; + this.extraParams = extraParams; + this.lineItems = lineItems; + this.shipping = shipping; + this.tax = tax; + } - /** - * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank - * account. - */ - @SerializedName("au_becs_debit") - AuBecsDebit auBecsDebit; + public static Builder builder() { + return new Builder(); + } - /** - * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs - * Direct Debit bank account. - */ - @SerializedName("bacs_debit") - BacsDebit bacsDebit; + public static class Builder { + private Object discountAmount; - /** - * If this is a {@code bancontact} PaymentMethod, this hash contains details about the - * Bancontact payment method. - */ - @SerializedName("bancontact") - Bancontact bancontact; + private Boolean enforceArithmeticValidation; - /** - * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie - * payment method. - */ - @SerializedName("billie") - Billie billie; + private Map extraParams; - /** - * Billing information associated with the PaymentMethod that may be used or required by - * particular types of payment methods. - */ - @SerializedName("billing_details") - BillingDetails billingDetails; + private Object lineItems; - /** - * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment - * method. - */ - @SerializedName("blik") - Blik blik; + private Object shipping; - /** - * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto - * payment method. - */ - @SerializedName("boleto") - Boleto boleto; + private Object tax; - /** - * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App Pay - * payment method. - */ - @SerializedName("cashapp") - Cashapp cashapp; + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails build() { + return new PaymentIntentUpdateParams.AmountDetails( + this.discountAmount, + this.enforceArithmeticValidation, + this.extraParams, + this.lineItems, + this.shipping, + this.tax); + } - /** - * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment - * method. - */ - @SerializedName("crypto") - Crypto crypto; + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + return this; + } - /** - * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the - * CustomerBalance payment method. - */ - @SerializedName("customer_balance") - CustomerBalance customerBalance; + /** + * The total discount applied on the transaction represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][discount_amount]} field. + */ + public Builder setDiscountAmount(EmptyParam discountAmount) { + this.discountAmount = discountAmount; + return this; + } - /** - * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment - * method. - */ - @SerializedName("eps") - Eps eps; + /** + * Set to {@code false} to return arithmetic validation errors in the response without failing + * the request. Use this when you want the operation to proceed regardless of arithmetic + * errors in the line item data. + * + *

Omit or set to {@code true} to immediately return a 400 error when arithmetic validation + * fails. Use this for strict validation that prevents processing with line item data that has + * arithmetic inconsistencies. + * + *

For card payments, Stripe doesn't send line item data if there's an arithmetic + * validation error to card networks. + */ + public Builder setEnforceArithmeticValidation(Boolean enforceArithmeticValidation) { + this.enforceArithmeticValidation = enforceArithmeticValidation; + return this; + } - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } - /** - * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment - * method. - */ - @SerializedName("fpx") - Fpx fpx; + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } - /** - * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay + /** + * 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 + * PaymentIntentUpdateParams.AmountDetails#lineItems} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addLineItem(PaymentIntentUpdateParams.AmountDetails.LineItem element) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = new ArrayList(); + } + ((List) 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 + * PaymentIntentUpdateParams.AmountDetails#lineItems} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllLineItem( + List elements) { + if (this.lineItems == null || this.lineItems instanceof EmptyParam) { + this.lineItems = new ArrayList(); + } + ((List) this.lineItems).addAll(elements); + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems(EmptyParam lineItems) { + this.lineItems = lineItems; + return this; + } + + /** + * A list of line items, each containing information about a product in the PaymentIntent. + * There is a maximum of 200 line items. + */ + public Builder setLineItems( + List lineItems) { + this.lineItems = lineItems; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(PaymentIntentUpdateParams.AmountDetails.Shipping shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(EmptyParam shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(PaymentIntentUpdateParams.AmountDetails.Tax tax) { + this.tax = tax; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(EmptyParam tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LineItem { + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} field. + */ + @SerializedName("discount_amount") + Long discountAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Payment method-specific information for line items. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ + @SerializedName("product_code") + Object productCode; + + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ + @SerializedName("product_name") + Object productName; + + /** + * Required. The quantity of items. Required for L3 rates. An integer greater + * than 0. + */ + @SerializedName("quantity") + Long quantity; + + /** Contains information about the tax on the item. */ + @SerializedName("tax") + Tax tax; + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. Required + * for L3 rates. An integer greater than or equal to 0. + */ + @SerializedName("unit_cost") + Long unitCost; + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + @SerializedName("unit_of_measure") + Object unitOfMeasure; + + private LineItem( + Long discountAmount, + Map extraParams, + PaymentMethodOptions paymentMethodOptions, + Object productCode, + Object productName, + Long quantity, + Tax tax, + Long unitCost, + Object unitOfMeasure) { + this.discountAmount = discountAmount; + this.extraParams = extraParams; + this.paymentMethodOptions = paymentMethodOptions; + this.productCode = productCode; + this.productName = productName; + this.quantity = quantity; + this.tax = tax; + this.unitCost = unitCost; + this.unitOfMeasure = unitOfMeasure; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long discountAmount; + + private Map extraParams; + + private PaymentMethodOptions paymentMethodOptions; + + private Object productCode; + + private Object productName; + + private Long quantity; + + private Tax tax; + + private Long unitCost; + + private Object unitOfMeasure; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.LineItem build() { + return new PaymentIntentUpdateParams.AmountDetails.LineItem( + this.discountAmount, + this.extraParams, + this.paymentMethodOptions, + this.productCode, + this.productName, + this.quantity, + this.tax, + this.unitCost, + this.unitOfMeasure); + } + + /** + * The discount applied on this line item represented in the smallest currency unit. An + * integer greater than 0. + * + *

This field is mutually exclusive with the {@code amount_details[discount_amount]} + * field. + */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + 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.AmountDetails.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 PaymentIntentUpdateParams.AmountDetails.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; + } + + /** Payment method-specific information for line items. */ + public Builder setPaymentMethodOptions( + PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions + paymentMethodOptions) { + this.paymentMethodOptions = paymentMethodOptions; + return this; + } + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ + public Builder setProductCode(String productCode) { + this.productCode = productCode; + return this; + } + + /** + * The product code of the line item, such as an SKU. Required for L3 rates. At most 12 + * characters long. + */ + public Builder setProductCode(EmptyParam productCode) { + this.productCode = productCode; + return this; + } + + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ + public Builder setProductName(String productName) { + this.productName = productName; + return this; + } + + /** + * Required. The product name of the line item. Required for L3 rates. At + * most 1024 characters long. + * + *

For Cards, this field is truncated to 26 alphanumeric characters before being sent to + * the card networks. For Paypal, this field is truncated to 127 characters. + */ + public Builder setProductName(EmptyParam productName) { + this.productName = productName; + return this; + } + + /** + * Required. The quantity of items. Required for L3 rates. An integer + * greater than 0. + */ + public Builder setQuantity(Long quantity) { + this.quantity = quantity; + return this; + } + + /** Contains information about the tax on the item. */ + public Builder setTax(PaymentIntentUpdateParams.AmountDetails.LineItem.Tax tax) { + this.tax = tax; + return this; + } + + /** + * Required. The unit cost of the line item represented in the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + */ + public Builder setUnitCost(Long unitCost) { + this.unitCost = unitCost; + return this; + } + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + public Builder setUnitOfMeasure(String unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + return this; + } + + /** A unit of measure for the line item, such as gallons, feet, meters, etc. */ + public Builder setUnitOfMeasure(EmptyParam unitOfMeasure) { + this.unitOfMeasure = unitOfMeasure; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions { + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + @SerializedName("card") + Card card; + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + @SerializedName("card_present") + CardPresent cardPresent; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + @SerializedName("klarna") + Klarna klarna; + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + @SerializedName("paypal") + Paypal paypal; + + private PaymentMethodOptions( + Card card, + CardPresent cardPresent, + Map extraParams, + Klarna klarna, + Paypal paypal) { + this.card = card; + this.cardPresent = cardPresent; + this.extraParams = extraParams; + this.klarna = klarna; + this.paypal = paypal; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Card card; + + private CardPresent cardPresent; + + private Map extraParams; + + private Klarna klarna; + + private Paypal paypal; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions build() { + return new PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions( + this.card, this.cardPresent, this.extraParams, this.klarna, this.paypal); + } + + /** + * This sub-hash contains line item details that are specific to {@code card} payment + * method.". + */ + public Builder setCard( + PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card card) { + this.card = card; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code card_present} + * payment method.". + */ + public Builder setCardPresent( + PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent + cardPresent) { + this.cardPresent = cardPresent; + 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.AmountDetails.LineItem.PaymentMethodOptions#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions#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 sub-hash contains line item details that are specific to {@code klarna} payment + * method.". + */ + public Builder setKlarna( + PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna klarna) { + this.klarna = klarna; + return this; + } + + /** + * This sub-hash contains line item details that are specific to {@code paypal} payment + * method.". + */ + public Builder setPaypal( + PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal paypal) { + this.paypal = paypal; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + Object commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Card(Object commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card + build() { + return new PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Card( + this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + return this; + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(EmptyParam commodityCode) { + this.commodityCode = commodityCode; + 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.AmountDetails.LineItem.PaymentMethodOptions.Card#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Card#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 CardPresent { + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + @SerializedName("commodity_code") + Object commodityCode; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 CardPresent(Object commodityCode, Map extraParams) { + this.commodityCode = commodityCode; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object commodityCode; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.CardPresent + build() { + return new PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions + .CardPresent(this.commodityCode, this.extraParams); + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(String commodityCode) { + this.commodityCode = commodityCode; + return this; + } + + /** + * Identifier that categorizes the items being purchased using a standardized commodity + * scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + */ + public Builder setCommodityCode(EmptyParam commodityCode) { + this.commodityCode = commodityCode; + 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.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.CardPresent#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 Klarna { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** URL to an image for the product. Max length, 4096 characters. */ + @SerializedName("image_url") + Object imageUrl; + + /** URL to the product page. Max length, 4096 characters. */ + @SerializedName("product_url") + Object productUrl; + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + @SerializedName("reference") + Object reference; + + /** Reference for the subscription this line item is for. */ + @SerializedName("subscription_reference") + Object subscriptionReference; + + private Klarna( + Map extraParams, + Object imageUrl, + Object productUrl, + Object reference, + Object subscriptionReference) { + this.extraParams = extraParams; + this.imageUrl = imageUrl; + this.productUrl = productUrl; + this.reference = reference; + this.subscriptionReference = subscriptionReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object imageUrl; + + private Object productUrl; + + private Object reference; + + private Object subscriptionReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Klarna + build() { + return new PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions + .Klarna( + this.extraParams, + this.imageUrl, + this.productUrl, + this.reference, + this.subscriptionReference); + } + + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Klarna#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** URL to an image for the product. Max length, 4096 characters. */ + public Builder setImageUrl(String imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** URL to an image for the product. Max length, 4096 characters. */ + public Builder setImageUrl(EmptyParam imageUrl) { + this.imageUrl = imageUrl; + return this; + } + + /** URL to the product page. Max length, 4096 characters. */ + public Builder setProductUrl(String productUrl) { + this.productUrl = productUrl; + return this; + } + + /** URL to the product page. Max length, 4096 characters. */ + public Builder setProductUrl(EmptyParam productUrl) { + this.productUrl = productUrl; + return this; + } + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * Unique reference for this line item to correlate it with your system’s internal + * records. The field is displayed in the Klarna Consumer App if passed. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + + /** Reference for the subscription this line item is for. */ + public Builder setSubscriptionReference(String subscriptionReference) { + this.subscriptionReference = subscriptionReference; + return this; + } + + /** Reference for the subscription this line item is for. */ + public Builder setSubscriptionReference(EmptyParam subscriptionReference) { + this.subscriptionReference = subscriptionReference; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { + /** Type of the line item. */ + @SerializedName("category") + Category category; + + /** Description of the line item. */ + @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; + + /** The Stripe account ID of the connected account that sells the item. */ + @SerializedName("sold_by") + Object soldBy; + + private Paypal( + Category category, + Object description, + Map extraParams, + Object soldBy) { + this.category = category; + this.description = description; + this.extraParams = extraParams; + this.soldBy = soldBy; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Category category; + + private Object description; + + private Map extraParams; + + private Object soldBy; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + build() { + return new PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions + .Paypal(this.category, this.description, this.extraParams, this.soldBy); + } + + /** Type of the line item. */ + public Builder setCategory( + PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal + .Category + category) { + this.category = category; + return this; + } + + /** Description of the line item. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** Description of the line item. */ + 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 + * PaymentIntentUpdateParams.AmountDetails.LineItem.PaymentMethodOptions.Paypal#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.PaymentMethodOptions.Paypal#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 Stripe account ID of the connected account that sells the item. */ + public Builder setSoldBy(String soldBy) { + this.soldBy = soldBy; + return this; + } + + /** The Stripe account ID of the connected account that sells the item. */ + public Builder setSoldBy(EmptyParam soldBy) { + this.soldBy = soldBy; + return this; + } + } + + public enum Category implements ApiRequestParams.EnumParam { + @SerializedName("digital_goods") + DIGITAL_GOODS("digital_goods"), + + @SerializedName("donation") + DONATION("donation"), + + @SerializedName("physical_goods") + PHYSICAL_GOODS("physical_goods"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Category(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on a single line item represented in + * the smallest currency unit. + * Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.LineItem.Tax build() { + return new PaymentIntentUpdateParams.AmountDetails.LineItem.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails.LineItem.Tax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.LineItem.Tax#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 total amount of tax on a single line item represented in + * the smallest currency + * unit. Required for L3 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shipping { + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + @SerializedName("amount") + Object 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; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("from_postal_code") + Object fromPostalCode; + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + @SerializedName("to_postal_code") + Object toPostalCode; + + private Shipping( + Object amount, + Map extraParams, + Object fromPostalCode, + Object toPostalCode) { + this.amount = amount; + this.extraParams = extraParams; + this.fromPostalCode = fromPostalCode; + this.toPostalCode = toPostalCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object amount; + + private Map extraParams; + + private Object fromPostalCode; + + private Object toPostalCode; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.Shipping build() { + return new PaymentIntentUpdateParams.AmountDetails.Shipping( + this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * If a physical good is being shipped, the cost of shipping represented in the smallest currency unit. An + * integer greater than or equal to 0. + */ + public Builder setAmount(EmptyParam 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 PaymentIntentUpdateParams.AmountDetails.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 PaymentIntentUpdateParams.AmountDetails.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; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(String fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped from. + * At most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setFromPostalCode(EmptyParam fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(String toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + + /** + * If a physical good is being shipped, the postal code of where it is being shipped to. At + * most 10 alphanumeric characters long, hyphens are allowed. + */ + public Builder setToPostalCode(EmptyParam toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 total amount of tax on the transaction represented in the smallest currency unit. Required + * for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.AmountDetails.Tax build() { + return new PaymentIntentUpdateParams.AmountDetails.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. 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.AmountDetails.Tax#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AmountDetails.Tax#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 total amount of tax on the transaction represented in the + * smallest currency unit. + * Required for L2 rates. An integer greater than or equal to 0. + * + *

This field is mutually exclusive with the {@code + * amount_details[line_items][#][tax][total_tax_amount]} field. + */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Hooks { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Arguments passed in automations. */ + @SerializedName("inputs") + Inputs inputs; + + private Hooks(Map extraParams, Inputs inputs) { + this.extraParams = extraParams; + this.inputs = inputs; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Inputs inputs; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.Hooks build() { + return new PaymentIntentUpdateParams.Hooks(this.extraParams, this.inputs); + } + + /** + * Add a key/value pair to `extraParams` map. 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.Hooks#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Hooks#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Arguments passed in automations. */ + public Builder setInputs(PaymentIntentUpdateParams.Hooks.Inputs inputs) { + this.inputs = inputs; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Inputs { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Tax arguments for automations. */ + @SerializedName("tax") + Tax tax; + + private Inputs(Map extraParams, Tax tax) { + this.extraParams = extraParams; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.Hooks.Inputs build() { + return new PaymentIntentUpdateParams.Hooks.Inputs(this.extraParams, this.tax); + } + + /** + * Add a key/value pair to `extraParams` map. 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.Hooks.Inputs#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Hooks.Inputs#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Tax arguments for automations. */ + public Builder setTax(PaymentIntentUpdateParams.Hooks.Inputs.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Required. The TaxCalculation id + */ + @SerializedName("calculation") + Object calculation; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Tax(Object calculation, Map extraParams) { + this.calculation = calculation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object calculation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.Hooks.Inputs.Tax build() { + return new PaymentIntentUpdateParams.Hooks.Inputs.Tax( + this.calculation, this.extraParams); + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(String calculation) { + this.calculation = calculation; + return this; + } + + /** + * Required. The TaxCalculation id + */ + public Builder setCalculation(EmptyParam calculation) { + this.calculation = calculation; + 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.Hooks.Inputs.Tax#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Hooks.Inputs.Tax#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 PaymentDetails { + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent + * to card networks. + */ + @SerializedName("customer_reference") + Object customerReference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before + * being sent to card networks. For Klarna, this field is truncated to 255 characters and is + * visible to customers when they view the order in the Klarna app. + */ + @SerializedName("order_reference") + Object orderReference; + + private PaymentDetails( + Object customerReference, Map extraParams, Object orderReference) { + this.customerReference = customerReference; + this.extraParams = extraParams; + this.orderReference = orderReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object customerReference; + + private Map extraParams; + + private Object orderReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentDetails build() { + return new PaymentIntentUpdateParams.PaymentDetails( + this.customerReference, this.extraParams, this.orderReference); + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(String customerReference) { + this.customerReference = customerReference; + return this; + } + + /** + * A unique value to identify the customer. This field is available only for card payments. + * + *

This field is truncated to 25 alphanumeric characters, excluding spaces, before being + * sent to card networks. + */ + public Builder setCustomerReference(EmptyParam customerReference) { + this.customerReference = customerReference; + 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.PaymentDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.PaymentDetails#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 unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(String orderReference) { + this.orderReference = orderReference; + return this; + } + + /** + * A unique value assigned by the business to identify the transaction. Required for L2 and L3 + * rates. + * + *

Required when the Payment Method Types array contains {@code card}, including when automatic_payment_methods.enabled + * is set to {@code true}. + * + *

For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, + * before being sent to card networks. For Klarna, this field is truncated to 255 characters + * and is visible to customers when they view the order in the Klarna app. + */ + public Builder setOrderReference(EmptyParam orderReference) { + this.orderReference = orderReference; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodData { + /** + * If this is an {@code acss_debit} PaymentMethod, this hash contains details about the ACSS + * Debit payment method. + */ + @SerializedName("acss_debit") + AcssDebit acssDebit; + + /** + * If this is an {@code affirm} PaymentMethod, this hash contains details about the Affirm + * payment method. + */ + @SerializedName("affirm") + Affirm affirm; + + /** + * If this is an {@code AfterpayClearpay} PaymentMethod, this hash contains details about the + * AfterpayClearpay payment method. + */ + @SerializedName("afterpay_clearpay") + AfterpayClearpay afterpayClearpay; + + /** + * If this is an {@code Alipay} PaymentMethod, this hash contains details about the Alipay + * payment method. + */ + @SerializedName("alipay") + Alipay alipay; + + /** + * 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. The field + * defaults to {@code unspecified}. + */ + @SerializedName("allow_redisplay") + AllowRedisplay allowRedisplay; + + /** + * If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + */ + @SerializedName("alma") + Alma alma; + + /** + * If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment + * method. + */ + @SerializedName("amazon_pay") + AmazonPay amazonPay; + + /** + * If this is an {@code au_becs_debit} PaymentMethod, this hash contains details about the bank + * account. + */ + @SerializedName("au_becs_debit") + AuBecsDebit auBecsDebit; + + /** + * If this is a {@code bacs_debit} PaymentMethod, this hash contains details about the Bacs + * Direct Debit bank account. + */ + @SerializedName("bacs_debit") + BacsDebit bacsDebit; + + /** + * If this is a {@code bancontact} PaymentMethod, this hash contains details about the + * Bancontact payment method. + */ + @SerializedName("bancontact") + Bancontact bancontact; + + /** + * If this is a {@code billie} PaymentMethod, this hash contains details about the Billie + * payment method. + */ + @SerializedName("billie") + Billie billie; + + /** + * Billing information associated with the PaymentMethod that may be used or required by + * particular types of payment methods. + */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** + * If this is a {@code blik} PaymentMethod, this hash contains details about the BLIK payment + * method. + */ + @SerializedName("blik") + Blik blik; + + /** + * If this is a {@code boleto} PaymentMethod, this hash contains details about the Boleto + * payment method. + */ + @SerializedName("boleto") + Boleto boleto; + + /** + * If this is a {@code cashapp} PaymentMethod, this hash contains details about the Cash App Pay + * payment method. + */ + @SerializedName("cashapp") + Cashapp cashapp; + + /** + * If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment + * method. + */ + @SerializedName("crypto") + Crypto crypto; + + /** + * If this is a {@code customer_balance} PaymentMethod, this hash contains details about the + * CustomerBalance payment method. + */ + @SerializedName("customer_balance") + CustomerBalance customerBalance; + + /** + * If this is an {@code eps} PaymentMethod, this hash contains details about the EPS payment + * method. + */ + @SerializedName("eps") + Eps eps; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * If this is an {@code fpx} PaymentMethod, this hash contains details about the FPX payment + * method. + */ + @SerializedName("fpx") + Fpx fpx; + + /** + * If this is a {@code giropay} PaymentMethod, this hash contains details about the Giropay * payment method. */ @SerializedName("giropay") @@ -1010,7 +3004,14 @@ public static class PaymentMethodData { Link link; /** - * Set of key-value pairs that you can attach + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1088,6 +3089,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. @@ -1103,7 +3111,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") @@ -1216,6 +3224,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1227,6 +3236,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1270,6 +3280,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1281,6 +3292,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.radarOptions = radarOptions; @@ -1360,6 +3372,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1382,6 +3396,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -1442,6 +3458,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1453,6 +3470,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -1756,6 +3774,15 @@ public Builder setLink(PaymentIntentUpdateParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(PaymentIntentUpdateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + 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 @@ -1875,6 +3902,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. @@ -1894,7 +3930,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( @@ -2920,11 +4956,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2932,7 +4968,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; @@ -3044,25 +5083,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -3080,13 +5119,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; @@ -3950,6 +5995,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -3959,6 +6007,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -3968,6 +6019,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -4467,6 +6521,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.MbWay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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 Mobilepay { @@ -5317,6 +7429,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 { @@ -5446,7 +7675,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. */ @@ -5502,7 +7731,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. */ @@ -5512,7 +7741,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. */ @@ -6393,6 +8622,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6423,6 +8655,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6673,6 +8908,13 @@ public static class PaymentMethodOptions { @SerializedName("link") Object link; + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + @SerializedName("mb_way") + Object mbWay; + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -6743,6 +8985,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. @@ -6857,6 +9106,7 @@ private PaymentMethodOptions( Object konbini, Object krCard, Object link, + Object mbWay, Object mobilepay, Object multibanco, Object naverPay, @@ -6867,6 +9117,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object payto, Object pix, Object promptpay, Object revolutPay, @@ -6908,6 +9159,7 @@ private PaymentMethodOptions( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.naverPay = naverPay; @@ -6918,6 +9170,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.promptpay = promptpay; this.revolutPay = revolutPay; @@ -6995,6 +9248,8 @@ public static class Builder { private Object link; + private Object mbWay; + private Object mobilepay; private Object multibanco; @@ -7015,6 +9270,8 @@ public static class Builder { private Object paypal; + private Object payto; + private Object pix; private Object promptpay; @@ -7071,6 +9328,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.naverPay, @@ -7081,6 +9339,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -7629,6 +9888,24 @@ public Builder setLink(EmptyParam link) { return this; } + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(PaymentIntentUpdateParams.PaymentMethodOptions.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + + /** + * If this is a {@code mb_way} PaymentMethod, this sub-hash contains details about the MB WAY + * payment method options. + */ + public Builder setMbWay(EmptyParam mbWay) { + this.mbWay = mbWay; + return this; + } + /** * If this is a {@code MobilePay} PaymentMethod, this sub-hash contains details about the * MobilePay payment method options. @@ -7813,6 +10090,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. @@ -10678,7 +12973,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; @@ -10704,7 +12999,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") @@ -10712,21 +13007,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") @@ -10735,11 +13030,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. */ @@ -10987,7 +13282,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) { @@ -11024,7 +13319,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( @@ -11036,7 +13331,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( @@ -11047,7 +13342,7 @@ public Builder setRequestIncrementalAuthorization( } /** - * Request ability to make multiple + * Request ability to make multiple * captures for this PaymentIntent. */ public Builder setRequestMulticapture( @@ -11058,7 +13353,7 @@ public Builder setRequestMulticapture( } /** - * Request ability to overcapture + * Request ability to overcapture * for this PaymentIntent. */ public Builder setRequestOvercapture( @@ -11071,11 +13366,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. */ @@ -12407,7 +14702,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; @@ -12575,9 +14876,22 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class CardPresent { + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardPresent { + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12589,7 +14903,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") @@ -12597,10 +14911,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") @@ -12614,10 +14928,12 @@ public static class CardPresent { Routing routing; private CardPresent( + CaptureMethod captureMethod, Map extraParams, Boolean requestExtendedAuthorization, Boolean requestIncrementalAuthorizationSupport, Routing routing) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.requestExtendedAuthorization = requestExtendedAuthorization; this.requestIncrementalAuthorizationSupport = requestIncrementalAuthorizationSupport; @@ -12629,6 +14945,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Boolean requestExtendedAuthorization; @@ -12640,12 +14958,30 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent( + this.captureMethod, this.extraParams, this.requestExtendedAuthorization, this.requestIncrementalAuthorizationSupport, this.routing); } + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.CardPresent.CaptureMethod + captureMethod) { + this.captureMethod = captureMethod; + 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 @@ -12676,7 +15012,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) { @@ -12686,10 +15022,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( @@ -12800,6 +15136,21 @@ public enum RequestedPriority implements ApiRequestParams.EnumParam { } } } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("manual_preferred") + MANUAL_PREFERRED("manual_preferred"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } } @Getter @@ -16084,7 +18435,230 @@ private Link( ApiRequestParams.EnumParam setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; - this.persistentToken = persistentToken; + this.persistentToken = persistentToken; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private Object persistentToken; + + private ApiRequestParams.EnumParam setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Link build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Link( + this.captureMethod, this.extraParams, this.persistentToken, this.setupFutureUsage); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.Link.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

If provided, this parameter overrides the behavior of the top-level capture_method + * for this payment method type when finalizing the payment with this payment method type. + * + *

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + 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.Link#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Link#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** [Deprecated] This is a legacy parameter that no longer has any function. */ + @Deprecated + public Builder setPersistentToken(String persistentToken) { + this.persistentToken = persistentToken; + return this; + } + + /** [Deprecated] This is a legacy parameter that no longer has any function. */ + @Deprecated + public Builder setPersistentToken(EmptyParam persistentToken) { + this.persistentToken = persistentToken; + 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.Link.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; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(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 MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -16093,55 +18667,20 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; - private Object persistentToken; - - private ApiRequestParams.EnumParam setupFutureUsage; + private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Link build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Link( - this.captureMethod, this.extraParams, this.persistentToken, this.setupFutureUsage); - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.Link.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** - * Controls when the funds are captured from the customer's account. - * - *

If provided, this parameter overrides the behavior of the top-level capture_method - * for this payment method type when finalizing the payment with this payment method type. - * - *

If {@code capture_method} is already set on the PaymentIntent, providing an empty - * value for this parameter unsets the stored value for this payment method type. - */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + public PaymentIntentUpdateParams.PaymentMethodOptions.MbWay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.MbWay( + this.extraParams, 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.Link#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.MbWay#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -16155,7 +18694,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.Link#extraParams} for the + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.MbWay#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16166,20 +18705,6 @@ public Builder putAllExtraParam(Map map) { return this; } - /** [Deprecated] This is a legacy parameter that no longer has any function. */ - @Deprecated - public Builder setPersistentToken(String persistentToken) { - this.persistentToken = persistentToken; - return this; - } - - /** [Deprecated] This is a legacy parameter that no longer has any function. */ - @Deprecated - public Builder setPersistentToken(EmptyParam persistentToken) { - this.persistentToken = persistentToken; - return this; - } - /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -16205,59 +18730,16 @@ public Builder setPersistentToken(EmptyParam persistentToken) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Link.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) { + PaymentIntentUpdateParams.PaymentMethodOptions.MbWay.SetupFutureUsage + setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } } - public enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - CaptureMethod(String value) { - this.value = value; - } - } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"), - - @SerializedName("off_session") - OFF_SESSION("off_session"); + NONE("none"); @Getter(onMethod_ = {@Override}) private final String value; @@ -17490,8 +19972,162 @@ public static class Paynow { * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) * name in this param object. Effectively, this map is flattened to its parent instance. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @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 Paynow(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Paynow build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Paynow( + this.extraParams, 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.Paynow#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Paynow#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.Paynow.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Preferred locale of + * the PayPal checkout page that the customer is redirected to. + */ + @SerializedName("preferred_locale") + PreferredLocale preferredLocale; + + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's + * invoice ID. This must be a globally unique ID if you have configured in your PayPal + * settings to block multiple payments per invoice ID. + */ + @SerializedName("reference") + Object reference; + + /** The risk correlation ID for an on-session payment using a saved PayPal payment method. */ + @SerializedName("risk_correlation_id") + Object riskCorrelationId; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -17517,10 +20153,20 @@ public static class Paynow { * off_session}. */ @SerializedName("setup_future_usage") - SetupFutureUsage setupFutureUsage; + ApiRequestParams.EnumParam setupFutureUsage; - private Paynow(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Paypal( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + PreferredLocale preferredLocale, + Object reference, + Object riskCorrelationId, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; + this.preferredLocale = preferredLocale; + this.reference = reference; + this.riskCorrelationId = riskCorrelationId; this.setupFutureUsage = setupFutureUsage; } @@ -17529,20 +20175,46 @@ public static Builder builder() { } public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + private Map extraParams; - private SetupFutureUsage setupFutureUsage; + private PreferredLocale preferredLocale; + + private Object reference; + + private Object riskCorrelationId; + + private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Paynow build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Paynow( - this.extraParams, this.setupFutureUsage); + public PaymentIntentUpdateParams.PaymentMethodOptions.Paypal build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Paypal( + this.captureMethod, + this.extraParams, + this.preferredLocale, + this.reference, + this.riskCorrelationId, + this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + PaymentIntentUpdateParams.PaymentMethodOptions.Paypal.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + 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.Paynow#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Paypal#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -17556,7 +20228,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.Paynow#extraParams} for + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Paypal#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -17567,6 +20239,52 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Preferred locale + * of the PayPal checkout page that the customer is redirected to. + */ + public Builder setPreferredLocale( + PaymentIntentUpdateParams.PaymentMethodOptions.Paypal.PreferredLocale preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's + * invoice ID. This must be a globally unique ID if you have configured in your PayPal + * settings to block multiple payments per invoice ID. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's + * invoice ID. This must be a globally unique ID if you have configured in your PayPal + * settings to block multiple payments per invoice ID. + */ + public Builder setReference(EmptyParam reference) { + this.reference = reference; + return this; + } + + /** + * The risk correlation ID for an on-session payment using a saved PayPal payment method. + */ + public Builder setRiskCorrelationId(String riskCorrelationId) { + this.riskCorrelationId = riskCorrelationId; + return this; + } + + /** + * The risk correlation ID for an on-session payment using a saved PayPal payment method. + */ + public Builder setRiskCorrelationId(EmptyParam riskCorrelationId) { + this.riskCorrelationId = riskCorrelationId; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -17592,16 +20310,132 @@ public Builder putAllExtraParam(Map map) { * off_session}. */ public Builder setSetupFutureUsage( - PaymentIntentUpdateParams.PaymentMethodOptions.Paynow.SetupFutureUsage + PaymentIntentUpdateParams.PaymentMethodOptions.Paypal.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; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum PreferredLocale implements ApiRequestParams.EnumParam { + @SerializedName("cs-CZ") + CS_CZ("cs-CZ"), + + @SerializedName("da-DK") + DA_DK("da-DK"), + + @SerializedName("de-AT") + DE_AT("de-AT"), + + @SerializedName("de-DE") + DE_DE("de-DE"), + + @SerializedName("de-LU") + DE_LU("de-LU"), + + @SerializedName("el-GR") + EL_GR("el-GR"), + + @SerializedName("en-GB") + EN_GB("en-GB"), + + @SerializedName("en-US") + EN_US("en-US"), + + @SerializedName("es-ES") + ES_ES("es-ES"), + + @SerializedName("fi-FI") + FI_FI("fi-FI"), + + @SerializedName("fr-BE") + FR_BE("fr-BE"), + + @SerializedName("fr-FR") + FR_FR("fr-FR"), + + @SerializedName("fr-LU") + FR_LU("fr-LU"), + + @SerializedName("hu-HU") + HU_HU("hu-HU"), + + @SerializedName("it-IT") + IT_IT("it-IT"), + + @SerializedName("nl-BE") + NL_BE("nl-BE"), + + @SerializedName("nl-NL") + NL_NL("nl-NL"), + + @SerializedName("pl-PL") + PL_PL("pl-PL"), + + @SerializedName("pt-PT") + PT_PT("pt-PT"), + + @SerializedName("sk-SK") + SK_SK("sk-SK"), + + @SerializedName("sv-SE") + SV_SE("sv-SE"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLocale(String value) { + this.value = value; + } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -17614,11 +20448,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Paypal { - /** Controls when the funds will be captured from the customer's account. */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + 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. @@ -17629,23 +20459,12 @@ public static class Paypal { Map extraParams; /** - * Preferred locale of - * the PayPal checkout page that the customer is redirected to. - */ - @SerializedName("preferred_locale") - PreferredLocale preferredLocale; - - /** - * A reference of the PayPal transaction visible to customer which is mapped to PayPal's - * invoice ID. This must be a globally unique ID if you have configured in your PayPal - * settings to block multiple payments per invoice ID. + * 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("reference") - Object reference; - - /** The risk correlation ID for an on-session payment using a saved PayPal payment method. */ - @SerializedName("risk_correlation_id") - Object riskCorrelationId; + @SerializedName("mandate_options") + MandateOptions mandateOptions; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -17673,18 +20492,12 @@ public static class Paypal { @SerializedName("setup_future_usage") ApiRequestParams.EnumParam setupFutureUsage; - private Paypal( - ApiRequestParams.EnumParam captureMethod, + private Payto( Map extraParams, - PreferredLocale preferredLocale, - Object reference, - Object riskCorrelationId, + MandateOptions mandateOptions, ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; this.extraParams = extraParams; - this.preferredLocale = preferredLocale; - this.reference = reference; - this.riskCorrelationId = riskCorrelationId; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -17693,47 +20506,23 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; - private PreferredLocale preferredLocale; - - private Object reference; - - private Object riskCorrelationId; + private MandateOptions mandateOptions; private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentMethodOptions.Paypal build() { - return new PaymentIntentUpdateParams.PaymentMethodOptions.Paypal( - this.captureMethod, - this.extraParams, - this.preferredLocale, - this.reference, - this.riskCorrelationId, - this.setupFutureUsage); - } - - /** Controls when the funds will be captured from the customer's account. */ - public Builder setCaptureMethod( - PaymentIntentUpdateParams.PaymentMethodOptions.Paypal.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** Controls when the funds will be captured from the customer's account. */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + 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.Paypal#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -17746,8 +20535,8 @@ 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.Paypal#extraParams} for - * the field documentation. + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -17758,193 +20547,408 @@ public Builder putAllExtraParam(Map map) { } /** - * Preferred locale - * of the PayPal checkout page that the customer is redirected to. + * 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 setPreferredLocale( - PaymentIntentUpdateParams.PaymentMethodOptions.Paypal.PreferredLocale preferredLocale) { - this.preferredLocale = preferredLocale; + public Builder setMandateOptions( + PaymentIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; return this; } /** - * A reference of the PayPal transaction visible to customer which is mapped to PayPal's - * invoice ID. This must be a globally unique ID if you have configured in your PayPal - * settings to block multiple payments per invoice ID. + * 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 setReference(String reference) { - this.reference = reference; + public Builder setSetupFutureUsage( + PaymentIntentUpdateParams.PaymentMethodOptions.Payto.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } /** - * A reference of the PayPal transaction visible to customer which is mapped to PayPal's - * invoice ID. This must be a globally unique ID if you have configured in your PayPal - * settings to block multiple payments per invoice ID. + * 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 setReference(EmptyParam reference) { - this.reference = reference; + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { /** - * The risk correlation ID for an on-session payment using a saved PayPal payment method. + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. */ - public Builder setRiskCorrelationId(String riskCorrelationId) { - this.riskCorrelationId = riskCorrelationId; - return this; - } + @SerializedName("amount") + Object amount; /** - * The risk correlation ID for an on-session payment using a saved PayPal payment method. + * 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 setRiskCorrelationId(EmptyParam riskCorrelationId) { - this.riskCorrelationId = riskCorrelationId; - return this; + @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(); } - /** - * 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.Paypal.SetupFutureUsage - setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; - } + 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; + } - /** - * 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; + /** + * 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 CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), - @Getter(onMethod_ = {@Override}) - private final String value; + @SerializedName("maximum") + MAXIMUM("maximum"); - CaptureMethod(String value) { - this.value = value; + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountType(String value) { + this.value = value; + } } - } - public enum PreferredLocale implements ApiRequestParams.EnumParam { - @SerializedName("cs-CZ") - CS_CZ("cs-CZ"), + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), - @SerializedName("da-DK") - DA_DK("da-DK"), + @SerializedName("annual") + ANNUAL("annual"), - @SerializedName("de-AT") - DE_AT("de-AT"), + @SerializedName("daily") + DAILY("daily"), - @SerializedName("de-DE") - DE_DE("de-DE"), + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), - @SerializedName("de-LU") - DE_LU("de-LU"), + @SerializedName("monthly") + MONTHLY("monthly"), - @SerializedName("el-GR") - EL_GR("el-GR"), + @SerializedName("quarterly") + QUARTERLY("quarterly"), - @SerializedName("en-GB") - EN_GB("en-GB"), + @SerializedName("semi_annual") + SEMI_ANNUAL("semi_annual"), - @SerializedName("en-US") - EN_US("en-US"), + @SerializedName("weekly") + WEEKLY("weekly"); - @SerializedName("es-ES") - ES_ES("es-ES"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("fi-FI") - FI_FI("fi-FI"), + PaymentSchedule(String value) { + this.value = value; + } + } - @SerializedName("fr-BE") - FR_BE("fr-BE"), + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), - @SerializedName("fr-FR") - FR_FR("fr-FR"), + @SerializedName("government") + GOVERNMENT("government"), - @SerializedName("fr-LU") - FR_LU("fr-LU"), + @SerializedName("loan") + LOAN("loan"), - @SerializedName("hu-HU") - HU_HU("hu-HU"), + @SerializedName("mortgage") + MORTGAGE("mortgage"), - @SerializedName("it-IT") - IT_IT("it-IT"), + @SerializedName("other") + OTHER("other"), - @SerializedName("nl-BE") - NL_BE("nl-BE"), + @SerializedName("pension") + PENSION("pension"), - @SerializedName("nl-NL") - NL_NL("nl-NL"), + @SerializedName("personal") + PERSONAL("personal"), - @SerializedName("pl-PL") - PL_PL("pl-PL"), + @SerializedName("retail") + RETAIL("retail"), - @SerializedName("pt-PT") - PT_PT("pt-PT"), + @SerializedName("salary") + SALARY("salary"), - @SerializedName("sk-SK") - SK_SK("sk-SK"), + @SerializedName("tax") + TAX("tax"), - @SerializedName("sv-SE") - SV_SE("sv-SE"); + @SerializedName("utility") + UTILITY("utility"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - PreferredLocale(String value) { - this.value = value; + Purpose(String value) { + this.value = value; + } } } @@ -21012,11 +24016,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -21024,7 +24028,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; @@ -21134,25 +24141,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -21170,13 +24177,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; @@ -21272,6 +24285,162 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("off_session") OFF_SESSION("off_session"), diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 6df7f9ff706..5b70c912672 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -62,19 +62,22 @@ public class PaymentLinkCreateParams extends ApiRequestParams { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("custom_fields") List customFields; - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("custom_text") 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,24 +111,28 @@ 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") Map metadata; + /** Controls settings applied for collecting the customer's name. */ + @SerializedName("name_collection") + NameCollection nameCollection; + /** The account on behalf of which to charge. */ @SerializedName("on_behalf_of") String onBehalfOf; /** * 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. @@ -148,7 +155,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") @@ -159,7 +166,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; @@ -182,7 +189,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") @@ -191,7 +198,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") @@ -233,6 +240,7 @@ private PaymentLinkCreateParams( InvoiceCreation invoiceCreation, List lineItems, Map metadata, + NameCollection nameCollection, String onBehalfOf, List optionalItems, PaymentIntentData paymentIntentData, @@ -263,6 +271,7 @@ private PaymentLinkCreateParams( this.invoiceCreation = invoiceCreation; this.lineItems = lineItems; this.metadata = metadata; + this.nameCollection = nameCollection; this.onBehalfOf = onBehalfOf; this.optionalItems = optionalItems; this.paymentIntentData = paymentIntentData; @@ -317,6 +326,8 @@ public static class Builder { private Map metadata; + private NameCollection nameCollection; + private String onBehalfOf; private List optionalItems; @@ -363,6 +374,7 @@ public PaymentLinkCreateParams build() { this.invoiceCreation, this.lineItems, this.metadata, + this.nameCollection, this.onBehalfOf, this.optionalItems, this.paymentIntentData, @@ -467,16 +479,19 @@ public Builder addAllCustomField(List eleme return this; } - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setCustomText(PaymentLinkCreateParams.CustomText customText) { this.customText = customText; return this; } /** - * 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; @@ -599,6 +614,12 @@ public Builder putAllMetadata(Map map) { return this; } + /** Controls settings applied for collecting the customer's name. */ + public Builder setNameCollection(PaymentLinkCreateParams.NameCollection nameCollection) { + this.nameCollection = nameCollection; + return this; + } + /** The account on behalf of which to charge. */ public Builder setOnBehalfOf(String onBehalfOf) { this.onBehalfOf = onBehalfOf; @@ -649,7 +670,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( @@ -738,7 +759,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) { @@ -966,7 +987,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") @@ -1023,7 +1044,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) { @@ -2794,7 +2815,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}. @@ -3033,7 +3054,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}. @@ -3044,7 +3065,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}. @@ -3423,15 +3444,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") @@ -3512,8 +3533,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) { @@ -3522,7 +3543,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) { @@ -3697,7 +3718,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 @@ -3843,7 +3864,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 @@ -3904,7 +3925,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}. @@ -3918,23 +3939,32 @@ public static class ProductData { @SerializedName("name") String name; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String 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") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String 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() { @@ -3954,6 +3984,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public PaymentLinkCreateParams.LineItem.PriceData.ProductData build() { return new PaymentLinkCreateParams.LineItem.PriceData.ProductData( @@ -3962,7 +3994,8 @@ public PaymentLinkCreateParams.LineItem.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -4067,11 +4100,20 @@ 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; } + + /** + * 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; + } } } @@ -4217,6 +4259,284 @@ public enum TaxBehavior implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection { + /** Controls settings applied for collecting the customer's business name. */ + @SerializedName("business") + Business business; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls settings applied for collecting the customer's individual name. */ + @SerializedName("individual") + Individual individual; + + private NameCollection( + Business business, Map extraParams, Individual individual) { + this.business = business; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Business business; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkCreateParams.NameCollection build() { + return new PaymentLinkCreateParams.NameCollection( + this.business, this.extraParams, this.individual); + } + + /** Controls settings applied for collecting the customer's business name. */ + public Builder setBusiness(PaymentLinkCreateParams.NameCollection.Business business) { + this.business = business; + 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 + * PaymentLinkCreateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentLinkCreateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Controls settings applied for collecting the customer's individual name. */ + public Builder setIndividual(PaymentLinkCreateParams.NameCollection.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Business { + /** + * Required. Enable business name collection on the payment link. Defaults to + * {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide their business name before checking out. + * Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Business(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkCreateParams.NameCollection.Business build() { + return new PaymentLinkCreateParams.NameCollection.Business( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable business name collection on the payment link. Defaults + * to {@code false}. + */ + 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 PaymentLinkCreateParams.NameCollection.Business#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkCreateParams.NameCollection.Business#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 customer is required to provide their business name before checking out. + * Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** + * Required. Enable individual name collection on the payment link. Defaults + * to {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide their full name before checking out. Defaults + * to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Individual(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkCreateParams.NameCollection.Individual build() { + return new PaymentLinkCreateParams.NameCollection.Individual( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable individual name collection on the payment link. + * Defaults to {@code false}. + */ + 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 PaymentLinkCreateParams.NameCollection.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 PaymentLinkCreateParams.NameCollection.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; + } + + /** + * Whether the customer is required to provide their full name before checking out. Defaults + * to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class OptionalItem { @@ -4238,8 +4558,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; @@ -4319,8 +4639,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; @@ -4478,8 +4798,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. */ @@ -4488,7 +4808,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 @@ -4535,7 +4855,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") @@ -4662,7 +4982,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 @@ -4717,7 +5037,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) { @@ -5901,9 +6221,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. */ @@ -6436,7 +6756,10 @@ public static class TaxIdCollection { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You can't + * set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("required") Required required; @@ -6499,7 +6822,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setRequired(PaymentLinkCreateParams.TaxIdCollection.Required required) { this.required = required; return this; @@ -6721,6 +7047,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6742,6 +7071,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 62934fddc16..fbf7d674611 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -39,19 +39,22 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("custom_fields") Object customFields; - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("custom_text") 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,17 +88,21 @@ 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") Map metadata; + /** Controls settings applied for collecting the customer's name. */ + @SerializedName("name_collection") + Object nameCollection; + /** * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code * payment} mode. @@ -111,7 +118,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") @@ -144,7 +151,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") @@ -176,6 +183,7 @@ private PaymentLinkUpdateParams( InvoiceCreation invoiceCreation, List lineItems, Map metadata, + Object nameCollection, PaymentIntentData paymentIntentData, PaymentMethodCollection paymentMethodCollection, Object paymentMethodTypes, @@ -199,6 +207,7 @@ private PaymentLinkUpdateParams( this.invoiceCreation = invoiceCreation; this.lineItems = lineItems; this.metadata = metadata; + this.nameCollection = nameCollection; this.paymentIntentData = paymentIntentData; this.paymentMethodCollection = paymentMethodCollection; this.paymentMethodTypes = paymentMethodTypes; @@ -243,6 +252,8 @@ public static class Builder { private Map metadata; + private Object nameCollection; + private PaymentIntentData paymentIntentData; private PaymentMethodCollection paymentMethodCollection; @@ -278,6 +289,7 @@ public PaymentLinkUpdateParams build() { this.invoiceCreation, this.lineItems, this.metadata, + this.nameCollection, this.paymentIntentData, this.paymentMethodCollection, this.paymentMethodTypes, @@ -353,7 +365,7 @@ public Builder addAllCustomField(List eleme /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setCustomFields(EmptyParam customFields) { this.customFields = customFields; @@ -362,23 +374,26 @@ public Builder setCustomFields(EmptyParam customFields) { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setCustomFields(List customFields) { this.customFields = customFields; return this; } - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setCustomText(PaymentLinkUpdateParams.CustomText customText) { this.customText = customText; return this; } /** - * 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; @@ -507,6 +522,18 @@ public Builder putAllMetadata(Map map) { return this; } + /** Controls settings applied for collecting the customer's name. */ + public Builder setNameCollection(PaymentLinkUpdateParams.NameCollection nameCollection) { + this.nameCollection = nameCollection; + return this; + } + + /** Controls settings applied for collecting the customer's name. */ + public Builder setNameCollection(EmptyParam nameCollection) { + this.nameCollection = nameCollection; + return this; + } + /** * A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in {@code * payment} mode. @@ -525,7 +552,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( @@ -623,7 +650,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) { @@ -848,7 +875,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") @@ -905,7 +932,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) { @@ -917,7 +944,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) { @@ -2513,7 +2540,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}. @@ -2764,7 +2791,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}. @@ -2775,7 +2802,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}. @@ -3394,6 +3421,284 @@ public Builder setMinimum(Long minimum) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection { + /** Controls settings applied for collecting the customer's business name. */ + @SerializedName("business") + Business business; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls settings applied for collecting the customer's individual name. */ + @SerializedName("individual") + Individual individual; + + private NameCollection( + Business business, Map extraParams, Individual individual) { + this.business = business; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Business business; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.NameCollection build() { + return new PaymentLinkUpdateParams.NameCollection( + this.business, this.extraParams, this.individual); + } + + /** Controls settings applied for collecting the customer's business name. */ + public Builder setBusiness(PaymentLinkUpdateParams.NameCollection.Business business) { + this.business = business; + 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 + * PaymentLinkUpdateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentLinkUpdateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Controls settings applied for collecting the customer's individual name. */ + public Builder setIndividual(PaymentLinkUpdateParams.NameCollection.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Business { + /** + * Required. Enable business name collection on the payment link. Defaults to + * {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide their business name before checking out. + * Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Business(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.NameCollection.Business build() { + return new PaymentLinkUpdateParams.NameCollection.Business( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable business name collection on the payment link. Defaults + * to {@code false}. + */ + 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 PaymentLinkUpdateParams.NameCollection.Business#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentLinkUpdateParams.NameCollection.Business#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 customer is required to provide their business name before checking out. + * Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** + * Required. Enable individual name collection on the payment link. Defaults + * to {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide their full name before checking out. Defaults + * to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Individual(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.NameCollection.Individual build() { + return new PaymentLinkUpdateParams.NameCollection.Individual( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable individual name collection on the payment link. + * Defaults to {@code false}. + */ + 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 PaymentLinkUpdateParams.NameCollection.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 PaymentLinkUpdateParams.NameCollection.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; + } + + /** + * Whether the customer is required to provide their full name before checking out. Defaults + * to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PaymentIntentData { @@ -3411,8 +3716,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. */ @@ -3444,7 +3749,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") @@ -3561,8 +3866,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. */ @@ -3572,8 +3877,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. */ @@ -3638,7 +3943,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) { @@ -3648,7 +3953,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) { @@ -4722,9 +5027,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. */ @@ -4843,9 +5148,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. */ @@ -4855,9 +5160,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. */ @@ -5289,7 +5594,10 @@ public static class TaxIdCollection { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You can't + * set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("required") Required required; @@ -5352,7 +5660,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setRequired(PaymentLinkUpdateParams.TaxIdCollection.Required required) { this.required = required; return this; @@ -5481,6 +5792,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -5502,6 +5816,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 9e1bbde5a7f..a4cae983f99 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,15 +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; /** - * Uses a customer’s cash balance + * 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 * 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; @@ -171,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; @@ -195,17 +202,26 @@ 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; + /** + * 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 details. + */ + @SerializedName("fr_meal_voucher_conecs") + FrMealVoucherConecs frMealVoucherConecs; + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * 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") @@ -215,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") @@ -225,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; @@ -235,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; @@ -257,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") @@ -268,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") @@ -279,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. */ @@ -287,11 +303,19 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { Link link; /** - * MobilePay is a single-use + * 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. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * 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; @@ -315,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; @@ -324,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; @@ -333,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; @@ -361,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; @@ -369,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; @@ -422,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; @@ -432,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; @@ -457,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; @@ -467,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") @@ -498,11 +531,13 @@ private PaymentMethodConfigurationCreateParams( Card card, CartesBancaires cartesBancaires, Cashapp cashapp, + Crypto crypto, CustomerBalance customerBalance, Eps eps, List expand, Map extraParams, Fpx fpx, + FrMealVoucherConecs frMealVoucherConecs, Giropay giropay, GooglePay googlePay, Grabpay grabpay, @@ -513,6 +548,7 @@ private PaymentMethodConfigurationCreateParams( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Mobilepay mobilepay, Multibanco multibanco, String name, @@ -525,6 +561,7 @@ private PaymentMethodConfigurationCreateParams( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RevolutPay revolutPay, @@ -554,11 +591,13 @@ private PaymentMethodConfigurationCreateParams( this.card = card; this.cartesBancaires = cartesBancaires; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.expand = expand; this.extraParams = extraParams; this.fpx = fpx; + this.frMealVoucherConecs = frMealVoucherConecs; this.giropay = giropay; this.googlePay = googlePay; this.grabpay = grabpay; @@ -569,6 +608,7 @@ private PaymentMethodConfigurationCreateParams( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.name = name; @@ -581,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; @@ -634,6 +675,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -644,6 +687,8 @@ public static class Builder { private Fpx fpx; + private FrMealVoucherConecs frMealVoucherConecs; + private Giropay giropay; private GooglePay googlePay; @@ -664,6 +709,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Mobilepay mobilepay; private Multibanco multibanco; @@ -688,6 +735,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -732,11 +781,13 @@ public PaymentMethodConfigurationCreateParams build() { this.card, this.cartesBancaires, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.expand, this.extraParams, this.fpx, + this.frMealVoucherConecs, this.giropay, this.googlePay, this.grabpay, @@ -747,6 +798,7 @@ public PaymentMethodConfigurationCreateParams build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.name, @@ -759,6 +811,7 @@ public PaymentMethodConfigurationCreateParams build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -775,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) { @@ -787,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) { @@ -797,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. */ @@ -812,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; @@ -842,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; @@ -862,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; @@ -872,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; @@ -881,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; @@ -905,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; @@ -918,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; @@ -938,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) { @@ -949,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; @@ -957,9 +1010,19 @@ public Builder setCashapp(PaymentMethodConfigurationCreateParams.Cashapp cashapp } /** - * Uses a customer’s cash + * Stablecoin payments enable + * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and + * Metamask. + */ + public Builder setCrypto(PaymentMethodConfigurationCreateParams.Crypto crypto) { + this.crypto = crypto; + return this; + } + + /** + * 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) { @@ -971,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; @@ -1036,19 +1099,31 @@ 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; return this; } + /** + * 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 details. + */ + public Builder setFrMealVoucherConecs( + PaymentMethodConfigurationCreateParams.FrMealVoucherConecs frMealVoucherConecs) { + this.frMealVoucherConecs = frMealVoucherConecs; + return this; + } + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * 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) { @@ -1060,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) { @@ -1072,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; @@ -1084,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; @@ -1112,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) { @@ -1125,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) { @@ -1140,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. */ @@ -1149,13 +1224,23 @@ public Builder setLink(PaymentMethodConfigurationCreateParams.Link link) { return this; } + /** + * 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. + */ + public Builder setMbWay(PaymentMethodConfigurationCreateParams.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * 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; @@ -1187,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) { @@ -1199,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; @@ -1210,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; @@ -1246,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) { @@ -1257,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; @@ -1322,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; @@ -1334,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; @@ -1342,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; @@ -1366,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( @@ -1380,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; @@ -1389,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) { @@ -4222,7 +4318,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class CustomerBalance { + public static class Crypto { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4236,7 +4332,7 @@ public static class CustomerBalance { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CustomerBalance(DisplayPreference displayPreference, Map extraParams) { + private Crypto(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4251,15 +4347,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.CustomerBalance build() { - return new PaymentMethodConfigurationCreateParams.CustomerBalance( + public PaymentMethodConfigurationCreateParams.Crypto build() { + return new PaymentMethodConfigurationCreateParams.Crypto( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference - displayPreference) { + PaymentMethodConfigurationCreateParams.Crypto.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4267,8 +4362,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.CustomerBalance#extraParams} for the field - * documentation. + * PaymentMethodConfigurationCreateParams.Crypto#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4281,8 +4375,8 @@ 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 PaymentMethodConfigurationCreateParams.CustomerBalance#extraParams} for the - * field documentation. + * See {@link PaymentMethodConfigurationCreateParams.Crypto#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4324,8 +4418,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Crypto.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Crypto.DisplayPreference( this.extraParams, this.preference); } @@ -4333,8 +4427,8 @@ public PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference * Add a key/value pair to `extraParams` map. 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.CustomerBalance.DisplayPreference#extraParams} for - * the field documentation. + * PaymentMethodConfigurationCreateParams.Crypto.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4348,8 +4442,8 @@ 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 - * PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference#extraParams} for - * the field documentation. + * PaymentMethodConfigurationCreateParams.Crypto.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4361,8 +4455,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationCreateParams.Crypto.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -4390,7 +4483,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Eps { + public static class CustomerBalance { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4404,7 +4497,7 @@ public static class Eps { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Eps(DisplayPreference displayPreference, Map extraParams) { + private CustomerBalance(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4419,14 +4512,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Eps build() { - return new PaymentMethodConfigurationCreateParams.Eps( + public PaymentMethodConfigurationCreateParams.CustomerBalance build() { + return new PaymentMethodConfigurationCreateParams.CustomerBalance( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Eps.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference + displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4434,7 +4528,8 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Eps#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.CustomerBalance#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4447,8 +4542,8 @@ 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 PaymentMethodConfigurationCreateParams.Eps#extraParams} for the field - * documentation. + * See {@link PaymentMethodConfigurationCreateParams.CustomerBalance#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4490,16 +4585,17 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Eps.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Eps.DisplayPreference( + public PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.CustomerBalance.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.Eps.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4512,8 +4608,9 @@ 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 PaymentMethodConfigurationCreateParams.Eps.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4525,7 +4622,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Eps.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.CustomerBalance.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -4553,7 +4651,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Fpx { + public static class Eps { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4567,7 +4665,7 @@ public static class Fpx { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Fpx(DisplayPreference displayPreference, Map extraParams) { + private Eps(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4582,14 +4680,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Fpx build() { - return new PaymentMethodConfigurationCreateParams.Fpx( + public PaymentMethodConfigurationCreateParams.Eps build() { + return new PaymentMethodConfigurationCreateParams.Eps( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Eps.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4597,7 +4695,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Fpx#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Eps#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4610,7 +4708,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 PaymentMethodConfigurationCreateParams.Fpx#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Eps#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -4653,15 +4751,15 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Eps.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Eps.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.Fpx.DisplayPreference#extraParams} + * map. See {@link PaymentMethodConfigurationCreateParams.Eps.DisplayPreference#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4675,7 +4773,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 PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference#extraParams} + * map. See {@link PaymentMethodConfigurationCreateParams.Eps.DisplayPreference#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4688,7 +4786,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Eps.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -4716,7 +4814,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Giropay { + public static class Fpx { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4730,7 +4828,7 @@ public static class Giropay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Giropay(DisplayPreference displayPreference, Map extraParams) { + private Fpx(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4745,14 +4843,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Giropay build() { - return new PaymentMethodConfigurationCreateParams.Giropay( + public PaymentMethodConfigurationCreateParams.Fpx build() { + return new PaymentMethodConfigurationCreateParams.Fpx( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4760,7 +4858,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Giropay#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Fpx#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4773,7 +4871,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 PaymentMethodConfigurationCreateParams.Giropay#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Fpx#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -4816,17 +4914,16 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Fpx.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.Giropay.DisplayPreference#extraParams} for the - * field documentation. + * map. See {@link PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4839,9 +4936,8 @@ 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 - * PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference#extraParams} for the - * field documentation. + * map. See {@link PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4853,8 +4949,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationCreateParams.Fpx.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -4882,7 +4977,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class GooglePay { + public static class FrMealVoucherConecs { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4896,7 +4991,8 @@ public static class GooglePay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private GooglePay(DisplayPreference displayPreference, Map extraParams) { + private FrMealVoucherConecs( + DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4911,14 +5007,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.GooglePay build() { - return new PaymentMethodConfigurationCreateParams.GooglePay( + public PaymentMethodConfigurationCreateParams.FrMealVoucherConecs build() { + return new PaymentMethodConfigurationCreateParams.FrMealVoucherConecs( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference + displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4926,7 +5023,8 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.GooglePay#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.FrMealVoucherConecs#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4939,8 +5037,8 @@ 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 PaymentMethodConfigurationCreateParams.GooglePay#extraParams} for the field - * documentation. + * See {@link PaymentMethodConfigurationCreateParams.FrMealVoucherConecs#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4982,8 +5080,9 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference( + public PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference + build() { + return new PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference( this.extraParams, this.preference); } @@ -4991,8 +5090,8 @@ public PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference build( * Add a key/value pair to `extraParams` map. 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.GooglePay.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5006,8 +5105,8 @@ 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 - * PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5019,7 +5118,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference.Preference + PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -5048,7 +5147,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Grabpay { + public static class Giropay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5062,7 +5161,7 @@ public static class Grabpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Grabpay(DisplayPreference displayPreference, Map extraParams) { + private Giropay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5077,14 +5176,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Grabpay build() { - return new PaymentMethodConfigurationCreateParams.Grabpay( + public PaymentMethodConfigurationCreateParams.Giropay build() { + return new PaymentMethodConfigurationCreateParams.Giropay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5092,7 +5191,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Grabpay#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Giropay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5105,7 +5204,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 PaymentMethodConfigurationCreateParams.Grabpay#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Giropay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5148,8 +5247,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference( this.extraParams, this.preference); } @@ -5157,7 +5256,7 @@ public PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference build() * Add a key/value pair to `extraParams` map. 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.Grabpay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5172,7 +5271,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 - * PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5185,7 +5284,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference.Preference + PaymentMethodConfigurationCreateParams.Giropay.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -5214,7 +5313,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Ideal { + public static class GooglePay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5228,7 +5327,7 @@ public static class Ideal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Ideal(DisplayPreference displayPreference, Map extraParams) { + private GooglePay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5243,14 +5342,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Ideal build() { - return new PaymentMethodConfigurationCreateParams.Ideal( + public PaymentMethodConfigurationCreateParams.GooglePay build() { + return new PaymentMethodConfigurationCreateParams.GooglePay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5258,7 +5357,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Ideal#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.GooglePay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5271,7 +5370,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 PaymentMethodConfigurationCreateParams.Ideal#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.GooglePay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5314,8 +5413,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference( + public PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference( this.extraParams, this.preference); } @@ -5323,8 +5422,8 @@ public PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference build() { * Add a key/value pair to `extraParams` map. 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.Ideal.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5338,8 +5437,8 @@ 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 - * PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5351,7 +5450,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Ideal.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.GooglePay.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -5379,7 +5479,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Jcb { + public static class Grabpay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5393,7 +5493,7 @@ public static class Jcb { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Jcb(DisplayPreference displayPreference, Map extraParams) { + private Grabpay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5408,14 +5508,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Jcb build() { - return new PaymentMethodConfigurationCreateParams.Jcb( + public PaymentMethodConfigurationCreateParams.Grabpay build() { + return new PaymentMethodConfigurationCreateParams.Grabpay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5423,7 +5523,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Jcb#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Grabpay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5436,7 +5536,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 PaymentMethodConfigurationCreateParams.Jcb#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Grabpay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5479,16 +5579,17 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Grabpay.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.Jcb.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5501,8 +5602,9 @@ 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 PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5514,7 +5616,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Jcb.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Grabpay.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -5542,7 +5645,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class KakaoPay { + public static class Ideal { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5556,7 +5659,335 @@ public static class KakaoPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private KakaoPay(DisplayPreference displayPreference, Map extraParams) { + private Ideal(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.Ideal build() { + return new PaymentMethodConfigurationCreateParams.Ideal( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Ideal.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.Ideal#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Ideal#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.Ideal.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Ideal.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.Ideal.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.Ideal.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.Ideal.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 Jcb { + /** 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 Jcb(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.Jcb build() { + return new PaymentMethodConfigurationCreateParams.Jcb( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Jcb.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.Jcb#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Jcb#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.Jcb.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Jcb.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.Jcb.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.Jcb.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.Jcb.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 KakaoPay { + /** 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 KakaoPay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5599,7 +6030,173 @@ 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 PaymentMethodConfigurationCreateParams.KakaoPay#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.KakaoPay#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.KakaoPay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.KakaoPay.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.KakaoPay.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.KakaoPay.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.KakaoPay.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 Klarna { + /** 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 Klarna(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.Klarna build() { + return new PaymentMethodConfigurationCreateParams.Klarna( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Klarna.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.Klarna#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Klarna#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5642,8 +6239,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.KakaoPay.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.KakaoPay.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference( this.extraParams, this.preference); } @@ -5651,7 +6248,7 @@ public PaymentMethodConfigurationCreateParams.KakaoPay.DisplayPreference build() * Add a key/value pair to `extraParams` map. 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.KakaoPay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5666,7 +6263,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 - * PaymentMethodConfigurationCreateParams.KakaoPay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5679,8 +6276,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.KakaoPay.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5708,7 +6304,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Klarna { + public static class Konbini { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5722,7 +6318,7 @@ public static class Klarna { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Klarna(DisplayPreference displayPreference, Map extraParams) { + private Konbini(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5737,14 +6333,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Klarna build() { - return new PaymentMethodConfigurationCreateParams.Klarna( + public PaymentMethodConfigurationCreateParams.Konbini build() { + return new PaymentMethodConfigurationCreateParams.Konbini( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5752,7 +6348,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Klarna#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Konbini#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5765,7 +6361,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 PaymentMethodConfigurationCreateParams.Klarna#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Konbini#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5808,8 +6404,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference( this.extraParams, this.preference); } @@ -5817,7 +6413,7 @@ public PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference build() { * Add a key/value pair to `extraParams` map. 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.Klarna.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5832,7 +6428,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 - * PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5845,7 +6441,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Klarna.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -5873,7 +6470,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Konbini { + public static class KrCard { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5887,7 +6484,7 @@ public static class Konbini { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Konbini(DisplayPreference displayPreference, Map extraParams) { + private KrCard(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5902,14 +6499,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Konbini build() { - return new PaymentMethodConfigurationCreateParams.Konbini( + public PaymentMethodConfigurationCreateParams.KrCard build() { + return new PaymentMethodConfigurationCreateParams.KrCard( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5917,7 +6514,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Konbini#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.KrCard#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5930,7 +6527,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 PaymentMethodConfigurationCreateParams.Konbini#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.KrCard#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5973,8 +6570,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference( + public PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference( this.extraParams, this.preference); } @@ -5982,7 +6579,7 @@ public PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference build() * Add a key/value pair to `extraParams` map. 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.Konbini.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5997,7 +6594,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 - * PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -6010,8 +6607,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Konbini.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6039,7 +6635,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class KrCard { + public static class Link { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6053,7 +6649,7 @@ public static class KrCard { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private KrCard(DisplayPreference displayPreference, Map extraParams) { + private Link(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6068,14 +6664,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.KrCard build() { - return new PaymentMethodConfigurationCreateParams.KrCard( + public PaymentMethodConfigurationCreateParams.Link build() { + return new PaymentMethodConfigurationCreateParams.Link( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.Link.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6083,7 +6679,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.KrCard#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.Link#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6096,7 +6692,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 PaymentMethodConfigurationCreateParams.KrCard#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.Link#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6139,8 +6735,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference( + public PaymentMethodConfigurationCreateParams.Link.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Link.DisplayPreference( this.extraParams, this.preference); } @@ -6148,8 +6744,8 @@ public PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference build() { * Add a key/value pair to `extraParams` map. 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.KrCard.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Link.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6163,8 +6759,8 @@ 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 - * PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationCreateParams.Link.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6176,7 +6772,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.KrCard.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.Link.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6204,7 +6800,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Link { + public static class MbWay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6218,7 +6814,7 @@ public static class Link { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Link(DisplayPreference displayPreference, Map extraParams) { + private MbWay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6233,14 +6829,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Link build() { - return new PaymentMethodConfigurationCreateParams.Link( + public PaymentMethodConfigurationCreateParams.MbWay build() { + return new PaymentMethodConfigurationCreateParams.MbWay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationCreateParams.Link.DisplayPreference displayPreference) { + PaymentMethodConfigurationCreateParams.MbWay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6248,7 +6844,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Link#extraParams} for the field documentation. + * PaymentMethodConfigurationCreateParams.MbWay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6261,7 +6857,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 PaymentMethodConfigurationCreateParams.Link#extraParams} for the field + * See {@link PaymentMethodConfigurationCreateParams.MbWay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6304,8 +6900,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationCreateParams.Link.DisplayPreference build() { - return new PaymentMethodConfigurationCreateParams.Link.DisplayPreference( + public PaymentMethodConfigurationCreateParams.MbWay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.MbWay.DisplayPreference( this.extraParams, this.preference); } @@ -6313,7 +6909,7 @@ public PaymentMethodConfigurationCreateParams.Link.DisplayPreference build() { * Add a key/value pair to `extraParams` map. 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.Link.DisplayPreference#extraParams} for the field + * PaymentMethodConfigurationCreateParams.MbWay.DisplayPreference#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6328,7 +6924,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 - * PaymentMethodConfigurationCreateParams.Link.DisplayPreference#extraParams} for the field + * PaymentMethodConfigurationCreateParams.MbWay.DisplayPreference#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6341,7 +6937,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationCreateParams.Link.DisplayPreference.Preference preference) { + PaymentMethodConfigurationCreateParams.MbWay.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -8022,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 e64f525d836..1261aa9fceb 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,15 +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; /** - * Uses a customer’s cash balance + * 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 * 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; @@ -176,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; @@ -200,17 +207,26 @@ 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; + /** + * 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 details. + */ + @SerializedName("fr_meal_voucher_conecs") + FrMealVoucherConecs frMealVoucherConecs; + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * 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") @@ -220,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") @@ -230,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; @@ -240,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; @@ -262,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") @@ -273,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") @@ -284,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. */ @@ -292,11 +308,19 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { Link link; /** - * MobilePay is a single-use + * 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. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * 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; @@ -320,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; @@ -329,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; @@ -338,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; @@ -362,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; @@ -370,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; @@ -423,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; @@ -433,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; @@ -458,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; @@ -468,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") @@ -500,11 +533,13 @@ private PaymentMethodConfigurationUpdateParams( Card card, CartesBancaires cartesBancaires, Cashapp cashapp, + Crypto crypto, CustomerBalance customerBalance, Eps eps, List expand, Map extraParams, Fpx fpx, + FrMealVoucherConecs frMealVoucherConecs, Giropay giropay, GooglePay googlePay, Grabpay grabpay, @@ -515,6 +550,7 @@ private PaymentMethodConfigurationUpdateParams( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Mobilepay mobilepay, Multibanco multibanco, Object name, @@ -526,6 +562,7 @@ private PaymentMethodConfigurationUpdateParams( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RevolutPay revolutPay, @@ -556,11 +593,13 @@ private PaymentMethodConfigurationUpdateParams( this.card = card; this.cartesBancaires = cartesBancaires; this.cashapp = cashapp; + this.crypto = crypto; this.customerBalance = customerBalance; this.eps = eps; this.expand = expand; this.extraParams = extraParams; this.fpx = fpx; + this.frMealVoucherConecs = frMealVoucherConecs; this.giropay = giropay; this.googlePay = googlePay; this.grabpay = grabpay; @@ -571,6 +610,7 @@ private PaymentMethodConfigurationUpdateParams( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.mobilepay = mobilepay; this.multibanco = multibanco; this.name = name; @@ -582,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; @@ -637,6 +678,8 @@ public static class Builder { private Cashapp cashapp; + private Crypto crypto; + private CustomerBalance customerBalance; private Eps eps; @@ -647,6 +690,8 @@ public static class Builder { private Fpx fpx; + private FrMealVoucherConecs frMealVoucherConecs; + private Giropay giropay; private GooglePay googlePay; @@ -667,6 +712,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Mobilepay mobilepay; private Multibanco multibanco; @@ -689,6 +736,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -734,11 +783,13 @@ public PaymentMethodConfigurationUpdateParams build() { this.card, this.cartesBancaires, this.cashapp, + this.crypto, this.customerBalance, this.eps, this.expand, this.extraParams, this.fpx, + this.frMealVoucherConecs, this.giropay, this.googlePay, this.grabpay, @@ -749,6 +800,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.konbini, this.krCard, this.link, + this.mbWay, this.mobilepay, this.multibanco, this.name, @@ -760,6 +812,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.revolutPay, @@ -776,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) { @@ -794,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) { @@ -804,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. */ @@ -819,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; @@ -849,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; @@ -869,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; @@ -879,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; @@ -888,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; @@ -912,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; @@ -925,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; @@ -945,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) { @@ -956,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; @@ -964,9 +1017,19 @@ public Builder setCashapp(PaymentMethodConfigurationUpdateParams.Cashapp cashapp } /** - * Uses a customer’s cash + * Stablecoin payments enable + * customers to pay in stablecoins like USDC from 100s of wallets including Phantom and + * Metamask. + */ + public Builder setCrypto(PaymentMethodConfigurationUpdateParams.Crypto crypto) { + this.crypto = crypto; + return this; + } + + /** + * 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) { @@ -978,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; @@ -1043,19 +1106,31 @@ 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; return this; } + /** + * 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 details. + */ + public Builder setFrMealVoucherConecs( + PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs frMealVoucherConecs) { + this.frMealVoucherConecs = frMealVoucherConecs; + return this; + } + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * 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) { @@ -1067,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) { @@ -1079,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; @@ -1091,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; @@ -1119,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) { @@ -1132,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) { @@ -1147,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. */ @@ -1156,13 +1231,23 @@ public Builder setLink(PaymentMethodConfigurationUpdateParams.Link link) { return this; } + /** + * 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. + */ + public Builder setMbWay(PaymentMethodConfigurationUpdateParams.MbWay mbWay) { + this.mbWay = mbWay; + return this; + } + /** * 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; @@ -1200,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) { @@ -1212,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; @@ -1223,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; @@ -1253,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) { @@ -1264,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; @@ -1329,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; @@ -1341,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; @@ -1349,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; @@ -1373,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( @@ -1387,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; @@ -1396,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) { @@ -4229,7 +4325,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class CustomerBalance { + public static class Crypto { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4243,7 +4339,7 @@ public static class CustomerBalance { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private CustomerBalance(DisplayPreference displayPreference, Map extraParams) { + private Crypto(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4258,15 +4354,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.CustomerBalance build() { - return new PaymentMethodConfigurationUpdateParams.CustomerBalance( + public PaymentMethodConfigurationUpdateParams.Crypto build() { + return new PaymentMethodConfigurationUpdateParams.Crypto( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference - displayPreference) { + PaymentMethodConfigurationUpdateParams.Crypto.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4274,8 +4369,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.CustomerBalance#extraParams} for the field - * documentation. + * PaymentMethodConfigurationUpdateParams.Crypto#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4288,8 +4382,8 @@ 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 PaymentMethodConfigurationUpdateParams.CustomerBalance#extraParams} for the - * field documentation. + * See {@link PaymentMethodConfigurationUpdateParams.Crypto#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4331,8 +4425,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Crypto.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Crypto.DisplayPreference( this.extraParams, this.preference); } @@ -4340,8 +4434,8 @@ public PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference * Add a key/value pair to `extraParams` map. 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.CustomerBalance.DisplayPreference#extraParams} for - * the field documentation. + * PaymentMethodConfigurationUpdateParams.Crypto.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4355,8 +4449,8 @@ 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 - * PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference#extraParams} for - * the field documentation. + * PaymentMethodConfigurationUpdateParams.Crypto.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4368,8 +4462,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationUpdateParams.Crypto.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -4397,7 +4490,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Eps { + public static class CustomerBalance { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4411,7 +4504,7 @@ public static class Eps { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Eps(DisplayPreference displayPreference, Map extraParams) { + private CustomerBalance(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4426,14 +4519,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Eps build() { - return new PaymentMethodConfigurationUpdateParams.Eps( + public PaymentMethodConfigurationUpdateParams.CustomerBalance build() { + return new PaymentMethodConfigurationUpdateParams.CustomerBalance( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference + displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4441,7 +4535,8 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Eps#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.CustomerBalance#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4454,8 +4549,8 @@ 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 PaymentMethodConfigurationUpdateParams.Eps#extraParams} for the field - * documentation. + * See {@link PaymentMethodConfigurationUpdateParams.CustomerBalance#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4497,16 +4592,17 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.CustomerBalance.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.Eps.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4519,8 +4615,9 @@ 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 PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4532,7 +4629,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.CustomerBalance.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -4560,7 +4658,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Fpx { + public static class Eps { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4574,7 +4672,7 @@ public static class Fpx { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Fpx(DisplayPreference displayPreference, Map extraParams) { + private Eps(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4589,14 +4687,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Fpx build() { - return new PaymentMethodConfigurationUpdateParams.Fpx( + public PaymentMethodConfigurationUpdateParams.Eps build() { + return new PaymentMethodConfigurationUpdateParams.Eps( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4604,7 +4702,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Fpx#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Eps#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4617,7 +4715,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 PaymentMethodConfigurationUpdateParams.Fpx#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Eps#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -4660,15 +4758,15 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Eps.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.Fpx.DisplayPreference#extraParams} + * map. See {@link PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4682,7 +4780,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 PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference#extraParams} + * map. See {@link PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -4695,7 +4793,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Eps.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -4723,7 +4821,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Giropay { + public static class Fpx { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4737,7 +4835,7 @@ public static class Giropay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Giropay(DisplayPreference displayPreference, Map extraParams) { + private Fpx(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4752,14 +4850,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Giropay build() { - return new PaymentMethodConfigurationUpdateParams.Giropay( + public PaymentMethodConfigurationUpdateParams.Fpx build() { + return new PaymentMethodConfigurationUpdateParams.Fpx( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4767,7 +4865,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Giropay#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Fpx#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4780,7 +4878,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 PaymentMethodConfigurationUpdateParams.Giropay#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Fpx#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -4823,17 +4921,16 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Fpx.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.Giropay.DisplayPreference#extraParams} for the - * field documentation. + * map. See {@link PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4846,9 +4943,8 @@ 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 - * PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference#extraParams} for the - * field documentation. + * map. See {@link PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4860,8 +4956,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationUpdateParams.Fpx.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -4889,7 +4984,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class GooglePay { + public static class FrMealVoucherConecs { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -4903,7 +4998,8 @@ public static class GooglePay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private GooglePay(DisplayPreference displayPreference, Map extraParams) { + private FrMealVoucherConecs( + DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -4918,14 +5014,15 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.GooglePay build() { - return new PaymentMethodConfigurationUpdateParams.GooglePay( + public PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs build() { + return new PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference + displayPreference) { this.displayPreference = displayPreference; return this; } @@ -4933,7 +5030,8 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.GooglePay#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4946,8 +5044,8 @@ 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 PaymentMethodConfigurationUpdateParams.GooglePay#extraParams} for the field - * documentation. + * See {@link PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -4989,8 +5087,9 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference + build() { + return new PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference( this.extraParams, this.preference); } @@ -4998,8 +5097,8 @@ public PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference build( * Add a key/value pair to `extraParams` map. 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.GooglePay.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5013,8 +5112,8 @@ 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 - * PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5026,7 +5125,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference.Preference + PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -5055,7 +5154,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Grabpay { + public static class Giropay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5069,7 +5168,7 @@ public static class Grabpay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Grabpay(DisplayPreference displayPreference, Map extraParams) { + private Giropay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5084,14 +5183,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Grabpay build() { - return new PaymentMethodConfigurationUpdateParams.Grabpay( + public PaymentMethodConfigurationUpdateParams.Giropay build() { + return new PaymentMethodConfigurationUpdateParams.Giropay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5099,7 +5198,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Grabpay#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Giropay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5112,7 +5211,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 PaymentMethodConfigurationUpdateParams.Grabpay#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Giropay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5155,8 +5254,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference( this.extraParams, this.preference); } @@ -5164,7 +5263,7 @@ public PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference build() * Add a key/value pair to `extraParams` map. 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.Grabpay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5179,7 +5278,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 - * PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5192,7 +5291,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference.Preference + PaymentMethodConfigurationUpdateParams.Giropay.DisplayPreference.Preference preference) { this.preference = preference; return this; @@ -5221,7 +5320,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Ideal { + public static class GooglePay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5235,7 +5334,7 @@ public static class Ideal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Ideal(DisplayPreference displayPreference, Map extraParams) { + private GooglePay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5250,14 +5349,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Ideal build() { - return new PaymentMethodConfigurationUpdateParams.Ideal( + public PaymentMethodConfigurationUpdateParams.GooglePay build() { + return new PaymentMethodConfigurationUpdateParams.GooglePay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5265,7 +5364,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Ideal#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.GooglePay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5278,7 +5377,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 PaymentMethodConfigurationUpdateParams.Ideal#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.GooglePay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5321,8 +5420,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference( this.extraParams, this.preference); } @@ -5330,8 +5429,8 @@ public PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference build() { * Add a key/value pair to `extraParams` map. 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.Ideal.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5345,8 +5444,8 @@ 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 - * PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference#extraParams} for the field - * documentation. + * PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5358,7 +5457,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Ideal.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.GooglePay.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -5386,7 +5486,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Jcb { + public static class Grabpay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5400,7 +5500,7 @@ public static class Jcb { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Jcb(DisplayPreference displayPreference, Map extraParams) { + private Grabpay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5415,14 +5515,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Jcb build() { - return new PaymentMethodConfigurationUpdateParams.Jcb( + public PaymentMethodConfigurationUpdateParams.Grabpay build() { + return new PaymentMethodConfigurationUpdateParams.Grabpay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5430,7 +5530,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Jcb#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Grabpay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5443,7 +5543,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 PaymentMethodConfigurationUpdateParams.Jcb#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Grabpay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5486,16 +5586,17 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Grabpay.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.Jcb.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5508,8 +5609,9 @@ 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 PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference#extraParams} - * for the field documentation. + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -5521,7 +5623,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Jcb.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Grabpay.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -5549,7 +5652,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class KakaoPay { + public static class Ideal { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5563,7 +5666,335 @@ public static class KakaoPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private KakaoPay(DisplayPreference displayPreference, Map extraParams) { + private Ideal(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.Ideal build() { + return new PaymentMethodConfigurationUpdateParams.Ideal( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Ideal.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.Ideal#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Ideal#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.Ideal.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Ideal.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.Ideal.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.Ideal.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.Ideal.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 Jcb { + /** 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 Jcb(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.Jcb build() { + return new PaymentMethodConfigurationUpdateParams.Jcb( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Jcb.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.Jcb#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Jcb#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.Jcb.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Jcb.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.Jcb.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.Jcb.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.Jcb.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 KakaoPay { + /** 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 KakaoPay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5606,7 +6037,173 @@ 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 PaymentMethodConfigurationUpdateParams.KakaoPay#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.KakaoPay#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.KakaoPay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.KakaoPay.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.KakaoPay.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.KakaoPay.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.KakaoPay.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 Klarna { + /** 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 Klarna(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.Klarna build() { + return new PaymentMethodConfigurationUpdateParams.Klarna( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Klarna.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.Klarna#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Klarna#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5649,8 +6246,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.KakaoPay.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.KakaoPay.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference( this.extraParams, this.preference); } @@ -5658,7 +6255,7 @@ public PaymentMethodConfigurationUpdateParams.KakaoPay.DisplayPreference build() * Add a key/value pair to `extraParams` map. 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.KakaoPay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5673,7 +6270,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 - * PaymentMethodConfigurationUpdateParams.KakaoPay.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5686,8 +6283,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.KakaoPay.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -5715,7 +6311,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Klarna { + public static class Konbini { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5729,7 +6325,7 @@ public static class Klarna { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Klarna(DisplayPreference displayPreference, Map extraParams) { + private Konbini(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5744,14 +6340,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Klarna build() { - return new PaymentMethodConfigurationUpdateParams.Klarna( + public PaymentMethodConfigurationUpdateParams.Konbini build() { + return new PaymentMethodConfigurationUpdateParams.Konbini( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5759,7 +6355,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Klarna#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Konbini#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5772,7 +6368,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 PaymentMethodConfigurationUpdateParams.Klarna#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Konbini#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5815,8 +6411,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference( this.extraParams, this.preference); } @@ -5824,7 +6420,7 @@ public PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference build() { * Add a key/value pair to `extraParams` map. 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.Klarna.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -5839,7 +6435,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 - * PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -5852,7 +6448,8 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Klarna.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference.Preference + preference) { this.preference = preference; return this; } @@ -5880,7 +6477,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Konbini { + public static class KrCard { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -5894,7 +6491,7 @@ public static class Konbini { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Konbini(DisplayPreference displayPreference, Map extraParams) { + private KrCard(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -5909,14 +6506,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Konbini build() { - return new PaymentMethodConfigurationUpdateParams.Konbini( + public PaymentMethodConfigurationUpdateParams.KrCard build() { + return new PaymentMethodConfigurationUpdateParams.KrCard( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -5924,7 +6521,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Konbini#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.KrCard#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -5937,7 +6534,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 PaymentMethodConfigurationUpdateParams.Konbini#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.KrCard#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -5980,8 +6577,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference( this.extraParams, this.preference); } @@ -5989,7 +6586,7 @@ public PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference build() * Add a key/value pair to `extraParams` map. 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.Konbini.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6004,7 +6601,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 - * PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference#extraParams} for the + * PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -6017,8 +6614,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Konbini.DisplayPreference.Preference - preference) { + PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6046,7 +6642,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class KrCard { + public static class Link { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6060,7 +6656,7 @@ public static class KrCard { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private KrCard(DisplayPreference displayPreference, Map extraParams) { + private Link(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6075,14 +6671,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.KrCard build() { - return new PaymentMethodConfigurationUpdateParams.KrCard( + public PaymentMethodConfigurationUpdateParams.Link build() { + return new PaymentMethodConfigurationUpdateParams.Link( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.Link.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6090,7 +6686,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.KrCard#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.Link#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6103,7 +6699,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 PaymentMethodConfigurationUpdateParams.KrCard#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.Link#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6146,8 +6742,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.Link.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Link.DisplayPreference( this.extraParams, this.preference); } @@ -6155,8 +6751,8 @@ public PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference build() { * Add a key/value pair to `extraParams` map. 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.KrCard.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Link.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6170,8 +6766,8 @@ 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 - * PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference#extraParams} for the - * field documentation. + * PaymentMethodConfigurationUpdateParams.Link.DisplayPreference#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -6183,7 +6779,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.KrCard.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.Link.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -6211,7 +6807,7 @@ public enum Preference implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Link { + public static class MbWay { /** Whether or not the payment method should be displayed. */ @SerializedName("display_preference") DisplayPreference displayPreference; @@ -6225,7 +6821,7 @@ public static class Link { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Link(DisplayPreference displayPreference, Map extraParams) { + private MbWay(DisplayPreference displayPreference, Map extraParams) { this.displayPreference = displayPreference; this.extraParams = extraParams; } @@ -6240,14 +6836,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Link build() { - return new PaymentMethodConfigurationUpdateParams.Link( + public PaymentMethodConfigurationUpdateParams.MbWay build() { + return new PaymentMethodConfigurationUpdateParams.MbWay( this.displayPreference, this.extraParams); } /** Whether or not the payment method should be displayed. */ public Builder setDisplayPreference( - PaymentMethodConfigurationUpdateParams.Link.DisplayPreference displayPreference) { + PaymentMethodConfigurationUpdateParams.MbWay.DisplayPreference displayPreference) { this.displayPreference = displayPreference; return this; } @@ -6255,7 +6851,7 @@ public Builder setDisplayPreference( /** * Add a key/value pair to `extraParams` map. 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.Link#extraParams} for the field documentation. + * PaymentMethodConfigurationUpdateParams.MbWay#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -6268,7 +6864,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 PaymentMethodConfigurationUpdateParams.Link#extraParams} for the field + * See {@link PaymentMethodConfigurationUpdateParams.MbWay#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6311,8 +6907,8 @@ public static class Builder { private Preference preference; /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodConfigurationUpdateParams.Link.DisplayPreference build() { - return new PaymentMethodConfigurationUpdateParams.Link.DisplayPreference( + public PaymentMethodConfigurationUpdateParams.MbWay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.MbWay.DisplayPreference( this.extraParams, this.preference); } @@ -6320,7 +6916,7 @@ public PaymentMethodConfigurationUpdateParams.Link.DisplayPreference build() { * Add a key/value pair to `extraParams` map. 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.Link.DisplayPreference#extraParams} for the field + * PaymentMethodConfigurationUpdateParams.MbWay.DisplayPreference#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6335,7 +6931,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 - * PaymentMethodConfigurationUpdateParams.Link.DisplayPreference#extraParams} for the field + * PaymentMethodConfigurationUpdateParams.MbWay.DisplayPreference#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -6348,7 +6944,7 @@ public Builder putAllExtraParam(Map map) { /** The account's preference for whether or not to display this payment method. */ public Builder setPreference( - PaymentMethodConfigurationUpdateParams.Link.DisplayPreference.Preference preference) { + PaymentMethodConfigurationUpdateParams.MbWay.DisplayPreference.Preference preference) { this.preference = preference; return this; } @@ -8029,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 eb3fdf86ab2..6a80db12abd 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -135,6 +135,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("crypto") Crypto crypto; + /** + * If this is a {@code custom} PaymentMethod, this hash contains details about the Custom payment + * method. + */ + @SerializedName("custom") + Custom custom; + /** The {@code Customer} to whom the original PaymentMethod is attached. */ @SerializedName("customer") String customer; @@ -237,7 +244,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { Link link; /** - * Set of key-value pairs that you can attach + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys can * be unset by posting an empty value to {@code metadata}. @@ -319,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. @@ -334,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") @@ -434,6 +454,7 @@ private PaymentMethodCreateParams( Object card, Cashapp cashapp, Crypto crypto, + Custom custom, String customer, CustomerBalance customerBalance, Eps eps, @@ -449,6 +470,7 @@ private PaymentMethodCreateParams( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -461,6 +483,7 @@ private PaymentMethodCreateParams( String paymentMethod, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -492,6 +515,7 @@ private PaymentMethodCreateParams( this.card = card; this.cashapp = cashapp; this.crypto = crypto; + this.custom = custom; this.customer = customer; this.customerBalance = customerBalance; this.eps = eps; @@ -507,6 +531,7 @@ private PaymentMethodCreateParams( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -519,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; @@ -574,6 +600,8 @@ public static class Builder { private Crypto crypto; + private Custom custom; + private String customer; private CustomerBalance customerBalance; @@ -604,6 +632,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -628,6 +658,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -676,6 +708,7 @@ public PaymentMethodCreateParams build() { this.card, this.cashapp, this.crypto, + this.custom, this.customer, this.customerBalance, this.eps, @@ -691,6 +724,7 @@ public PaymentMethodCreateParams build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -703,6 +737,7 @@ public PaymentMethodCreateParams build() { this.paymentMethod, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -891,6 +926,15 @@ public Builder setCrypto(PaymentMethodCreateParams.Crypto crypto) { return this; } + /** + * If this is a {@code custom} PaymentMethod, this hash contains details about the Custom + * payment method. + */ + public Builder setCustom(PaymentMethodCreateParams.Custom custom) { + this.custom = custom; + return this; + } + /** The {@code Customer} to whom the original PaymentMethod is attached. */ public Builder setCustomer(String customer) { this.customer = customer; @@ -1057,6 +1101,15 @@ public Builder setLink(PaymentMethodCreateParams.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(PaymentMethodCreateParams.MbWay mbWay) { + this.mbWay = mbWay; + 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 @@ -1179,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. @@ -1198,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) { @@ -2146,11 +2208,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2158,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; @@ -2253,13 +2318,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -2271,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; @@ -2750,6 +2818,81 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Custom { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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. ID of the Dashboard-only CustomPaymentMethodType. This field is + * used by Stripe products' internal code to support CPMs. + */ + @SerializedName("type") + String type; + + private Custom(Map extraParams, String type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.Custom build() { + return new PaymentMethodCreateParams.Custom(this.extraParams, 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 + * PaymentMethodCreateParams.Custom#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Custom#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. ID of the Dashboard-only CustomPaymentMethodType. This field is + * used by Stripe products' internal code to support CPMs. + */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class CustomerBalance { @@ -3333,6 +3476,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -3342,6 +3488,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -3351,6 +3500,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -3838,6 +3990,62 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.MbWay build() { + return new PaymentMethodCreateParams.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.MbWay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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 Mobilepay { @@ -4629,6 +4837,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 { @@ -4754,7 +5059,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. */ @@ -4807,7 +5112,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. */ @@ -5688,6 +5993,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -5721,6 +6029,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -5751,6 +6062,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 41514ad42f3..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 @@ -56,22 +68,26 @@ public class PaymentMethodListParams extends ApiRequestParams { String startingAfter; /** - * An optional filter on the list, based on the object {@code type} field. Without the filter, the - * list includes all current and future payment method types. If your integration expects only one - * type of payment method in the response, make sure to provide a type value in the request. + * Filters the list by the object {@code type} field. Unfiltered, the list returns all payment + * method types except {@code custom}. If your integration expects only one type of payment method + * in the response, specify that type value in the request to reduce your payload. */ @SerializedName("type") 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 @@ -201,10 +239,9 @@ public Builder setStartingAfter(String startingAfter) { } /** - * An optional filter on the list, based on the object {@code type} field. Without the filter, - * the list includes all current and future payment method types. If your integration expects - * only one type of payment method in the response, make sure to provide a type value in the - * request. + * Filters the list by the object {@code type} field. Unfiltered, the list returns all payment + * method types except {@code custom}. If your integration expects only one type of payment + * method in the response, specify that type value in the request to reduce your payload. */ public Builder setType(PaymentMethodListParams.Type type) { this.type = type; @@ -212,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"), @@ -258,6 +313,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -291,6 +349,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -321,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 ed8b223545a..4c5f7005907 100644 --- a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java @@ -48,14 +48,7 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { Map extraParams; /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - @SerializedName("link") - Link link; - - /** - * Set of key-value pairs that you can attach + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual 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,11 +57,11 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { Object metadata; /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the PayByBank - * payment method. + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. */ - @SerializedName("pay_by_bank") - PayByBank payByBank; + @SerializedName("payto") + Payto payto; /** * If this is an {@code us_bank_account} PaymentMethod, this hash contains details about the US @@ -83,18 +76,16 @@ private PaymentMethodUpdateParams( Card card, List expand, Map extraParams, - Link link, Object metadata, - PayByBank payByBank, + Payto payto, UsBankAccount usBankAccount) { this.allowRedisplay = allowRedisplay; this.billingDetails = billingDetails; this.card = card; this.expand = expand; this.extraParams = extraParams; - this.link = link; this.metadata = metadata; - this.payByBank = payByBank; + this.payto = payto; this.usBankAccount = usBankAccount; } @@ -113,11 +104,9 @@ public static class Builder { private Map extraParams; - private Link link; - private Object metadata; - private PayByBank payByBank; + private Payto payto; private UsBankAccount usBankAccount; @@ -129,9 +118,8 @@ public PaymentMethodUpdateParams build() { this.card, this.expand, this.extraParams, - this.link, this.metadata, - this.payByBank, + this.payto, this.usBankAccount); } @@ -213,15 +201,6 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - public Builder setLink(PaymentMethodUpdateParams.Link link) { - this.link = link; - 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 @@ -251,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}. @@ -262,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}. @@ -273,11 +252,11 @@ public Builder setMetadata(Map metadata) { } /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the - * PayByBank payment method. + * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment + * method. */ - public Builder setPayByBank(PaymentMethodUpdateParams.PayByBank payByBank) { - this.payByBank = payByBank; + public Builder setPayto(PaymentMethodUpdateParams.Payto payto) { + this.payto = payto; return this; } @@ -481,11 +460,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -493,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; @@ -603,25 +585,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -639,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; @@ -859,7 +847,15 @@ public enum Preferred implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Link { + 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 @@ -869,8 +865,16 @@ public static class Link { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Link(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() { @@ -878,73 +882,48 @@ public static Builder 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.Link build() { - return new PaymentMethodUpdateParams.Link(this.extraParams); + public PaymentMethodUpdateParams.Payto build() { + return new PaymentMethodUpdateParams.Payto( + this.accountNumber, this.bsbNumber, this.extraParams, this.payId); } - /** - * Add a key/value pair to `extraParams` map. 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.Link#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); + /** The account number for the bank account. */ + public Builder setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; return this; } - /** - * Add all map key/value pairs to `extraParams` map. 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.Link#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); + /** The account number for the bank account. */ + public Builder setAccountNumber(EmptyParam accountNumber) { + this.accountNumber = accountNumber; return this; } - } - } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PayByBank { - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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 PayByBank(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; + /** Bank-State-Branch number of the bank account. */ + public Builder setBsbNumber(String bsbNumber) { + this.bsbNumber = bsbNumber; + return this; + } - /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodUpdateParams.PayByBank build() { - return new PaymentMethodUpdateParams.PayByBank(this.extraParams); + /** 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.PayByBank#extraParams} for the field documentation. + * PaymentMethodUpdateParams.Payto#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -957,7 +936,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 PaymentMethodUpdateParams.PayByBank#extraParams} for the field documentation. + * See {@link PaymentMethodUpdateParams.Payto#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -966,6 +945,18 @@ public Builder putAllExtraParam(Map map) { 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; + } } } diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java new file mode 100644 index 00000000000..0aad0a5bcaa --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptCanceledParams.java @@ -0,0 +1,168 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentRecordReportPaymentAttemptCanceledParams extends ApiRequestParams { + /** + * Required. When the reported payment was canceled. Measured in seconds since + * the Unix epoch. + */ + @SerializedName("canceled_at") + Long canceledAt; + + /** 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; + + @SerializedName("metadata") + Object metadata; + + private PaymentRecordReportPaymentAttemptCanceledParams( + Long canceledAt, List expand, Map extraParams, Object metadata) { + this.canceledAt = canceledAt; + this.expand = expand; + this.extraParams = extraParams; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long canceledAt; + + private List expand; + + private Map extraParams; + + private Object metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptCanceledParams build() { + return new PaymentRecordReportPaymentAttemptCanceledParams( + this.canceledAt, this.expand, this.extraParams, this.metadata); + } + + /** + * Required. When the reported payment was canceled. Measured in seconds since + * the Unix epoch. + */ + public Builder setCanceledAt(Long canceledAt) { + this.canceledAt = canceledAt; + 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 + * PaymentRecordReportPaymentAttemptCanceledParams#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 + * PaymentRecordReportPaymentAttemptCanceledParams#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 + * PaymentRecordReportPaymentAttemptCanceledParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptCanceledParams#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 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 + * PaymentRecordReportPaymentAttemptCanceledParams#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 PaymentRecordReportPaymentAttemptCanceledParams#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; + } + + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java new file mode 100644 index 00000000000..6ce79b2039b --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptFailedParams.java @@ -0,0 +1,168 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentRecordReportPaymentAttemptFailedParams 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; + + /** + * Required. When the reported payment failed. Measured in seconds since the Unix + * epoch. + */ + @SerializedName("failed_at") + Long failedAt; + + @SerializedName("metadata") + Object metadata; + + private PaymentRecordReportPaymentAttemptFailedParams( + List expand, Map extraParams, Long failedAt, Object metadata) { + this.expand = expand; + this.extraParams = extraParams; + this.failedAt = failedAt; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private Long failedAt; + + private Object metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptFailedParams build() { + return new PaymentRecordReportPaymentAttemptFailedParams( + this.expand, this.extraParams, this.failedAt, this.metadata); + } + + /** + * 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 + * PaymentRecordReportPaymentAttemptFailedParams#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 + * PaymentRecordReportPaymentAttemptFailedParams#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 + * PaymentRecordReportPaymentAttemptFailedParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptFailedParams#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. When the reported payment failed. Measured in seconds since the + * Unix epoch. + */ + public Builder setFailedAt(Long failedAt) { + this.failedAt = failedAt; + 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 + * PaymentRecordReportPaymentAttemptFailedParams#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 PaymentRecordReportPaymentAttemptFailedParams#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; + } + + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java new file mode 100644 index 00000000000..34b62376aa8 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptGuaranteedParams.java @@ -0,0 +1,168 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentRecordReportPaymentAttemptGuaranteedParams 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; + + /** + * Required. When the reported payment was guaranteed. Measured in seconds since + * the Unix epoch. + */ + @SerializedName("guaranteed_at") + Long guaranteedAt; + + @SerializedName("metadata") + Object metadata; + + private PaymentRecordReportPaymentAttemptGuaranteedParams( + List expand, Map extraParams, Long guaranteedAt, Object metadata) { + this.expand = expand; + this.extraParams = extraParams; + this.guaranteedAt = guaranteedAt; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private Long guaranteedAt; + + private Object metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptGuaranteedParams build() { + return new PaymentRecordReportPaymentAttemptGuaranteedParams( + this.expand, this.extraParams, this.guaranteedAt, this.metadata); + } + + /** + * 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 + * PaymentRecordReportPaymentAttemptGuaranteedParams#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 + * PaymentRecordReportPaymentAttemptGuaranteedParams#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 + * PaymentRecordReportPaymentAttemptGuaranteedParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptGuaranteedParams#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. When the reported payment was guaranteed. Measured in seconds + * since the Unix epoch. + */ + public Builder setGuaranteedAt(Long guaranteedAt) { + this.guaranteedAt = guaranteedAt; + 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 + * PaymentRecordReportPaymentAttemptGuaranteedParams#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 PaymentRecordReportPaymentAttemptGuaranteedParams#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; + } + + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java new file mode 100644 index 00000000000..d2c0cd4377a --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java @@ -0,0 +1,610 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentRecordReportPaymentAttemptInformationalParams extends ApiRequestParams { + /** Customer information for this payment. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + Object 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; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual 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; + + /** Shipping information for this payment. */ + @SerializedName("shipping_details") + Object shippingDetails; + + private PaymentRecordReportPaymentAttemptInformationalParams( + CustomerDetails customerDetails, + Object description, + List expand, + Map extraParams, + Object metadata, + Object shippingDetails) { + this.customerDetails = customerDetails; + this.description = description; + this.expand = expand; + this.extraParams = extraParams; + this.metadata = metadata; + this.shippingDetails = shippingDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CustomerDetails customerDetails; + + private Object description; + + private List expand; + + private Map extraParams; + + private Object metadata; + + private Object shippingDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptInformationalParams build() { + return new PaymentRecordReportPaymentAttemptInformationalParams( + this.customerDetails, + this.description, + this.expand, + this.extraParams, + this.metadata, + this.shippingDetails); + } + + /** Customer information for this payment. */ + public Builder setCustomerDetails( + PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails customerDetails) { + this.customerDetails = customerDetails; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(EmptyParam 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 + * PaymentRecordReportPaymentAttemptInformationalParams#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 + * PaymentRecordReportPaymentAttemptInformationalParams#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 + * PaymentRecordReportPaymentAttemptInformationalParams#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptInformationalParams#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 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 + * PaymentRecordReportPaymentAttemptInformationalParams#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 PaymentRecordReportPaymentAttemptInformationalParams#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; + } + + /** Shipping information for this payment. */ + public Builder setShippingDetails( + PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + + /** Shipping information for this payment. */ + public Builder setShippingDetails(EmptyParam shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails { + /** The customer who made the payment. */ + @SerializedName("customer") + String customer; + + /** The customer's phone number. */ + @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 customer's name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + + private CustomerDetails( + String customer, String email, Map extraParams, String name, String phone) { + this.customer = customer; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String customer; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails build() { + return new PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails( + this.customer, this.email, this.extraParams, this.name, this.phone); + } + + /** The customer who made the payment. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** The customer's phone number. */ + 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 + * PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link + * PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails#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 name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The customer's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails { + /** The physical 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; + + /** The shipping recipient's name. */ + @SerializedName("name") + String name; + + /** The shipping recipient's phone number. */ + @SerializedName("phone") + String phone; + + private ShippingDetails( + 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 PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails build() { + return new PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails( + this.address, this.extraParams, this.name, this.phone); + } + + /** The physical shipping address. */ + public Builder setAddress( + PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.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 + * PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link + * PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails#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 shipping recipient's name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The shipping recipient's phone number. */ + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @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 PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.Address + build() { + return new PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.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 + * PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.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 + * PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.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 2, such as the 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 (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 new file mode 100644 index 00000000000..8d960fabddc --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java @@ -0,0 +1,1233 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentRecordReportPaymentAttemptParams extends ApiRequestParams { + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @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; + + /** Information about the payment attempt failure. */ + @SerializedName("failed") + Failed failed; + + /** Information about the payment attempt guarantee. */ + @SerializedName("guaranteed") + Guaranteed guaranteed; + + /** + * Required. When the reported payment was initiated. Measured in seconds since + * the Unix epoch. + */ + @SerializedName("initiated_at") + Long initiatedAt; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual 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 outcome of the reported payment. */ + @SerializedName("outcome") + Outcome outcome; + + /** Information about the Payment Method debited for this payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** Shipping information for this payment. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + private PaymentRecordReportPaymentAttemptParams( + String description, + List expand, + Map extraParams, + Failed failed, + Guaranteed guaranteed, + Long initiatedAt, + Object metadata, + Outcome outcome, + PaymentMethodDetails paymentMethodDetails, + ShippingDetails shippingDetails) { + this.description = description; + this.expand = expand; + this.extraParams = extraParams; + this.failed = failed; + this.guaranteed = guaranteed; + this.initiatedAt = initiatedAt; + this.metadata = metadata; + this.outcome = outcome; + this.paymentMethodDetails = paymentMethodDetails; + this.shippingDetails = shippingDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String description; + + private List expand; + + private Map extraParams; + + private Failed failed; + + private Guaranteed guaranteed; + + private Long initiatedAt; + + private Object metadata; + + private Outcome outcome; + + private PaymentMethodDetails paymentMethodDetails; + + private ShippingDetails shippingDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptParams build() { + return new PaymentRecordReportPaymentAttemptParams( + this.description, + this.expand, + this.extraParams, + this.failed, + this.guaranteed, + this.initiatedAt, + this.metadata, + this.outcome, + this.paymentMethodDetails, + this.shippingDetails); + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + 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 + * PaymentRecordReportPaymentAttemptParams#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 + * PaymentRecordReportPaymentAttemptParams#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 + * PaymentRecordReportPaymentAttemptParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptParams#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 payment attempt failure. */ + public Builder setFailed(PaymentRecordReportPaymentAttemptParams.Failed failed) { + this.failed = failed; + return this; + } + + /** Information about the payment attempt guarantee. */ + public Builder setGuaranteed(PaymentRecordReportPaymentAttemptParams.Guaranteed guaranteed) { + this.guaranteed = guaranteed; + return this; + } + + /** + * Required. When the reported payment was initiated. Measured in seconds since + * the Unix epoch. + */ + public Builder setInitiatedAt(Long initiatedAt) { + this.initiatedAt = initiatedAt; + 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 + * PaymentRecordReportPaymentAttemptParams#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 PaymentRecordReportPaymentAttemptParams#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 outcome of the reported payment. */ + public Builder setOutcome(PaymentRecordReportPaymentAttemptParams.Outcome outcome) { + this.outcome = outcome; + return this; + } + + /** Information about the Payment Method debited for this payment. */ + public Builder setPaymentMethodDetails( + PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails paymentMethodDetails) { + this.paymentMethodDetails = paymentMethodDetails; + return this; + } + + /** Shipping information for this payment. */ + public Builder setShippingDetails( + PaymentRecordReportPaymentAttemptParams.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Failed { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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. When the reported payment failed. Measured in seconds since the + * Unix epoch. + */ + @SerializedName("failed_at") + Long failedAt; + + private Failed(Map extraParams, Long failedAt) { + this.extraParams = extraParams; + this.failedAt = failedAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long failedAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptParams.Failed build() { + return new PaymentRecordReportPaymentAttemptParams.Failed(this.extraParams, this.failedAt); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportPaymentAttemptParams.Failed#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptParams.Failed#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. When the reported payment failed. Measured in seconds since the + * Unix epoch. + */ + public Builder setFailedAt(Long failedAt) { + this.failedAt = failedAt; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Guaranteed { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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. When the reported payment was guaranteed. Measured in seconds + * since the Unix epoch. + */ + @SerializedName("guaranteed_at") + Long guaranteedAt; + + private Guaranteed(Map extraParams, Long guaranteedAt) { + this.extraParams = extraParams; + this.guaranteedAt = guaranteedAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long guaranteedAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptParams.Guaranteed build() { + return new PaymentRecordReportPaymentAttemptParams.Guaranteed( + this.extraParams, this.guaranteedAt); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportPaymentAttemptParams.Guaranteed#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptParams.Guaranteed#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. When the reported payment was guaranteed. Measured in seconds + * since the Unix epoch. + */ + public Builder setGuaranteedAt(Long guaranteedAt) { + this.guaranteedAt = guaranteedAt; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails { + /** The billing details associated with the method of payment. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** Information about the custom (user-defined) payment method used to make this payment. */ + @SerializedName("custom") + Custom custom; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Stripe Payment Method used to make this payment. */ + @SerializedName("payment_method") + String paymentMethod; + + /** + * The type of the payment method details. An additional hash is included on the + * payment_method_details with a name matching this value. It contains additional information + * specific to the type. + */ + @SerializedName("type") + Type type; + + private PaymentMethodDetails( + BillingDetails billingDetails, + Custom custom, + Map extraParams, + String paymentMethod, + Type type) { + this.billingDetails = billingDetails; + this.custom = custom; + this.extraParams = extraParams; + this.paymentMethod = paymentMethod; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BillingDetails billingDetails; + + private Custom custom; + + private Map extraParams; + + private String paymentMethod; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails build() { + return new PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails( + this.billingDetails, this.custom, this.extraParams, this.paymentMethod, this.type); + } + + /** The billing details associated with the method of payment. */ + public Builder setBillingDetails( + PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails + billingDetails) { + this.billingDetails = billingDetails; + return this; + } + + /** Information about the custom (user-defined) payment method used to make this payment. */ + public Builder setCustom( + PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom custom) { + this.custom = custom; + 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 + * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails#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 Stripe Payment Method used to make this payment. */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * The type of the payment method details. An additional hash is included on the + * payment_method_details with a name matching this value. It contains additional information + * specific to the type. + */ + public Builder setType( + PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails { + /** The billing address associated with the method of payment. */ + @SerializedName("address") + Address address; + + /** The billing email associated with the method of payment. */ + @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 billing name associated with the method of payment. */ + @SerializedName("name") + String name; + + /** The billing phone number associated with the method of payment. */ + @SerializedName("phone") + String phone; + + private BillingDetails( + Address address, + String email, + Map extraParams, + String name, + String phone) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails build() { + return new PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails( + this.address, this.email, this.extraParams, this.name, this.phone); + } + + /** The billing address associated with the method of payment. */ + public Builder setAddress( + PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails.Address + address) { + this.address = address; + return this; + } + + /** The billing email associated with the method of payment. */ + 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 + * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails#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 billing name associated with the method of payment. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The billing phone number associated with the method of payment. */ + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @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 PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails.Address + build() { + return new PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails + .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 + * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails.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 + * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.BillingDetails.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 2, such as the 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 (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Custom { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + @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; + + /** The custom payment method type associated with this payment. */ + @SerializedName("type") + String type; + + private Custom(String displayName, Map extraParams, String type) { + this.displayName = displayName; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String displayName; + + private Map extraParams; + + private String type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom build() { + return new PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom( + this.displayName, this.extraParams, this.type); + } + + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + 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 + * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentRecordReportPaymentAttemptParams.PaymentMethodDetails.Custom#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 custom payment method type associated with this payment. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("custom") + CUSTOM("custom"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails { + /** The physical 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; + + /** The shipping recipient's name. */ + @SerializedName("name") + String name; + + /** The shipping recipient's phone number. */ + @SerializedName("phone") + String phone; + + private ShippingDetails( + 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 PaymentRecordReportPaymentAttemptParams.ShippingDetails build() { + return new PaymentRecordReportPaymentAttemptParams.ShippingDetails( + this.address, this.extraParams, this.name, this.phone); + } + + /** The physical shipping address. */ + public Builder setAddress( + PaymentRecordReportPaymentAttemptParams.ShippingDetails.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 + * PaymentRecordReportPaymentAttemptParams.ShippingDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptParams.ShippingDetails#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 shipping recipient's name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The shipping recipient's phone number. */ + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @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 PaymentRecordReportPaymentAttemptParams.ShippingDetails.Address build() { + return new PaymentRecordReportPaymentAttemptParams.ShippingDetails.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 + * PaymentRecordReportPaymentAttemptParams.ShippingDetails.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 + * PaymentRecordReportPaymentAttemptParams.ShippingDetails.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 2, such as the 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 (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + + public enum Outcome implements ApiRequestParams.EnumParam { + @SerializedName("failed") + FAILED("failed"), + + @SerializedName("guaranteed") + GUARANTEED("guaranteed"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Outcome(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java new file mode 100644 index 00000000000..2194f0f91db --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java @@ -0,0 +1,1693 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentRecordReportPaymentParams extends ApiRequestParams { + /** Required. The amount you initially requested for this payment. */ + @SerializedName("amount_requested") + AmountRequested amountRequested; + + /** Customer information for this payment. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** Indicates whether the customer was present in your checkout flow during this payment. */ + @SerializedName("customer_presence") + CustomerPresence customerPresence; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @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; + + /** Information about the payment attempt failure. */ + @SerializedName("failed") + Failed failed; + + /** Information about the payment attempt guarantee. */ + @SerializedName("guaranteed") + Guaranteed guaranteed; + + /** + * Required. When the reported payment was initiated. Measured in seconds since + * the Unix epoch. + */ + @SerializedName("initiated_at") + Long initiatedAt; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual 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 outcome of the reported payment. */ + @SerializedName("outcome") + Outcome outcome; + + /** Required. Information about the Payment Method debited for this payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** Processor information for this payment. */ + @SerializedName("processor_details") + ProcessorDetails processorDetails; + + /** Shipping information for this payment. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + private PaymentRecordReportPaymentParams( + AmountRequested amountRequested, + CustomerDetails customerDetails, + CustomerPresence customerPresence, + String description, + List expand, + Map extraParams, + Failed failed, + Guaranteed guaranteed, + Long initiatedAt, + Object metadata, + Outcome outcome, + PaymentMethodDetails paymentMethodDetails, + ProcessorDetails processorDetails, + ShippingDetails shippingDetails) { + this.amountRequested = amountRequested; + this.customerDetails = customerDetails; + this.customerPresence = customerPresence; + this.description = description; + this.expand = expand; + this.extraParams = extraParams; + this.failed = failed; + this.guaranteed = guaranteed; + this.initiatedAt = initiatedAt; + this.metadata = metadata; + this.outcome = outcome; + this.paymentMethodDetails = paymentMethodDetails; + this.processorDetails = processorDetails; + this.shippingDetails = shippingDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmountRequested amountRequested; + + private CustomerDetails customerDetails; + + private CustomerPresence customerPresence; + + private String description; + + private List expand; + + private Map extraParams; + + private Failed failed; + + private Guaranteed guaranteed; + + private Long initiatedAt; + + private Object metadata; + + private Outcome outcome; + + private PaymentMethodDetails paymentMethodDetails; + + private ProcessorDetails processorDetails; + + private ShippingDetails shippingDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentParams build() { + return new PaymentRecordReportPaymentParams( + this.amountRequested, + this.customerDetails, + this.customerPresence, + this.description, + this.expand, + this.extraParams, + this.failed, + this.guaranteed, + this.initiatedAt, + this.metadata, + this.outcome, + this.paymentMethodDetails, + this.processorDetails, + this.shippingDetails); + } + + /** Required. The amount you initially requested for this payment. */ + public Builder setAmountRequested( + PaymentRecordReportPaymentParams.AmountRequested amountRequested) { + this.amountRequested = amountRequested; + return this; + } + + /** Customer information for this payment. */ + public Builder setCustomerDetails( + PaymentRecordReportPaymentParams.CustomerDetails customerDetails) { + this.customerDetails = customerDetails; + return this; + } + + /** Indicates whether the customer was present in your checkout flow during this payment. */ + public Builder setCustomerPresence( + PaymentRecordReportPaymentParams.CustomerPresence customerPresence) { + this.customerPresence = customerPresence; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + 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 + * PaymentRecordReportPaymentParams#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 + * PaymentRecordReportPaymentParams#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 + * PaymentRecordReportPaymentParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentParams#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 payment attempt failure. */ + public Builder setFailed(PaymentRecordReportPaymentParams.Failed failed) { + this.failed = failed; + return this; + } + + /** Information about the payment attempt guarantee. */ + public Builder setGuaranteed(PaymentRecordReportPaymentParams.Guaranteed guaranteed) { + this.guaranteed = guaranteed; + return this; + } + + /** + * Required. When the reported payment was initiated. Measured in seconds since + * the Unix epoch. + */ + public Builder setInitiatedAt(Long initiatedAt) { + this.initiatedAt = initiatedAt; + 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 + * PaymentRecordReportPaymentParams#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 PaymentRecordReportPaymentParams#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 outcome of the reported payment. */ + public Builder setOutcome(PaymentRecordReportPaymentParams.Outcome outcome) { + this.outcome = outcome; + return this; + } + + /** Required. Information about the Payment Method debited for this payment. */ + public Builder setPaymentMethodDetails( + PaymentRecordReportPaymentParams.PaymentMethodDetails paymentMethodDetails) { + this.paymentMethodDetails = paymentMethodDetails; + return this; + } + + /** Processor information for this payment. */ + public Builder setProcessorDetails( + PaymentRecordReportPaymentParams.ProcessorDetails processorDetails) { + this.processorDetails = processorDetails; + return this; + } + + /** Shipping information for this payment. */ + public Builder setShippingDetails( + PaymentRecordReportPaymentParams.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AmountRequested { + /** + * Required. 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; + + /** + * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @SerializedName("value") + Long value; + + private AmountRequested(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 PaymentRecordReportPaymentParams.AmountRequested build() { + return new PaymentRecordReportPaymentParams.AmountRequested( + this.currency, this.extraParams, this.value); + } + + /** + * Required. 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 + * PaymentRecordReportPaymentParams.AmountRequested#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentParams.AmountRequested#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 positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails { + /** The customer who made the payment. */ + @SerializedName("customer") + String customer; + + /** The customer's phone number. */ + @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 customer's name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + + private CustomerDetails( + String customer, String email, Map extraParams, String name, String phone) { + this.customer = customer; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String customer; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentParams.CustomerDetails build() { + return new PaymentRecordReportPaymentParams.CustomerDetails( + this.customer, this.email, this.extraParams, this.name, this.phone); + } + + /** The customer who made the payment. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** The customer's phone number. */ + 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 + * PaymentRecordReportPaymentParams.CustomerDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentParams.CustomerDetails#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 name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The customer's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Failed { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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. When the reported payment failed. Measured in seconds since the + * Unix epoch. + */ + @SerializedName("failed_at") + Long failedAt; + + private Failed(Map extraParams, Long failedAt) { + this.extraParams = extraParams; + this.failedAt = failedAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long failedAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentParams.Failed build() { + return new PaymentRecordReportPaymentParams.Failed(this.extraParams, this.failedAt); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportPaymentParams.Failed#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentParams.Failed#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. When the reported payment failed. Measured in seconds since the + * Unix epoch. + */ + public Builder setFailedAt(Long failedAt) { + this.failedAt = failedAt; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Guaranteed { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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. When the reported payment was guaranteed. Measured in seconds + * since the Unix epoch. + */ + @SerializedName("guaranteed_at") + Long guaranteedAt; + + private Guaranteed(Map extraParams, Long guaranteedAt) { + this.extraParams = extraParams; + this.guaranteedAt = guaranteedAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long guaranteedAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentParams.Guaranteed build() { + return new PaymentRecordReportPaymentParams.Guaranteed(this.extraParams, this.guaranteedAt); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportPaymentParams.Guaranteed#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentParams.Guaranteed#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. When the reported payment was guaranteed. Measured in seconds + * since the Unix epoch. + */ + public Builder setGuaranteedAt(Long guaranteedAt) { + this.guaranteedAt = guaranteedAt; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails { + /** The billing details associated with the method of payment. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** Information about the custom (user-defined) payment method used to make this payment. */ + @SerializedName("custom") + Custom custom; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Stripe Payment Method used to make this payment. */ + @SerializedName("payment_method") + String paymentMethod; + + /** + * The type of the payment method details. An additional hash is included on the + * payment_method_details with a name matching this value. It contains additional information + * specific to the type. + */ + @SerializedName("type") + Type type; + + private PaymentMethodDetails( + BillingDetails billingDetails, + Custom custom, + Map extraParams, + String paymentMethod, + Type type) { + this.billingDetails = billingDetails; + this.custom = custom; + this.extraParams = extraParams; + this.paymentMethod = paymentMethod; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BillingDetails billingDetails; + + private Custom custom; + + private Map extraParams; + + private String paymentMethod; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentParams.PaymentMethodDetails build() { + return new PaymentRecordReportPaymentParams.PaymentMethodDetails( + this.billingDetails, this.custom, this.extraParams, this.paymentMethod, this.type); + } + + /** The billing details associated with the method of payment. */ + public Builder setBillingDetails( + PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails billingDetails) { + this.billingDetails = billingDetails; + return this; + } + + /** Information about the custom (user-defined) payment method used to make this payment. */ + public Builder setCustom( + PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom custom) { + this.custom = custom; + 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 + * PaymentRecordReportPaymentParams.PaymentMethodDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentParams.PaymentMethodDetails#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 Stripe Payment Method used to make this payment. */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** + * The type of the payment method details. An additional hash is included on the + * payment_method_details with a name matching this value. It contains additional information + * specific to the type. + */ + public Builder setType(PaymentRecordReportPaymentParams.PaymentMethodDetails.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails { + /** The billing address associated with the method of payment. */ + @SerializedName("address") + Address address; + + /** The billing email associated with the method of payment. */ + @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 billing name associated with the method of payment. */ + @SerializedName("name") + String name; + + /** The billing phone number associated with the method of payment. */ + @SerializedName("phone") + String phone; + + private BillingDetails( + Address address, + String email, + Map extraParams, + String name, + String phone) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails build() { + return new PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails( + this.address, this.email, this.extraParams, this.name, this.phone); + } + + /** The billing address associated with the method of payment. */ + public Builder setAddress( + PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.Address address) { + this.address = address; + return this; + } + + /** The billing email associated with the method of payment. */ + 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 + * PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails#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 billing name associated with the method of payment. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The billing phone number associated with the method of payment. */ + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @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 PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.Address + build() { + return new PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.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 + * PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.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 + * PaymentRecordReportPaymentParams.PaymentMethodDetails.BillingDetails.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 2, such as the 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 (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Custom { + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + @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; + + /** The custom payment method type associated with this payment. */ + @SerializedName("type") + String type; + + private Custom(String displayName, Map extraParams, String type) { + this.displayName = displayName; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String displayName; + + private Map extraParams; + + private String type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom build() { + return new PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom( + this.displayName, this.extraParams, this.type); + } + + /** + * Display name for the custom (user-defined) payment method type used to make this payment. + */ + 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 PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentRecordReportPaymentParams.PaymentMethodDetails.Custom#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 custom payment method type associated with this payment. */ + public Builder setType(String type) { + this.type = type; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("custom") + CUSTOM("custom"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProcessorDetails { + /** Information about the custom processor used to make this payment. */ + @SerializedName("custom") + Custom custom; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 the processor details. An additional hash is included + * on processor_details with a name matching this value. It contains additional information + * specific to the processor. + */ + @SerializedName("type") + Type type; + + private ProcessorDetails(Custom custom, Map extraParams, Type type) { + this.custom = custom; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Custom custom; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentParams.ProcessorDetails build() { + return new PaymentRecordReportPaymentParams.ProcessorDetails( + this.custom, this.extraParams, this.type); + } + + /** Information about the custom processor used to make this payment. */ + public Builder setCustom(PaymentRecordReportPaymentParams.ProcessorDetails.Custom custom) { + this.custom = custom; + 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 + * PaymentRecordReportPaymentParams.ProcessorDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentParams.ProcessorDetails#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 the processor details. An additional hash is + * included on processor_details with a name matching this value. It contains additional + * information specific to the processor. + */ + public Builder setType(PaymentRecordReportPaymentParams.ProcessorDetails.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Custom { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. An opaque string for manual reconciliation of this payment, for + * example a check number or a payment processor ID. + */ + @SerializedName("payment_reference") + String paymentReference; + + private Custom(Map extraParams, String paymentReference) { + this.extraParams = extraParams; + this.paymentReference = paymentReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String paymentReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentParams.ProcessorDetails.Custom build() { + return new PaymentRecordReportPaymentParams.ProcessorDetails.Custom( + this.extraParams, this.paymentReference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentRecordReportPaymentParams.ProcessorDetails.Custom#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentRecordReportPaymentParams.ProcessorDetails.Custom#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. An opaque string for manual reconciliation of this payment, + * for example a check number or a payment processor ID. + */ + public Builder setPaymentReference(String paymentReference) { + this.paymentReference = paymentReference; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("custom") + CUSTOM("custom"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails { + /** The physical 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; + + /** The shipping recipient's name. */ + @SerializedName("name") + String name; + + /** The shipping recipient's phone number. */ + @SerializedName("phone") + String phone; + + private ShippingDetails( + 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 PaymentRecordReportPaymentParams.ShippingDetails build() { + return new PaymentRecordReportPaymentParams.ShippingDetails( + this.address, this.extraParams, this.name, this.phone); + } + + /** The physical shipping address. */ + public Builder setAddress(PaymentRecordReportPaymentParams.ShippingDetails.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 + * PaymentRecordReportPaymentParams.ShippingDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentParams.ShippingDetails#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 shipping recipient's name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The shipping recipient's phone number. */ + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @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 PaymentRecordReportPaymentParams.ShippingDetails.Address build() { + return new PaymentRecordReportPaymentParams.ShippingDetails.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 PaymentRecordReportPaymentParams.ShippingDetails.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 PaymentRecordReportPaymentParams.ShippingDetails.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 2, such as the 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 (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + + public enum CustomerPresence implements ApiRequestParams.EnumParam { + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CustomerPresence(String value) { + this.value = value; + } + } + + public enum Outcome implements ApiRequestParams.EnumParam { + @SerializedName("failed") + FAILED("failed"), + + @SerializedName("guaranteed") + GUARANTEED("guaranteed"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Outcome(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java new file mode 100644 index 00000000000..3d4f5354b69 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordReportRefundParams.java @@ -0,0 +1,622 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentRecordReportRefundParams extends ApiRequestParams { + /** + * 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. + */ + @SerializedName("amount") + Amount amount; + + /** 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; + + /** When the reported refund was initiated. Measured in seconds since the Unix epoch. */ + @SerializedName("initiated_at") + Long initiatedAt; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual 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; + + /** Required. The outcome of the reported refund. */ + @SerializedName("outcome") + Outcome outcome; + + /** Required. Processor information for this refund. */ + @SerializedName("processor_details") + ProcessorDetails processorDetails; + + /** Required. Information about the payment attempt refund. */ + @SerializedName("refunded") + Refunded refunded; + + private PaymentRecordReportRefundParams( + Amount amount, + List expand, + Map extraParams, + Long initiatedAt, + Object metadata, + Outcome outcome, + ProcessorDetails processorDetails, + Refunded refunded) { + this.amount = amount; + this.expand = expand; + this.extraParams = extraParams; + this.initiatedAt = initiatedAt; + this.metadata = metadata; + this.outcome = outcome; + this.processorDetails = processorDetails; + this.refunded = refunded; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Amount amount; + + private List expand; + + private Map extraParams; + + private Long initiatedAt; + + private Object metadata; + + private Outcome outcome; + + private ProcessorDetails processorDetails; + + private Refunded refunded; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportRefundParams build() { + return new PaymentRecordReportRefundParams( + this.amount, + this.expand, + this.extraParams, + this.initiatedAt, + this.metadata, + this.outcome, + this.processorDetails, + this.refunded); + } + + /** + * 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. + */ + public Builder setAmount(PaymentRecordReportRefundParams.Amount amount) { + this.amount = amount; + 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 + * PaymentRecordReportRefundParams#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 + * PaymentRecordReportRefundParams#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 + * PaymentRecordReportRefundParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportRefundParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** When the reported refund was initiated. Measured in seconds since the Unix epoch. */ + public Builder setInitiatedAt(Long initiatedAt) { + this.initiatedAt = initiatedAt; + 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 + * PaymentRecordReportRefundParams#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 PaymentRecordReportRefundParams#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; + } + + /** Required. The outcome of the reported refund. */ + public Builder setOutcome(PaymentRecordReportRefundParams.Outcome outcome) { + this.outcome = outcome; + return this; + } + + /** Required. Processor information for this refund. */ + public Builder setProcessorDetails( + PaymentRecordReportRefundParams.ProcessorDetails processorDetails) { + this.processorDetails = processorDetails; + return this; + } + + /** Required. Information about the payment attempt refund. */ + public Builder setRefunded(PaymentRecordReportRefundParams.Refunded refunded) { + this.refunded = refunded; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Amount { + /** + * Required. 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; + + /** + * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + @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 PaymentRecordReportRefundParams.Amount build() { + return new PaymentRecordReportRefundParams.Amount( + this.currency, this.extraParams, this.value); + } + + /** + * Required. 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 + * PaymentRecordReportRefundParams.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 PaymentRecordReportRefundParams.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; + } + + /** + * Required. A positive integer representing the amount in the currency's minor unit. For example, {@code + * 100} can represent 1 USD or 100 JPY. + */ + public Builder setValue(Long value) { + this.value = value; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProcessorDetails { + /** Information about the custom processor used to make this refund. */ + @SerializedName("custom") + Custom custom; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 the processor details. An additional hash is included + * on processor_details with a name matching this value. It contains additional information + * specific to the processor. + */ + @SerializedName("type") + Type type; + + private ProcessorDetails(Custom custom, Map extraParams, Type type) { + this.custom = custom; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Custom custom; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportRefundParams.ProcessorDetails build() { + return new PaymentRecordReportRefundParams.ProcessorDetails( + this.custom, this.extraParams, this.type); + } + + /** Information about the custom processor used to make this refund. */ + public Builder setCustom(PaymentRecordReportRefundParams.ProcessorDetails.Custom custom) { + this.custom = custom; + 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 + * PaymentRecordReportRefundParams.ProcessorDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportRefundParams.ProcessorDetails#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 the processor details. An additional hash is + * included on processor_details with a name matching this value. It contains additional + * information specific to the processor. + */ + public Builder setType(PaymentRecordReportRefundParams.ProcessorDetails.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Custom { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 reference to the external refund. This field must be unique + * across all refunds. + */ + @SerializedName("refund_reference") + String refundReference; + + private Custom(Map extraParams, String refundReference) { + this.extraParams = extraParams; + this.refundReference = refundReference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String refundReference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportRefundParams.ProcessorDetails.Custom build() { + return new PaymentRecordReportRefundParams.ProcessorDetails.Custom( + this.extraParams, this.refundReference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentRecordReportRefundParams.ProcessorDetails.Custom#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentRecordReportRefundParams.ProcessorDetails.Custom#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 reference to the external refund. This field must be unique + * across all refunds. + */ + public Builder setRefundReference(String refundReference) { + this.refundReference = refundReference; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("custom") + CUSTOM("custom"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Refunded { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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. When the reported refund completed. Measured in seconds since the + * Unix epoch. + */ + @SerializedName("refunded_at") + Long refundedAt; + + private Refunded(Map extraParams, Long refundedAt) { + this.extraParams = extraParams; + this.refundedAt = refundedAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long refundedAt; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportRefundParams.Refunded build() { + return new PaymentRecordReportRefundParams.Refunded(this.extraParams, this.refundedAt); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportRefundParams.Refunded#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportRefundParams.Refunded#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. When the reported refund completed. Measured in seconds since + * the Unix epoch. + */ + public Builder setRefundedAt(Long refundedAt) { + this.refundedAt = refundedAt; + return this; + } + } + } + + public enum Outcome implements ApiRequestParams.EnumParam { + @SerializedName("refunded") + REFUNDED("refunded"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Outcome(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentRecordRetrieveParams.java b/src/main/java/com/stripe/param/PaymentRecordRetrieveParams.java new file mode 100644 index 00000000000..af7ec8a5fd3 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordRetrieveParams.java @@ -0,0 +1,100 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +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 PaymentRecordRetrieveParams 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 PaymentRecordRetrieveParams(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 PaymentRecordRetrieveParams build() { + return new PaymentRecordRetrieveParams(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 + * PaymentRecordRetrieveParams#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 + * PaymentRecordRetrieveParams#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 + * PaymentRecordRetrieveParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordRetrieveParams#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/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 c8177d6b621..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}. @@ -886,11 +886,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -991,13 +994,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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; @@ -1877,11 +1880,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -1983,13 +1989,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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 4b9b6011e56..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}. @@ -996,11 +996,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -1116,25 +1119,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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; @@ -2111,11 +2117,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -2231,25 +2240,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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 8f674c7458b..0cf5e0616d1 100644 --- a/src/main/java/com/stripe/param/PromotionCodeCreateParams.java +++ b/src/main/java/com/stripe/param/PromotionCodeCreateParams.java @@ -27,17 +27,20 @@ public class PromotionCodeCreateParams extends ApiRequestParams { @SerializedName("code") String code; - /** Required. The coupon for this promotion code. */ - @SerializedName("coupon") - String coupon; - /** - * 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; @@ -67,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}. @@ -75,6 +78,10 @@ public class PromotionCodeCreateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** Required. The promotion referenced by this promotion code. */ + @SerializedName("promotion") + Promotion promotion; + /** Settings that restrict the redemption of the promotion code. */ @SerializedName("restrictions") Restrictions restrictions; @@ -82,23 +89,25 @@ public class PromotionCodeCreateParams extends ApiRequestParams { private PromotionCodeCreateParams( Boolean active, String code, - String coupon, String customer, + String customerAccount, List expand, Long expiresAt, Map extraParams, Long maxRedemptions, Map metadata, + Promotion promotion, Restrictions restrictions) { this.active = active; this.code = code; - this.coupon = coupon; this.customer = customer; + this.customerAccount = customerAccount; this.expand = expand; this.expiresAt = expiresAt; this.extraParams = extraParams; this.maxRedemptions = maxRedemptions; this.metadata = metadata; + this.promotion = promotion; this.restrictions = restrictions; } @@ -111,10 +120,10 @@ public static class Builder { private String code; - private String coupon; - private String customer; + private String customerAccount; + private List expand; private Long expiresAt; @@ -125,6 +134,8 @@ public static class Builder { private Map metadata; + private Promotion promotion; + private Restrictions restrictions; /** Finalize and obtain parameter instance from this builder. */ @@ -132,13 +143,14 @@ public PromotionCodeCreateParams build() { return new PromotionCodeCreateParams( this.active, this.code, - this.coupon, this.customer, + this.customerAccount, this.expand, this.expiresAt, this.extraParams, this.maxRedemptions, this.metadata, + this.promotion, this.restrictions); } @@ -160,18 +172,21 @@ public Builder setCode(String code) { return this; } - /** Required. The coupon for this promotion code. */ - public Builder setCoupon(String coupon) { - this.coupon = coupon; + /** + * 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 customer that this promotion code can be used by. If not set, the promotion code can be - * used by all customers. + * The account representing 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; + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; return this; } @@ -272,6 +287,12 @@ public Builder putAllMetadata(Map map) { return this; } + /** Required. The promotion referenced by this promotion code. */ + public Builder setPromotion(PromotionCodeCreateParams.Promotion promotion) { + this.promotion = promotion; + return this; + } + /** Settings that restrict the redemption of the promotion code. */ public Builder setRestrictions(PromotionCodeCreateParams.Restrictions restrictions) { this.restrictions = restrictions; @@ -279,6 +300,100 @@ public Builder setRestrictions(PromotionCodeCreateParams.Restrictions restrictio } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Promotion { + /** If promotion {@code type} is {@code coupon}, the coupon for this promotion code. */ + @SerializedName("coupon") + String coupon; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 the type of promotion. */ + @SerializedName("type") + Type type; + + private Promotion(String coupon, Map extraParams, Type type) { + this.coupon = coupon; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String coupon; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PromotionCodeCreateParams.Promotion build() { + return new PromotionCodeCreateParams.Promotion(this.coupon, this.extraParams, this.type); + } + + /** If promotion {@code type} is {@code coupon}, the coupon for this promotion code. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + 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 + * PromotionCodeCreateParams.Promotion#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PromotionCodeCreateParams.Promotion#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 the type of promotion. */ + public Builder setType(PromotionCodeCreateParams.Promotion.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("coupon") + COUPON("coupon"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Restrictions { 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 43b84d3ede8..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, @@ -2110,15 +2131,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -2129,11 +2155,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public QuoteCreateParams.SubscriptionData.BillingMode build() { - return new QuoteCreateParams.SubscriptionData.BillingMode(this.extraParams, this.type); + return new QuoteCreateParams.SubscriptionData.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -2164,9 +2193,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + QuoteCreateParams.SubscriptionData.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(QuoteCreateParams.SubscriptionData.BillingMode.Type type) { this.type = type; @@ -2174,6 +2210,100 @@ public Builder setType(QuoteCreateParams.SubscriptionData.BillingMode.Type type) } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public QuoteCreateParams.SubscriptionData.BillingMode.Flexible build() { + return new QuoteCreateParams.SubscriptionData.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link QuoteCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link QuoteCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + QuoteCreateParams.SubscriptionData.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), 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 df14d4463ce..6758c5ef32b 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( @@ -835,7 +835,14 @@ public static class PaymentMethodData { Link link; /** - * Set of key-value pairs that you can attach + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -913,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. @@ -928,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") @@ -1041,6 +1055,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1052,6 +1067,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1095,6 +1111,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1106,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; @@ -1185,6 +1203,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1207,6 +1227,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -1267,6 +1289,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1278,6 +1301,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -1581,6 +1605,15 @@ public Builder setLink(SetupIntentConfirmParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(SetupIntentConfirmParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + 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 @@ -1700,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. @@ -1719,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( @@ -2694,11 +2736,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2706,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; @@ -2803,13 +2848,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -2821,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; @@ -3676,6 +3724,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -3685,6 +3736,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -3694,6 +3748,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -4193,6 +4250,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodData.MbWay build() { + return new SetupIntentConfirmParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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 Mobilepay { @@ -5005,6 +5120,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 { @@ -5134,7 +5348,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. */ @@ -5190,7 +5404,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. */ @@ -6047,6 +6261,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6077,6 +6294,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6187,6 +6407,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. @@ -6211,6 +6438,7 @@ private PaymentMethodOptions( Klarna klarna, Link link, Paypal paypal, + Payto payto, SepaDebit sepaDebit, UsBankAccount usBankAccount) { this.acssDebit = acssDebit; @@ -6222,6 +6450,7 @@ private PaymentMethodOptions( this.klarna = klarna; this.link = link; this.paypal = paypal; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -6249,6 +6478,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private SepaDebit sepaDebit; private UsBankAccount usBankAccount; @@ -6265,6 +6496,7 @@ public SetupIntentConfirmParams.PaymentMethodOptions build() { this.klarna, this.link, this.paypal, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -6369,6 +6601,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. @@ -7044,11 +7285,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. */ @@ -7163,11 +7404,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. */ @@ -8053,7 +8294,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; @@ -9107,6 +9354,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 8bad3948c70..df0d34e227b 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -57,10 +57,23 @@ 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; + /** The list of payment method types to exclude from use with this SetupIntent. */ + @SerializedName("excluded_payment_method_types") + List excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -87,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}. @@ -114,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") @@ -122,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") @@ -146,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") @@ -183,7 +196,9 @@ private SetupIntentCreateParams( Boolean confirm, String confirmationToken, String customer, + String customerAccount, String description, + List excludedPaymentMethodTypes, List expand, Map extraParams, List flowDirections, @@ -204,7 +219,9 @@ private SetupIntentCreateParams( this.confirm = confirm; this.confirmationToken = confirmationToken; this.customer = customer; + this.customerAccount = customerAccount; this.description = description; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; this.flowDirections = flowDirections; @@ -237,8 +254,12 @@ public static class Builder { private String customer; + private String customerAccount; + private String description; + private List excludedPaymentMethodTypes; + private List expand; private Map extraParams; @@ -277,7 +298,9 @@ public SetupIntentCreateParams build() { this.confirm, this.confirmationToken, this.customer, + this.customerAccount, this.description, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, this.flowDirections, @@ -353,12 +376,51 @@ 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; return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addExcludedPaymentMethodType( + SetupIntentCreateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.addAll(elements); + 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 @@ -439,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) { @@ -449,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) { @@ -499,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) { @@ -509,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( @@ -555,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) { @@ -603,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. */ @@ -652,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. */ @@ -1311,7 +1373,14 @@ public static class PaymentMethodData { Link link; /** - * Set of key-value pairs that you can attach + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -1389,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. @@ -1404,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") @@ -1517,6 +1593,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -1528,6 +1605,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -1571,6 +1649,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -1582,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; @@ -1661,6 +1741,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1683,6 +1765,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -1743,6 +1827,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1754,6 +1839,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -2057,6 +2143,15 @@ public Builder setLink(SetupIntentCreateParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(SetupIntentCreateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + 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 @@ -2175,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. @@ -2194,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( @@ -3169,11 +3273,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3181,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; @@ -3278,13 +3385,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3296,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; @@ -4150,6 +4260,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -4159,6 +4272,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -4168,6 +4284,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -4667,6 +4786,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodData.MbWay build() { + return new SetupIntentCreateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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 Mobilepay { @@ -5479,6 +5656,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 { @@ -5608,7 +5884,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. */ @@ -5664,7 +5940,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. */ @@ -6521,6 +6797,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6551,6 +6830,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6661,6 +6943,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. @@ -6685,6 +6974,7 @@ private PaymentMethodOptions( Klarna klarna, Link link, Paypal paypal, + Payto payto, SepaDebit sepaDebit, UsBankAccount usBankAccount) { this.acssDebit = acssDebit; @@ -6696,6 +6986,7 @@ private PaymentMethodOptions( this.klarna = klarna; this.link = link; this.paypal = paypal; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -6723,6 +7014,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private SepaDebit sepaDebit; private UsBankAccount usBankAccount; @@ -6739,6 +7032,7 @@ public SetupIntentCreateParams.PaymentMethodOptions build() { this.klarna, this.link, this.paypal, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -6843,6 +7137,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. @@ -7516,11 +7819,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. */ @@ -7635,11 +7938,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. */ @@ -8525,7 +8828,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; @@ -9581,7 +9890,7 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class SepaDebit { + 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. @@ -9595,7 +9904,7 @@ public static class SepaDebit { @SerializedName("mandate_options") MandateOptions mandateOptions; - private SepaDebit(Map extraParams, MandateOptions mandateOptions) { + private Payto(Map extraParams, MandateOptions mandateOptions) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; } @@ -9610,16 +9919,16 @@ public static class Builder { private MandateOptions mandateOptions; /** Finalize and obtain parameter instance from this builder. */ - public SetupIntentCreateParams.PaymentMethodOptions.SepaDebit build() { - return new SetupIntentCreateParams.PaymentMethodOptions.SepaDebit( + 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.SepaDebit#extraParams} for - * the field documentation. + * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9632,8 +9941,8 @@ 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 SetupIntentCreateParams.PaymentMethodOptions.SepaDebit#extraParams} for - * the field documentation. + * map. See {@link SetupIntentCreateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9645,7 +9954,7 @@ public Builder putAllExtraParam(Map map) { /** Additional fields for Mandate creation. */ public Builder setMandateOptions( - SetupIntentCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions mandateOptions) { + SetupIntentCreateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { this.mandateOptions = mandateOptions; return this; } @@ -9654,6 +9963,27 @@ public Builder setMandateOptions( @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. @@ -9664,17 +9994,49 @@ public static class MandateOptions { @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; + /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special characters: - * '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + * 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("reference_prefix") - Object referencePrefix; + @SerializedName("payments_per_period") + Object paymentsPerPeriod; - private MandateOptions(Map extraParams, Object referencePrefix) { + /** + * 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.referencePrefix = referencePrefix; + this.paymentSchedule = paymentSchedule; + this.paymentsPerPeriod = paymentsPerPeriod; + this.purpose = purpose; + this.startDate = startDate; } public static Builder builder() { @@ -9682,12 +10044,396 @@ public static Builder builder() { } public static class Builder { + private Object amount; + + private ApiRequestParams.EnumParam amountType; + + private Object endDate; + private Map extraParams; - private Object referencePrefix; + 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.SepaDebit.MandateOptions build() { + 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 { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 SepaDebit(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.SepaDebit build() { + return new SetupIntentCreateParams.PaymentMethodOptions.SepaDebit( + 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.SepaDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.SepaDebit#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.SepaDebit.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special characters: + * '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + */ + @SerializedName("reference_prefix") + Object referencePrefix; + + private MandateOptions(Map extraParams, Object referencePrefix) { + this.extraParams = extraParams; + this.referencePrefix = referencePrefix; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object referencePrefix; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions build() { return new SetupIntentCreateParams.PaymentMethodOptions.SepaDebit.MandateOptions( this.extraParams, this.referencePrefix); } @@ -10509,10 +11255,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). */ @@ -10561,10 +11307,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). */ @@ -10611,6 +11357,162 @@ public Builder putAllExtraParam(Map map) { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum FlowDirection implements ApiRequestParams.EnumParam { @SerializedName("inbound") INBOUND("inbound"), 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 73a40d01c06..60c1dd1bbb0 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -33,10 +33,23 @@ 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; + /** The list of payment method types to exclude from use with this SetupIntent. */ + @SerializedName("excluded_payment_method_types") + Object excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -62,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}. @@ -78,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") @@ -86,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") @@ -109,7 +122,9 @@ public class SetupIntentUpdateParams extends ApiRequestParams { private SetupIntentUpdateParams( Boolean attachToSelf, Object customer, + Object customerAccount, Object description, + Object excludedPaymentMethodTypes, List expand, Map extraParams, List flowDirections, @@ -121,7 +136,9 @@ private SetupIntentUpdateParams( List paymentMethodTypes) { this.attachToSelf = attachToSelf; this.customer = customer; + this.customerAccount = customerAccount; this.description = description; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; this.flowDirections = flowDirections; @@ -142,8 +159,12 @@ public static class Builder { private Object customer; + private Object customerAccount; + private Object description; + private Object excludedPaymentMethodTypes; + private List expand; private Map extraParams; @@ -167,7 +188,9 @@ public SetupIntentUpdateParams build() { return new SetupIntentUpdateParams( this.attachToSelf, this.customer, + this.customerAccount, this.description, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, this.flowDirections, @@ -217,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; @@ -229,6 +274,55 @@ public Builder setDescription(EmptyParam description) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addExcludedPaymentMethodType( + SetupIntentUpdateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** The list of payment method types to exclude from use with this SetupIntent. */ + public Builder setExcludedPaymentMethodTypes(EmptyParam excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + + /** The list of payment method types to exclude from use with this SetupIntent. */ + public Builder setExcludedPaymentMethodTypes( + List excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + 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 @@ -336,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}. @@ -347,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}. @@ -376,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) { @@ -385,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) { @@ -395,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( @@ -648,7 +742,14 @@ public static class PaymentMethodData { Link link; /** - * Set of key-value pairs that you can attach + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + @SerializedName("mb_way") + MbWay mbWay; + + /** + * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a * structured format. Individual keys can be unset by posting an empty value to them. All keys * can be unset by posting an empty value to {@code metadata}. @@ -726,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. @@ -741,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") @@ -854,6 +962,7 @@ private PaymentMethodData( Konbini konbini, KrCard krCard, Link link, + MbWay mbWay, Map metadata, Mobilepay mobilepay, Multibanco multibanco, @@ -865,6 +974,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, Promptpay promptpay, RadarOptions radarOptions, @@ -908,6 +1018,7 @@ private PaymentMethodData( this.konbini = konbini; this.krCard = krCard; this.link = link; + this.mbWay = mbWay; this.metadata = metadata; this.mobilepay = mobilepay; this.multibanco = multibanco; @@ -919,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; @@ -998,6 +1110,8 @@ public static class Builder { private Link link; + private MbWay mbWay; + private Map metadata; private Mobilepay mobilepay; @@ -1020,6 +1134,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private Promptpay promptpay; @@ -1080,6 +1196,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.konbini, this.krCard, this.link, + this.mbWay, this.metadata, this.mobilepay, this.multibanco, @@ -1091,6 +1208,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.promptpay, this.radarOptions, @@ -1394,6 +1512,15 @@ public Builder setLink(SetupIntentUpdateParams.PaymentMethodData.Link link) { return this; } + /** + * If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment + * method. + */ + public Builder setMbWay(SetupIntentUpdateParams.PaymentMethodData.MbWay mbWay) { + this.mbWay = mbWay; + 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 @@ -1512,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. @@ -1531,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( @@ -2557,11 +2693,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2569,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; @@ -2681,25 +2820,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -2717,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; @@ -3586,6 +3731,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("abn_amro") ABN_AMRO("abn_amro"), + @SerializedName("adyen") + ADYEN("adyen"), + @SerializedName("asn_bank") ASN_BANK("asn_bank"), @@ -3595,6 +3743,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("buut") BUUT("buut"), + @SerializedName("finom") + FINOM("finom"), + @SerializedName("handelsbanken") HANDELSBANKEN("handelsbanken"), @@ -3604,6 +3755,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("knab") KNAB("knab"), + @SerializedName("mollie") + MOLLIE("mollie"), + @SerializedName("moneyou") MONEYOU("moneyou"), @@ -4103,6 +4257,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MbWay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 MbWay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodData.MbWay build() { + return new SetupIntentUpdateParams.PaymentMethodData.MbWay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. 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.MbWay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.MbWay#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 Mobilepay { @@ -4953,6 +5165,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 { @@ -5082,7 +5411,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. */ @@ -5138,7 +5467,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. */ @@ -5148,7 +5477,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. */ @@ -6029,6 +6358,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -6059,6 +6391,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("pix") PIX("pix"), @@ -6169,6 +6504,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. @@ -6193,6 +6535,7 @@ private PaymentMethodOptions( Klarna klarna, Link link, Paypal paypal, + Payto payto, SepaDebit sepaDebit, UsBankAccount usBankAccount) { this.acssDebit = acssDebit; @@ -6204,6 +6547,7 @@ private PaymentMethodOptions( this.klarna = klarna; this.link = link; this.paypal = paypal; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -6231,6 +6575,8 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private SepaDebit sepaDebit; private UsBankAccount usBankAccount; @@ -6247,6 +6593,7 @@ public SetupIntentUpdateParams.PaymentMethodOptions build() { this.klarna, this.link, this.paypal, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -6351,6 +6698,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. @@ -7033,11 +7389,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. */ @@ -7152,11 +7508,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. */ @@ -8107,7 +8463,13 @@ public enum Version implements ApiRequestParams.EnumParam { N2__1__0("2.1.0"), @SerializedName("2.2.0") - N2__2__0("2.2.0"); + N2__2__0("2.2.0"), + + @SerializedName("2.3.0") + N2__3__0("2.3.0"), + + @SerializedName("2.3.1") + N2__3__1("2.3.1"); @Getter(onMethod_ = {@Override}) private final String value; @@ -9209,7 +9571,7 @@ public Builder putAllExtraParam(Map map) { @Getter @EqualsAndHashCode(callSuper = false) - public static class SepaDebit { + 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. @@ -9223,7 +9585,7 @@ public static class SepaDebit { @SerializedName("mandate_options") MandateOptions mandateOptions; - private SepaDebit(Map extraParams, MandateOptions mandateOptions) { + private Payto(Map extraParams, MandateOptions mandateOptions) { this.extraParams = extraParams; this.mandateOptions = mandateOptions; } @@ -9238,16 +9600,16 @@ public static class Builder { private MandateOptions mandateOptions; /** Finalize and obtain parameter instance from this builder. */ - public SetupIntentUpdateParams.PaymentMethodOptions.SepaDebit build() { - return new SetupIntentUpdateParams.PaymentMethodOptions.SepaDebit( + 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.SepaDebit#extraParams} for - * the field documentation. + * map. See {@link SetupIntentUpdateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9260,8 +9622,8 @@ 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 SetupIntentUpdateParams.PaymentMethodOptions.SepaDebit#extraParams} for - * the field documentation. + * map. See {@link SetupIntentUpdateParams.PaymentMethodOptions.Payto#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -9273,7 +9635,7 @@ public Builder putAllExtraParam(Map map) { /** Additional fields for Mandate creation. */ public Builder setMandateOptions( - SetupIntentUpdateParams.PaymentMethodOptions.SepaDebit.MandateOptions mandateOptions) { + SetupIntentUpdateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { this.mandateOptions = mandateOptions; return this; } @@ -9282,6 +9644,27 @@ public Builder setMandateOptions( @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. @@ -9292,9 +9675,425 @@ public static class MandateOptions { @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; + /** - * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must - * consist of only uppercase letters, numbers, spaces, or the following special characters: + * 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 { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 SepaDebit(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.SepaDebit build() { + return new SetupIntentUpdateParams.PaymentMethodOptions.SepaDebit( + 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.SepaDebit#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.SepaDebit#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.SepaDebit.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must + * consist of only uppercase letters, numbers, spaces, or the following special characters: * '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. */ @SerializedName("reference_prefix") @@ -10140,6 +10939,162 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum FlowDirection implements ApiRequestParams.EnumParam { @SerializedName("inbound") INBOUND("inbound"), 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 fde41519cae..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) { @@ -1196,11 +1196,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -1303,13 +1306,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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; @@ -1951,11 +1957,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1963,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; @@ -2058,13 +2069,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -2076,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 0688c705693..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}. @@ -1073,11 +1073,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -1195,25 +1198,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -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; @@ -1734,11 +1743,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1746,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; @@ -1856,25 +1870,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1892,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 d185813b887..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. @@ -57,7 +57,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { /** * Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price - * intervals. When provided, the billing_cycle_anchor is set to the next occurence of the + * intervals. When provided, the billing_cycle_anchor is set to the next occurrence of the * day_of_month at the hour, minute, and second UTC. */ @SerializedName("billing_cycle_anchor_config") @@ -81,7 +81,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { * period. */ @SerializedName("cancel_at") - Long cancelAt; + Object cancelAt; /** * Indicate whether this subscription should cancel at the end of the current period ({@code @@ -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") @@ -312,11 +316,12 @@ private SubscriptionCreateParams( BillingCycleAnchorConfig billingCycleAnchorConfig, BillingMode billingMode, Object billingThresholds, - Long cancelAt, + Object cancelAt, Boolean cancelAtPeriodEnd, 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; @@ -397,7 +403,7 @@ public static class Builder { private Object billingThresholds; - private Long cancelAt; + private Object cancelAt; private Boolean cancelAtPeriodEnd; @@ -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. @@ -573,7 +582,7 @@ public Builder setBillingCycleAnchor(Long billingCycleAnchor) { /** * Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price - * intervals. When provided, the billing_cycle_anchor is set to the next occurence of the + * intervals. When provided, the billing_cycle_anchor is set to the next occurrence of the * day_of_month at the hour, minute, and second UTC. */ public Builder setBillingCycleAnchorConfig( @@ -618,6 +627,17 @@ public Builder setCancelAt(Long cancelAt) { return this; } + /** + * A timestamp at which the subscription should cancel. If set to a date before the current + * period ends, this will cause a proration if prorations have been enabled using {@code + * proration_behavior}. If set during a future period, this will always cause a proration for + * that period. + */ + public Builder setCancelAt(SubscriptionCreateParams.CancelAt cancelAt) { + this.cancelAt = cancelAt; + return this; + } + /** * Indicate whether this subscription should cancel at the end of the current period ({@code * current_period_end}). Defaults to {@code false}. @@ -649,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}. @@ -668,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; @@ -682,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; @@ -908,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}. @@ -919,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}. @@ -957,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 @@ -965,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. @@ -975,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. @@ -996,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( @@ -1007,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) { @@ -1017,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}. */ @@ -1042,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) { @@ -1056,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) { @@ -1068,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) { @@ -1079,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) { @@ -1111,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}. @@ -1120,8 +1146,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} defaults + * to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -1131,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") @@ -1282,8 +1309,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod(SubscriptionCreateParams.AddInvoiceItem.Period period) { this.period = period; @@ -1297,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) { @@ -1798,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 @@ -1915,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 @@ -2310,15 +2338,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -2329,11 +2362,13 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionCreateParams.BillingMode build() { - return new SubscriptionCreateParams.BillingMode(this.extraParams, this.type); + return new SubscriptionCreateParams.BillingMode(this.extraParams, this.flexible, this.type); } /** @@ -2362,9 +2397,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible(SubscriptionCreateParams.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(SubscriptionCreateParams.BillingMode.Type type) { this.type = type; @@ -2372,6 +2413,96 @@ public Builder setType(SubscriptionCreateParams.BillingMode.Type type) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls how invoices and invoice items display proration amounts and discount amounts. */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.BillingMode.Flexible build() { + return new SubscriptionCreateParams.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. 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.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SubscriptionCreateParams.BillingMode.Flexible.ProrationDiscounts prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -2835,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}. @@ -2852,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") @@ -2863,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. */ @@ -3054,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) { @@ -3097,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. */ @@ -3109,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. */ @@ -3136,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") @@ -3193,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) { @@ -3339,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 @@ -3470,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 @@ -3869,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. @@ -3890,6 +4028,7 @@ private PaymentMethodOptions( Object customerBalance, Map extraParams, Object konbini, + Object payto, Object sepaDebit, Object usBankAccount) { this.acssDebit = acssDebit; @@ -3898,6 +4037,7 @@ private PaymentMethodOptions( this.customerBalance = customerBalance; this.extraParams = extraParams; this.konbini = konbini; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -3919,6 +4059,8 @@ public static class Builder { private Object konbini; + private Object payto; + private Object sepaDebit; private Object usBankAccount; @@ -3932,6 +4074,7 @@ public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions build() { this.customerBalance, this.extraParams, this.konbini, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -4062,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. @@ -4443,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. */ @@ -4534,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. */ @@ -5108,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 { @@ -5700,6 +6086,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -5757,6 +6146,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -6194,6 +6586,21 @@ public enum MissingPaymentMethod implements ApiRequestParams.EnumParam { } } + public enum CancelAt implements ApiRequestParams.EnumParam { + @SerializedName("max_period_end") + MAX_PERIOD_END("max_period_end"), + + @SerializedName("min_period_end") + MIN_PERIOD_END("min_period_end"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CancelAt(String value) { + this.value = value; + } + } + public enum CollectionMethod implements ApiRequestParams.EnumParam { @SerializedName("charge_automatically") CHARGE_AUTOMATICALLY("charge_automatically"), 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/SubscriptionMigrateParams.java b/src/main/java/com/stripe/param/SubscriptionMigrateParams.java index 18da721a8c8..8d11769fe12 100644 --- a/src/main/java/com/stripe/param/SubscriptionMigrateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionMigrateParams.java @@ -130,12 +130,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. */ + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + + /** + * Required. Controls the calculation and orchestration of prorations and + * invoices for subscriptions. + */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -146,11 +154,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionMigrateParams.BillingMode build() { - return new SubscriptionMigrateParams.BillingMode(this.extraParams, this.type); + return new SubscriptionMigrateParams.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -179,13 +190,112 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. */ + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible(SubscriptionMigrateParams.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + + /** + * Required. Controls the calculation and orchestration of prorations and + * invoices for subscriptions. + */ public Builder setType(SubscriptionMigrateParams.BillingMode.Type type) { this.type = type; return this; } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls how invoices and invoice items display proration amounts and discount amounts. */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionMigrateParams.BillingMode.Flexible build() { + return new SubscriptionMigrateParams.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionMigrateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionMigrateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SubscriptionMigrateParams.BillingMode.Flexible.ProrationDiscounts prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("flexible") FLEXIBLE("flexible"); 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 7c7ab3da5e7..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}. @@ -350,15 +365,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -369,11 +389,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleCreateParams.BillingMode build() { - return new SubscriptionScheduleCreateParams.BillingMode(this.extraParams, this.type); + return new SubscriptionScheduleCreateParams.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -403,9 +426,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible(SubscriptionScheduleCreateParams.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(SubscriptionScheduleCreateParams.BillingMode.Type type) { this.type = type; @@ -413,6 +442,97 @@ public Builder setType(SubscriptionScheduleCreateParams.BillingMode.Type type) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls how invoices and invoice items display proration amounts and discount amounts. */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionScheduleCreateParams.BillingMode.Flexible build() { + return new SubscriptionScheduleCreateParams.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionScheduleCreateParams.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionScheduleCreateParams.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SubscriptionScheduleCreateParams.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -451,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; @@ -607,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) { @@ -1473,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; @@ -1512,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") @@ -1543,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; @@ -1570,17 +1690,7 @@ public static class Phase { List items; /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} must - * not be set. This parameter is deprecated and will be removed in a future version. Use {@code - * duration} instead. - */ - @SerializedName("iterations") - Long iterations; - - /** - * 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 @@ -1599,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. */ @@ -1647,7 +1757,6 @@ private Phase( Map extraParams, InvoiceSettings invoiceSettings, List items, - Long iterations, Map metadata, String onBehalfOf, ProrationBehavior prorationBehavior, @@ -1670,7 +1779,6 @@ private Phase( this.extraParams = extraParams; this.invoiceSettings = invoiceSettings; this.items = items; - this.iterations = iterations; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.prorationBehavior = prorationBehavior; @@ -1716,8 +1824,6 @@ public static class Builder { private List items; - private Long iterations; - private Map metadata; private String onBehalfOf; @@ -1749,7 +1855,6 @@ public SubscriptionScheduleCreateParams.Phase build() { this.extraParams, this.invoiceSettings, this.items, - this.iterations, this.metadata, this.onBehalfOf, this.prorationBehavior, @@ -1810,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) { @@ -1899,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) { @@ -1912,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) { @@ -2002,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) { @@ -2069,18 +2174,6 @@ public Builder addAllItem(List elem return this; } - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. Use - * {@code duration} instead. - */ - public Builder setIterations(Long iterations) { - this.iterations = iterations; - 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 @@ -2118,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. */ @@ -2177,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}. @@ -2186,8 +2279,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -2197,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") @@ -2354,8 +2448,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod( SubscriptionScheduleCreateParams.Phase.AddInvoiceItem.Period period) { @@ -2370,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( @@ -2894,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 @@ -3015,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} @@ -3866,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 @@ -3888,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") @@ -3902,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. */ @@ -4103,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( @@ -4150,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. */ @@ -4162,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. */ @@ -4190,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") @@ -4249,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) { @@ -4397,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 @@ -4530,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 270c9eddf41..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,17 +1442,7 @@ public static class Phase { List items; /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} must - * not be set. This parameter is deprecated and will be removed in a future version. Use {@code - * duration} instead. - */ - @SerializedName("iterations") - Long iterations; - - /** - * 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 @@ -1471,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. */ @@ -1526,7 +1516,6 @@ private Phase( Map extraParams, InvoiceSettings invoiceSettings, List items, - Long iterations, Map metadata, Object onBehalfOf, ProrationBehavior prorationBehavior, @@ -1550,7 +1539,6 @@ private Phase( this.extraParams = extraParams; this.invoiceSettings = invoiceSettings; this.items = items; - this.iterations = iterations; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.prorationBehavior = prorationBehavior; @@ -1597,8 +1585,6 @@ public static class Builder { private List items; - private Long iterations; - private Map metadata; private Object onBehalfOf; @@ -1632,7 +1618,6 @@ public SubscriptionScheduleUpdateParams.Phase build() { this.extraParams, this.invoiceSettings, this.items, - this.iterations, this.metadata, this.onBehalfOf, this.prorationBehavior, @@ -1694,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) { @@ -1803,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) { @@ -1816,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) { @@ -1906,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) { @@ -1915,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) { @@ -1982,18 +1967,6 @@ public Builder addAllItem(List elem return this; } - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. Use - * {@code duration} instead. - */ - public Builder setIterations(Long iterations) { - this.iterations = iterations; - 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 @@ -2040,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. */ @@ -2126,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}. @@ -2135,8 +2108,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -2146,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") @@ -2303,8 +2277,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod( SubscriptionScheduleUpdateParams.Phase.AddInvoiceItem.Period period) { @@ -2325,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( @@ -2867,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 @@ -3009,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} @@ -3900,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 @@ -3922,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") @@ -3936,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. */ @@ -4152,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( @@ -4199,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. */ @@ -4211,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. */ @@ -4239,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") @@ -4298,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) { @@ -4464,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 @@ -4618,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 5d7f25626e0..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) { @@ -561,6 +561,17 @@ public Builder setCancelAt(Long cancelAt) { return this; } + /** + * A timestamp at which the subscription should cancel. If set to a date before the current + * period ends, this will cause a proration if prorations have been enabled using {@code + * proration_behavior}. If set during a future period, this will always cause a proration for + * that period. + */ + public Builder setCancelAt(SubscriptionUpdateParams.CancelAt cancelAt) { + this.cancelAt = cancelAt; + return this; + } + /** * A timestamp at which the subscription should cancel. If set to a date before the current * period ends, this will cause a proration if prorations have been enabled using {@code @@ -613,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; @@ -626,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; @@ -640,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; @@ -654,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; @@ -890,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}. @@ -901,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}. @@ -935,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) { @@ -946,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) { @@ -959,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 @@ -995,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( @@ -1006,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) { @@ -1016,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}. @@ -1090,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) { @@ -1122,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}. @@ -1131,8 +1142,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} defaults + * to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -1142,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") @@ -1293,8 +1305,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod(SubscriptionUpdateParams.AddInvoiceItem.Period period) { this.period = period; @@ -1314,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) { @@ -1833,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 @@ -1970,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 @@ -2871,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}. @@ -2892,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") @@ -2903,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. */ @@ -3127,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}. @@ -3138,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}. @@ -3181,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) { @@ -3224,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. */ @@ -3236,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. */ @@ -3263,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") @@ -3320,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) { @@ -3484,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 @@ -3635,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 @@ -4152,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. @@ -4173,6 +4193,7 @@ private PaymentMethodOptions( Object customerBalance, Map extraParams, Object konbini, + Object payto, Object sepaDebit, Object usBankAccount) { this.acssDebit = acssDebit; @@ -4181,6 +4202,7 @@ private PaymentMethodOptions( this.customerBalance = customerBalance; this.extraParams = extraParams; this.konbini = konbini; + this.payto = payto; this.sepaDebit = sepaDebit; this.usBankAccount = usBankAccount; } @@ -4202,6 +4224,8 @@ public static class Builder { private Object konbini; + private Object payto; + private Object sepaDebit; private Object usBankAccount; @@ -4215,6 +4239,7 @@ public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.customerBalance, this.extraParams, this.konbini, + this.payto, this.sepaDebit, this.usBankAccount); } @@ -4345,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. @@ -4726,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. */ @@ -4817,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. */ @@ -5429,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 { @@ -6021,6 +6289,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("crypto") CRYPTO("crypto"), + @SerializedName("custom") + CUSTOM("custom"), + @SerializedName("customer_balance") CUSTOMER_BALANCE("customer_balance"), @@ -6078,6 +6349,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("payto") + PAYTO("payto"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -6536,6 +6810,21 @@ public enum BillingCycleAnchor implements ApiRequestParams.EnumParam { } } + public enum CancelAt implements ApiRequestParams.EnumParam { + @SerializedName("max_period_end") + MAX_PERIOD_END("max_period_end"), + + @SerializedName("min_period_end") + MIN_PERIOD_END("min_period_end"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CancelAt(String value) { + this.value = value; + } + } + public enum CollectionMethod implements ApiRequestParams.EnumParam { @SerializedName("charge_automatically") CHARGE_AUTOMATICALLY("charge_automatically"), diff --git a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java index a9dac7a769c..509ab49c3b2 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java @@ -42,11 +42,11 @@ public class TaxIdCollectionCreateParams extends ApiRequestParams { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, + * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -149,12 +149,12 @@ public Builder putAllExtraParam(Map map) { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(TaxIdCollectionCreateParams.Type type) { this.type = type; @@ -418,6 +418,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), diff --git a/src/main/java/com/stripe/param/TaxIdCreateParams.java b/src/main/java/com/stripe/param/TaxIdCreateParams.java index ea8838e67c7..548215820cd 100644 --- a/src/main/java/com/stripe/param/TaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCreateParams.java @@ -46,11 +46,11 @@ public class TaxIdCreateParams extends ApiRequestParams { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, - * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code - * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code - * ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, + * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code + * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code + * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ @SerializedName("type") Type type; @@ -163,12 +163,12 @@ public Builder setOwner(TaxIdCreateParams.Owner owner) { * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code ma_vat}, {@code md_vat}, * {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, {@code my_frp}, {@code * my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code no_voec}, {@code np_pan}, - * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code ro_tin}, {@code - * rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, - * {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code th_vat}, {@code - * tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, - * {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code - * vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, {@code pl_nip}, {@code + * ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code sg_gst}, + * {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, {@code + * th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code ua_vat}, + * {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, {@code + * ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} */ public Builder setType(TaxIdCreateParams.Type type) { this.type = type; @@ -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 @@ -549,6 +573,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), 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 05cfd38dfd7..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) { @@ -489,6 +489,13 @@ public static class Company { @SerializedName("registration_number") String registrationNumber; + /** + * 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; + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -539,6 +546,7 @@ private Company( String phone, Object registrationDate, String registrationNumber, + RepresentativeDeclaration representativeDeclaration, ApiRequestParams.EnumParam structure, String taxId, String taxIdRegistrar, @@ -563,6 +571,7 @@ private Company( this.phone = phone; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; + this.representativeDeclaration = representativeDeclaration; this.structure = structure; this.taxId = taxId; this.taxIdRegistrar = taxIdRegistrar; @@ -613,6 +622,8 @@ public static class Builder { private String registrationNumber; + private RepresentativeDeclaration representativeDeclaration; + private ApiRequestParams.EnumParam structure; private String taxId; @@ -645,6 +656,7 @@ public TokenCreateParams.Account.Company build() { this.phone, this.registrationDate, this.registrationNumber, + this.representativeDeclaration, this.structure, this.taxId, this.taxIdRegistrar, @@ -853,6 +865,16 @@ public Builder setRegistrationNumber(String registrationNumber) { 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( + TokenCreateParams.Account.Company.RepresentativeDeclaration representativeDeclaration) { + this.representativeDeclaration = representativeDeclaration; + return this; + } + /** * The category identifying the legal structure of the company or legal entity. See Business @@ -930,11 +952,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -942,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; @@ -1037,13 +1062,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1055,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; @@ -1712,6 +1740,116 @@ public Builder setYear(Long year) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RepresentativeDeclaration { + /** The Unix timestamp marking when the representative declaration attestation was made. */ + @SerializedName("date") + Long 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 declaration attestation was made. */ + @SerializedName("ip") + String ip; + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + @SerializedName("user_agent") + String userAgent; + + private RepresentativeDeclaration( + Long 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 Long date; + + private Map extraParams; + + private String ip; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public TokenCreateParams.Account.Company.RepresentativeDeclaration build() { + return new TokenCreateParams.Account.Company.RepresentativeDeclaration( + this.date, this.extraParams, this.ip, this.userAgent); + } + + /** + * The Unix timestamp marking when the representative declaration attestation was made. + */ + public Builder setDate(Long 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 + * TokenCreateParams.Account.Company.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 + * TokenCreateParams.Account.Company.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 declaration attestation was made. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** + * The user agent of the browser from which the representative declaration attestation was + * made. + */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Verification { @@ -1789,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; @@ -1809,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; @@ -1843,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. @@ -1885,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. @@ -2082,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}. @@ -2462,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}. @@ -2473,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}. @@ -2552,11 +2688,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2564,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; @@ -2659,13 +2798,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -2677,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; @@ -3152,11 +3294,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3164,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; @@ -3259,13 +3404,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3277,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; @@ -3542,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. @@ -3561,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. @@ -3593,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; @@ -3635,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; @@ -3652,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. @@ -3671,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. @@ -3703,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; @@ -3745,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; @@ -3834,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; @@ -3972,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; @@ -4599,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}. @@ -5022,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}. @@ -5033,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}. @@ -5320,11 +5464,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -5332,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; @@ -5427,13 +5574,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5445,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; @@ -6021,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; @@ -6120,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; @@ -6216,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; @@ -6322,11 +6469,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -6334,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; @@ -6429,13 +6579,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -6447,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; @@ -7202,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. @@ -7221,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. @@ -7253,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. @@ -7292,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. @@ -7308,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. @@ -7327,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. @@ -7359,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. @@ -7398,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 86aa5ae65b0..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}. @@ -627,7 +627,22 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2025_07_30_BASIL("2025-07-30.basil"), @SerializedName("2025-08-27.basil") - VERSION_2025_08_27_BASIL("2025-08-27.basil"); + VERSION_2025_08_27_BASIL("2025-08-27.basil"), + + @SerializedName("2025-09-30.clover") + VERSION_2025_09_30_CLOVER("2025-09-30.clover"), + + @SerializedName("2025-10-29.clover") + VERSION_2025_10_29_CLOVER("2025-10-29.clover"), + + @SerializedName("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; @@ -671,6 +686,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("balance.available") BALANCE__AVAILABLE("balance.available"), + @SerializedName("balance_settings.updated") + BALANCE_SETTINGS__UPDATED("balance_settings.updated"), + @SerializedName("billing.alert.triggered") BILLING__ALERT__TRIGGERED("billing.alert.triggered"), @@ -852,6 +870,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("file.created") FILE__CREATED("file.created"), + @SerializedName("financial_connections.account.account_numbers_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__ACCOUNT_NUMBERS_UPDATED( + "financial_connections.account.account_numbers_updated"), + @SerializedName("financial_connections.account.created") FINANCIAL_CONNECTIONS__ACCOUNT__CREATED("financial_connections.account.created"), @@ -876,6 +898,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { FINANCIAL_CONNECTIONS__ACCOUNT__REFRESHED_TRANSACTIONS( "financial_connections.account.refreshed_transactions"), + @SerializedName("financial_connections.account.upcoming_account_number_expiry") + FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_ACCOUNT_NUMBER_EXPIRY( + "financial_connections.account.upcoming_account_number_expiry"), + @SerializedName("identity.verification_session.canceled") IDENTITY__VERIFICATION_SESSION__CANCELED("identity.verification_session.canceled"), @@ -921,6 +947,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("invoice.payment_action_required") INVOICE__PAYMENT_ACTION_REQUIRED("invoice.payment_action_required"), + @SerializedName("invoice.payment_attempt_required") + INVOICE__PAYMENT_ATTEMPT_REQUIRED("invoice.payment_attempt_required"), + @SerializedName("invoice.payment_failed") INVOICE__PAYMENT_FAILED("invoice.payment_failed"), diff --git a/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java b/src/main/java/com/stripe/param/WebhookEndpointUpdateParams.java index c931493b081..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}. @@ -296,6 +296,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("balance.available") BALANCE__AVAILABLE("balance.available"), + @SerializedName("balance_settings.updated") + BALANCE_SETTINGS__UPDATED("balance_settings.updated"), + @SerializedName("billing.alert.triggered") BILLING__ALERT__TRIGGERED("billing.alert.triggered"), @@ -477,6 +480,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("file.created") FILE__CREATED("file.created"), + @SerializedName("financial_connections.account.account_numbers_updated") + FINANCIAL_CONNECTIONS__ACCOUNT__ACCOUNT_NUMBERS_UPDATED( + "financial_connections.account.account_numbers_updated"), + @SerializedName("financial_connections.account.created") FINANCIAL_CONNECTIONS__ACCOUNT__CREATED("financial_connections.account.created"), @@ -501,6 +508,10 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { FINANCIAL_CONNECTIONS__ACCOUNT__REFRESHED_TRANSACTIONS( "financial_connections.account.refreshed_transactions"), + @SerializedName("financial_connections.account.upcoming_account_number_expiry") + FINANCIAL_CONNECTIONS__ACCOUNT__UPCOMING_ACCOUNT_NUMBER_EXPIRY( + "financial_connections.account.upcoming_account_number_expiry"), + @SerializedName("identity.verification_session.canceled") IDENTITY__VERIFICATION_SESSION__CANCELED("identity.verification_session.canceled"), @@ -546,6 +557,9 @@ public enum EnabledEvent implements ApiRequestParams.EnumParam { @SerializedName("invoice.payment_action_required") INVOICE__PAYMENT_ACTION_REQUIRED("invoice.payment_action_required"), + @SerializedName("invoice.payment_attempt_required") + INVOICE__PAYMENT_ATTEMPT_REQUIRED("invoice.payment_attempt_required"), + @SerializedName("invoice.payment_failed") INVOICE__PAYMENT_FAILED("invoice.payment_failed"), diff --git a/src/main/java/com/stripe/param/billing/AlertCreateParams.java b/src/main/java/com/stripe/param/billing/AlertCreateParams.java index f6e4a483961..c8ad48b58c9 100644 --- a/src/main/java/com/stripe/param/billing/AlertCreateParams.java +++ b/src/main/java/com/stripe/param/billing/AlertCreateParams.java @@ -173,10 +173,7 @@ public static class UsageThreshold { @SerializedName("meter") String meter; - /** - * Required. Whether the alert should only fire only once, or once per billing - * cycle. - */ + /** Required. Defines how the alert will behave. */ @SerializedName("recurrence") Recurrence recurrence; @@ -281,10 +278,7 @@ public Builder setMeter(String meter) { return this; } - /** - * Required. Whether the alert should only fire only once, or once per - * billing cycle. - */ + /** Required. Defines how the alert will behave. */ public Builder setRecurrence(AlertCreateParams.UsageThreshold.Recurrence recurrence) { this.recurrence = recurrence; return this; 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 0ae18b100e3..a13a2f380a8 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java @@ -25,14 +25,18 @@ public class CreditGrantCreateParams extends ApiRequestParams { @SerializedName("applicability_config") ApplicabilityConfig applicabilityConfig; - /** Required. The category of this credit grant. */ + /** The category of this credit grant. It defaults to {@code paid} if not specified. */ @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, @@ -162,18 +171,24 @@ public Builder setApplicabilityConfig( return this; } - /** Required. The category of this credit grant. */ + /** The category of this credit grant. It defaults to {@code paid} if not specified. */ public Builder setCategory(CreditGrantCreateParams.Category category) { this.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 bb3be2904af..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) { @@ -752,9 +752,21 @@ public static class PaymentMethodUpdate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private PaymentMethodUpdate(Boolean enabled, Map extraParams) { + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able to + * update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + @SerializedName("payment_method_configuration") + Object paymentMethodConfiguration; + + private PaymentMethodUpdate( + Boolean enabled, Map extraParams, Object paymentMethodConfiguration) { this.enabled = enabled; this.extraParams = extraParams; + this.paymentMethodConfiguration = paymentMethodConfiguration; } public static Builder builder() { @@ -766,10 +778,12 @@ public static class Builder { private Map extraParams; + private Object paymentMethodConfiguration; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationCreateParams.Features.PaymentMethodUpdate build() { return new ConfigurationCreateParams.Features.PaymentMethodUpdate( - this.enabled, this.extraParams); + this.enabled, this.extraParams, this.paymentMethodConfiguration); } /** Required. Whether the feature is enabled. */ @@ -805,6 +819,30 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able + * to update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) { + this.paymentMethodConfiguration = paymentMethodConfiguration; + return this; + } + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able + * to update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + public Builder setPaymentMethodConfiguration(EmptyParam paymentMethodConfiguration) { + this.paymentMethodConfiguration = paymentMethodConfiguration; + return this; + } } } @@ -1167,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. @@ -1205,19 +1253,27 @@ public static class SubscriptionUpdate { @SerializedName("schedule_at_period_end") ScheduleAtPeriodEnd scheduleAtPeriodEnd; + /** The behavior when updating a subscription that is trialing. */ + @SerializedName("trial_update_behavior") + TrialUpdateBehavior trialUpdateBehavior; + private SubscriptionUpdate( + BillingCycleAnchor billingCycleAnchor, Object defaultAllowedUpdates, Boolean enabled, Map extraParams, Object products, ProrationBehavior prorationBehavior, - ScheduleAtPeriodEnd scheduleAtPeriodEnd) { + ScheduleAtPeriodEnd scheduleAtPeriodEnd, + TrialUpdateBehavior trialUpdateBehavior) { + this.billingCycleAnchor = billingCycleAnchor; this.defaultAllowedUpdates = defaultAllowedUpdates; this.enabled = enabled; this.extraParams = extraParams; this.products = products; this.prorationBehavior = prorationBehavior; this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; + this.trialUpdateBehavior = trialUpdateBehavior; } public static Builder builder() { @@ -1225,6 +1281,8 @@ public static Builder builder() { } public static class Builder { + private BillingCycleAnchor billingCycleAnchor; + private Object defaultAllowedUpdates; private Boolean enabled; @@ -1237,15 +1295,33 @@ public static class Builder { private ScheduleAtPeriodEnd scheduleAtPeriodEnd; + private TrialUpdateBehavior trialUpdateBehavior; + /** 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, this.products, this.prorationBehavior, - this.scheduleAtPeriodEnd); + this.scheduleAtPeriodEnd, + 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; } /** @@ -1415,6 +1491,14 @@ public Builder setScheduleAtPeriodEnd( this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; return this; } + + /** The behavior when updating a subscription that is trialing. */ + public Builder setTrialUpdateBehavior( + ConfigurationCreateParams.Features.SubscriptionUpdate.TrialUpdateBehavior + trialUpdateBehavior) { + this.trialUpdateBehavior = trialUpdateBehavior; + return this; + } } @Getter @@ -1868,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"), @@ -1903,6 +2002,21 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum TrialUpdateBehavior implements ApiRequestParams.EnumParam { + @SerializedName("continue_trial") + CONTINUE_TRIAL("continue_trial"), + + @SerializedName("end_trial") + END_TRIAL("end_trial"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TrialUpdateBehavior(String value) { + this.value = value; + } + } } } @@ -1911,7 +2025,7 @@ public enum ProrationBehavior 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. */ @@ -1948,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 87418baeec9..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}. @@ -803,9 +803,21 @@ public static class PaymentMethodUpdate { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private PaymentMethodUpdate(Boolean enabled, Map extraParams) { + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able to + * update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + @SerializedName("payment_method_configuration") + Object paymentMethodConfiguration; + + private PaymentMethodUpdate( + Boolean enabled, Map extraParams, Object paymentMethodConfiguration) { this.enabled = enabled; this.extraParams = extraParams; + this.paymentMethodConfiguration = paymentMethodConfiguration; } public static Builder builder() { @@ -817,10 +829,12 @@ public static class Builder { private Map extraParams; + private Object paymentMethodConfiguration; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationUpdateParams.Features.PaymentMethodUpdate build() { return new ConfigurationUpdateParams.Features.PaymentMethodUpdate( - this.enabled, this.extraParams); + this.enabled, this.extraParams, this.paymentMethodConfiguration); } /** Required. Whether the feature is enabled. */ @@ -856,6 +870,30 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able + * to update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + public Builder setPaymentMethodConfiguration(String paymentMethodConfiguration) { + this.paymentMethodConfiguration = paymentMethodConfiguration; + return this; + } + + /** + * The Payment Method + * Configuration to use for this portal session. When specified, customers will be able + * to update their payment method to one of the options specified by the payment method + * configuration. If not set or set to an empty string, the default payment method + * configuration is used. + */ + public Builder setPaymentMethodConfiguration(EmptyParam paymentMethodConfiguration) { + this.paymentMethodConfiguration = paymentMethodConfiguration; + return this; + } } } @@ -1209,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. @@ -1247,19 +1295,27 @@ public static class SubscriptionUpdate { @SerializedName("schedule_at_period_end") ScheduleAtPeriodEnd scheduleAtPeriodEnd; + /** The behavior when updating a subscription that is trialing. */ + @SerializedName("trial_update_behavior") + TrialUpdateBehavior trialUpdateBehavior; + private SubscriptionUpdate( + BillingCycleAnchor billingCycleAnchor, Object defaultAllowedUpdates, Boolean enabled, Map extraParams, Object products, ProrationBehavior prorationBehavior, - ScheduleAtPeriodEnd scheduleAtPeriodEnd) { + ScheduleAtPeriodEnd scheduleAtPeriodEnd, + TrialUpdateBehavior trialUpdateBehavior) { + this.billingCycleAnchor = billingCycleAnchor; this.defaultAllowedUpdates = defaultAllowedUpdates; this.enabled = enabled; this.extraParams = extraParams; this.products = products; this.prorationBehavior = prorationBehavior; this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; + this.trialUpdateBehavior = trialUpdateBehavior; } public static Builder builder() { @@ -1267,6 +1323,8 @@ public static Builder builder() { } public static class Builder { + private BillingCycleAnchor billingCycleAnchor; + private Object defaultAllowedUpdates; private Boolean enabled; @@ -1279,15 +1337,33 @@ public static class Builder { private ScheduleAtPeriodEnd scheduleAtPeriodEnd; + private TrialUpdateBehavior trialUpdateBehavior; + /** 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, this.products, this.prorationBehavior, - this.scheduleAtPeriodEnd); + this.scheduleAtPeriodEnd, + 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; } /** @@ -1457,6 +1533,14 @@ public Builder setScheduleAtPeriodEnd( this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; return this; } + + /** The behavior when updating a subscription that is trialing. */ + public Builder setTrialUpdateBehavior( + ConfigurationUpdateParams.Features.SubscriptionUpdate.TrialUpdateBehavior + trialUpdateBehavior) { + this.trialUpdateBehavior = trialUpdateBehavior; + return this; + } } @Getter @@ -1945,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"), @@ -1980,6 +2079,21 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum TrialUpdateBehavior implements ApiRequestParams.EnumParam { + @SerializedName("continue_trial") + CONTINUE_TRIAL("continue_trial"), + + @SerializedName("end_trial") + END_TRIAL("end_trial"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TrialUpdateBehavior(String value) { + this.value = value; + } + } } } @@ -1988,7 +2102,7 @@ public enum ProrationBehavior 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. * @@ -2027,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 bfb540a7e3d..fe2ad8eea9d 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -22,7 +22,10 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("adaptive_pricing") AdaptivePricing adaptivePricing; - /** Configure actions after a Checkout Session has expired. */ + /** + * Configure actions after a Checkout Session has expired. You can't set this parameter if {@code + * ui_mode} is {@code custom}. + */ @SerializedName("after_expiration") AfterExpiration afterExpiration; @@ -44,6 +47,13 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("billing_address_collection") BillingAddressCollection billingAddressCollection; + /** + * The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is + * {@code custom}. + */ + @SerializedName("branding_settings") + BrandingSettings brandingSettings; + /** * If set, Checkout displays a back button and customers will be directed to this URL if they * decide to cancel payment and return to your website. This parameter is not allowed if ui_mode @@ -73,12 +83,15 @@ public class SessionCreateParams extends ApiRequestParams { /** * Collect additional information from your customer using custom fields. Up to 3 fields are - * supported. + * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("custom_fields") List customFields; - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("custom_text") CustomText customText; @@ -86,13 +99,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. * @@ -101,23 +114,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. * @@ -149,6 +166,15 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("discounts") List discounts; + /** + * A list of the types of payment methods (e.g., {@code card}) that should be excluded from this + * Checkout Session. This should only be used when payment methods for this Checkout Session are + * managed through the Stripe + * Dashboard. + */ + @SerializedName("excluded_payment_method_types") + List excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -176,7 +202,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 @@ -197,7 +223,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}. @@ -212,9 +238,23 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("mode") Mode mode; + /** + * Controls name collection settings for the session. + * + *

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, + * the names can be saved to the Customer object as well. + * + *

You can't set this parameter if {@code ui_mode} is {@code custom}. + */ + @SerializedName("name_collection") + NameCollection nameCollection; + /** * 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 @@ -225,12 +265,15 @@ public class SessionCreateParams extends ApiRequestParams { * *

For {@code subscription} mode, there is a maximum of 20 line items and optional items with * recurring Prices and 20 line items and optional items with one-time Prices. + * + *

You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("optional_items") List optionalItems; /** * Where the user is coming from. This informs the optimizations that are applied to the session. + * You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("origin_context") OriginContext originContext; @@ -251,7 +294,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") @@ -277,7 +320,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") @@ -314,7 +357,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") @@ -356,7 +399,7 @@ public class SessionCreateParams extends ApiRequestParams { * Describes the type of transaction being performed by Checkout in order to customize relevant * text on the page, such as the submit button. {@code submit_type} can only be specified on * Checkout Sessions in {@code payment} or {@code subscription} mode. If blank or {@code auto}, - * {@code pay} is used. + * {@code pay} is used. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("submit_type") SubmitType submitType; @@ -372,7 +415,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") @@ -396,6 +439,7 @@ private SessionCreateParams( Boolean allowPromotionCodes, AutomaticTax automaticTax, BillingAddressCollection billingAddressCollection, + BrandingSettings brandingSettings, String cancelUrl, String clientReferenceId, ConsentCollection consentCollection, @@ -403,10 +447,12 @@ private SessionCreateParams( List customFields, CustomText customText, String customer, + String customerAccount, CustomerCreation customerCreation, String customerEmail, CustomerUpdate customerUpdate, List discounts, + List excludedPaymentMethodTypes, List expand, Long expiresAt, Map extraParams, @@ -415,6 +461,7 @@ private SessionCreateParams( Locale locale, Map metadata, Mode mode, + NameCollection nameCollection, List optionalItems, OriginContext originContext, PaymentIntentData paymentIntentData, @@ -442,6 +489,7 @@ private SessionCreateParams( this.allowPromotionCodes = allowPromotionCodes; this.automaticTax = automaticTax; this.billingAddressCollection = billingAddressCollection; + this.brandingSettings = brandingSettings; this.cancelUrl = cancelUrl; this.clientReferenceId = clientReferenceId; this.consentCollection = consentCollection; @@ -449,10 +497,12 @@ private SessionCreateParams( this.customFields = customFields; this.customText = customText; this.customer = customer; + this.customerAccount = customerAccount; this.customerCreation = customerCreation; this.customerEmail = customerEmail; this.customerUpdate = customerUpdate; this.discounts = discounts; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.expiresAt = expiresAt; this.extraParams = extraParams; @@ -461,6 +511,7 @@ private SessionCreateParams( this.locale = locale; this.metadata = metadata; this.mode = mode; + this.nameCollection = nameCollection; this.optionalItems = optionalItems; this.originContext = originContext; this.paymentIntentData = paymentIntentData; @@ -500,6 +551,8 @@ public static class Builder { private BillingAddressCollection billingAddressCollection; + private BrandingSettings brandingSettings; + private String cancelUrl; private String clientReferenceId; @@ -514,6 +567,8 @@ public static class Builder { private String customer; + private String customerAccount; + private CustomerCreation customerCreation; private String customerEmail; @@ -522,6 +577,8 @@ public static class Builder { private List discounts; + private List excludedPaymentMethodTypes; + private List expand; private Long expiresAt; @@ -538,6 +595,8 @@ public static class Builder { private Mode mode; + private NameCollection nameCollection; + private List optionalItems; private OriginContext originContext; @@ -590,6 +649,7 @@ public SessionCreateParams build() { this.allowPromotionCodes, this.automaticTax, this.billingAddressCollection, + this.brandingSettings, this.cancelUrl, this.clientReferenceId, this.consentCollection, @@ -597,10 +657,12 @@ public SessionCreateParams build() { this.customFields, this.customText, this.customer, + this.customerAccount, this.customerCreation, this.customerEmail, this.customerUpdate, this.discounts, + this.excludedPaymentMethodTypes, this.expand, this.expiresAt, this.extraParams, @@ -609,6 +671,7 @@ public SessionCreateParams build() { this.locale, this.metadata, this.mode, + this.nameCollection, this.optionalItems, this.originContext, this.paymentIntentData, @@ -642,7 +705,10 @@ public Builder setAdaptivePricing(SessionCreateParams.AdaptivePricing adaptivePr return this; } - /** Configure actions after a Checkout Session has expired. */ + /** + * Configure actions after a Checkout Session has expired. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setAfterExpiration(SessionCreateParams.AfterExpiration afterExpiration) { this.afterExpiration = afterExpiration; return this; @@ -673,6 +739,15 @@ public Builder setBillingAddressCollection( return this; } + /** + * The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is + * {@code custom}. + */ + public Builder setBrandingSettings(SessionCreateParams.BrandingSettings brandingSettings) { + this.brandingSettings = brandingSettings; + return this; + } + /** * If set, Checkout displays a back button and customers will be directed to this URL if they * decide to cancel payment and return to your website. This parameter is not allowed if ui_mode @@ -734,7 +809,10 @@ public Builder addAllCustomField(List elements) return this; } - /** Display additional text for your customers using custom text. */ + /** + * Display additional text for your customers using custom text. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ public Builder setCustomText(SessionCreateParams.CustomText customText) { this.customText = customText; return this; @@ -744,13 +822,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. * @@ -759,7 +837,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. */ @@ -768,16 +846,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. * @@ -834,6 +918,34 @@ public Builder addAllDiscount(List elements) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SessionCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addExcludedPaymentMethodType( + SessionCreateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SessionCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.addAll(elements); + 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 @@ -972,6 +1084,22 @@ public Builder setMode(SessionCreateParams.Mode mode) { return this; } + /** + * Controls name collection settings for the session. + * + *

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, + * the names can be saved to the Customer object as well. + * + *

You can't set this parameter if {@code ui_mode} is {@code custom}. + */ + public Builder setNameCollection(SessionCreateParams.NameCollection nameCollection) { + this.nameCollection = nameCollection; + return this; + } + /** * Add an element to `optionalItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link @@ -1000,7 +1128,7 @@ public Builder addAllOptionalItem(List element /** * Where the user is coming from. This informs the optimizations that are applied to the - * session. + * session. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setOriginContext(SessionCreateParams.OriginContext originContext) { this.originContext = originContext; @@ -1025,7 +1153,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( @@ -1100,7 +1228,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( @@ -1111,7 +1239,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( @@ -1188,7 +1316,7 @@ public Builder addAllShippingOption(List ele * Describes the type of transaction being performed by Checkout in order to customize relevant * text on the page, such as the submit button. {@code submit_type} can only be specified on * Checkout Sessions in {@code payment} or {@code subscription} mode. If blank or {@code auto}, - * {@code pay} is used. + * {@code pay} is used. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setSubmitType(SessionCreateParams.SubmitType submitType) { this.submitType = submitType; @@ -1208,7 +1336,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) { @@ -1689,49 +1817,75 @@ public enum Type implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class ConsentCollection { + public static class BrandingSettings { /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. + * A hex color value starting with {@code #} representing the background color for the Checkout + * Session. */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; + @SerializedName("background_color") + Object backgroundColor; + + /** The border style for the Checkout Session. */ + @SerializedName("border_style") + ApiRequestParams.EnumParam borderStyle; /** - * Determines the display of payment method reuse agreement text in the UI. If set to {@code - * hidden}, it will hide legal text related to the reuse of a payment method. + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. */ - @SerializedName("payment_method_reuse_agreement") - PaymentMethodReuseAgreement paymentMethodReuseAgreement; + @SerializedName("button_color") + Object buttonColor; /** - * If set to {@code auto}, enables the collection of customer consent for promotional - * communications. The Checkout Session will determine whether to display an option to opt into - * promotional communication from the merchant depending on the customer's locale. Only - * available to US merchants. + * A string to override the business name shown on the Checkout Session. This only shows at the + * top of the Checkout page, and your business name still appears in terms, receipts, and other + * places. */ - @SerializedName("promotions") - Promotions promotions; + @SerializedName("display_name") + String displayName; /** - * If set to {@code required}, it requires customers to check a terms of service checkbox before - * being able to pay. There must be a valid terms of service URL set in your Dashboard settings. + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. */ - @SerializedName("terms_of_service") - TermsOfService termsOfService; + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - private ConsentCollection( + /** + * The font family for the Checkout Session corresponding to one of the supported + * font families. + */ + @SerializedName("font_family") + ApiRequestParams.EnumParam fontFamily; + + /** The icon for the Checkout Session. For best results, use a square image. */ + @SerializedName("icon") + Icon icon; + + /** The logo for the Checkout Session. */ + @SerializedName("logo") + Logo logo; + + private BrandingSettings( + Object backgroundColor, + ApiRequestParams.EnumParam borderStyle, + Object buttonColor, + String displayName, Map extraParams, - PaymentMethodReuseAgreement paymentMethodReuseAgreement, - Promotions promotions, - TermsOfService termsOfService) { + ApiRequestParams.EnumParam fontFamily, + Icon icon, + Logo logo) { + this.backgroundColor = backgroundColor; + this.borderStyle = borderStyle; + this.buttonColor = buttonColor; + this.displayName = displayName; this.extraParams = extraParams; - this.paymentMethodReuseAgreement = paymentMethodReuseAgreement; - this.promotions = promotions; - this.termsOfService = termsOfService; + this.fontFamily = fontFamily; + this.icon = icon; + this.logo = logo; } public static Builder builder() { @@ -1739,27 +1893,97 @@ public static Builder builder() { } public static class Builder { + private Object backgroundColor; + + private ApiRequestParams.EnumParam borderStyle; + + private Object buttonColor; + + private String displayName; + private Map extraParams; - private PaymentMethodReuseAgreement paymentMethodReuseAgreement; + private ApiRequestParams.EnumParam fontFamily; - private Promotions promotions; + private Icon icon; - private TermsOfService termsOfService; + private Logo logo; /** Finalize and obtain parameter instance from this builder. */ - public SessionCreateParams.ConsentCollection build() { - return new SessionCreateParams.ConsentCollection( + public SessionCreateParams.BrandingSettings build() { + return new SessionCreateParams.BrandingSettings( + this.backgroundColor, + this.borderStyle, + this.buttonColor, + this.displayName, this.extraParams, - this.paymentMethodReuseAgreement, - this.promotions, - this.termsOfService); + this.fontFamily, + this.icon, + this.logo); + } + + /** + * A hex color value starting with {@code #} representing the background color for the + * Checkout Session. + */ + public Builder setBackgroundColor(String backgroundColor) { + this.backgroundColor = backgroundColor; + return this; + } + + /** + * A hex color value starting with {@code #} representing the background color for the + * Checkout Session. + */ + public Builder setBackgroundColor(EmptyParam backgroundColor) { + this.backgroundColor = backgroundColor; + return this; + } + + /** The border style for the Checkout Session. */ + public Builder setBorderStyle(SessionCreateParams.BrandingSettings.BorderStyle borderStyle) { + this.borderStyle = borderStyle; + return this; + } + + /** The border style for the Checkout Session. */ + public Builder setBorderStyle(EmptyParam borderStyle) { + this.borderStyle = borderStyle; + return this; + } + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + public Builder setButtonColor(String buttonColor) { + this.buttonColor = buttonColor; + return this; + } + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + public Builder setButtonColor(EmptyParam buttonColor) { + this.buttonColor = buttonColor; + return this; + } + + /** + * A string to override the business name shown on the Checkout Session. This only shows at + * the top of the Checkout page, and your business name still appears in terms, receipts, and + * other places. + */ + 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 - * SessionCreateParams.ConsentCollection#extraParams} for the field documentation. + * SessionCreateParams.BrandingSettings#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -1772,7 +1996,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 SessionCreateParams.ConsentCollection#extraParams} for the field documentation. + * See {@link SessionCreateParams.BrandingSettings#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -1783,42 +2007,41 @@ public Builder putAllExtraParam(Map map) { } /** - * Determines the display of payment method reuse agreement text in the UI. If set to {@code - * hidden}, it will hide legal text related to the reuse of a payment method. + * The font family for the Checkout Session corresponding to one of the supported + * font families. */ - public Builder setPaymentMethodReuseAgreement( - SessionCreateParams.ConsentCollection.PaymentMethodReuseAgreement - paymentMethodReuseAgreement) { - this.paymentMethodReuseAgreement = paymentMethodReuseAgreement; + public Builder setFontFamily(SessionCreateParams.BrandingSettings.FontFamily fontFamily) { + this.fontFamily = fontFamily; return this; } /** - * If set to {@code auto}, enables the collection of customer consent for promotional - * communications. The Checkout Session will determine whether to display an option to opt - * into promotional communication from the merchant depending on the customer's locale. Only - * available to US merchants. + * The font family for the Checkout Session corresponding to one of the supported + * font families. */ - public Builder setPromotions(SessionCreateParams.ConsentCollection.Promotions promotions) { - this.promotions = promotions; + public Builder setFontFamily(EmptyParam fontFamily) { + this.fontFamily = fontFamily; return this; } - /** - * If set to {@code required}, it requires customers to check a terms of service checkbox - * before being able to pay. There must be a valid terms of service URL set in your Dashboard settings. - */ - public Builder setTermsOfService( - SessionCreateParams.ConsentCollection.TermsOfService termsOfService) { - this.termsOfService = termsOfService; + /** The icon for the Checkout Session. For best results, use a square image. */ + public Builder setIcon(SessionCreateParams.BrandingSettings.Icon icon) { + this.icon = icon; + return this; + } + + /** The logo for the Checkout Session. */ + public Builder setLogo(SessionCreateParams.BrandingSettings.Logo logo) { + this.logo = logo; return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class PaymentMethodReuseAgreement { + public static class Icon { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1829,17 +2052,29 @@ public static class PaymentMethodReuseAgreement { Map extraParams; /** - * Required. Determines the position and visibility of the payment method - * reuse agreement in the UI. When set to {@code auto}, Stripe's defaults will be used. When - * set to {@code hidden}, the payment method reuse agreement text will always be hidden in the - * UI. + * The ID of a File upload representing the + * icon. Purpose must be {@code business_icon}. Required if {@code type} is {@code file} and + * disallowed otherwise. */ - @SerializedName("position") - Position position; + @SerializedName("file") + String file; - private PaymentMethodReuseAgreement(Map extraParams, Position position) { + /** + * Required. The type of image for the icon. Must be one of {@code file} or + * {@code url}. + */ + @SerializedName("type") + Type type; + + /** The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. */ + @SerializedName("url") + String url; + + private Icon(Map extraParams, String file, Type type, String url) { this.extraParams = extraParams; - this.position = position; + this.file = file; + this.type = type; + this.url = url; } public static Builder builder() { @@ -1849,20 +2084,23 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private Position position; + private String file; + + private Type type; + + private String url; /** Finalize and obtain parameter instance from this builder. */ - public SessionCreateParams.ConsentCollection.PaymentMethodReuseAgreement build() { - return new SessionCreateParams.ConsentCollection.PaymentMethodReuseAgreement( - this.extraParams, this.position); + public SessionCreateParams.BrandingSettings.Icon build() { + return new SessionCreateParams.BrandingSettings.Icon( + this.extraParams, this.file, this.type, this.url); } /** * Add a key/value pair to `extraParams` map. 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.ConsentCollection.PaymentMethodReuseAgreement#extraParams} for the - * field documentation. + * map. See {@link SessionCreateParams.BrandingSettings.Icon#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -1875,9 +2113,8 @@ 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 - * SessionCreateParams.ConsentCollection.PaymentMethodReuseAgreement#extraParams} for the - * field documentation. + * map. See {@link SessionCreateParams.BrandingSettings.Icon#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -1888,60 +2125,279 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. Determines the position and visibility of the payment method - * reuse agreement in the UI. When set to {@code auto}, Stripe's defaults will be used. When - * set to {@code hidden}, the payment method reuse agreement text will always be hidden in - * the UI. + * The ID of a File upload representing the + * icon. Purpose must be {@code business_icon}. Required if {@code type} is {@code file} and + * disallowed otherwise. */ - public Builder setPosition( - SessionCreateParams.ConsentCollection.PaymentMethodReuseAgreement.Position position) { - this.position = position; + public Builder setFile(String file) { + this.file = file; + return this; + } + + /** + * Required. The type of image for the icon. Must be one of {@code file} or + * {@code url}. + */ + public Builder setType(SessionCreateParams.BrandingSettings.Icon.Type type) { + this.type = type; + return this; + } + + /** + * The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. + */ + public Builder setUrl(String url) { + this.url = url; return this; } } - public enum Position implements ApiRequestParams.EnumParam { - @SerializedName("auto") - AUTO("auto"), + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("file") + FILE("file"), - @SerializedName("hidden") - HIDDEN("hidden"); + @SerializedName("url") + URL("url"); @Getter(onMethod_ = {@Override}) private final String value; - Position(String value) { + Type(String value) { this.value = value; } } } - public enum Promotions implements ApiRequestParams.EnumParam { - @SerializedName("auto") - AUTO("auto"), + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Logo { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("none") - NONE("none"); + /** + * The ID of a File upload representing the + * logo. Purpose must be {@code business_logo}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; - @Getter(onMethod_ = {@Override}) - private final String value; + /** + * Required. The type of image for the logo. Must be one of {@code file} or + * {@code url}. + */ + @SerializedName("type") + Type type; - Promotions(String value) { - this.value = value; + /** The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. */ + @SerializedName("url") + String url; + + private Logo(Map extraParams, String file, Type type, String url) { + this.extraParams = extraParams; + this.file = file; + this.type = type; + this.url = url; } - } - public enum TermsOfService implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"), + public static Builder builder() { + return new Builder(); + } - @SerializedName("required") - REQUIRED("required"); + public static class Builder { + private Map extraParams; + + private String file; + + private Type type; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.BrandingSettings.Logo build() { + return new SessionCreateParams.BrandingSettings.Logo( + this.extraParams, this.file, this.type, this.url); + } + + /** + * Add a key/value pair to `extraParams` map. 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.BrandingSettings.Logo#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.BrandingSettings.Logo#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 a File upload representing the + * logo. Purpose must be {@code business_logo}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + public Builder setFile(String file) { + this.file = file; + return this; + } + + /** + * Required. The type of image for the logo. Must be one of {@code file} or + * {@code url}. + */ + public Builder setType(SessionCreateParams.BrandingSettings.Logo.Type type) { + this.type = type; + return this; + } + + /** + * The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. + */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("file") + FILE("file"), + + @SerializedName("url") + URL("url"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + public enum BorderStyle implements ApiRequestParams.EnumParam { + @SerializedName("pill") + PILL("pill"), + + @SerializedName("rectangular") + RECTANGULAR("rectangular"), + + @SerializedName("rounded") + ROUNDED("rounded"); @Getter(onMethod_ = {@Override}) private final String value; - TermsOfService(String value) { + BorderStyle(String value) { + this.value = value; + } + } + + public enum FontFamily implements ApiRequestParams.EnumParam { + @SerializedName("be_vietnam_pro") + BE_VIETNAM_PRO("be_vietnam_pro"), + + @SerializedName("bitter") + BITTER("bitter"), + + @SerializedName("chakra_petch") + CHAKRA_PETCH("chakra_petch"), + + @SerializedName("default") + DEFAULT("default"), + + @SerializedName("hahmlet") + HAHMLET("hahmlet"), + + @SerializedName("inconsolata") + INCONSOLATA("inconsolata"), + + @SerializedName("inter") + INTER("inter"), + + @SerializedName("lato") + LATO("lato"), + + @SerializedName("lora") + LORA("lora"), + + @SerializedName("m_plus_1_code") + M_PLUS_1_CODE("m_plus_1_code"), + + @SerializedName("montserrat") + MONTSERRAT("montserrat"), + + @SerializedName("noto_sans") + NOTO_SANS("noto_sans"), + + @SerializedName("noto_sans_jp") + NOTO_SANS_JP("noto_sans_jp"), + + @SerializedName("noto_serif") + NOTO_SERIF("noto_serif"), + + @SerializedName("nunito") + NUNITO("nunito"), + + @SerializedName("open_sans") + OPEN_SANS("open_sans"), + + @SerializedName("pridi") + PRIDI("pridi"), + + @SerializedName("pt_sans") + PT_SANS("pt_sans"), + + @SerializedName("pt_serif") + PT_SERIF("pt_serif"), + + @SerializedName("raleway") + RALEWAY("raleway"), + + @SerializedName("roboto") + ROBOTO("roboto"), + + @SerializedName("roboto_slab") + ROBOTO_SLAB("roboto_slab"), + + @SerializedName("source_sans_pro") + SOURCE_SANS_PRO("source_sans_pro"), + + @SerializedName("titillium_web") + TITILLIUM_WEB("titillium_web"), + + @SerializedName("ubuntu_mono") + UBUNTU_MONO("ubuntu_mono"), + + @SerializedName("zen_maru_gothic") + ZEN_MARU_GOTHIC("zen_maru_gothic"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FontFamily(String value) { this.value = value; } } @@ -1949,11 +2405,7 @@ public enum TermsOfService implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class CustomField { - /** Configuration for {@code type=dropdown} fields. */ - @SerializedName("dropdown") - Dropdown dropdown; - + public static class ConsentCollection { /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -1964,52 +2416,38 @@ public static class CustomField { Map extraParams; /** - * Required. String of your choice that your integration can use to reconcile - * this field. Must be unique to this field, alphanumeric, and up to 200 characters. + * Determines the display of payment method reuse agreement text in the UI. If set to {@code + * hidden}, it will hide legal text related to the reuse of a payment method. */ - @SerializedName("key") - String key; - - /** Required. The label for the field, displayed to the customer. */ - @SerializedName("label") - Label label; - - /** Configuration for {@code type=numeric} fields. */ - @SerializedName("numeric") - Numeric numeric; + @SerializedName("payment_method_reuse_agreement") + PaymentMethodReuseAgreement paymentMethodReuseAgreement; /** - * Whether the customer is required to complete the field before completing the Checkout - * Session. Defaults to {@code false}. + * If set to {@code auto}, enables the collection of customer consent for promotional + * communications. The Checkout Session will determine whether to display an option to opt into + * promotional communication from the merchant depending on the customer's locale. Only + * available to US merchants. */ - @SerializedName("optional") - Boolean optional; - - /** Configuration for {@code type=text} fields. */ - @SerializedName("text") - Text text; + @SerializedName("promotions") + Promotions promotions; - /** Required. The type of the field. */ - @SerializedName("type") - Type type; + /** + * If set to {@code required}, it requires customers to check a terms of service checkbox before + * being able to pay. There must be a valid terms of service URL set in your Dashboard settings. + */ + @SerializedName("terms_of_service") + TermsOfService termsOfService; - private CustomField( - Dropdown dropdown, + private ConsentCollection( Map extraParams, - String key, - Label label, - Numeric numeric, - Boolean optional, - Text text, - Type type) { - this.dropdown = dropdown; + PaymentMethodReuseAgreement paymentMethodReuseAgreement, + Promotions promotions, + TermsOfService termsOfService) { this.extraParams = extraParams; - this.key = key; - this.label = label; - this.numeric = numeric; - this.optional = optional; - this.text = text; - this.type = type; + this.paymentMethodReuseAgreement = paymentMethodReuseAgreement; + this.promotions = promotions; + this.termsOfService = termsOfService; } public static Builder builder() { @@ -2017,45 +2455,27 @@ public static Builder builder() { } public static class Builder { - private Dropdown dropdown; - private Map extraParams; - private String key; - - private Label label; - - private Numeric numeric; - - private Boolean optional; + private PaymentMethodReuseAgreement paymentMethodReuseAgreement; - private Text text; + private Promotions promotions; - private Type type; + private TermsOfService termsOfService; /** Finalize and obtain parameter instance from this builder. */ - public SessionCreateParams.CustomField build() { - return new SessionCreateParams.CustomField( - this.dropdown, + public SessionCreateParams.ConsentCollection build() { + return new SessionCreateParams.ConsentCollection( this.extraParams, - this.key, - this.label, - this.numeric, - this.optional, - this.text, - this.type); - } - - /** Configuration for {@code type=dropdown} fields. */ - public Builder setDropdown(SessionCreateParams.CustomField.Dropdown dropdown) { - this.dropdown = dropdown; - return this; + this.paymentMethodReuseAgreement, + this.promotions, + this.termsOfService); } /** * Add a key/value pair to `extraParams` map. 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.CustomField#extraParams} for the field documentation. + * SessionCreateParams.ConsentCollection#extraParams} for the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -2068,7 +2488,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 SessionCreateParams.CustomField#extraParams} for the field documentation. + * See {@link SessionCreateParams.ConsentCollection#extraParams} for the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -2079,34 +2499,330 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. String of your choice that your integration can use to reconcile - * this field. Must be unique to this field, alphanumeric, and up to 200 characters. + * Determines the display of payment method reuse agreement text in the UI. If set to {@code + * hidden}, it will hide legal text related to the reuse of a payment method. */ - public Builder setKey(String key) { - this.key = key; + public Builder setPaymentMethodReuseAgreement( + SessionCreateParams.ConsentCollection.PaymentMethodReuseAgreement + paymentMethodReuseAgreement) { + this.paymentMethodReuseAgreement = paymentMethodReuseAgreement; return this; } - /** Required. The label for the field, displayed to the customer. */ - public Builder setLabel(SessionCreateParams.CustomField.Label label) { - this.label = label; + /** + * If set to {@code auto}, enables the collection of customer consent for promotional + * communications. The Checkout Session will determine whether to display an option to opt + * into promotional communication from the merchant depending on the customer's locale. Only + * available to US merchants. + */ + public Builder setPromotions(SessionCreateParams.ConsentCollection.Promotions promotions) { + this.promotions = promotions; return this; } - /** Configuration for {@code type=numeric} fields. */ - public Builder setNumeric(SessionCreateParams.CustomField.Numeric numeric) { - this.numeric = numeric; + /** + * If set to {@code required}, it requires customers to check a terms of service checkbox + * before being able to pay. There must be a valid terms of service URL set in your Dashboard settings. + */ + public Builder setTermsOfService( + SessionCreateParams.ConsentCollection.TermsOfService termsOfService) { + this.termsOfService = termsOfService; return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodReuseAgreement { /** - * Whether the customer is required to complete the field before completing the Checkout - * Session. Defaults to {@code false}. + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. */ - public Builder setOptional(Boolean optional) { - this.optional = optional; - return this; - } + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Determines the position and visibility of the payment method + * reuse agreement in the UI. When set to {@code auto}, Stripe's defaults will be used. When + * set to {@code hidden}, the payment method reuse agreement text will always be hidden in the + * UI. + */ + @SerializedName("position") + Position position; + + private PaymentMethodReuseAgreement(Map extraParams, Position position) { + this.extraParams = extraParams; + this.position = position; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Position position; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.ConsentCollection.PaymentMethodReuseAgreement build() { + return new SessionCreateParams.ConsentCollection.PaymentMethodReuseAgreement( + this.extraParams, this.position); + } + + /** + * Add a key/value pair to `extraParams` map. 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.ConsentCollection.PaymentMethodReuseAgreement#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.ConsentCollection.PaymentMethodReuseAgreement#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. Determines the position and visibility of the payment method + * reuse agreement in the UI. When set to {@code auto}, Stripe's defaults will be used. When + * set to {@code hidden}, the payment method reuse agreement text will always be hidden in + * the UI. + */ + public Builder setPosition( + SessionCreateParams.ConsentCollection.PaymentMethodReuseAgreement.Position position) { + this.position = position; + return this; + } + } + + public enum Position implements ApiRequestParams.EnumParam { + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("hidden") + HIDDEN("hidden"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Position(String value) { + this.value = value; + } + } + } + + public enum Promotions implements ApiRequestParams.EnumParam { + @SerializedName("auto") + AUTO("auto"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Promotions(String value) { + this.value = value; + } + } + + public enum TermsOfService implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("required") + REQUIRED("required"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TermsOfService(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomField { + /** Configuration for {@code type=dropdown} fields. */ + @SerializedName("dropdown") + Dropdown dropdown; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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. String of your choice that your integration can use to reconcile + * this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ + @SerializedName("key") + String key; + + /** Required. The label for the field, displayed to the customer. */ + @SerializedName("label") + Label label; + + /** Configuration for {@code type=numeric} fields. */ + @SerializedName("numeric") + Numeric numeric; + + /** + * Whether the customer is required to complete the field before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + /** Configuration for {@code type=text} fields. */ + @SerializedName("text") + Text text; + + /** Required. The type of the field. */ + @SerializedName("type") + Type type; + + private CustomField( + Dropdown dropdown, + Map extraParams, + String key, + Label label, + Numeric numeric, + Boolean optional, + Text text, + Type type) { + this.dropdown = dropdown; + this.extraParams = extraParams; + this.key = key; + this.label = label; + this.numeric = numeric; + this.optional = optional; + this.text = text; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Dropdown dropdown; + + private Map extraParams; + + private String key; + + private Label label; + + private Numeric numeric; + + private Boolean optional; + + private Text text; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.CustomField build() { + return new SessionCreateParams.CustomField( + this.dropdown, + this.extraParams, + this.key, + this.label, + this.numeric, + this.optional, + this.text, + this.type); + } + + /** Configuration for {@code type=dropdown} fields. */ + public Builder setDropdown(SessionCreateParams.CustomField.Dropdown dropdown) { + this.dropdown = dropdown; + 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.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 SessionCreateParams.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. String of your choice that your integration can use to reconcile + * this field. Must be unique to this field, alphanumeric, and up to 200 characters. + */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** Required. The label for the field, displayed to the customer. */ + public Builder setLabel(SessionCreateParams.CustomField.Label label) { + this.label = label; + return this; + } + + /** Configuration for {@code type=numeric} fields. */ + public Builder setNumeric(SessionCreateParams.CustomField.Numeric numeric) { + this.numeric = numeric; + return this; + } + + /** + * Whether the customer is required to complete the field before completing the Checkout + * Session. Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } /** Configuration for {@code type=text} fields. */ public Builder setText(SessionCreateParams.CustomField.Text text) { @@ -3467,7 +4183,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}. @@ -4058,9 +4774,10 @@ 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. + * following countries: US, GB, AU, and all countries in the EU. You can't set this parameter if + * {@code ui_mode} is {@code custom}. */ @SerializedName("dynamic_tax_rates") List dynamicTaxRates; @@ -4075,15 +4792,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") @@ -4097,7 +4823,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") @@ -4107,6 +4833,7 @@ private LineItem( AdjustableQuantity adjustableQuantity, List dynamicTaxRates, Map extraParams, + Map metadata, String price, PriceData priceData, Long quantity, @@ -4114,6 +4841,7 @@ private LineItem( this.adjustableQuantity = adjustableQuantity; this.dynamicTaxRates = dynamicTaxRates; this.extraParams = extraParams; + this.metadata = metadata; this.price = price; this.priceData = priceData; this.quantity = quantity; @@ -4131,6 +4859,8 @@ public static class Builder { private Map extraParams; + private Map metadata; + private String price; private PriceData priceData; @@ -4145,6 +4875,7 @@ public SessionCreateParams.LineItem build() { this.adjustableQuantity, this.dynamicTaxRates, this.extraParams, + this.metadata, this.price, this.priceData, this.quantity, @@ -4201,21 +4932,47 @@ public Builder putExtraParam(String key, Object value) { } /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * Add all map key/value pairs to `extraParams` map. 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#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 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#extraParams} for the field documentation. + * See {@link SessionCreateParams.LineItem#metadata} for the field documentation. */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + public Builder putAllMetadata(Map map) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); } - this.extraParams.putAll(map); + this.metadata.putAll(map); return this; } /** - * 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) { @@ -4224,7 +4981,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) { @@ -4428,7 +5185,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 @@ -4573,7 +5330,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 @@ -4634,7 +5391,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}. @@ -4648,23 +5405,32 @@ public static class ProductData { @SerializedName("name") String name; - /** A tax code ID. */ + /** A tax code ID. */ @SerializedName("tax_code") String 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") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String 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() { @@ -4684,6 +5450,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.LineItem.PriceData.ProductData build() { return new SessionCreateParams.LineItem.PriceData.ProductData( @@ -4692,7 +5460,8 @@ public SessionCreateParams.LineItem.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -4795,11 +5564,20 @@ 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; } + + /** + * 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; + } } } @@ -4903,43 +5681,321 @@ public Builder setIntervalCount(Long intervalCount) { } } - 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 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 NameCollection { + /** Controls settings applied for collecting the customer's business name on the session. */ + @SerializedName("business") + Business business; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls settings applied for collecting the customer's individual name on the session. */ + @SerializedName("individual") + Individual individual; + + private NameCollection( + Business business, Map extraParams, Individual individual) { + this.business = business; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Business business; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.NameCollection build() { + return new SessionCreateParams.NameCollection( + this.business, this.extraParams, this.individual); + } + + /** Controls settings applied for collecting the customer's business name on the session. */ + public Builder setBusiness(SessionCreateParams.NameCollection.Business business) { + this.business = business; + 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.NameCollection#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.NameCollection#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Controls settings applied for collecting the customer's individual name on the session. */ + public Builder setIndividual(SessionCreateParams.NameCollection.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Business { + /** + * Required. Enable business name collection on the Checkout Session. + * Defaults to {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide a business name before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Business(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.NameCollection.Business build() { + return new SessionCreateParams.NameCollection.Business( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable business name collection on the Checkout Session. + * Defaults to {@code false}. + */ + 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 SessionCreateParams.NameCollection.Business#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.NameCollection.Business#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 customer is required to provide a business name before completing the + * Checkout Session. Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** + * Required. Enable individual name collection on the Checkout Session. + * Defaults to {@code false}. + */ + @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; + + /** + * Whether the customer is required to provide their name before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Individual(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.NameCollection.Individual build() { + return new SessionCreateParams.NameCollection.Individual( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable individual name collection on the Checkout Session. + * Defaults to {@code false}. + */ + 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 SessionCreateParams.NameCollection.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 SessionCreateParams.NameCollection.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; } - } - - 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; + /** + * Whether the customer is required to provide their name before completing the Checkout + * Session. Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; } } } @@ -4966,8 +6022,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; @@ -5047,8 +6103,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; @@ -5194,7 +6250,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") @@ -5218,7 +6274,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}. @@ -5244,7 +6300,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 @@ -5296,7 +6352,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") @@ -5304,7 +6360,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") @@ -5393,7 +6449,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) { @@ -5488,7 +6544,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 @@ -5550,7 +6606,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( @@ -5561,7 +6617,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) { @@ -5735,11 +6791,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -5747,7 +6805,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; @@ -5842,13 +6903,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5860,7 +6923,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; @@ -6097,7 +7163,10 @@ public enum AllowRedisplay implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class PaymentMethodOptions { - /** contains details about the ACSS Debit payment method options. */ + /** + * contains details about the ACSS Debit payment method options. You can't set this parameter if + * {@code ui_mode} is {@code custom}. + */ @SerializedName("acss_debit") AcssDebit acssDebit; @@ -6113,6 +7182,10 @@ public static class PaymentMethodOptions { @SerializedName("alipay") Alipay alipay; + /** contains details about the Alma payment method options. */ + @SerializedName("alma") + Alma alma; + /** contains details about the AmazonPay payment method options. */ @SerializedName("amazon_pay") AmazonPay amazonPay; @@ -6129,6 +7202,10 @@ public static class PaymentMethodOptions { @SerializedName("bancontact") Bancontact bancontact; + /** contains details about the Billie payment method options. */ + @SerializedName("billie") + Billie billie; + /** contains details about the Boleto payment method options. */ @SerializedName("boleto") Boleto boleto; @@ -6145,6 +7222,10 @@ public static class PaymentMethodOptions { @SerializedName("customer_balance") CustomerBalance customerBalance; + /** contains details about the DemoPay payment method options. */ + @SerializedName("demo_pay") + DemoPay demoPay; + /** contains details about the EPS payment method options. */ @SerializedName("eps") Eps eps; @@ -6230,6 +7311,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; @@ -6242,6 +7327,10 @@ public static class PaymentMethodOptions { @SerializedName("samsung_pay") SamsungPay samsungPay; + /** contains details about the Satispay payment method options. */ + @SerializedName("satispay") + Satispay satispay; + /** contains details about the Sepa Debit payment method options. */ @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -6254,6 +7343,10 @@ public static class PaymentMethodOptions { @SerializedName("swish") Swish swish; + /** contains details about the TWINT payment method options. */ + @SerializedName("twint") + Twint twint; + /** contains details about the Us Bank Account payment method options. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; @@ -6267,14 +7360,17 @@ private PaymentMethodOptions( Affirm affirm, AfterpayClearpay afterpayClearpay, Alipay alipay, + Alma alma, AmazonPay amazonPay, AuBecsDebit auBecsDebit, BacsDebit bacsDebit, Bancontact bancontact, + Billie billie, Boleto boleto, Card card, Cashapp cashapp, CustomerBalance customerBalance, + DemoPay demoPay, Eps eps, Map extraParams, Fpx fpx, @@ -6295,26 +7391,32 @@ private PaymentMethodOptions( Payco payco, Paynow paynow, Paypal paypal, + Payto payto, Pix pix, RevolutPay revolutPay, SamsungPay samsungPay, + Satispay satispay, SepaDebit sepaDebit, Sofort sofort, Swish swish, + Twint twint, UsBankAccount usBankAccount, WechatPay wechatPay) { this.acssDebit = acssDebit; this.affirm = affirm; this.afterpayClearpay = afterpayClearpay; this.alipay = alipay; + this.alma = alma; this.amazonPay = amazonPay; this.auBecsDebit = auBecsDebit; this.bacsDebit = bacsDebit; this.bancontact = bancontact; + this.billie = billie; this.boleto = boleto; this.card = card; this.cashapp = cashapp; this.customerBalance = customerBalance; + this.demoPay = demoPay; this.eps = eps; this.extraParams = extraParams; this.fpx = fpx; @@ -6335,12 +7437,15 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.payto = payto; this.pix = pix; this.revolutPay = revolutPay; this.samsungPay = samsungPay; + this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; this.swish = swish; + this.twint = twint; this.usBankAccount = usBankAccount; this.wechatPay = wechatPay; } @@ -6358,6 +7463,8 @@ public static class Builder { private Alipay alipay; + private Alma alma; + private AmazonPay amazonPay; private AuBecsDebit auBecsDebit; @@ -6366,6 +7473,8 @@ public static class Builder { private Bancontact bancontact; + private Billie billie; + private Boleto boleto; private Card card; @@ -6374,6 +7483,8 @@ public static class Builder { private CustomerBalance customerBalance; + private DemoPay demoPay; + private Eps eps; private Map extraParams; @@ -6414,18 +7525,24 @@ public static class Builder { private Paypal paypal; + private Payto payto; + private Pix pix; private RevolutPay revolutPay; private SamsungPay samsungPay; + private Satispay satispay; + private SepaDebit sepaDebit; private Sofort sofort; private Swish swish; + private Twint twint; + private UsBankAccount usBankAccount; private WechatPay wechatPay; @@ -6437,14 +7554,17 @@ public SessionCreateParams.PaymentMethodOptions build() { this.affirm, this.afterpayClearpay, this.alipay, + this.alma, this.amazonPay, this.auBecsDebit, this.bacsDebit, this.bancontact, + this.billie, this.boleto, this.card, this.cashapp, this.customerBalance, + this.demoPay, this.eps, this.extraParams, this.fpx, @@ -6465,17 +7585,23 @@ public SessionCreateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.payto, this.pix, this.revolutPay, this.samsungPay, + this.satispay, this.sepaDebit, this.sofort, this.swish, + this.twint, this.usBankAccount, this.wechatPay); } - /** contains details about the ACSS Debit payment method options. */ + /** + * contains details about the ACSS Debit payment method options. You can't set this parameter + * if {@code ui_mode} is {@code custom}. + */ public Builder setAcssDebit(SessionCreateParams.PaymentMethodOptions.AcssDebit acssDebit) { this.acssDebit = acssDebit; return this; @@ -6500,6 +7626,12 @@ public Builder setAlipay(SessionCreateParams.PaymentMethodOptions.Alipay alipay) return this; } + /** contains details about the Alma payment method options. */ + public Builder setAlma(SessionCreateParams.PaymentMethodOptions.Alma alma) { + this.alma = alma; + return this; + } + /** contains details about the AmazonPay payment method options. */ public Builder setAmazonPay(SessionCreateParams.PaymentMethodOptions.AmazonPay amazonPay) { this.amazonPay = amazonPay; @@ -6525,6 +7657,12 @@ public Builder setBancontact(SessionCreateParams.PaymentMethodOptions.Bancontact return this; } + /** contains details about the Billie payment method options. */ + public Builder setBillie(SessionCreateParams.PaymentMethodOptions.Billie billie) { + this.billie = billie; + return this; + } + /** contains details about the Boleto payment method options. */ public Builder setBoleto(SessionCreateParams.PaymentMethodOptions.Boleto boleto) { this.boleto = boleto; @@ -6550,6 +7688,12 @@ public Builder setCustomerBalance( return this; } + /** contains details about the DemoPay payment method options. */ + public Builder setDemoPay(SessionCreateParams.PaymentMethodOptions.DemoPay demoPay) { + this.demoPay = demoPay; + return this; + } + /** contains details about the EPS payment method options. */ public Builder setEps(SessionCreateParams.PaymentMethodOptions.Eps eps) { this.eps = eps; @@ -6691,6 +7835,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; @@ -6709,6 +7859,12 @@ public Builder setSamsungPay(SessionCreateParams.PaymentMethodOptions.SamsungPay return this; } + /** contains details about the Satispay payment method options. */ + public Builder setSatispay(SessionCreateParams.PaymentMethodOptions.Satispay satispay) { + this.satispay = satispay; + return this; + } + /** contains details about the Sepa Debit payment method options. */ public Builder setSepaDebit(SessionCreateParams.PaymentMethodOptions.SepaDebit sepaDebit) { this.sepaDebit = sepaDebit; @@ -6727,6 +7883,12 @@ public Builder setSwish(SessionCreateParams.PaymentMethodOptions.Swish swish) { return this; } + /** contains details about the TWINT payment method options. */ + public Builder setTwint(SessionCreateParams.PaymentMethodOptions.Twint twint) { + this.twint = twint; + return this; + } + /** contains details about the Us Bank Account payment method options. */ public Builder setUsBankAccount( SessionCreateParams.PaymentMethodOptions.UsBankAccount usBankAccount) { @@ -7237,6 +8399,10 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Affirm { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -7268,7 +8434,11 @@ public static class Affirm { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Affirm(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Affirm( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -7278,6 +8448,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -7285,7 +8457,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Affirm build() { return new SessionCreateParams.PaymentMethodOptions.Affirm( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -7343,6 +8522,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -7359,6 +8550,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class AfterpayClearpay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -7390,7 +8585,11 @@ public static class AfterpayClearpay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AfterpayClearpay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private AfterpayClearpay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -7400,6 +8599,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -7407,7 +8608,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.AfterpayClearpay build() { return new SessionCreateParams.PaymentMethodOptions.AfterpayClearpay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -7466,6 +8674,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -7601,9 +8821,98 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Alma { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Alma(CaptureMethod captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Alma build() { + return new SessionCreateParams.PaymentMethodOptions.Alma( + this.captureMethod, this.extraParams); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + 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.Alma#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Alma#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 CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class AmazonPay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -7635,7 +8944,11 @@ public static class AmazonPay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AmazonPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private AmazonPay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -7645,6 +8958,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -7652,7 +8967,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.AmazonPay build() { return new SessionCreateParams.PaymentMethodOptions.AmazonPay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -7710,6 +9032,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -8253,6 +9587,91 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billie { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Billie(CaptureMethod captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Billie build() { + return new SessionCreateParams.PaymentMethodOptions.Billie( + this.captureMethod, this.extraParams); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + 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.Billie#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Billie#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 CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Boleto { @@ -8408,6 +9827,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Card { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -8453,11 +9876,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. */ @@ -8466,7 +9889,7 @@ public static class Card { /** * Restrictions to apply to the card payment method. For example, you can block specific card - * brands. + * brands. You can't set this parameter if {@code ui_mode} is {@code custom}. */ @SerializedName("restrictions") Restrictions restrictions; @@ -8514,6 +9937,7 @@ public static class Card { String statementDescriptorSuffixKanji; private Card( + CaptureMethod captureMethod, Map extraParams, Installments installments, RequestExtendedAuthorization requestExtendedAuthorization, @@ -8525,6 +9949,7 @@ private Card( SetupFutureUsage setupFutureUsage, String statementDescriptorSuffixKana, String statementDescriptorSuffixKanji) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.installments = installments; this.requestExtendedAuthorization = requestExtendedAuthorization; @@ -8543,6 +9968,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Installments installments; @@ -8568,6 +9995,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Card build() { return new SessionCreateParams.PaymentMethodOptions.Card( + this.captureMethod, this.extraParams, this.installments, this.requestExtendedAuthorization, @@ -8581,6 +10009,13 @@ public SessionCreateParams.PaymentMethodOptions.Card build() { this.statementDescriptorSuffixKanji); } + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + 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 @@ -8662,11 +10097,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. */ @@ -8678,7 +10113,7 @@ public Builder setRequestThreeDSecure( /** * Restrictions to apply to the card payment method. For example, you can block specific - * card brands. + * card brands. You can't set this parameter if {@code ui_mode} is {@code custom}. */ public Builder setRestrictions( SessionCreateParams.PaymentMethodOptions.Card.Restrictions restrictions) { @@ -8943,6 +10378,18 @@ public enum BrandsBlocked implements ApiRequestParams.EnumParam { } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum RequestExtendedAuthorization implements ApiRequestParams.EnumParam { @SerializedName("if_available") IF_AVAILABLE("if_available"), @@ -9040,6 +10487,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Cashapp { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9071,7 +10522,11 @@ public static class Cashapp { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Cashapp(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Cashapp( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -9081,6 +10536,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -9088,7 +10545,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Cashapp build() { return new SessionCreateParams.PaymentMethodOptions.Cashapp( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Cashapp.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -9146,6 +10610,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -9643,6 +11119,131 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DemoPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private DemoPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.DemoPay build() { + return new SessionCreateParams.PaymentMethodOptions.DemoPay( + this.extraParams, 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.DemoPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.DemoPay#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. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.DemoPay.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + 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 Eps { @@ -10410,6 +12011,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Klarna { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -10446,9 +12051,11 @@ public static class Klarna { Object subscriptions; private Klarna( + CaptureMethod captureMethod, Map extraParams, SetupFutureUsage setupFutureUsage, Object subscriptions) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; this.subscriptions = subscriptions; @@ -10459,6 +12066,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -10468,7 +12077,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Klarna build() { return new SessionCreateParams.PaymentMethodOptions.Klarna( - this.extraParams, this.setupFutureUsage, this.subscriptions); + this.captureMethod, this.extraParams, this.setupFutureUsage, this.subscriptions); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -10846,6 +12462,18 @@ public enum Interval implements ApiRequestParams.EnumParam { } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -11164,6 +12792,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Link { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -11195,7 +12827,11 @@ public static class Link { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Link(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Link( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -11205,6 +12841,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -11212,7 +12850,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Link build() { return new SessionCreateParams.PaymentMethodOptions.Link( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Link.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -11270,6 +12915,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -11289,6 +12946,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -11320,7 +12981,11 @@ public static class Mobilepay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Mobilepay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Mobilepay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -11330,6 +12995,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -11337,7 +13004,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Mobilepay build() { return new SessionCreateParams.PaymentMethodOptions.Mobilepay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Mobilepay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -11395,6 +13069,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -12157,18 +13843,203 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private SetupFutureUsage setupFutureUsage; + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Paynow build() { + return new SessionCreateParams.PaymentMethodOptions.Paynow( + this.extraParams, 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.Paynow#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Paynow#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. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.Paynow.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypal { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Preferred locale of + * the PayPal checkout page that the customer is redirected to. + */ + @SerializedName("preferred_locale") + PreferredLocale preferredLocale; + + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's + * invoice ID. This must be a globally unique ID if you have configured in your PayPal + * settings to block multiple payments per invoice ID. + */ + @SerializedName("reference") + String reference; + + /** The risk correlation ID for an on-session payment using a saved PayPal payment method. */ + @SerializedName("risk_correlation_id") + String riskCorrelationId; + + /** + * 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 Paypal( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + PreferredLocale preferredLocale, + String reference, + String riskCorrelationId, + ApiRequestParams.EnumParam setupFutureUsage) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + this.preferredLocale = preferredLocale; + this.reference = reference; + this.riskCorrelationId = riskCorrelationId; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + private PreferredLocale preferredLocale; + + private String reference; + + private String riskCorrelationId; + + private ApiRequestParams.EnumParam setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public SessionCreateParams.PaymentMethodOptions.Paynow build() { - return new SessionCreateParams.PaymentMethodOptions.Paynow( - this.extraParams, this.setupFutureUsage); + public SessionCreateParams.PaymentMethodOptions.Paypal build() { + return new SessionCreateParams.PaymentMethodOptions.Paypal( + this.captureMethod, + this.extraParams, + this.preferredLocale, + this.reference, + this.riskCorrelationId, + this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Paypal.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + 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.Paynow#extraParams} for the + * map. See {@link SessionCreateParams.PaymentMethodOptions.Paypal#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12182,7 +14053,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 SessionCreateParams.PaymentMethodOptions.Paynow#extraParams} for the + * map. See {@link SessionCreateParams.PaymentMethodOptions.Paypal#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12193,6 +14064,34 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Preferred locale + * of the PayPal checkout page that the customer is redirected to. + */ + public Builder setPreferredLocale( + SessionCreateParams.PaymentMethodOptions.Paypal.PreferredLocale preferredLocale) { + this.preferredLocale = preferredLocale; + return this; + } + + /** + * A reference of the PayPal transaction visible to customer which is mapped to PayPal's + * invoice ID. This must be a globally unique ID if you have configured in your PayPal + * settings to block multiple payments per invoice ID. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + + /** + * The risk correlation ID for an on-session payment using a saved PayPal payment method. + */ + public Builder setRiskCorrelationId(String riskCorrelationId) { + this.riskCorrelationId = riskCorrelationId; + return this; + } + /** * Indicates that you intend to make future payments with this PaymentIntent's payment * method. @@ -12212,17 +14111,137 @@ public Builder putAllExtraParam(Map map) { *

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( - SessionCreateParams.PaymentMethodOptions.Paynow.SetupFutureUsage setupFutureUsage) { + SessionCreateParams.PaymentMethodOptions.Paypal.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; } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + + public enum PreferredLocale implements ApiRequestParams.EnumParam { + @SerializedName("cs-CZ") + CS_CZ("cs-CZ"), + + @SerializedName("da-DK") + DA_DK("da-DK"), + + @SerializedName("de-AT") + DE_AT("de-AT"), + + @SerializedName("de-DE") + DE_DE("de-DE"), + + @SerializedName("de-LU") + DE_LU("de-LU"), + + @SerializedName("el-GR") + EL_GR("el-GR"), + + @SerializedName("en-GB") + EN_GB("en-GB"), + + @SerializedName("en-US") + EN_US("en-US"), + + @SerializedName("es-ES") + ES_ES("es-ES"), + + @SerializedName("fi-FI") + FI_FI("fi-FI"), + + @SerializedName("fr-BE") + FR_BE("fr-BE"), + + @SerializedName("fr-FR") + FR_FR("fr-FR"), + + @SerializedName("fr-LU") + FR_LU("fr-LU"), + + @SerializedName("hu-HU") + HU_HU("hu-HU"), + + @SerializedName("it-IT") + IT_IT("it-IT"), + + @SerializedName("nl-BE") + NL_BE("nl-BE"), + + @SerializedName("nl-NL") + NL_NL("nl-NL"), + + @SerializedName("pl-PL") + PL_PL("pl-PL"), + + @SerializedName("pt-PT") + PT_PT("pt-PT"), + + @SerializedName("sk-SK") + SK_SK("sk-SK"), + + @SerializedName("sv-SE") + SV_SE("sv-SE"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PreferredLocale(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -12235,11 +14254,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class Paypal { - /** Controls when the funds will be captured from the customer's account. */ - @SerializedName("capture_method") - ApiRequestParams.EnumParam captureMethod; - + 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. @@ -12249,24 +14264,9 @@ public static class Paypal { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * Preferred locale of - * the PayPal checkout page that the customer is redirected to. - */ - @SerializedName("preferred_locale") - PreferredLocale preferredLocale; - - /** - * A reference of the PayPal transaction visible to customer which is mapped to PayPal's - * invoice ID. This must be a globally unique ID if you have configured in your PayPal - * settings to block multiple payments per invoice ID. - */ - @SerializedName("reference") - String reference; - - /** The risk correlation ID for an on-session payment using a saved PayPal payment method. */ - @SerializedName("risk_correlation_id") - String riskCorrelationId; + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -12286,26 +14286,16 @@ public static class Paypal { *

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; + SetupFutureUsage setupFutureUsage; - private Paypal( - ApiRequestParams.EnumParam captureMethod, + private Payto( Map extraParams, - PreferredLocale preferredLocale, - String reference, - String riskCorrelationId, - ApiRequestParams.EnumParam setupFutureUsage) { - this.captureMethod = captureMethod; + MandateOptions mandateOptions, + SetupFutureUsage setupFutureUsage) { this.extraParams = extraParams; - this.preferredLocale = preferredLocale; - this.reference = reference; - this.riskCorrelationId = riskCorrelationId; + this.mandateOptions = mandateOptions; this.setupFutureUsage = setupFutureUsage; } @@ -12314,47 +14304,23 @@ public static Builder builder() { } public static class Builder { - private ApiRequestParams.EnumParam captureMethod; - private Map extraParams; - private PreferredLocale preferredLocale; - - private String reference; - - private String riskCorrelationId; + private MandateOptions mandateOptions; - private ApiRequestParams.EnumParam setupFutureUsage; + private SetupFutureUsage setupFutureUsage; /** Finalize and obtain parameter instance from this builder. */ - public SessionCreateParams.PaymentMethodOptions.Paypal build() { - return new SessionCreateParams.PaymentMethodOptions.Paypal( - this.captureMethod, - this.extraParams, - this.preferredLocale, - this.reference, - this.riskCorrelationId, - this.setupFutureUsage); - } - - /** Controls when the funds will be captured from the customer's account. */ - public Builder setCaptureMethod( - SessionCreateParams.PaymentMethodOptions.Paypal.CaptureMethod captureMethod) { - this.captureMethod = captureMethod; - return this; - } - - /** Controls when the funds will be captured from the customer's account. */ - public Builder setCaptureMethod(EmptyParam captureMethod) { - this.captureMethod = captureMethod; - return this; + 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.Paypal#extraParams} for the - * field documentation. + * map. See {@link SessionCreateParams.PaymentMethodOptions.Payto#extraParams} for the field + * documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -12367,8 +14333,8 @@ 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 SessionCreateParams.PaymentMethodOptions.Paypal#extraParams} for the - * field documentation. + * map. See {@link SessionCreateParams.PaymentMethodOptions.Payto#extraParams} for the field + * documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12378,31 +14344,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * Preferred locale - * of the PayPal checkout page that the customer is redirected to. - */ - public Builder setPreferredLocale( - SessionCreateParams.PaymentMethodOptions.Paypal.PreferredLocale preferredLocale) { - this.preferredLocale = preferredLocale; - return this; - } - - /** - * A reference of the PayPal transaction visible to customer which is mapped to PayPal's - * invoice ID. This must be a globally unique ID if you have configured in your PayPal - * settings to block multiple payments per invoice ID. - */ - public Builder setReference(String reference) { - this.reference = reference; - return this; - } - - /** - * The risk correlation ID for an on-session payment using a saved PayPal payment method. - */ - public Builder setRiskCorrelationId(String riskCorrelationId) { - this.riskCorrelationId = riskCorrelationId; + /** Additional fields for Mandate creation. */ + public Builder setMandateOptions( + SessionCreateParams.PaymentMethodOptions.Payto.MandateOptions mandateOptions) { + this.mandateOptions = mandateOptions; return this; } @@ -12425,128 +14370,374 @@ public Builder setRiskCorrelationId(String riskCorrelationId) { *

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( - SessionCreateParams.PaymentMethodOptions.Paypal.SetupFutureUsage setupFutureUsage) { + SessionCreateParams.PaymentMethodOptions.Payto.SetupFutureUsage setupFutureUsage) { this.setupFutureUsage = setupFutureUsage; return this; } + } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class 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}. + * Amount that will be collected. It is required when {@code amount_type} is {@code fixed}. */ - public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { - this.setupFutureUsage = setupFutureUsage; - return this; + @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 enum CaptureMethod implements ApiRequestParams.EnumParam { - @SerializedName("manual") - MANUAL("manual"); + public static Builder builder() { + return new Builder(); + } - @Getter(onMethod_ = {@Override}) - private final String value; + public static class Builder { + private Object amount; - CaptureMethod(String value) { - this.value = value; + 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 PreferredLocale implements ApiRequestParams.EnumParam { - @SerializedName("cs-CZ") - CS_CZ("cs-CZ"), + public enum AmountType implements ApiRequestParams.EnumParam { + @SerializedName("fixed") + FIXED("fixed"), - @SerializedName("da-DK") - DA_DK("da-DK"), + @SerializedName("maximum") + MAXIMUM("maximum"); - @SerializedName("de-AT") - DE_AT("de-AT"), + @Getter(onMethod_ = {@Override}) + private final String value; - @SerializedName("de-DE") - DE_DE("de-DE"), + AmountType(String value) { + this.value = value; + } + } - @SerializedName("de-LU") - DE_LU("de-LU"), + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("adhoc") + ADHOC("adhoc"), - @SerializedName("el-GR") - EL_GR("el-GR"), + @SerializedName("annual") + ANNUAL("annual"), - @SerializedName("en-GB") - EN_GB("en-GB"), + @SerializedName("daily") + DAILY("daily"), - @SerializedName("en-US") - EN_US("en-US"), + @SerializedName("fortnightly") + FORTNIGHTLY("fortnightly"), - @SerializedName("es-ES") - ES_ES("es-ES"), + @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; - @SerializedName("fi-FI") - FI_FI("fi-FI"), + PaymentSchedule(String value) { + this.value = value; + } + } - @SerializedName("fr-BE") - FR_BE("fr-BE"), + public enum Purpose implements ApiRequestParams.EnumParam { + @SerializedName("dependant_support") + DEPENDANT_SUPPORT("dependant_support"), - @SerializedName("fr-FR") - FR_FR("fr-FR"), + @SerializedName("government") + GOVERNMENT("government"), - @SerializedName("fr-LU") - FR_LU("fr-LU"), + @SerializedName("loan") + LOAN("loan"), - @SerializedName("hu-HU") - HU_HU("hu-HU"), + @SerializedName("mortgage") + MORTGAGE("mortgage"), - @SerializedName("it-IT") - IT_IT("it-IT"), + @SerializedName("other") + OTHER("other"), - @SerializedName("nl-BE") - NL_BE("nl-BE"), + @SerializedName("pension") + PENSION("pension"), - @SerializedName("nl-NL") - NL_NL("nl-NL"), + @SerializedName("personal") + PERSONAL("personal"), - @SerializedName("pl-PL") - PL_PL("pl-PL"), + @SerializedName("retail") + RETAIL("retail"), - @SerializedName("pt-PT") - PT_PT("pt-PT"), + @SerializedName("salary") + SALARY("salary"), - @SerializedName("sk-SK") - SK_SK("sk-SK"), + @SerializedName("tax") + TAX("tax"), - @SerializedName("sv-SE") - SV_SE("sv-SE"); + @SerializedName("utility") + UTILITY("utility"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - PreferredLocale(String value) { - this.value = value; + Purpose(String value) { + this.value = value; + } } } @@ -12746,6 +14937,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class RevolutPay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12777,7 +14972,11 @@ public static class RevolutPay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private RevolutPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private RevolutPay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -12787,6 +14986,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -12794,7 +14995,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.RevolutPay build() { return new SessionCreateParams.PaymentMethodOptions.RevolutPay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.RevolutPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -12852,6 +15060,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -12953,6 +15173,91 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Satispay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Satispay(CaptureMethod captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Satispay build() { + return new SessionCreateParams.PaymentMethodOptions.Satispay( + this.captureMethod, this.extraParams); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Satispay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + 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.Satispay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Satispay#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 CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -13402,13 +15707,135 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * The order reference that will be displayed to customers in the Swish application. - * Defaults to the {@code id} of the Payment Intent. - */ - public Builder setReference(String reference) { - this.reference = reference; - return this; + /** + * The order reference that will be displayed to customers in the Swish application. + * Defaults to the {@code id} of the Payment Intent. + */ + public Builder setReference(String reference) { + this.reference = reference; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Twint { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. + */ + @SerializedName("setup_future_usage") + SetupFutureUsage setupFutureUsage; + + private Twint(Map extraParams, SetupFutureUsage setupFutureUsage) { + this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private SetupFutureUsage setupFutureUsage; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Twint build() { + return new SessionCreateParams.PaymentMethodOptions.Twint( + this.extraParams, 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.Twint#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Twint#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. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.Twint.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; } } } @@ -14391,7 +16818,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}. @@ -15440,7 +17867,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}. @@ -15456,7 +17883,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") @@ -15615,7 +18042,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) { @@ -16291,7 +18718,10 @@ public static class SubscriptionData { @SerializedName("application_fee_percent") BigDecimal applicationFeePercent; - /** A future timestamp to anchor the subscription's billing cycle for new subscriptions. */ + /** + * A future timestamp to anchor the subscription's billing cycle for new subscriptions. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("billing_cycle_anchor") Long billingCycleAnchor; @@ -16310,7 +18740,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; @@ -16329,7 +18759,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}. @@ -16469,7 +18899,10 @@ public Builder setApplicationFeePercent(BigDecimal applicationFeePercent) { return this; } - /** A future timestamp to anchor the subscription's billing cycle for new subscriptions. */ + /** + * A future timestamp to anchor the subscription's billing cycle for new subscriptions. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setBillingCycleAnchor(Long billingCycleAnchor) { this.billingCycleAnchor = billingCycleAnchor; return this; @@ -16510,7 +18943,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; @@ -16640,15 +19073,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -16659,11 +19097,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.SubscriptionData.BillingMode build() { - return new SessionCreateParams.SubscriptionData.BillingMode(this.extraParams, this.type); + return new SessionCreateParams.SubscriptionData.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -16694,9 +19135,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + SessionCreateParams.SubscriptionData.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(SessionCreateParams.SubscriptionData.BillingMode.Type type) { this.type = type; @@ -16704,6 +19152,100 @@ public Builder setType(SessionCreateParams.SubscriptionData.BillingMode.Type typ } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.SubscriptionData.BillingMode.Flexible build() { + return new SessionCreateParams.SubscriptionData.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. 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.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SessionCreateParams.SubscriptionData.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -17213,7 +19755,10 @@ public static class TaxIdCollection { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You can't + * set this parameter if {@code ui_mode} is {@code custom}. + */ @SerializedName("required") Required required; @@ -17275,7 +19820,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Describes whether a tax ID is required during checkout. Defaults to {@code never}. */ + /** + * Describes whether a tax ID is required during checkout. Defaults to {@code never}. You + * can't set this parameter if {@code ui_mode} is {@code custom}. + */ public Builder setRequired(SessionCreateParams.TaxIdCollection.Required required) { this.required = required; return this; @@ -17491,6 +20039,162 @@ public enum CustomerCreation implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum Locale implements ApiRequestParams.EnumParam { @SerializedName("auto") AUTO("auto"), @@ -17750,6 +20454,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("link") LINK("link"), + @SerializedName("mb_way") + MB_WAY("mb_way"), + @SerializedName("mobilepay") MOBILEPAY("mobilepay"), @@ -17780,6 +20487,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 a48b892252b..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}. @@ -423,11 +475,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -435,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; @@ -547,25 +604,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -583,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; @@ -599,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 { @@ -723,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}. @@ -739,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") @@ -907,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) { @@ -916,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 f0f905606c0..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; @@ -62,13 +62,20 @@ public class AuthorizationCreateParams extends ApiRequestParams { @SerializedName("fleet") Fleet fleet; + /** + * Probability that this transaction can be disputed in the event of fraud. Assessed by comparing + * the characteristics of the authorization to card network rules. + */ + @SerializedName("fraud_disputability_likelihood") + FraudDisputabilityLikelihood fraudDisputabilityLikelihood; + /** Information about fuel that was purchased with this transaction. */ @SerializedName("fuel") 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. */ @SerializedName("is_amount_controllable") @@ -76,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; @@ -100,6 +107,10 @@ public class AuthorizationCreateParams extends ApiRequestParams { @SerializedName("network_data") NetworkData networkData; + /** Stripe’s assessment of the fraud risk for this authorization. */ + @SerializedName("risk_assessment") + RiskAssessment riskAssessment; + /** * Verifications that Stripe performed on information that the cardholder provided to the * merchant. @@ -123,12 +134,14 @@ private AuthorizationCreateParams( List expand, Map extraParams, Fleet fleet, + FraudDisputabilityLikelihood fraudDisputabilityLikelihood, Fuel fuel, Boolean isAmountControllable, Long merchantAmount, String merchantCurrency, MerchantData merchantData, NetworkData networkData, + RiskAssessment riskAssessment, VerificationData verificationData, Wallet wallet) { this.amount = amount; @@ -139,12 +152,14 @@ private AuthorizationCreateParams( this.expand = expand; this.extraParams = extraParams; this.fleet = fleet; + this.fraudDisputabilityLikelihood = fraudDisputabilityLikelihood; this.fuel = fuel; this.isAmountControllable = isAmountControllable; this.merchantAmount = merchantAmount; this.merchantCurrency = merchantCurrency; this.merchantData = merchantData; this.networkData = networkData; + this.riskAssessment = riskAssessment; this.verificationData = verificationData; this.wallet = wallet; } @@ -170,6 +185,8 @@ public static class Builder { private Fleet fleet; + private FraudDisputabilityLikelihood fraudDisputabilityLikelihood; + private Fuel fuel; private Boolean isAmountControllable; @@ -182,6 +199,8 @@ public static class Builder { private NetworkData networkData; + private RiskAssessment riskAssessment; + private VerificationData verificationData; private Wallet wallet; @@ -197,12 +216,14 @@ public AuthorizationCreateParams build() { this.expand, this.extraParams, this.fleet, + this.fraudDisputabilityLikelihood, this.fuel, this.isAmountControllable, this.merchantAmount, this.merchantCurrency, this.merchantData, this.networkData, + this.riskAssessment, this.verificationData, this.wallet); } @@ -210,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; @@ -219,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) { @@ -309,6 +330,16 @@ public Builder setFleet(AuthorizationCreateParams.Fleet fleet) { return this; } + /** + * Probability that this transaction can be disputed in the event of fraud. Assessed by + * comparing the characteristics of the authorization to card network rules. + */ + public Builder setFraudDisputabilityLikelihood( + AuthorizationCreateParams.FraudDisputabilityLikelihood fraudDisputabilityLikelihood) { + this.fraudDisputabilityLikelihood = fraudDisputabilityLikelihood; + return this; + } + /** Information about fuel that was purchased with this transaction. */ public Builder setFuel(AuthorizationCreateParams.Fuel fuel) { this.fuel = fuel; @@ -317,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) { @@ -327,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) { @@ -361,6 +392,12 @@ public Builder setNetworkData(AuthorizationCreateParams.NetworkData networkData) return this; } + /** Stripe’s assessment of the fraud risk for this authorization. */ + public Builder setRiskAssessment(AuthorizationCreateParams.RiskAssessment riskAssessment) { + this.riskAssessment = riskAssessment; + return this; + } + /** * Verifications that Stripe performed on information that the cardholder provided to the * merchant. @@ -1374,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") @@ -1489,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) { @@ -2559,6 +2596,532 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RiskAssessment { + /** Stripe's assessment of this authorization's likelihood of being card testing activity. */ + @SerializedName("card_testing_risk") + CardTestingRisk cardTestingRisk; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Stripe’s assessment of this authorization’s likelihood to be fraudulent. */ + @SerializedName("fraud_risk") + FraudRisk fraudRisk; + + /** + * The dispute risk of the merchant (the seller on a purchase) on an authorization based on all + * Stripe Issuing activity. + */ + @SerializedName("merchant_dispute_risk") + MerchantDisputeRisk merchantDisputeRisk; + + private RiskAssessment( + CardTestingRisk cardTestingRisk, + Map extraParams, + FraudRisk fraudRisk, + MerchantDisputeRisk merchantDisputeRisk) { + this.cardTestingRisk = cardTestingRisk; + this.extraParams = extraParams; + this.fraudRisk = fraudRisk; + this.merchantDisputeRisk = merchantDisputeRisk; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CardTestingRisk cardTestingRisk; + + private Map extraParams; + + private FraudRisk fraudRisk; + + private MerchantDisputeRisk merchantDisputeRisk; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment build() { + return new AuthorizationCreateParams.RiskAssessment( + this.cardTestingRisk, this.extraParams, this.fraudRisk, this.merchantDisputeRisk); + } + + /** Stripe's assessment of this authorization's likelihood of being card testing activity. */ + public Builder setCardTestingRisk( + AuthorizationCreateParams.RiskAssessment.CardTestingRisk cardTestingRisk) { + this.cardTestingRisk = cardTestingRisk; + 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 + * AuthorizationCreateParams.RiskAssessment#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AuthorizationCreateParams.RiskAssessment#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Stripe’s assessment of this authorization’s likelihood to be fraudulent. */ + public Builder setFraudRisk(AuthorizationCreateParams.RiskAssessment.FraudRisk fraudRisk) { + this.fraudRisk = fraudRisk; + return this; + } + + /** + * The dispute risk of the merchant (the seller on a purchase) on an authorization based on + * all Stripe Issuing activity. + */ + public Builder setMerchantDisputeRisk( + AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk merchantDisputeRisk) { + this.merchantDisputeRisk = merchantDisputeRisk; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardTestingRisk { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 % of declines due to a card number not existing in the past hour, taking place at the + * same merchant. Higher rates correspond to a greater probability of card testing activity, + * meaning bad actors may be attempting different card number combinations to guess a correct + * one. Takes on values between 0 and 100. + */ + @SerializedName("invalid_account_number_decline_rate_past_hour") + Long invalidAccountNumberDeclineRatePastHour; + + /** + * The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, + * taking place at the same merchant. Higher rates correspond to a greater probability of bad + * actors attempting to utilize valid card credentials at merchants with verification + * requirements. Takes on values between 0 and 100. + */ + @SerializedName("invalid_credentials_decline_rate_past_hour") + Long invalidCredentialsDeclineRatePastHour; + + /** + * Required. The likelihood that this authorization is associated with card + * testing activity. This is assessed by evaluating decline activity over the last hour. + */ + @SerializedName("risk_level") + RiskLevel riskLevel; + + private CardTestingRisk( + Map extraParams, + Long invalidAccountNumberDeclineRatePastHour, + Long invalidCredentialsDeclineRatePastHour, + RiskLevel riskLevel) { + this.extraParams = extraParams; + this.invalidAccountNumberDeclineRatePastHour = invalidAccountNumberDeclineRatePastHour; + this.invalidCredentialsDeclineRatePastHour = invalidCredentialsDeclineRatePastHour; + this.riskLevel = riskLevel; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long invalidAccountNumberDeclineRatePastHour; + + private Long invalidCredentialsDeclineRatePastHour; + + private RiskLevel riskLevel; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment.CardTestingRisk build() { + return new AuthorizationCreateParams.RiskAssessment.CardTestingRisk( + this.extraParams, + this.invalidAccountNumberDeclineRatePastHour, + this.invalidCredentialsDeclineRatePastHour, + this.riskLevel); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.CardTestingRisk#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.CardTestingRisk#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 % of declines due to a card number not existing in the past hour, taking place at the + * same merchant. Higher rates correspond to a greater probability of card testing activity, + * meaning bad actors may be attempting different card number combinations to guess a + * correct one. Takes on values between 0 and 100. + */ + public Builder setInvalidAccountNumberDeclineRatePastHour( + Long invalidAccountNumberDeclineRatePastHour) { + this.invalidAccountNumberDeclineRatePastHour = invalidAccountNumberDeclineRatePastHour; + return this; + } + + /** + * The % of declines due to incorrect verification data (like CVV or expiry) in the past + * hour, taking place at the same merchant. Higher rates correspond to a greater probability + * of bad actors attempting to utilize valid card credentials at merchants with verification + * requirements. Takes on values between 0 and 100. + */ + public Builder setInvalidCredentialsDeclineRatePastHour( + Long invalidCredentialsDeclineRatePastHour) { + this.invalidCredentialsDeclineRatePastHour = invalidCredentialsDeclineRatePastHour; + return this; + } + + /** + * Required. The likelihood that this authorization is associated with card + * testing activity. This is assessed by evaluating decline activity over the last hour. + */ + public Builder setRiskLevel( + AuthorizationCreateParams.RiskAssessment.CardTestingRisk.RiskLevel riskLevel) { + this.riskLevel = riskLevel; + return this; + } + } + + public enum RiskLevel implements ApiRequestParams.EnumParam { + @SerializedName("elevated") + ELEVATED("elevated"), + + @SerializedName("highest") + HIGHEST("highest"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("normal") + NORMAL("normal"), + + @SerializedName("not_assessed") + NOT_ASSESSED("not_assessed"), + + @SerializedName("unknown") + UNKNOWN("unknown"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RiskLevel(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FraudRisk { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Stripe’s assessment of the likelihood of fraud on an + * authorization. + */ + @SerializedName("level") + Level level; + + /** + * Stripe’s numerical model score assessing the likelihood of fraudulent activity. A higher + * score means a higher likelihood of fraudulent activity, and anything above 25 is considered + * high risk. + */ + @SerializedName("score") + BigDecimal score; + + private FraudRisk(Map extraParams, Level level, BigDecimal score) { + this.extraParams = extraParams; + this.level = level; + this.score = score; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Level level; + + private BigDecimal score; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment.FraudRisk build() { + return new AuthorizationCreateParams.RiskAssessment.FraudRisk( + this.extraParams, this.level, this.score); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.FraudRisk#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.FraudRisk#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. Stripe’s assessment of the likelihood of fraud on an + * authorization. + */ + public Builder setLevel(AuthorizationCreateParams.RiskAssessment.FraudRisk.Level level) { + this.level = level; + return this; + } + + /** + * Stripe’s numerical model score assessing the likelihood of fraudulent activity. A higher + * score means a higher likelihood of fraudulent activity, and anything above 25 is + * considered high risk. + */ + public Builder setScore(BigDecimal score) { + this.score = score; + return this; + } + } + + public enum Level implements ApiRequestParams.EnumParam { + @SerializedName("elevated") + ELEVATED("elevated"), + + @SerializedName("highest") + HIGHEST("highest"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("normal") + NORMAL("normal"), + + @SerializedName("not_assessed") + NOT_ASSESSED("not_assessed"), + + @SerializedName("unknown") + UNKNOWN("unknown"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Level(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MerchantDisputeRisk { + /** + * The dispute rate observed across all Stripe Issuing authorizations for this merchant. For + * example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing + * have resulted in a dispute. Higher values mean a higher likelihood the authorization is + * disputed. Takes on values between 0 and 100. + */ + @SerializedName("dispute_rate") + Long disputeRate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 likelihood that authorizations from this merchant will + * result in a dispute based on their history on Stripe Issuing. + */ + @SerializedName("risk_level") + RiskLevel riskLevel; + + private MerchantDisputeRisk( + Long disputeRate, Map extraParams, RiskLevel riskLevel) { + this.disputeRate = disputeRate; + this.extraParams = extraParams; + this.riskLevel = riskLevel; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long disputeRate; + + private Map extraParams; + + private RiskLevel riskLevel; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk build() { + return new AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk( + this.disputeRate, this.extraParams, this.riskLevel); + } + + /** + * The dispute rate observed across all Stripe Issuing authorizations for this merchant. For + * example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing + * have resulted in a dispute. Higher values mean a higher likelihood the authorization is + * disputed. Takes on values between 0 and 100. + */ + public Builder setDisputeRate(Long disputeRate) { + this.disputeRate = disputeRate; + 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 AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk#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 likelihood that authorizations from this merchant will + * result in a dispute based on their history on Stripe Issuing. + */ + public Builder setRiskLevel( + AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk.RiskLevel riskLevel) { + this.riskLevel = riskLevel; + return this; + } + } + + public enum RiskLevel implements ApiRequestParams.EnumParam { + @SerializedName("elevated") + ELEVATED("elevated"), + + @SerializedName("highest") + HIGHEST("highest"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("normal") + NORMAL("normal"), + + @SerializedName("not_assessed") + NOT_ASSESSED("not_assessed"), + + @SerializedName("unknown") + UNKNOWN("unknown"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RiskLevel(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class VerificationData { @@ -3047,6 +3610,27 @@ public enum AuthorizationMethod implements ApiRequestParams.EnumParam { } } + public enum FraudDisputabilityLikelihood implements ApiRequestParams.EnumParam { + @SerializedName("neutral") + NEUTRAL("neutral"), + + @SerializedName("unknown") + UNKNOWN("unknown"), + + @SerializedName("very_likely") + VERY_LIKELY("very_likely"), + + @SerializedName("very_unlikely") + VERY_UNLIKELY("very_unlikely"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FraudDisputabilityLikelihood(String value) { + this.value = value; + } + } + public enum Wallet implements ApiRequestParams.EnumParam { @SerializedName("apple_pay") APPLE_PAY("apple_pay"), 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 74b78490be4..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) { @@ -684,11 +684,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -791,13 +794,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -809,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; @@ -1022,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}. */ @@ -1040,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}. */ @@ -1288,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 e78869945d4..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) { @@ -570,11 +570,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -692,25 +695,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -728,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; @@ -956,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}. */ @@ -974,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}. */ @@ -1222,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 e13017ab67e..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) { @@ -451,11 +451,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -558,13 +561,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -576,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; @@ -1187,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") @@ -1204,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") @@ -1234,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) { @@ -1271,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) { @@ -1288,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}. */ @@ -1306,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}. */ @@ -1579,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 ae9b204859b..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) { @@ -411,11 +411,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -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; @@ -533,25 +536,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -569,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; @@ -1221,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") @@ -1238,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") @@ -1268,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) { @@ -1277,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) { @@ -1314,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) { @@ -1323,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) { @@ -1340,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}. */ @@ -1358,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}. */ @@ -1640,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/PaymentEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java new file mode 100644 index 00000000000..d9072f65bdf --- /dev/null +++ b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java @@ -0,0 +1,1483 @@ +// File generated from our OpenAPI spec +package com.stripe.param.radar; + +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 PaymentEvaluationCreateParams extends ApiRequestParams { + /** Details about the Client Device Metadata to associate with the payment evaluation. */ + @SerializedName("client_device_metadata_details") + ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + /** + * Required. Details about the customer associated with the payment evaluation. + */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** 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; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual 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. Details about the payment. */ + @SerializedName("payment_details") + PaymentDetails paymentDetails; + + private PaymentEvaluationCreateParams( + ClientDeviceMetadataDetails clientDeviceMetadataDetails, + CustomerDetails customerDetails, + List expand, + Map extraParams, + Map metadata, + PaymentDetails paymentDetails) { + this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; + this.customerDetails = customerDetails; + this.expand = expand; + this.extraParams = extraParams; + this.metadata = metadata; + this.paymentDetails = paymentDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ClientDeviceMetadataDetails clientDeviceMetadataDetails; + + private CustomerDetails customerDetails; + + private List expand; + + private Map extraParams; + + private Map metadata; + + private PaymentDetails paymentDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams build() { + return new PaymentEvaluationCreateParams( + this.clientDeviceMetadataDetails, + this.customerDetails, + this.expand, + this.extraParams, + this.metadata, + this.paymentDetails); + } + + /** Details about the Client Device Metadata to associate with the payment evaluation. */ + public Builder setClientDeviceMetadataDetails( + PaymentEvaluationCreateParams.ClientDeviceMetadataDetails clientDeviceMetadataDetails) { + this.clientDeviceMetadataDetails = clientDeviceMetadataDetails; + return this; + } + + /** + * Required. Details about the customer associated with the payment evaluation. + */ + public Builder setCustomerDetails( + PaymentEvaluationCreateParams.CustomerDetails customerDetails) { + this.customerDetails = customerDetails; + 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 + * PaymentEvaluationCreateParams#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 + * PaymentEvaluationCreateParams#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 + * PaymentEvaluationCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentEvaluationCreateParams#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 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 + * PaymentEvaluationCreateParams#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 PaymentEvaluationCreateParams#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. Details about the payment. */ + public Builder setPaymentDetails(PaymentEvaluationCreateParams.PaymentDetails paymentDetails) { + this.paymentDetails = paymentDetails; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ClientDeviceMetadataDetails { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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. ID for the Radar Session to associate with the payment evaluation. + * A Radar Session is a snapshot of + * the browser metadata and device details that help Radar make more accurate predictions on + * your payments. + */ + @SerializedName("radar_session") + String radarSession; + + private ClientDeviceMetadataDetails(Map extraParams, String radarSession) { + this.extraParams = extraParams; + this.radarSession = radarSession; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String radarSession; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.ClientDeviceMetadataDetails build() { + return new PaymentEvaluationCreateParams.ClientDeviceMetadataDetails( + this.extraParams, this.radarSession); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentEvaluationCreateParams.ClientDeviceMetadataDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentEvaluationCreateParams.ClientDeviceMetadataDetails#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. ID for the Radar Session to associate with the payment + * evaluation. A Radar Session is a + * snapshot of the browser metadata and device details that help Radar make more accurate + * predictions on your payments. + */ + public Builder setRadarSession(String radarSession) { + this.radarSession = radarSession; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails { + /** The ID of the customer associated with the payment evaluation. */ + @SerializedName("customer") + String customer; + + /** The ID of the Account representing the customer associated with the payment evaluation. */ + @SerializedName("customer_account") + String customerAccount; + + /** The customer'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 customer's full name or business name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + + private CustomerDetails( + String customer, + String customerAccount, + String email, + Map extraParams, + String name, + String phone) { + this.customer = customer; + this.customerAccount = customerAccount; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String customer; + + private String customerAccount; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.CustomerDetails build() { + return new PaymentEvaluationCreateParams.CustomerDetails( + this.customer, + this.customerAccount, + this.email, + this.extraParams, + this.name, + this.phone); + } + + /** The ID of the customer associated with the payment evaluation. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** The ID of the Account representing the customer associated with the payment evaluation. */ + public Builder setCustomerAccount(String customerAccount) { + this.customerAccount = customerAccount; + return this; + } + + /** The customer'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 + * PaymentEvaluationCreateParams.CustomerDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentEvaluationCreateParams.CustomerDetails#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 full name or business name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The customer's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDetails { + /** + * Required. The intended amount to collect with this payment. A positive + * integer representing how much to charge in the smallest currency unit (for + * example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + */ + @SerializedName("amount") + Long amount; + + /** + * Required. Three-letter ISO currency code, in lowercase. + * Must be a supported currency. + */ + @SerializedName("currency") + String currency; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + String 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; + + /** Details about the payment's customer presence and type. */ + @SerializedName("money_movement_details") + MoneyMovementDetails moneyMovementDetails; + + /** Required. Details about the payment method to use for the payment. */ + @SerializedName("payment_method_details") + PaymentMethodDetails paymentMethodDetails; + + /** Shipping details for the payment evaluation. */ + @SerializedName("shipping_details") + ShippingDetails shippingDetails; + + /** Payment statement descriptor. */ + @SerializedName("statement_descriptor") + String statementDescriptor; + + private PaymentDetails( + Long amount, + String currency, + String description, + Map extraParams, + MoneyMovementDetails moneyMovementDetails, + PaymentMethodDetails paymentMethodDetails, + ShippingDetails shippingDetails, + String statementDescriptor) { + this.amount = amount; + this.currency = currency; + this.description = description; + this.extraParams = extraParams; + this.moneyMovementDetails = moneyMovementDetails; + this.paymentMethodDetails = paymentMethodDetails; + this.shippingDetails = shippingDetails; + this.statementDescriptor = statementDescriptor; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private String currency; + + private String description; + + private Map extraParams; + + private MoneyMovementDetails moneyMovementDetails; + + private PaymentMethodDetails paymentMethodDetails; + + private ShippingDetails shippingDetails; + + private String statementDescriptor; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails( + this.amount, + this.currency, + this.description, + this.extraParams, + this.moneyMovementDetails, + this.paymentMethodDetails, + this.shippingDetails, + this.statementDescriptor); + } + + /** + * Required. The intended amount to collect with this payment. A positive + * integer representing how much to charge in the smallest currency unit (for + * example, 100 cents to charge 1.00 USD or 100 to charge 100 Yen, a zero-decimal currency). + */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Required. Three-letter ISO currency code, in + * lowercase. Must be a supported currency. + */ + public Builder setCurrency(String currency) { + this.currency = currency; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String 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 + * PaymentEvaluationCreateParams.PaymentDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentEvaluationCreateParams.PaymentDetails#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 about the payment's customer presence and type. */ + public Builder setMoneyMovementDetails( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails moneyMovementDetails) { + this.moneyMovementDetails = moneyMovementDetails; + return this; + } + + /** Required. Details about the payment method to use for the payment. */ + public Builder setPaymentMethodDetails( + PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails paymentMethodDetails) { + this.paymentMethodDetails = paymentMethodDetails; + return this; + } + + /** Shipping details for the payment evaluation. */ + public Builder setShippingDetails( + PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + + /** Payment statement descriptor. */ + public Builder setStatementDescriptor(String statementDescriptor) { + this.statementDescriptor = statementDescriptor; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MoneyMovementDetails { + /** Describes card money movement details for the payment evaluation. */ + @SerializedName("card") + Card card; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Describes the type of money movement. Currently only {@code + * card} is supported. + */ + @SerializedName("money_movement_type") + MoneyMovementType moneyMovementType; + + private MoneyMovementDetails( + Card card, Map extraParams, MoneyMovementType moneyMovementType) { + this.card = card; + this.extraParams = extraParams; + this.moneyMovementType = moneyMovementType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Card card; + + private Map extraParams; + + private MoneyMovementType moneyMovementType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails( + this.card, this.extraParams, this.moneyMovementType); + } + + /** Describes card money movement details for the payment evaluation. */ + public Builder setCard( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card card) { + this.card = card; + 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 + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails#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. Describes the type of money movement. Currently only {@code + * card} is supported. + */ + public Builder setMoneyMovementType( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.MoneyMovementType + moneyMovementType) { + this.moneyMovementType = moneyMovementType; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** Describes the presence of the customer during the payment. */ + @SerializedName("customer_presence") + CustomerPresence customerPresence; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Describes the type of payment. */ + @SerializedName("payment_type") + PaymentType paymentType; + + private Card( + CustomerPresence customerPresence, + Map extraParams, + PaymentType paymentType) { + this.customerPresence = customerPresence; + this.extraParams = extraParams; + this.paymentType = paymentType; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CustomerPresence customerPresence; + + private Map extraParams; + + private PaymentType paymentType; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card build() { + return new PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card( + this.customerPresence, this.extraParams, this.paymentType); + } + + /** Describes the presence of the customer during the payment. */ + public Builder setCustomerPresence( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card + .CustomerPresence + customerPresence) { + this.customerPresence = customerPresence; + 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 + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Describes the type of payment. */ + public Builder setPaymentType( + PaymentEvaluationCreateParams.PaymentDetails.MoneyMovementDetails.Card.PaymentType + paymentType) { + this.paymentType = paymentType; + return this; + } + } + + public enum CustomerPresence implements ApiRequestParams.EnumParam { + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CustomerPresence(String value) { + this.value = value; + } + } + + public enum PaymentType implements ApiRequestParams.EnumParam { + @SerializedName("one_off") + ONE_OFF("one_off"), + + @SerializedName("recurring") + RECURRING("recurring"), + + @SerializedName("setup_one_off") + SETUP_ONE_OFF("setup_one_off"), + + @SerializedName("setup_recurring") + SETUP_RECURRING("setup_recurring"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentType(String value) { + this.value = value; + } + } + } + + public enum MoneyMovementType implements ApiRequestParams.EnumParam { + @SerializedName("card") + CARD("card"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + MoneyMovementType(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodDetails { + /** Billing information associated with the payment evaluation. */ + @SerializedName("billing_details") + BillingDetails billingDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. ID of the payment method used in this payment evaluation. */ + @SerializedName("payment_method") + String paymentMethod; + + private PaymentMethodDetails( + BillingDetails billingDetails, Map extraParams, String paymentMethod) { + this.billingDetails = billingDetails; + this.extraParams = extraParams; + this.paymentMethod = paymentMethod; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BillingDetails billingDetails; + + private Map extraParams; + + private String paymentMethod; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails( + this.billingDetails, this.extraParams, this.paymentMethod); + } + + /** Billing information associated with the payment evaluation. */ + public Builder setBillingDetails( + PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + billingDetails) { + this.billingDetails = billingDetails; + 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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails#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. ID of the payment method used in this payment evaluation. */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingDetails { + /** Billing address. */ + @SerializedName("address") + Address address; + + /** 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; + + /** Full name. */ + @SerializedName("name") + String name; + + /** Billing phone number (including extension). */ + @SerializedName("phone") + String phone; + + private BillingDetails( + Address address, + String email, + Map extraParams, + String name, + String phone) { + this.address = address; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + build() { + return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails + .BillingDetails(this.address, this.email, this.extraParams, this.name, this.phone); + } + + /** Billing address. */ + public Builder setAddress( + PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + .Address + address) { + this.address = address; + return this; + } + + /** 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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Full name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Billing phone number (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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @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 PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails + .Address + build() { + return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails + .BillingDetails.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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails.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 + * PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.BillingDetails.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 2, such as the 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 (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails { + /** 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; + + /** Shipping name. */ + @SerializedName("name") + String name; + + /** Shipping phone number. */ + @SerializedName("phone") + String phone; + + private ShippingDetails( + 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 PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails build() { + return new PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails( + this.address, this.extraParams, this.name, this.phone); + } + + /** Shipping address. */ + public Builder setAddress( + PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.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 PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Shipping name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** Shipping phone number. */ + 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** + * State, county, province, or region (ISO 3166-2). + */ + @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 PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.Address build() { + return new PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.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 + * PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.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 + * PaymentEvaluationCreateParams.PaymentDetails.ShippingDetails.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 2, such as the 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 (ISO 3166-2). + */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } + } +} 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 new file mode 100644 index 00000000000..4986e4489c2 --- /dev/null +++ b/src/main/java/com/stripe/param/tax/AssociationFindParams.java @@ -0,0 +1,120 @@ +// 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 AssociationFindParams 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; + + /** + * Required. Valid PaymentIntent id + */ + @SerializedName("payment_intent") + String paymentIntent; + + private AssociationFindParams( + List expand, Map extraParams, String paymentIntent) { + this.expand = expand; + this.extraParams = extraParams; + this.paymentIntent = paymentIntent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private String paymentIntent; + + /** Finalize and obtain parameter instance from this builder. */ + public AssociationFindParams build() { + return new AssociationFindParams(this.expand, this.extraParams, this.paymentIntent); + } + + /** + * 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 + * AssociationFindParams#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 + * AssociationFindParams#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 + * AssociationFindParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AssociationFindParams#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. Valid PaymentIntent id + */ + public Builder setPaymentIntent(String paymentIntent) { + this.paymentIntent = paymentIntent; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index a539435d89c..e11770bc6ca 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -442,11 +442,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -559,25 +559,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -646,11 +646,12 @@ public static class TaxId { * ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code mx_rfc}, * {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, {@code * no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code ph_tin}, - * {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, {@code - * sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code sv_nit}, - * {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, {@code - * ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code uz_vat}, - * {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code zw_tin} + * {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code + * sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, + * {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code + * tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, + * {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code + * zw_tin} */ @SerializedName("type") Type type; @@ -727,12 +728,12 @@ public Builder putAllExtraParam(Map map) { * {@code ma_vat}, {@code md_vat}, {@code me_pib}, {@code mk_vat}, {@code mr_nif}, {@code * mx_rfc}, {@code my_frp}, {@code my_itn}, {@code my_sst}, {@code ng_tin}, {@code no_vat}, * {@code no_voec}, {@code np_pan}, {@code nz_gst}, {@code om_vat}, {@code pe_ruc}, {@code - * ph_tin}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, {@code sa_vat}, - * {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code sr_fin}, {@code - * sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, {@code tz_vat}, - * {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code uz_tin}, {@code - * uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, or {@code - * zw_tin} + * ph_tin}, {@code pl_nip}, {@code ro_tin}, {@code rs_pib}, {@code ru_inn}, {@code ru_kpp}, + * {@code sa_vat}, {@code sg_gst}, {@code sg_uen}, {@code si_tin}, {@code sn_ninea}, {@code + * sr_fin}, {@code sv_nit}, {@code th_vat}, {@code tj_tin}, {@code tr_tin}, {@code tw_vat}, + * {@code tz_vat}, {@code ua_vat}, {@code ug_tin}, {@code us_ein}, {@code uy_ruc}, {@code + * uz_tin}, {@code uz_vat}, {@code ve_rif}, {@code vn_tin}, {@code za_vat}, {@code zm_tin}, + * or {@code zw_tin} */ public Builder setType(CalculationCreateParams.CustomerDetails.TaxId.Type type) { this.type = type; @@ -996,6 +997,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("ph_tin") PH_TIN("ph_tin"), + @SerializedName("pl_nip") + PL_NIP("pl_nip"), + @SerializedName("ro_tin") RO_TIN("ro_tin"), @@ -1125,7 +1129,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 +1146,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 +1170,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 +1180,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 +1243,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 +1326,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 +1340,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. @@ -1455,11 +1459,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1469,7 +1473,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") Object state; @@ -1571,25 +1575,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1609,7 +1613,7 @@ public Builder setPostalCode(EmptyParam postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; @@ -1618,7 +1622,7 @@ public Builder setState(String state) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(EmptyParam state) { this.state = state; @@ -1632,7 +1636,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 +1653,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 +1669,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 +1712,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 +1748,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 +1768,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/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index 537c6f76860..3a272c23e08 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -566,6 +566,10 @@ public static class CountryOptions { @SerializedName("tr") Tr tr; + /** Options for the registration in TW. */ + @SerializedName("tw") + Tw tw; + /** Options for the registration in TZ. */ @SerializedName("tz") Tz tz; @@ -697,6 +701,7 @@ private CountryOptions( Th th, Tj tj, Tr tr, + Tw tw, Tz tz, Ua ua, Ug ug, @@ -797,6 +802,7 @@ private CountryOptions( this.th = th; this.tj = tj; this.tr = tr; + this.tw = tw; this.tz = tz; this.ua = ua; this.ug = ug; @@ -994,6 +1000,8 @@ public static class Builder { private Tr tr; + private Tw tw; + private Tz tz; private Ua ua; @@ -1107,6 +1115,7 @@ public RegistrationCreateParams.CountryOptions build() { this.th, this.tj, this.tr, + this.tw, this.tz, this.ua, this.ug, @@ -1680,6 +1689,12 @@ public Builder setTr(RegistrationCreateParams.CountryOptions.Tr tr) { return this; } + /** Options for the registration in TW. */ + public Builder setTw(RegistrationCreateParams.CountryOptions.Tw tw) { + this.tw = tw; + return this; + } + /** Options for the registration in TZ. */ public Builder setTz(RegistrationCreateParams.CountryOptions.Tz tz) { this.tz = tz; @@ -15278,6 +15293,89 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tw { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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. Type of registration to be created in {@code country}. */ + @SerializedName("type") + Type type; + + private Tw(Map extraParams, Type type) { + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Tw build() { + return new RegistrationCreateParams.CountryOptions.Tw(this.extraParams, 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 RegistrationCreateParams.CountryOptions.Tw#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link RegistrationCreateParams.CountryOptions.Tw#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. Type of registration to be created in {@code country}. */ + public Builder setType(RegistrationCreateParams.CountryOptions.Tw.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("simplified") + SIMPLIFIED("simplified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Tz { @@ -15687,9 +15785,10 @@ public static class LocalAmusementTax { * Required. A FIPS code * representing the local jurisdiction. Supported FIPS codes are: {@code 14000} (Chicago), - * {@code 06613} (Bloomington), {@code 21696} (East Dundee), {@code 24582} (Evanston), - * {@code 45421} (Lynwood), {@code 48892} (Midlothian), {@code 64343} (River Grove), and - * {@code 68081} (Schiller Park). + * {@code 02154} (Arlington Heights), {@code 06613} (Bloomington), {@code 10906} (Campton + * Hills), {@code 21696} (East Dundee), {@code 24582} (Evanston), {@code 45421} (Lynwood), + * {@code 48892} (Midlothian), {@code 64343} (River Grove), and {@code 68081} (Schiller + * Park). */ @SerializedName("jurisdiction") String jurisdiction; @@ -15748,9 +15847,10 @@ public Builder putAllExtraParam(Map map) { * Required. A FIPS code * representing the local jurisdiction. Supported FIPS codes are: {@code 14000} (Chicago), - * {@code 06613} (Bloomington), {@code 21696} (East Dundee), {@code 24582} (Evanston), - * {@code 45421} (Lynwood), {@code 48892} (Midlothian), {@code 64343} (River Grove), and - * {@code 68081} (Schiller Park). + * {@code 02154} (Arlington Heights), {@code 06613} (Bloomington), {@code 10906} (Campton + * Hills), {@code 21696} (East Dundee), {@code 24582} (Evanston), {@code 45421} (Lynwood), + * {@code 48892} (Midlothian), {@code 64343} (River Grove), and {@code 68081} (Schiller + * Park). */ public Builder setJurisdiction(String jurisdiction) { this.jurisdiction = jurisdiction; diff --git a/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java b/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java index 4b637a89ebb..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; @@ -338,11 +338,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -352,7 +352,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") Object state; @@ -463,25 +463,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -501,7 +501,7 @@ public Builder setPostalCode(EmptyParam postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; @@ -510,7 +510,7 @@ public Builder setState(String state) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(EmptyParam state) { this.state = state; 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/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index c19d0be2d03..d4013302e2b 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -14,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ConfigurationCreateParams extends ApiRequestParams { + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + @SerializedName("bbpos_wisepad3") + BbposWisepad3 bbposWisepad3; + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ @SerializedName("bbpos_wisepos_e") BbposWiseposE bbposWiseposE; @@ -39,7 +43,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("offline") Object offline; - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ @SerializedName("reboot_window") RebootWindow rebootWindow; @@ -47,7 +51,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { @SerializedName("stripe_s700") StripeS700 stripeS700; - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers that support on-reader tips. */ @SerializedName("tipping") Object tipping; @@ -60,6 +64,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { Object wifi; private ConfigurationCreateParams( + BbposWisepad3 bbposWisepad3, BbposWiseposE bbposWiseposE, List expand, Map extraParams, @@ -70,6 +75,7 @@ private ConfigurationCreateParams( Object tipping, VerifoneP400 verifoneP400, Object wifi) { + this.bbposWisepad3 = bbposWisepad3; this.bbposWiseposE = bbposWiseposE; this.expand = expand; this.extraParams = extraParams; @@ -87,6 +93,8 @@ public static Builder builder() { } public static class Builder { + private BbposWisepad3 bbposWisepad3; + private BbposWiseposE bbposWiseposE; private List expand; @@ -110,6 +118,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public ConfigurationCreateParams build() { return new ConfigurationCreateParams( + this.bbposWisepad3, this.bbposWiseposE, this.expand, this.extraParams, @@ -122,6 +131,12 @@ public ConfigurationCreateParams build() { this.wifi); } + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + public Builder setBbposWisepad3(ConfigurationCreateParams.BbposWisepad3 bbposWisepad3) { + this.bbposWisepad3 = bbposWisepad3; + return this; + } + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ public Builder setBbposWiseposE(ConfigurationCreateParams.BbposWiseposE bbposWiseposE) { this.bbposWiseposE = bbposWiseposE; @@ -198,7 +213,7 @@ public Builder setOffline(EmptyParam offline) { return this; } - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(ConfigurationCreateParams.RebootWindow rebootWindow) { this.rebootWindow = rebootWindow; return this; @@ -210,13 +225,13 @@ public Builder setStripeS700(ConfigurationCreateParams.StripeS700 stripeS700) { return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers that support on-reader tips. */ public Builder setTipping(ConfigurationCreateParams.Tipping tipping) { this.tipping = tipping; return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers that support on-reader tips. */ public Builder setTipping(EmptyParam tipping) { this.tipping = tipping; return this; @@ -241,6 +256,82 @@ public Builder setWifi(EmptyParam wifi) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BbposWisepad3 { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 ID representing an image you want to display on the reader. */ + @SerializedName("splashscreen") + Object splashscreen; + + private BbposWisepad3(Map extraParams, Object splashscreen) { + this.extraParams = extraParams; + this.splashscreen = splashscreen; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object splashscreen; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.BbposWisepad3 build() { + return new ConfigurationCreateParams.BbposWisepad3(this.extraParams, this.splashscreen); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ConfigurationCreateParams.BbposWisepad3#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ConfigurationCreateParams.BbposWisepad3#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 ID representing an image you want to display on the reader. */ + public Builder setSplashscreen(String splashscreen) { + this.splashscreen = splashscreen; + return this; + } + + /** A File ID representing an image you want to display on the reader. */ + public Builder setSplashscreen(EmptyParam splashscreen) { + this.splashscreen = splashscreen; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class BbposWiseposE { @@ -499,7 +590,7 @@ public static class StripeS700 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -548,13 +639,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -573,10 +664,6 @@ public static class Tipping { @SerializedName("aud") Aud aud; - /** Tipping configuration for BGN. */ - @SerializedName("bgn") - Bgn bgn; - /** Tipping configuration for CAD. */ @SerializedName("cad") Cad cad; @@ -610,6 +697,10 @@ public static class Tipping { @SerializedName("gbp") Gbp gbp; + /** Tipping configuration for GIP. */ + @SerializedName("gip") + Gip gip; + /** Tipping configuration for HKD. */ @SerializedName("hkd") Hkd hkd; @@ -661,7 +752,6 @@ public static class Tipping { private Tipping( Aed aed, Aud aud, - Bgn bgn, Cad cad, Chf chf, Czk czk, @@ -669,6 +759,7 @@ private Tipping( Eur eur, Map extraParams, Gbp gbp, + Gip gip, Hkd hkd, Huf huf, Jpy jpy, @@ -683,7 +774,6 @@ private Tipping( Usd usd) { this.aed = aed; this.aud = aud; - this.bgn = bgn; this.cad = cad; this.chf = chf; this.czk = czk; @@ -691,6 +781,7 @@ private Tipping( this.eur = eur; this.extraParams = extraParams; this.gbp = gbp; + this.gip = gip; this.hkd = hkd; this.huf = huf; this.jpy = jpy; @@ -714,8 +805,6 @@ public static class Builder { private Aud aud; - private Bgn bgn; - private Cad cad; private Chf chf; @@ -730,6 +819,8 @@ public static class Builder { private Gbp gbp; + private Gip gip; + private Hkd hkd; private Huf huf; @@ -759,7 +850,6 @@ public ConfigurationCreateParams.Tipping build() { return new ConfigurationCreateParams.Tipping( this.aed, this.aud, - this.bgn, this.cad, this.chf, this.czk, @@ -767,6 +857,7 @@ public ConfigurationCreateParams.Tipping build() { this.eur, this.extraParams, this.gbp, + this.gip, this.hkd, this.huf, this.jpy, @@ -793,12 +884,6 @@ public Builder setAud(ConfigurationCreateParams.Tipping.Aud aud) { return this; } - /** Tipping configuration for BGN. */ - public Builder setBgn(ConfigurationCreateParams.Tipping.Bgn bgn) { - this.bgn = bgn; - return this; - } - /** Tipping configuration for CAD. */ public Builder setCad(ConfigurationCreateParams.Tipping.Cad cad) { this.cad = cad; @@ -861,6 +946,12 @@ public Builder setGbp(ConfigurationCreateParams.Tipping.Gbp gbp) { return this; } + /** Tipping configuration for GIP. */ + public Builder setGip(ConfigurationCreateParams.Tipping.Gip gip) { + this.gip = gip; + return this; + } + /** Tipping configuration for HKD. */ public Builder setHkd(ConfigurationCreateParams.Tipping.Hkd hkd) { this.hkd = hkd; @@ -1232,7 +1323,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Bgn { + public static class Cad { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1257,7 +1348,7 @@ public static class Bgn { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Bgn( + private Cad( Map extraParams, List fixedAmounts, List percentages, @@ -1282,15 +1373,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationCreateParams.Tipping.Bgn build() { - return new ConfigurationCreateParams.Tipping.Bgn( + public ConfigurationCreateParams.Tipping.Cad build() { + return new ConfigurationCreateParams.Tipping.Cad( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationCreateParams.Tipping.Bgn#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Cad#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1304,7 +1395,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 ConfigurationCreateParams.Tipping.Bgn#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Cad#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1318,7 +1409,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Cad#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1331,7 +1422,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Cad#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1344,7 +1435,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Cad#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1357,7 +1448,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Bgn#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Cad#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -1380,7 +1471,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Cad { + public static class Chf { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1405,7 +1496,7 @@ public static class Cad { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Cad( + private Chf( Map extraParams, List fixedAmounts, List percentages, @@ -1430,15 +1521,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationCreateParams.Tipping.Cad build() { - return new ConfigurationCreateParams.Tipping.Cad( + public ConfigurationCreateParams.Tipping.Chf build() { + return new ConfigurationCreateParams.Tipping.Chf( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationCreateParams.Tipping.Cad#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Chf#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1452,7 +1543,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 ConfigurationCreateParams.Tipping.Cad#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Chf#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1466,7 +1557,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Cad#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Chf#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1479,7 +1570,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Cad#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Chf#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1492,7 +1583,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Cad#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Chf#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1505,7 +1596,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Cad#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Chf#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -1528,7 +1619,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Chf { + public static class Czk { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1553,7 +1644,7 @@ public static class Chf { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Chf( + private Czk( Map extraParams, List fixedAmounts, List percentages, @@ -1578,15 +1669,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationCreateParams.Tipping.Chf build() { - return new ConfigurationCreateParams.Tipping.Chf( + public ConfigurationCreateParams.Tipping.Czk build() { + return new ConfigurationCreateParams.Tipping.Czk( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationCreateParams.Tipping.Chf#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Czk#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1600,7 +1691,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 ConfigurationCreateParams.Tipping.Chf#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Czk#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1614,7 +1705,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Chf#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Czk#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1627,7 +1718,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Chf#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Czk#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1640,7 +1731,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Chf#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Czk#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1653,7 +1744,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Chf#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Czk#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -1676,7 +1767,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Czk { + public static class Dkk { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1701,7 +1792,7 @@ public static class Czk { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Czk( + private Dkk( Map extraParams, List fixedAmounts, List percentages, @@ -1726,15 +1817,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationCreateParams.Tipping.Czk build() { - return new ConfigurationCreateParams.Tipping.Czk( + public ConfigurationCreateParams.Tipping.Dkk build() { + return new ConfigurationCreateParams.Tipping.Dkk( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationCreateParams.Tipping.Czk#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Dkk#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1748,7 +1839,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 ConfigurationCreateParams.Tipping.Czk#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Dkk#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1762,7 +1853,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Czk#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Dkk#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1775,7 +1866,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Czk#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Dkk#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1788,7 +1879,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Czk#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Dkk#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1801,7 +1892,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Czk#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Dkk#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -1824,7 +1915,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Dkk { + public static class Eur { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1849,7 +1940,7 @@ public static class Dkk { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Dkk( + private Eur( Map extraParams, List fixedAmounts, List percentages, @@ -1874,15 +1965,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationCreateParams.Tipping.Dkk build() { - return new ConfigurationCreateParams.Tipping.Dkk( + public ConfigurationCreateParams.Tipping.Eur build() { + return new ConfigurationCreateParams.Tipping.Eur( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationCreateParams.Tipping.Dkk#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Eur#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1896,7 +1987,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 ConfigurationCreateParams.Tipping.Dkk#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Eur#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1910,7 +2001,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Dkk#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Eur#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1923,7 +2014,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Dkk#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Eur#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1936,7 +2027,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Dkk#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Eur#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1949,7 +2040,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Dkk#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Eur#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -1972,7 +2063,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Eur { + public static class Gbp { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1997,7 +2088,7 @@ public static class Eur { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Eur( + private Gbp( Map extraParams, List fixedAmounts, List percentages, @@ -2022,15 +2113,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationCreateParams.Tipping.Eur build() { - return new ConfigurationCreateParams.Tipping.Eur( + public ConfigurationCreateParams.Tipping.Gbp build() { + return new ConfigurationCreateParams.Tipping.Gbp( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationCreateParams.Tipping.Eur#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Gbp#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2044,7 +2135,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 ConfigurationCreateParams.Tipping.Eur#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Gbp#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -2058,7 +2149,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Eur#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Gbp#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -2071,7 +2162,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Eur#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Gbp#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -2084,7 +2175,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Eur#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Gbp#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -2097,7 +2188,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Eur#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Gbp#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -2120,7 +2211,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Gbp { + public static class Gip { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2145,7 +2236,7 @@ public static class Gbp { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Gbp( + private Gip( Map extraParams, List fixedAmounts, List percentages, @@ -2170,15 +2261,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationCreateParams.Tipping.Gbp build() { - return new ConfigurationCreateParams.Tipping.Gbp( + public ConfigurationCreateParams.Tipping.Gip build() { + return new ConfigurationCreateParams.Tipping.Gip( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationCreateParams.Tipping.Gbp#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Gip#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2192,7 +2283,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 ConfigurationCreateParams.Tipping.Gbp#extraParams} for the field + * map. See {@link ConfigurationCreateParams.Tipping.Gip#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -2206,7 +2297,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Gbp#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Gip#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -2219,7 +2310,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Gbp#fixedAmounts} for the field documentation. + * ConfigurationCreateParams.Tipping.Gip#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -2232,7 +2323,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Gbp#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Gip#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -2245,7 +2336,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationCreateParams.Tipping.Gbp#percentages} for the field documentation. + * ConfigurationCreateParams.Tipping.Gip#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -4055,7 +4146,7 @@ public static class VerifoneP400 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -4104,13 +4195,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 5dce706c41c..f51015f5fdd 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -14,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ConfigurationUpdateParams extends ApiRequestParams { + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + @SerializedName("bbpos_wisepad3") + Object bbposWisepad3; + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ @SerializedName("bbpos_wisepos_e") Object bbposWiseposE; @@ -39,7 +43,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { @SerializedName("offline") Object offline; - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ @SerializedName("reboot_window") Object rebootWindow; @@ -47,7 +51,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { @SerializedName("stripe_s700") Object stripeS700; - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ @SerializedName("tipping") Object tipping; @@ -60,6 +64,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { Object wifi; private ConfigurationUpdateParams( + Object bbposWisepad3, Object bbposWiseposE, List expand, Map extraParams, @@ -70,6 +75,7 @@ private ConfigurationUpdateParams( Object tipping, Object verifoneP400, Object wifi) { + this.bbposWisepad3 = bbposWisepad3; this.bbposWiseposE = bbposWiseposE; this.expand = expand; this.extraParams = extraParams; @@ -87,6 +93,8 @@ public static Builder builder() { } public static class Builder { + private Object bbposWisepad3; + private Object bbposWiseposE; private List expand; @@ -110,6 +118,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public ConfigurationUpdateParams build() { return new ConfigurationUpdateParams( + this.bbposWisepad3, this.bbposWiseposE, this.expand, this.extraParams, @@ -122,6 +131,18 @@ public ConfigurationUpdateParams build() { this.wifi); } + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + public Builder setBbposWisepad3(ConfigurationUpdateParams.BbposWisepad3 bbposWisepad3) { + this.bbposWisepad3 = bbposWisepad3; + return this; + } + + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + public Builder setBbposWisepad3(EmptyParam bbposWisepad3) { + this.bbposWisepad3 = bbposWisepad3; + return this; + } + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ public Builder setBbposWiseposE(ConfigurationUpdateParams.BbposWiseposE bbposWiseposE) { this.bbposWiseposE = bbposWiseposE; @@ -210,13 +231,13 @@ public Builder setOffline(EmptyParam offline) { return this; } - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(ConfigurationUpdateParams.RebootWindow rebootWindow) { this.rebootWindow = rebootWindow; return this; } - /** Reboot time settings for readers that support customized reboot time configuration. */ + /** Reboot time settings for readers. that support customized reboot time configuration. */ public Builder setRebootWindow(EmptyParam rebootWindow) { this.rebootWindow = rebootWindow; return this; @@ -234,13 +255,13 @@ public Builder setStripeS700(EmptyParam stripeS700) { return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(ConfigurationUpdateParams.Tipping tipping) { this.tipping = tipping; return this; } - /** Tipping configurations for readers supporting on-reader tips. */ + /** Tipping configurations for readers. supporting on-reader tips */ public Builder setTipping(EmptyParam tipping) { this.tipping = tipping; return this; @@ -271,6 +292,82 @@ public Builder setWifi(EmptyParam wifi) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BbposWisepad3 { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 ID representing an image you want to display on the reader. */ + @SerializedName("splashscreen") + Object splashscreen; + + private BbposWisepad3(Map extraParams, Object splashscreen) { + this.extraParams = extraParams; + this.splashscreen = splashscreen; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object splashscreen; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.BbposWisepad3 build() { + return new ConfigurationUpdateParams.BbposWisepad3(this.extraParams, this.splashscreen); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ConfigurationUpdateParams.BbposWisepad3#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ConfigurationUpdateParams.BbposWisepad3#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 ID representing an image you want to display on the reader. */ + public Builder setSplashscreen(String splashscreen) { + this.splashscreen = splashscreen; + return this; + } + + /** A File ID representing an image you want to display on the reader. */ + public Builder setSplashscreen(EmptyParam splashscreen) { + this.splashscreen = splashscreen; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class BbposWiseposE { @@ -529,7 +626,7 @@ public static class StripeS700 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -578,13 +675,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; @@ -603,10 +700,6 @@ public static class Tipping { @SerializedName("aud") Aud aud; - /** Tipping configuration for BGN. */ - @SerializedName("bgn") - Bgn bgn; - /** Tipping configuration for CAD. */ @SerializedName("cad") Cad cad; @@ -640,6 +733,10 @@ public static class Tipping { @SerializedName("gbp") Gbp gbp; + /** Tipping configuration for GIP. */ + @SerializedName("gip") + Gip gip; + /** Tipping configuration for HKD. */ @SerializedName("hkd") Hkd hkd; @@ -691,7 +788,6 @@ public static class Tipping { private Tipping( Aed aed, Aud aud, - Bgn bgn, Cad cad, Chf chf, Czk czk, @@ -699,6 +795,7 @@ private Tipping( Eur eur, Map extraParams, Gbp gbp, + Gip gip, Hkd hkd, Huf huf, Jpy jpy, @@ -713,7 +810,6 @@ private Tipping( Usd usd) { this.aed = aed; this.aud = aud; - this.bgn = bgn; this.cad = cad; this.chf = chf; this.czk = czk; @@ -721,6 +817,7 @@ private Tipping( this.eur = eur; this.extraParams = extraParams; this.gbp = gbp; + this.gip = gip; this.hkd = hkd; this.huf = huf; this.jpy = jpy; @@ -744,8 +841,6 @@ public static class Builder { private Aud aud; - private Bgn bgn; - private Cad cad; private Chf chf; @@ -760,6 +855,8 @@ public static class Builder { private Gbp gbp; + private Gip gip; + private Hkd hkd; private Huf huf; @@ -789,7 +886,6 @@ public ConfigurationUpdateParams.Tipping build() { return new ConfigurationUpdateParams.Tipping( this.aed, this.aud, - this.bgn, this.cad, this.chf, this.czk, @@ -797,6 +893,7 @@ public ConfigurationUpdateParams.Tipping build() { this.eur, this.extraParams, this.gbp, + this.gip, this.hkd, this.huf, this.jpy, @@ -823,12 +920,6 @@ public Builder setAud(ConfigurationUpdateParams.Tipping.Aud aud) { return this; } - /** Tipping configuration for BGN. */ - public Builder setBgn(ConfigurationUpdateParams.Tipping.Bgn bgn) { - this.bgn = bgn; - return this; - } - /** Tipping configuration for CAD. */ public Builder setCad(ConfigurationUpdateParams.Tipping.Cad cad) { this.cad = cad; @@ -891,6 +982,12 @@ public Builder setGbp(ConfigurationUpdateParams.Tipping.Gbp gbp) { return this; } + /** Tipping configuration for GIP. */ + public Builder setGip(ConfigurationUpdateParams.Tipping.Gip gip) { + this.gip = gip; + return this; + } + /** Tipping configuration for HKD. */ public Builder setHkd(ConfigurationUpdateParams.Tipping.Hkd hkd) { this.hkd = hkd; @@ -1262,7 +1359,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Bgn { + public static class Cad { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1287,7 +1384,7 @@ public static class Bgn { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Bgn( + private Cad( Map extraParams, List fixedAmounts, List percentages, @@ -1312,15 +1409,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationUpdateParams.Tipping.Bgn build() { - return new ConfigurationUpdateParams.Tipping.Bgn( + public ConfigurationUpdateParams.Tipping.Cad build() { + return new ConfigurationUpdateParams.Tipping.Cad( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationUpdateParams.Tipping.Bgn#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Cad#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1334,7 +1431,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 ConfigurationUpdateParams.Tipping.Bgn#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Cad#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1348,7 +1445,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Cad#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1361,7 +1458,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Cad#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1374,7 +1471,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Cad#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1387,7 +1484,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Bgn#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Cad#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -1410,7 +1507,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Cad { + public static class Chf { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1435,7 +1532,7 @@ public static class Cad { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Cad( + private Chf( Map extraParams, List fixedAmounts, List percentages, @@ -1460,15 +1557,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationUpdateParams.Tipping.Cad build() { - return new ConfigurationUpdateParams.Tipping.Cad( + public ConfigurationUpdateParams.Tipping.Chf build() { + return new ConfigurationUpdateParams.Tipping.Chf( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationUpdateParams.Tipping.Cad#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Chf#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1482,7 +1579,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 ConfigurationUpdateParams.Tipping.Cad#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Chf#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1496,7 +1593,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Cad#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Chf#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1509,7 +1606,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Cad#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Chf#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1522,7 +1619,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Cad#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Chf#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1535,7 +1632,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Cad#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Chf#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -1558,7 +1655,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Chf { + public static class Czk { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1583,7 +1680,7 @@ public static class Chf { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Chf( + private Czk( Map extraParams, List fixedAmounts, List percentages, @@ -1608,15 +1705,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationUpdateParams.Tipping.Chf build() { - return new ConfigurationUpdateParams.Tipping.Chf( + public ConfigurationUpdateParams.Tipping.Czk build() { + return new ConfigurationUpdateParams.Tipping.Czk( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationUpdateParams.Tipping.Chf#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Czk#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1630,7 +1727,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 ConfigurationUpdateParams.Tipping.Chf#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Czk#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1644,7 +1741,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Chf#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Czk#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1657,7 +1754,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Chf#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Czk#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1670,7 +1767,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Chf#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Czk#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1683,7 +1780,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Chf#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Czk#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -1706,7 +1803,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Czk { + public static class Dkk { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1731,7 +1828,7 @@ public static class Czk { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Czk( + private Dkk( Map extraParams, List fixedAmounts, List percentages, @@ -1756,15 +1853,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationUpdateParams.Tipping.Czk build() { - return new ConfigurationUpdateParams.Tipping.Czk( + public ConfigurationUpdateParams.Tipping.Dkk build() { + return new ConfigurationUpdateParams.Tipping.Dkk( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationUpdateParams.Tipping.Czk#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Dkk#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1778,7 +1875,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 ConfigurationUpdateParams.Tipping.Czk#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Dkk#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1792,7 +1889,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Czk#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Dkk#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1805,7 +1902,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Czk#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Dkk#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1818,7 +1915,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Czk#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Dkk#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1831,7 +1928,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Czk#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Dkk#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -1854,7 +1951,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Dkk { + public static class Eur { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -1879,7 +1976,7 @@ public static class Dkk { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Dkk( + private Eur( Map extraParams, List fixedAmounts, List percentages, @@ -1904,15 +2001,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationUpdateParams.Tipping.Dkk build() { - return new ConfigurationUpdateParams.Tipping.Dkk( + public ConfigurationUpdateParams.Tipping.Eur build() { + return new ConfigurationUpdateParams.Tipping.Eur( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationUpdateParams.Tipping.Dkk#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Eur#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1926,7 +2023,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 ConfigurationUpdateParams.Tipping.Dkk#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Eur#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1940,7 +2037,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Dkk#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Eur#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -1953,7 +2050,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Dkk#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Eur#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -1966,7 +2063,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Dkk#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Eur#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -1979,7 +2076,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Dkk#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Eur#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -2002,7 +2099,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Eur { + public static class Gbp { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2027,7 +2124,7 @@ public static class Eur { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Eur( + private Gbp( Map extraParams, List fixedAmounts, List percentages, @@ -2052,15 +2149,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationUpdateParams.Tipping.Eur build() { - return new ConfigurationUpdateParams.Tipping.Eur( + public ConfigurationUpdateParams.Tipping.Gbp build() { + return new ConfigurationUpdateParams.Tipping.Gbp( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationUpdateParams.Tipping.Eur#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Gbp#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2074,7 +2171,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 ConfigurationUpdateParams.Tipping.Eur#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Gbp#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -2088,7 +2185,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Eur#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Gbp#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -2101,7 +2198,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Eur#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Gbp#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -2114,7 +2211,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Eur#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Gbp#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -2127,7 +2224,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Eur#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Gbp#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -2150,7 +2247,7 @@ public Builder setSmartTipThreshold(Long smartTipThreshold) { @Getter @EqualsAndHashCode(callSuper = false) - public static class Gbp { + public static class Gip { /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -2175,7 +2272,7 @@ public static class Gbp { @SerializedName("smart_tip_threshold") Long smartTipThreshold; - private Gbp( + private Gip( Map extraParams, List fixedAmounts, List percentages, @@ -2200,15 +2297,15 @@ public static class Builder { private Long smartTipThreshold; /** Finalize and obtain parameter instance from this builder. */ - public ConfigurationUpdateParams.Tipping.Gbp build() { - return new ConfigurationUpdateParams.Tipping.Gbp( + public ConfigurationUpdateParams.Tipping.Gip build() { + return new ConfigurationUpdateParams.Tipping.Gip( this.extraParams, this.fixedAmounts, this.percentages, this.smartTipThreshold); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link ConfigurationUpdateParams.Tipping.Gbp#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Gip#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -2222,7 +2319,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 ConfigurationUpdateParams.Tipping.Gbp#extraParams} for the field + * map. See {@link ConfigurationUpdateParams.Tipping.Gip#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -2236,7 +2333,7 @@ public Builder putAllExtraParam(Map map) { /** * Add an element to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Gbp#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Gip#fixedAmounts} for the field documentation. */ public Builder addFixedAmount(Long element) { if (this.fixedAmounts == null) { @@ -2249,7 +2346,7 @@ public Builder addFixedAmount(Long element) { /** * Add all elements to `fixedAmounts` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Gbp#fixedAmounts} for the field documentation. + * ConfigurationUpdateParams.Tipping.Gip#fixedAmounts} for the field documentation. */ public Builder addAllFixedAmount(List elements) { if (this.fixedAmounts == null) { @@ -2262,7 +2359,7 @@ public Builder addAllFixedAmount(List elements) { /** * Add an element to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Gbp#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Gip#percentages} for the field documentation. */ public Builder addPercentage(Long element) { if (this.percentages == null) { @@ -2275,7 +2372,7 @@ public Builder addPercentage(Long element) { /** * Add all elements to `percentages` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ConfigurationUpdateParams.Tipping.Gbp#percentages} for the field documentation. + * ConfigurationUpdateParams.Tipping.Gip#percentages} for the field documentation. */ public Builder addAllPercentage(List elements) { if (this.percentages == null) { @@ -4085,7 +4182,7 @@ public static class VerifoneP400 { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ @SerializedName("splashscreen") Object splashscreen; @@ -4134,13 +4231,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(String splashscreen) { this.splashscreen = splashscreen; return this; } - /** A File ID representing an image you would like displayed on the reader. */ + /** A File ID representing an image you want to display on the reader. */ public Builder setSplashscreen(EmptyParam splashscreen) { this.splashscreen = splashscreen; return this; diff --git a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java index 1a32c9139d0..e44555a6f0c 100644 --- a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java @@ -14,18 +14,40 @@ @Getter @EqualsAndHashCode(callSuper = false) public class LocationCreateParams extends ApiRequestParams { - /** Required. The full address of the location. */ + /** The full address of the location. */ @SerializedName("address") Address address; + /** The Kana variation of the full address of the location (Japan only). */ + @SerializedName("address_kana") + AddressKana addressKana; + + /** The Kanji variation of the full address of the location (Japan only). */ + @SerializedName("address_kanji") + AddressKanji addressKanji; + /** The ID of a configuration that will be used to customize all readers in this location. */ @SerializedName("configuration_overrides") String configurationOverrides; - /** Required. A name for the location. Maximum length is 1000 characters. */ + /** A name for the location. Maximum length is 1000 characters. */ @SerializedName("display_name") String displayName; + /** + * The Kana variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + @SerializedName("display_name_kana") + String displayNameKana; + + /** + * The Kanji variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + @SerializedName("display_name_kanji") + String displayNameKanji; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -40,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}. @@ -48,19 +70,33 @@ public class LocationCreateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** The phone number for the location. */ + @SerializedName("phone") + String phone; + private LocationCreateParams( Address address, + AddressKana addressKana, + AddressKanji addressKanji, String configurationOverrides, String displayName, + String displayNameKana, + String displayNameKanji, List expand, Map extraParams, - Object metadata) { + Object metadata, + String phone) { this.address = address; + this.addressKana = addressKana; + this.addressKanji = addressKanji; this.configurationOverrides = configurationOverrides; this.displayName = displayName; + this.displayNameKana = displayNameKana; + this.displayNameKanji = displayNameKanji; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; + this.phone = phone; } public static Builder builder() { @@ -70,45 +106,90 @@ public static Builder builder() { public static class Builder { private Address address; + private AddressKana addressKana; + + private AddressKanji addressKanji; + private String configurationOverrides; private String displayName; + private String displayNameKana; + + private String displayNameKanji; + private List expand; private Map extraParams; private Object metadata; + private String phone; + /** Finalize and obtain parameter instance from this builder. */ public LocationCreateParams build() { return new LocationCreateParams( this.address, + this.addressKana, + this.addressKanji, this.configurationOverrides, this.displayName, + this.displayNameKana, + this.displayNameKanji, this.expand, this.extraParams, - this.metadata); + this.metadata, + this.phone); } - /** Required. The full address of the location. */ + /** The full address of the location. */ public Builder setAddress(LocationCreateParams.Address address) { this.address = address; return this; } + /** The Kana variation of the full address of the location (Japan only). */ + public Builder setAddressKana(LocationCreateParams.AddressKana addressKana) { + this.addressKana = addressKana; + return this; + } + + /** The Kanji variation of the full address of the location (Japan only). */ + public Builder setAddressKanji(LocationCreateParams.AddressKanji addressKanji) { + this.addressKanji = addressKanji; + return this; + } + /** The ID of a configuration that will be used to customize all readers in this location. */ public Builder setConfigurationOverrides(String configurationOverrides) { this.configurationOverrides = configurationOverrides; return this; } - /** Required. A name for the location. Maximum length is 1000 characters. */ + /** A name for the location. Maximum length is 1000 characters. */ public Builder setDisplayName(String displayName) { this.displayName = displayName; return this; } + /** + * The Kana variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + public Builder setDisplayNameKana(String displayNameKana) { + this.displayNameKana = displayNameKana; + return this; + } + + /** + * The Kanji variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + public Builder setDisplayNameKanji(String displayNameKanji) { + this.displayNameKanji = displayNameKanji; + 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 @@ -190,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}. @@ -201,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}. @@ -210,6 +291,12 @@ public Builder setMetadata(Map metadata) { this.metadata = metadata; return this; } + + /** The phone number for the location. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } } @Getter @@ -235,11 +322,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -247,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; @@ -340,13 +430,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -358,11 +448,352 @@ 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; } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKana { + /** City or ward. */ + @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; + + /** Block or building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** Postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private AddressKana( + 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 LocationCreateParams.AddressKana build() { + return new LocationCreateParams.AddressKana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + 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 + * LocationCreateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AddressKana#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKanji { + /** City or ward. */ + @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; + + /** Block or building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** Postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private AddressKanji( + 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 LocationCreateParams.AddressKanji build() { + return new LocationCreateParams.AddressKanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + 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 + * LocationCreateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AddressKanji#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + 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 987c6c05e7e..dd39f624d90 100644 --- a/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java @@ -22,6 +22,14 @@ public class LocationUpdateParams extends ApiRequestParams { @SerializedName("address") Address address; + /** The Kana variation of the full address of the location (Japan only). */ + @SerializedName("address_kana") + AddressKana addressKana; + + /** The Kanji variation of the full address of the location (Japan only). */ + @SerializedName("address_kanji") + AddressKanji addressKanji; + /** The ID of a configuration that will be used to customize all readers in this location. */ @SerializedName("configuration_overrides") Object configurationOverrides; @@ -30,6 +38,14 @@ public class LocationUpdateParams extends ApiRequestParams { @SerializedName("display_name") Object displayName; + /** The Kana variation of the name for the location (Japan only). */ + @SerializedName("display_name_kana") + Object displayNameKana; + + /** The Kanji variation of the name for the location (Japan only). */ + @SerializedName("display_name_kanji") + Object displayNameKanji; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -44,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}. @@ -52,19 +68,33 @@ public class LocationUpdateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** The phone number for the location. */ + @SerializedName("phone") + Object phone; + private LocationUpdateParams( Address address, + AddressKana addressKana, + AddressKanji addressKanji, Object configurationOverrides, Object displayName, + Object displayNameKana, + Object displayNameKanji, List expand, Map extraParams, - Object metadata) { + Object metadata, + Object phone) { this.address = address; + this.addressKana = addressKana; + this.addressKanji = addressKanji; this.configurationOverrides = configurationOverrides; this.displayName = displayName; + this.displayNameKana = displayNameKana; + this.displayNameKanji = displayNameKanji; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; + this.phone = phone; } public static Builder builder() { @@ -74,25 +104,40 @@ public static Builder builder() { public static class Builder { private Address address; + private AddressKana addressKana; + + private AddressKanji addressKanji; + private Object configurationOverrides; private Object displayName; + private Object displayNameKana; + + private Object displayNameKanji; + private List expand; private Map extraParams; private Object metadata; + private Object phone; + /** Finalize and obtain parameter instance from this builder. */ public LocationUpdateParams build() { return new LocationUpdateParams( this.address, + this.addressKana, + this.addressKanji, this.configurationOverrides, this.displayName, + this.displayNameKana, + this.displayNameKanji, this.expand, this.extraParams, - this.metadata); + this.metadata, + this.phone); } /** @@ -105,6 +150,18 @@ public Builder setAddress(LocationUpdateParams.Address address) { return this; } + /** The Kana variation of the full address of the location (Japan only). */ + public Builder setAddressKana(LocationUpdateParams.AddressKana addressKana) { + this.addressKana = addressKana; + return this; + } + + /** The Kanji variation of the full address of the location (Japan only). */ + public Builder setAddressKanji(LocationUpdateParams.AddressKanji addressKanji) { + this.addressKanji = addressKanji; + return this; + } + /** The ID of a configuration that will be used to customize all readers in this location. */ public Builder setConfigurationOverrides(String configurationOverrides) { this.configurationOverrides = configurationOverrides; @@ -129,6 +186,30 @@ public Builder setDisplayName(EmptyParam displayName) { return this; } + /** The Kana variation of the name for the location (Japan only). */ + public Builder setDisplayNameKana(String displayNameKana) { + this.displayNameKana = displayNameKana; + return this; + } + + /** The Kana variation of the name for the location (Japan only). */ + public Builder setDisplayNameKana(EmptyParam displayNameKana) { + this.displayNameKana = displayNameKana; + return this; + } + + /** The Kanji variation of the name for the location (Japan only). */ + public Builder setDisplayNameKanji(String displayNameKanji) { + this.displayNameKanji = displayNameKanji; + return this; + } + + /** The Kanji variation of the name for the location (Japan only). */ + public Builder setDisplayNameKanji(EmptyParam displayNameKanji) { + this.displayNameKanji = displayNameKanji; + 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 @@ -210,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}. @@ -221,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}. @@ -230,6 +311,18 @@ public Builder setMetadata(Map metadata) { this.metadata = metadata; return this; } + + /** The phone number for the location. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The phone number for the location. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } } @Getter @@ -255,11 +348,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -267,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; @@ -375,25 +471,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., street, PO Box, or company name). */ + /** 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 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -411,17 +507,451 @@ 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 (ISO + * 3166-2). + */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKana { + /** City or ward. */ + @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; + + /** Block or building number. */ + @SerializedName("line1") + Object line1; + + /** Building details. */ + @SerializedName("line2") + Object line2; + + /** Postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** Prefecture. */ + @SerializedName("state") + Object state; + + /** Town or cho-me. */ + @SerializedName("town") + Object town; + + private AddressKana( + 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 LocationUpdateParams.AddressKana build() { + return new LocationUpdateParams.AddressKana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City or ward. */ + 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 + * LocationUpdateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationUpdateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Block or building number. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Building details. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Prefecture. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKanji { + /** City or ward. */ + @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; + + /** Block or building number. */ + @SerializedName("line1") + Object line1; + + /** Building details. */ + @SerializedName("line2") + Object line2; + + /** Postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** Prefecture. */ + @SerializedName("state") + Object state; + + /** Town or cho-me. */ + @SerializedName("town") + Object town; + + private AddressKanji( + 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 LocationUpdateParams.AddressKanji build() { + return new LocationUpdateParams.AddressKanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City or ward. */ + 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 + * LocationUpdateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationUpdateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Block or building number. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Building details. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ public Builder setState(String state) { this.state = state; return this; } - /** State, county, province, or region. */ + /** Prefecture. */ public Builder setState(EmptyParam state) { this.state = state; return this; } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } } } } diff --git a/src/main/java/com/stripe/param/terminal/OnboardingLinkCreateParams.java b/src/main/java/com/stripe/param/terminal/OnboardingLinkCreateParams.java new file mode 100644 index 00000000000..e0d2b2b5479 --- /dev/null +++ b/src/main/java/com/stripe/param/terminal/OnboardingLinkCreateParams.java @@ -0,0 +1,323 @@ +// File generated from our OpenAPI spec +package com.stripe.param.terminal; + +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 OnboardingLinkCreateParams 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; + + /** Required. Specific fields needed to generate the desired link type. */ + @SerializedName("link_options") + LinkOptions linkOptions; + + /** Required. The type of link being generated. */ + @SerializedName("link_type") + LinkType linkType; + + /** Stripe account ID to generate the link for. */ + @SerializedName("on_behalf_of") + String onBehalfOf; + + private OnboardingLinkCreateParams( + List expand, + Map extraParams, + LinkOptions linkOptions, + LinkType linkType, + String onBehalfOf) { + this.expand = expand; + this.extraParams = extraParams; + this.linkOptions = linkOptions; + this.linkType = linkType; + this.onBehalfOf = onBehalfOf; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List expand; + + private Map extraParams; + + private LinkOptions linkOptions; + + private LinkType linkType; + + private String onBehalfOf; + + /** Finalize and obtain parameter instance from this builder. */ + public OnboardingLinkCreateParams build() { + return new OnboardingLinkCreateParams( + this.expand, this.extraParams, this.linkOptions, this.linkType, this.onBehalfOf); + } + + /** + * 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 + * OnboardingLinkCreateParams#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 + * OnboardingLinkCreateParams#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 + * OnboardingLinkCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OnboardingLinkCreateParams#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. Specific fields needed to generate the desired link type. */ + public Builder setLinkOptions(OnboardingLinkCreateParams.LinkOptions linkOptions) { + this.linkOptions = linkOptions; + return this; + } + + /** Required. The type of link being generated. */ + public Builder setLinkType(OnboardingLinkCreateParams.LinkType linkType) { + this.linkType = linkType; + return this; + } + + /** Stripe account ID to generate the link for. */ + public Builder setOnBehalfOf(String onBehalfOf) { + this.onBehalfOf = onBehalfOf; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LinkOptions { + /** The options associated with the Apple Terms and Conditions link type. */ + @SerializedName("apple_terms_and_conditions") + AppleTermsAndConditions appleTermsAndConditions; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 LinkOptions( + AppleTermsAndConditions appleTermsAndConditions, Map extraParams) { + this.appleTermsAndConditions = appleTermsAndConditions; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AppleTermsAndConditions appleTermsAndConditions; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OnboardingLinkCreateParams.LinkOptions build() { + return new OnboardingLinkCreateParams.LinkOptions( + this.appleTermsAndConditions, this.extraParams); + } + + /** The options associated with the Apple Terms and Conditions link type. */ + public Builder setAppleTermsAndConditions( + OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions appleTermsAndConditions) { + this.appleTermsAndConditions = appleTermsAndConditions; + 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 + * OnboardingLinkCreateParams.LinkOptions#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OnboardingLinkCreateParams.LinkOptions#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 AppleTermsAndConditions { + /** Whether the link should also support users relinking their Apple account. */ + @SerializedName("allow_relinking") + Boolean allowRelinking; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 business name of the merchant accepting Apple's Terms and + * Conditions. + */ + @SerializedName("merchant_display_name") + String merchantDisplayName; + + private AppleTermsAndConditions( + Boolean allowRelinking, Map extraParams, String merchantDisplayName) { + this.allowRelinking = allowRelinking; + this.extraParams = extraParams; + this.merchantDisplayName = merchantDisplayName; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean allowRelinking; + + private Map extraParams; + + private String merchantDisplayName; + + /** Finalize and obtain parameter instance from this builder. */ + public OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions build() { + return new OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions( + this.allowRelinking, this.extraParams, this.merchantDisplayName); + } + + /** Whether the link should also support users relinking their Apple account. */ + public Builder setAllowRelinking(Boolean allowRelinking) { + this.allowRelinking = allowRelinking; + 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 + * OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * OnboardingLinkCreateParams.LinkOptions.AppleTermsAndConditions#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 business name of the merchant accepting Apple's Terms and + * Conditions. + */ + public Builder setMerchantDisplayName(String merchantDisplayName) { + this.merchantDisplayName = merchantDisplayName; + return this; + } + } + } + } + + public enum LinkType implements ApiRequestParams.EnumParam { + @SerializedName("apple_terms_and_conditions") + APPLE_TERMS_AND_CONDITIONS("apple_terms_and_conditions"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + LinkType(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java b/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java index efe83e3e0e8..2360aef69a2 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCollectInputsParams.java @@ -26,12 +26,15 @@ public class ReaderCollectInputsParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. List of inputs to be collected using the Reader */ + /** + * Required. List of inputs to be collected from the customer using the Reader. + * Maximum 5 inputs. + */ @SerializedName("inputs") 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}. @@ -348,11 +351,11 @@ public static class CustomText { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The skip button text. */ + /** Custom text for the skip button. Maximum 14 characters. */ @SerializedName("skip_button") String skipButton; - /** The submit button text. */ + /** Custom text for the submit button. Maximum 30 characters. */ @SerializedName("submit_button") String submitButton; @@ -428,13 +431,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The skip button text. */ + /** Custom text for the skip button. Maximum 14 characters. */ public Builder setSkipButton(String skipButton) { this.skipButton = skipButton; return this; } - /** The submit button text. */ + /** Custom text for the submit button. Maximum 30 characters. */ public Builder setSubmitButton(String submitButton) { this.submitButton = submitButton; return this; @@ -560,7 +563,10 @@ public static class Choice { @SerializedName("id") String id; - /** The style of the button which will be shown for this choice. */ + /** + * The style of the button which will be shown for this choice. Can be {@code primary} or + * {@code secondary}. + */ @SerializedName("style") Style style; @@ -628,7 +634,10 @@ public Builder setId(String id) { return this; } - /** The style of the button which will be shown for this choice. */ + /** + * The style of the button which will be shown for this choice. Can be {@code primary} or + * {@code secondary}. + */ public Builder setStyle(ReaderCollectInputsParams.Input.Selection.Choice.Style style) { this.style = style; return this; @@ -663,11 +672,14 @@ public enum Style implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Toggle { - /** The default value of the toggle. */ + /** The default value of the toggle. Can be {@code enabled} or {@code disabled}. */ @SerializedName("default_value") DefaultValue defaultValue; - /** The description which will be displayed for the toggle. */ + /** + * The description which will be displayed for the toggle. Maximum 50 characters. At least one + * of title or description must be provided. + */ @SerializedName("description") String description; @@ -680,7 +692,10 @@ public static class Toggle { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** The title which will be displayed for the toggle. */ + /** + * The title which will be displayed for the toggle. Maximum 50 characters. At least one of + * title or description must be provided. + */ @SerializedName("title") String title; @@ -714,14 +729,17 @@ public ReaderCollectInputsParams.Input.Toggle build() { this.defaultValue, this.description, this.extraParams, this.title); } - /** The default value of the toggle. */ + /** The default value of the toggle. Can be {@code enabled} or {@code disabled}. */ public Builder setDefaultValue( ReaderCollectInputsParams.Input.Toggle.DefaultValue defaultValue) { this.defaultValue = defaultValue; return this; } - /** The description which will be displayed for the toggle. */ + /** + * The description which will be displayed for the toggle. Maximum 50 characters. At least + * one of title or description must be provided. + */ public Builder setDescription(String description) { this.description = description; return this; @@ -755,7 +773,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** The title which will be displayed for the toggle. */ + /** + * The title which will be displayed for the toggle. Maximum 50 characters. At least one of + * title or description must be provided. + */ public Builder setTitle(String title) { this.title = title; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java index 251ac892a71..19a0d2d5dd4 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java @@ -13,7 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ReaderCollectPaymentMethodParams extends ApiRequestParams { - /** Configuration overrides. */ + /** + * Configuration overrides for this collection, such as tipping, surcharging, and customer + * cancellation settings. + */ @SerializedName("collect_config") CollectConfig collectConfig; @@ -30,7 +33,7 @@ public class ReaderCollectPaymentMethodParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. PaymentIntent ID. */ + /** Required. The ID of the PaymentIntent to collect a payment method for. */ @SerializedName("payment_intent") String paymentIntent; @@ -64,7 +67,10 @@ public ReaderCollectPaymentMethodParams build() { this.collectConfig, this.expand, this.extraParams, this.paymentIntent); } - /** Configuration overrides. */ + /** + * Configuration overrides for this collection, such as tipping, surcharging, and customer + * cancellation settings. + */ public Builder setCollectConfig(ReaderCollectPaymentMethodParams.CollectConfig collectConfig) { this.collectConfig = collectConfig; return this; @@ -122,7 +128,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. PaymentIntent ID. */ + /** Required. The ID of the PaymentIntent to collect a payment method for. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java b/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java index 766dba8d1cf..978c59329a7 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderConfirmPaymentIntentParams.java @@ -13,7 +13,7 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ReaderConfirmPaymentIntentParams extends ApiRequestParams { - /** Configuration overrides. */ + /** Configuration overrides for this confirmation, such as surcharge settings and return URL. */ @SerializedName("confirm_config") ConfirmConfig confirmConfig; @@ -30,7 +30,7 @@ public class ReaderConfirmPaymentIntentParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. PaymentIntent ID. */ + /** Required. The ID of the PaymentIntent to confirm. */ @SerializedName("payment_intent") String paymentIntent; @@ -64,7 +64,7 @@ public ReaderConfirmPaymentIntentParams build() { this.confirmConfig, this.expand, this.extraParams, this.paymentIntent); } - /** Configuration overrides. */ + /** Configuration overrides for this confirmation, such as surcharge settings and return URL. */ public Builder setConfirmConfig(ReaderConfirmPaymentIntentParams.ConfirmConfig confirmConfig) { this.confirmConfig = confirmConfig; return this; @@ -122,7 +122,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. PaymentIntent ID. */ + /** Required. The ID of the PaymentIntent to confirm. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; 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/ReaderPresentPaymentMethodParams.java b/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java index e2fb109db94..e1ff2e6accd 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java @@ -375,7 +375,7 @@ public static class InteracPresent { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Card Number. */ + /** The Interac card number. */ @SerializedName("number") String number; @@ -425,7 +425,7 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Card Number. */ + /** The Interac card number. */ public Builder setNumber(String number) { this.number = number; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java b/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java index 826c2e8bcc9..1c151700007 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java @@ -26,11 +26,14 @@ public class ReaderProcessPaymentIntentParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. PaymentIntent ID */ + /** Required. The ID of the PaymentIntent to process on the reader. */ @SerializedName("payment_intent") String paymentIntent; - /** Configuration overrides. */ + /** + * Configuration overrides for this transaction, such as tipping and customer cancellation + * settings. + */ @SerializedName("process_config") ProcessConfig processConfig; @@ -116,13 +119,16 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. PaymentIntent ID */ + /** Required. The ID of the PaymentIntent to process on the reader. */ public Builder setPaymentIntent(String paymentIntent) { this.paymentIntent = paymentIntent; return this; } - /** Configuration overrides. */ + /** + * Configuration overrides for this transaction, such as tipping and customer cancellation + * settings. + */ public Builder setProcessConfig(ReaderProcessPaymentIntentParams.ProcessConfig processConfig) { this.processConfig = processConfig; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderProcessSetupIntentParams.java b/src/main/java/com/stripe/param/terminal/ReaderProcessSetupIntentParams.java index 74272ee0f8a..cae1b068ad7 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderProcessSetupIntentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderProcessSetupIntentParams.java @@ -35,11 +35,11 @@ public class ReaderProcessSetupIntentParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Configuration overrides. */ + /** Configuration overrides for this setup, such as MOTO and customer cancellation settings. */ @SerializedName("process_config") ProcessConfig processConfig; - /** Required. SetupIntent ID */ + /** Required. The ID of the SetupIntent to process on the reader. */ @SerializedName("setup_intent") String setupIntent; @@ -140,13 +140,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Configuration overrides. */ + /** Configuration overrides for this setup, such as MOTO and customer cancellation settings. */ public Builder setProcessConfig(ReaderProcessSetupIntentParams.ProcessConfig processConfig) { this.processConfig = processConfig; return this; } - /** Required. SetupIntent ID */ + /** Required. The ID of the SetupIntent to process on the reader. */ public Builder setSetupIntent(String setupIntent) { this.setupIntent = setupIntent; return this; diff --git a/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java b/src/main/java/com/stripe/param/terminal/ReaderRefundPaymentParams.java index 69eeb69343e..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}. @@ -58,7 +58,7 @@ public class ReaderRefundPaymentParams extends ApiRequestParams { @SerializedName("refund_application_fee") Boolean refundApplicationFee; - /** Configuration overrides. */ + /** Configuration overrides for this refund, such as customer cancellation settings. */ @SerializedName("refund_payment_config") RefundPaymentConfig refundPaymentConfig; @@ -237,7 +237,7 @@ public Builder setRefundApplicationFee(Boolean refundApplicationFee) { return this; } - /** Configuration overrides. */ + /** Configuration overrides for this refund, such as customer cancellation settings. */ public Builder setRefundPaymentConfig( ReaderRefundPaymentParams.RefundPaymentConfig refundPaymentConfig) { this.refundPaymentConfig = refundPaymentConfig; diff --git a/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java b/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java index 1c1c79b1b1a..0ab5354728d 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderSetReaderDisplayParams.java @@ -13,7 +13,7 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ReaderSetReaderDisplayParams extends ApiRequestParams { - /** Cart. */ + /** Cart details to display on the reader screen, including line items, amounts, and currency. */ @SerializedName("cart") Cart cart; @@ -30,7 +30,10 @@ public class ReaderSetReaderDisplayParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Type */ + /** + * Required. Type of information to display. Only {@code cart} is currently + * supported. + */ @SerializedName("type") Type type; @@ -60,7 +63,9 @@ public ReaderSetReaderDisplayParams build() { return new ReaderSetReaderDisplayParams(this.cart, this.expand, this.extraParams, this.type); } - /** Cart. */ + /** + * Cart details to display on the reader screen, including line items, amounts, and currency. + */ public Builder setCart(ReaderSetReaderDisplayParams.Cart cart) { this.cart = cart; return this; @@ -118,7 +123,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Type */ + /** + * Required. Type of information to display. Only {@code cart} is currently + * supported. + */ public Builder setType(ReaderSetReaderDisplayParams.Type type) { this.type = type; return this; @@ -145,15 +153,21 @@ public static class Cart { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Array of line items that were purchased. */ + /** Required. Array of line items to display. */ @SerializedName("line_items") List lineItems; - /** The amount of tax in cents. */ + /** + * The amount of tax in the smallest + * currency unit. + */ @SerializedName("tax") Long tax; - /** Required. Total balance of cart due in cents. */ + /** + * Required. Total balance of cart due in the smallest currency unit. + */ @SerializedName("total") Long total; @@ -253,13 +267,19 @@ public Builder addAllLineItem(List e return this; } - /** The amount of tax in cents. */ + /** + * The amount of tax in the smallest + * currency unit. + */ public Builder setTax(Long tax) { this.tax = tax; return this; } - /** Required. Total balance of cart due in cents. */ + /** + * Required. Total balance of cart due in the smallest currency unit. + */ public Builder setTotal(Long total) { this.total = total; return this; @@ -269,7 +289,10 @@ public Builder setTotal(Long total) { @Getter @EqualsAndHashCode(callSuper = false) public static class LineItem { - /** Required. The price of the item in cents. */ + /** + * Required. The price of the item in the smallest currency unit. + */ @SerializedName("amount") Long amount; @@ -317,7 +340,10 @@ public ReaderSetReaderDisplayParams.Cart.LineItem build() { this.amount, this.description, this.extraParams, this.quantity); } - /** Required. The price of the item in cents. */ + /** + * Required. The price of the item in the smallest currency unit. + */ public Builder setAmount(Long amount) { this.amount = amount; return this; 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 7e344b0e3fb..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}. @@ -682,11 +684,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -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; @@ -793,13 +798,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the 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). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -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/billing/MeterEventStreamCreateParams.java b/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java index 5b0d475cd51..8712b57029c 100644 --- a/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java @@ -14,7 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class MeterEventStreamCreateParams extends ApiRequestParams { - /** Required. List of meter events to include in the request. */ + /** + * Required. List of meter events to include in the request. Supports up to 100 + * events per request. + */ @SerializedName("events") List events; 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..7543b5309c1 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -0,0 +1,16778 @@ +// 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; + + /** The default contact phone for the Account. */ + @SerializedName("contact_phone") + String contactPhone; + + /** + * 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, + String contactPhone, + Dashboard dashboard, + Defaults defaults, + String displayName, + Map extraParams, + Identity identity, + List include, + Map metadata) { + this.accountToken = accountToken; + this.configuration = configuration; + this.contactEmail = contactEmail; + this.contactPhone = contactPhone; + 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 String contactPhone; + + 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.contactPhone, + 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; + } + + /** The default contact phone for the Account. */ + public Builder setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + 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; + + /** When the business was incorporated or registered. */ + @SerializedName("registration_date") + RegistrationDate registrationDate; + + /** 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, + RegistrationDate registrationDate, + 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.registrationDate = registrationDate; + 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 RegistrationDate registrationDate; + + 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.registrationDate, + 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; + } + + /** When the business was incorporated or registered. */ + public Builder setRegistrationDate( + AccountCreateParams.Identity.BusinessDetails.RegistrationDate registrationDate) { + this.registrationDate = registrationDate; + 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("gb_vat") + GB_VAT("gb_vat"), + + @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 RegistrationDate { + /** Required. The day of registration, between 1 and 31. */ + @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 registration, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of registration. */ + @SerializedName("year") + Long year; + + private RegistrationDate(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.BusinessDetails.RegistrationDate build() { + return new AccountCreateParams.Identity.BusinessDetails.RegistrationDate( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of registration, between 1 and 31. */ + 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.BusinessDetails.RegistrationDate#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.RegistrationDate#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 registration, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of registration. */ + public Builder setYear(Long year) { + this.year = year; + 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..80f89389a60 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -0,0 +1,8203 @@ +// 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; + + /** The default contact phone for the Account. */ + @SerializedName("contact_phone") + String contactPhone; + + /** + * 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 contactPhone, + String displayName, + Map extraParams, + Identity identity) { + this.contactEmail = contactEmail; + this.contactPhone = contactPhone; + 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 contactPhone; + + 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.contactPhone, 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; + } + + /** The default contact phone for the Account. */ + public Builder setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + 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; + + /** When the business was incorporated or registered. */ + @SerializedName("registration_date") + RegistrationDate registrationDate; + + /** 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, + RegistrationDate registrationDate, + 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.registrationDate = registrationDate; + 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 RegistrationDate registrationDate; + + 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.registrationDate, + 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; + } + + /** When the business was incorporated or registered. */ + public Builder setRegistrationDate( + AccountTokenCreateParams.Identity.BusinessDetails.RegistrationDate registrationDate) { + this.registrationDate = registrationDate; + 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("gb_vat") + GB_VAT("gb_vat"), + + @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 RegistrationDate { + /** Required. The day of registration, between 1 and 31. */ + @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 registration, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of registration. */ + @SerializedName("year") + Long year; + + private RegistrationDate(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.BusinessDetails.RegistrationDate build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.RegistrationDate( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of registration, between 1 and 31. */ + 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.BusinessDetails.RegistrationDate#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.RegistrationDate#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 registration, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of registration. */ + public Builder setYear(Long year) { + this.year = year; + 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..fea3ba60a71 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -0,0 +1,18244 @@ +// 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; + + /** The default contact phone for the Account. */ + @SerializedName("contact_phone") + Object contactPhone; + + /** + * 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, + Object contactPhone, + Dashboard dashboard, + Defaults defaults, + Object displayName, + Map extraParams, + Identity identity, + List include, + Map metadata) { + this.accountToken = accountToken; + this.configuration = configuration; + this.contactEmail = contactEmail; + this.contactPhone = contactPhone; + 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 Object contactPhone; + + 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.contactPhone, + 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; + } + + /** The default contact phone for the Account. */ + public Builder setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + return this; + } + + /** The default contact phone for the Account. */ + public Builder setContactPhone(EmptyParam contactPhone) { + this.contactPhone = contactPhone; + 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; + + /** When the business was incorporated or registered. */ + @SerializedName("registration_date") + RegistrationDate registrationDate; + + /** 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, + RegistrationDate registrationDate, + 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.registrationDate = registrationDate; + 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 RegistrationDate registrationDate; + + 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.registrationDate, + 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; + } + + /** When the business was incorporated or registered. */ + public Builder setRegistrationDate( + AccountUpdateParams.Identity.BusinessDetails.RegistrationDate registrationDate) { + this.registrationDate = registrationDate; + 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("gb_vat") + GB_VAT("gb_vat"), + + @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 RegistrationDate { + /** Required. The day of registration, between 1 and 31. */ + @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 registration, between 1 and 12. */ + @SerializedName("month") + Long month; + + /** Required. The four-digit year of registration. */ + @SerializedName("year") + Long year; + + private RegistrationDate(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.BusinessDetails.RegistrationDate build() { + return new AccountUpdateParams.Identity.BusinessDetails.RegistrationDate( + this.day, this.extraParams, this.month, this.year); + } + + /** Required. The day of registration, between 1 and 31. */ + 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.BusinessDetails.RegistrationDate#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.RegistrationDate#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 registration, between 1 and 12. */ + public Builder setMonth(Long month) { + this.month = month; + return this; + } + + /** Required. The four-digit year of registration. */ + public Builder setYear(Long year) { + this.year = year; + 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/EventDestinationListParams.java b/src/main/java/com/stripe/param/v2/core/EventDestinationListParams.java index 1c36684abab..c13bf0cf2ff 100644 --- a/src/main/java/com/stripe/param/v2/core/EventDestinationListParams.java +++ b/src/main/java/com/stripe/param/v2/core/EventDestinationListParams.java @@ -30,12 +30,12 @@ public class EventDestinationListParams extends ApiRequestParams { /** The page size. */ @SerializedName("limit") - Integer limit; + Long limit; private EventDestinationListParams( Map extraParams, List include, - Integer limit) { + Long limit) { this.extraParams = extraParams; this.include = include; this.limit = limit; @@ -50,7 +50,7 @@ public static class Builder { private List include; - private Integer limit; + private Long limit; /** Finalize and obtain parameter instance from this builder. */ public EventDestinationListParams build() { @@ -110,7 +110,7 @@ public Builder addAllInclude(List elements) } /** The page size. */ - public Builder setLimit(Integer limit) { + public Builder setLimit(Long limit) { this.limit = limit; return this; } diff --git a/src/main/java/com/stripe/param/v2/core/EventListParams.java b/src/main/java/com/stripe/param/v2/core/EventListParams.java index 735cb6c2b09..c0d2274654f 100644 --- a/src/main/java/com/stripe/param/v2/core/EventListParams.java +++ b/src/main/java/com/stripe/param/v2/core/EventListParams.java @@ -3,7 +3,10 @@ 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; @@ -11,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class EventListParams extends ApiRequestParams { + /** Set of filters to query events within a range of {@code created} timestamps. */ + @SerializedName("created") + Created created; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -22,16 +29,27 @@ public class EventListParams extends ApiRequestParams { /** The page size. */ @SerializedName("limit") - Integer limit; + Long limit; - /** Required. Primary object ID used to retrieve related events. */ + /** Primary object ID used to retrieve related events. */ @SerializedName("object_id") String objectId; - private EventListParams(Map extraParams, Integer limit, String objectId) { + /** An array of up to 20 strings containing specific event names. */ + @SerializedName("types") + List types; + + private EventListParams( + Created created, + Map extraParams, + Long limit, + String objectId, + List types) { + this.created = created; this.extraParams = extraParams; this.limit = limit; this.objectId = objectId; + this.types = types; } public static Builder builder() { @@ -39,15 +57,26 @@ public static Builder builder() { } public static class Builder { + private Created created; + private Map extraParams; - private Integer limit; + private Long limit; private String objectId; + private List types; + /** Finalize and obtain parameter instance from this builder. */ public EventListParams build() { - return new EventListParams(this.extraParams, this.limit, this.objectId); + return new EventListParams( + this.created, this.extraParams, this.limit, this.objectId, this.types); + } + + /** Set of filters to query events within a range of {@code created} timestamps. */ + public Builder setCreated(EventListParams.Created created) { + this.created = created; + return this; } /** @@ -77,15 +106,150 @@ public Builder putAllExtraParam(Map map) { } /** The page size. */ - public Builder setLimit(Integer limit) { + public Builder setLimit(Long limit) { this.limit = limit; return this; } - /** Required. Primary object ID used to retrieve related events. */ + /** Primary object ID used to retrieve related events. */ public Builder setObjectId(String objectId) { this.objectId = objectId; return this; } + + /** + * Add an element to `types` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * EventListParams#types} for the field documentation. + */ + public Builder addType(String element) { + if (this.types == null) { + this.types = new ArrayList<>(); + } + this.types.add(element); + return this; + } + + /** + * Add all elements to `types` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * EventListParams#types} for the field documentation. + */ + public Builder addAllType(List elements) { + if (this.types == null) { + this.types = new ArrayList<>(); + } + this.types.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Created { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Filter for events created after the specified timestamp. */ + @SerializedName("gt") + Instant gt; + + /** Filter for events created at or after the specified timestamp. */ + @SerializedName("gte") + Instant gte; + + /** Filter for events created before the specified timestamp. */ + @SerializedName("lt") + Instant lt; + + /** Filter for events created at or before the specified timestamp. */ + @SerializedName("lte") + Instant lte; + + private Created( + Map extraParams, Instant gt, Instant gte, Instant lt, Instant lte) { + this.extraParams = extraParams; + this.gt = gt; + this.gte = gte; + this.lt = lt; + this.lte = lte; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Instant gt; + + private Instant gte; + + private Instant lt; + + private Instant lte; + + /** Finalize and obtain parameter instance from this builder. */ + public EventListParams.Created build() { + return new EventListParams.Created(this.extraParams, this.gt, this.gte, this.lt, this.lte); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * EventListParams.Created#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link EventListParams.Created#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Filter for events created after the specified timestamp. */ + public Builder setGt(Instant gt) { + this.gt = gt; + return this; + } + + /** Filter for events created at or after the specified timestamp. */ + public Builder setGte(Instant gte) { + this.gte = gte; + return this; + } + + /** Filter for events created before the specified timestamp. */ + public Builder setLt(Instant lt) { + this.lt = lt; + return this; + } + + /** Filter for events created at or before the specified timestamp. */ + public Builder setLte(Instant lte) { + this.lte = lte; + return this; + } + } } } 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/BalanceSettingsService.java b/src/main/java/com/stripe/service/BalanceSettingsService.java new file mode 100644 index 00000000000..463e5cd1756 --- /dev/null +++ b/src/main/java/com/stripe/service/BalanceSettingsService.java @@ -0,0 +1,95 @@ +// File generated from our OpenAPI spec +package com.stripe.service; + +import com.stripe.exception.StripeException; +import com.stripe.model.BalanceSettings; +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.BalanceSettingsRetrieveParams; +import com.stripe.param.BalanceSettingsUpdateParams; + +public final class BalanceSettingsService extends ApiService { + public BalanceSettingsService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings retrieve(BalanceSettingsRetrieveParams params) throws StripeException { + return retrieve(params, (RequestOptions) null); + } + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings retrieve(RequestOptions options) throws StripeException { + return retrieve((BalanceSettingsRetrieveParams) null, options); + } + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings retrieve() throws StripeException { + return retrieve((BalanceSettingsRetrieveParams) null, (RequestOptions) null); + } + /** + * Retrieves balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings retrieve(BalanceSettingsRetrieveParams params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, BalanceSettings.class); + } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update(BalanceSettingsUpdateParams params) throws StripeException { + return update(params, (RequestOptions) null); + } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update(RequestOptions options) throws StripeException { + return update((BalanceSettingsUpdateParams) null, options); + } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update() throws StripeException { + return update((BalanceSettingsUpdateParams) null, (RequestOptions) null); + } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update(BalanceSettingsUpdateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/balance_settings"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, BalanceSettings.class); + } +} diff --git a/src/main/java/com/stripe/service/CustomerService.java b/src/main/java/com/stripe/service/CustomerService.java index f9f899556bd..6d71cc14460 100644 --- a/src/main/java/com/stripe/service/CustomerService.java +++ b/src/main/java/com/stripe/service/CustomerService.java @@ -69,14 +69,14 @@ public Customer retrieve(String customer, CustomerRetrieveParams params, Request } /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -86,14 +86,14 @@ public Customer update(String customer, CustomerUpdateParams params) throws Stri } /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -103,14 +103,14 @@ public Customer update(String customer, RequestOptions options) throws StripeExc } /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. @@ -120,14 +120,14 @@ public Customer update(String customer) throws StripeException { } /** * Updates the specified customer by setting the values of the parameters passed. Any parameters - * not provided will be left unchanged. For example, if you pass the source - * parameter, that becomes the customer’s active source (e.g., a card) to be used for all charges - * in the future. When you update a customer to a new valid card source by passing the + * not provided are left unchanged. For example, if you pass the source + * parameter, that becomes the customer’s active source (such as a card) to be used for all + * charges in the future. When you update a customer to a new valid card source by passing the * source parameter: for each of the customer’s current subscriptions, if the * subscription bills automatically and is in the {@code past_due} state, then the latest open - * invoice for the subscription with automatic collection enabled will be retried. This retry will - * not count as an automatic retry, and will not affect the next regularly scheduled payment for - * the invoice. Changing the default_source for a customer will not trigger this + * invoice for the subscription with automatic collection enabled is retried. This retry doesn’t + * count as an automatic retry, and doesn’t affect the next regularly scheduled payment for the + * invoice. Changing the default_source for a customer doesn’t trigger this * behavior. * *

This request accepts mostly the same arguments as the customer creation call. diff --git a/src/main/java/com/stripe/service/ExchangeRateService.java b/src/main/java/com/stripe/service/ExchangeRateService.java index c8e50cb422f..83cacab1a98 100644 --- a/src/main/java/com/stripe/service/ExchangeRateService.java +++ b/src/main/java/com/stripe/service/ExchangeRateService.java @@ -21,29 +21,45 @@ public ExchangeRateService(StripeResponseGetter responseGetter) { } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ public StripeCollection list(ExchangeRateListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((ExchangeRateListParams) null, options); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ public StripeCollection list() throws StripeException { return list((ExchangeRateListParams) null, (RequestOptions) null); } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Returns a list of objects that contain the rates at which foreign currencies are converted + * to one another. Only shows the currencies for which Stripe supports. */ public StripeCollection list(ExchangeRateListParams params, RequestOptions options) throws StripeException { @@ -57,20 +73,44 @@ public StripeCollection list(ExchangeRateListParams params, Reques options); return this.request(request, new TypeToken>() {}.getType()); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ public ExchangeRate retrieve(String rateId, ExchangeRateRetrieveParams params) throws StripeException { return retrieve(rateId, params, (RequestOptions) null); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ public ExchangeRate retrieve(String rateId, RequestOptions options) throws StripeException { return retrieve(rateId, (ExchangeRateRetrieveParams) null, options); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ public ExchangeRate retrieve(String rateId) throws StripeException { return retrieve(rateId, (ExchangeRateRetrieveParams) null, (RequestOptions) null); } - /** Retrieves the exchange rates from the given currency to every supported currency. */ + /** + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

Retrieves the exchange rates from the given currency to every supported currency. + */ public ExchangeRate retrieve( String rateId, ExchangeRateRetrieveParams params, RequestOptions options) throws StripeException { 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/InvoiceService.java b/src/main/java/com/stripe/service/InvoiceService.java index 30efc494903..979dc51661d 100644 --- a/src/main/java/com/stripe/service/InvoiceService.java +++ b/src/main/java/com/stripe/service/InvoiceService.java @@ -181,8 +181,8 @@ public StripeCollection list(InvoiceListParams params, RequestOptions o /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create(InvoiceCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -190,8 +190,8 @@ public Invoice create(InvoiceCreateParams params) throws StripeException { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create(RequestOptions options) throws StripeException { return create((InvoiceCreateParams) null, options); @@ -199,8 +199,8 @@ public Invoice create(RequestOptions options) throws StripeException { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create() throws StripeException { return create((InvoiceCreateParams) null, (RequestOptions) null); @@ -208,8 +208,8 @@ public Invoice create() throws StripeException { /** * This endpoint creates a draft invoice for a given customer. The invoice remains a draft until * you finalize the invoice, which - * allows you to pay or send the invoice to your customers. + * allows you to pay or send the invoice to your customers. */ public Invoice create(InvoiceCreateParams params, RequestOptions options) throws StripeException { String path = "/v1/invoices"; diff --git a/src/main/java/com/stripe/service/PaymentAttemptRecordService.java b/src/main/java/com/stripe/service/PaymentAttemptRecordService.java new file mode 100644 index 00000000000..e27811829a2 --- /dev/null +++ b/src/main/java/com/stripe/service/PaymentAttemptRecordService.java @@ -0,0 +1,69 @@ +// File generated from our OpenAPI spec +package com.stripe.service; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.PaymentAttemptRecord; +import com.stripe.model.StripeCollection; +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.PaymentAttemptRecordListParams; +import com.stripe.param.PaymentAttemptRecordRetrieveParams; + +public final class PaymentAttemptRecordService extends ApiService { + public PaymentAttemptRecordService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** List all the Payment Attempt Records attached to the specified Payment Record. */ + public StripeCollection list(PaymentAttemptRecordListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** List all the Payment Attempt Records attached to the specified Payment Record. */ + public StripeCollection list( + PaymentAttemptRecordListParams params, RequestOptions options) throws StripeException { + String path = "/v1/payment_attempt_records"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request( + request, new TypeToken>() {}.getType()); + } + /** Retrieves a Payment Attempt Record with the given ID. */ + public PaymentAttemptRecord retrieve(String id, PaymentAttemptRecordRetrieveParams params) + throws StripeException { + return retrieve(id, params, (RequestOptions) null); + } + /** Retrieves a Payment Attempt Record with the given ID. */ + public PaymentAttemptRecord retrieve(String id, RequestOptions options) throws StripeException { + return retrieve(id, (PaymentAttemptRecordRetrieveParams) null, options); + } + /** Retrieves a Payment Attempt Record with the given ID. */ + public PaymentAttemptRecord retrieve(String id) throws StripeException { + return retrieve(id, (PaymentAttemptRecordRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves a Payment Attempt Record with the given ID. */ + public PaymentAttemptRecord retrieve( + String id, PaymentAttemptRecordRetrieveParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/payment_attempt_records/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentAttemptRecord.class); + } +} diff --git a/src/main/java/com/stripe/service/PaymentIntentAmountDetailsLineItemService.java b/src/main/java/com/stripe/service/PaymentIntentAmountDetailsLineItemService.java new file mode 100644 index 00000000000..87f4a66d2b4 --- /dev/null +++ b/src/main/java/com/stripe/service/PaymentIntentAmountDetailsLineItemService.java @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +package com.stripe.service; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.PaymentIntentAmountDetailsLineItem; +import com.stripe.model.StripeCollection; +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.PaymentIntentAmountDetailsLineItemListParams; + +public final class PaymentIntentAmountDetailsLineItemService extends ApiService { + public PaymentIntentAmountDetailsLineItemService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Lists all LineItems of a given PaymentIntent. */ + public StripeCollection list( + String intent, PaymentIntentAmountDetailsLineItemListParams params) throws StripeException { + return list(intent, params, (RequestOptions) null); + } + /** Lists all LineItems of a given PaymentIntent. */ + public StripeCollection list( + String intent, RequestOptions options) throws StripeException { + return list(intent, (PaymentIntentAmountDetailsLineItemListParams) null, options); + } + /** Lists all LineItems of a given PaymentIntent. */ + public StripeCollection list(String intent) + throws StripeException { + return list(intent, (PaymentIntentAmountDetailsLineItemListParams) null, (RequestOptions) null); + } + /** Lists all LineItems of a given PaymentIntent. */ + public StripeCollection list( + String intent, PaymentIntentAmountDetailsLineItemListParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_intents/%s/amount_details_line_items", ApiResource.urlEncodeId(intent)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request( + request, + new TypeToken>() {}.getType()); + } +} diff --git a/src/main/java/com/stripe/service/PaymentIntentService.java b/src/main/java/com/stripe/service/PaymentIntentService.java index 4c5f5ce95b4..4baa049de19 100644 --- a/src/main/java/com/stripe/service/PaymentIntentService.java +++ b/src/main/java/com/stripe/service/PaymentIntentService.java @@ -667,4 +667,9 @@ public PaymentIntent verifyMicrodeposits( options); return this.request(request, PaymentIntent.class); } + + public com.stripe.service.PaymentIntentAmountDetailsLineItemService amountDetailsLineItems() { + return new com.stripe.service.PaymentIntentAmountDetailsLineItemService( + this.getResponseGetter()); + } } 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/PaymentRecordService.java b/src/main/java/com/stripe/service/PaymentRecordService.java new file mode 100644 index 00000000000..8ab61a4ef4d --- /dev/null +++ b/src/main/java/com/stripe/service/PaymentRecordService.java @@ -0,0 +1,230 @@ +// File generated from our OpenAPI spec +package com.stripe.service; + +import com.stripe.exception.StripeException; +import com.stripe.model.PaymentRecord; +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.PaymentRecordReportPaymentAttemptCanceledParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptInformationalParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptParams; +import com.stripe.param.PaymentRecordReportPaymentParams; +import com.stripe.param.PaymentRecordReportRefundParams; +import com.stripe.param.PaymentRecordRetrieveParams; + +public final class PaymentRecordService extends ApiService { + public PaymentRecordService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Retrieves a Payment Record with the given ID. */ + public PaymentRecord retrieve(String id, PaymentRecordRetrieveParams params) + throws StripeException { + return retrieve(id, params, (RequestOptions) null); + } + /** Retrieves a Payment Record with the given ID. */ + public PaymentRecord retrieve(String id, RequestOptions options) throws StripeException { + return retrieve(id, (PaymentRecordRetrieveParams) null, options); + } + /** Retrieves a Payment Record with the given ID. */ + public PaymentRecord retrieve(String id) throws StripeException { + return retrieve(id, (PaymentRecordRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves a Payment Record with the given ID. */ + public PaymentRecord retrieve( + String id, PaymentRecordRetrieveParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/payment_records/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } + /** + * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be + * specified if all other payment attempts are canceled or failed. + */ + public PaymentRecord reportPaymentAttempt( + String id, PaymentRecordReportPaymentAttemptParams params) throws StripeException { + return reportPaymentAttempt(id, params, (RequestOptions) null); + } + /** + * Report a new payment attempt on the specified Payment Record. A new payment attempt can only be + * specified if all other payment attempts are canceled or failed. + */ + public PaymentRecord reportPaymentAttempt( + String id, PaymentRecordReportPaymentAttemptParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v1/payment_records/%s/report_payment_attempt", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled( + String id, PaymentRecordReportPaymentAttemptCanceledParams params) throws StripeException { + return reportPaymentAttemptCanceled(id, params, (RequestOptions) null); + } + /** Report that the most recent payment attempt on the specified Payment Record was canceled. */ + public PaymentRecord reportPaymentAttemptCanceled( + String id, PaymentRecordReportPaymentAttemptCanceledParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_canceled", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed( + String id, PaymentRecordReportPaymentAttemptFailedParams params) throws StripeException { + return reportPaymentAttemptFailed(id, params, (RequestOptions) null); + } + /** + * Report that the most recent payment attempt on the specified Payment Record failed or errored. + */ + public PaymentRecord reportPaymentAttemptFailed( + String id, PaymentRecordReportPaymentAttemptFailedParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_failed", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed( + String id, PaymentRecordReportPaymentAttemptGuaranteedParams params) throws StripeException { + return reportPaymentAttemptGuaranteed(id, params, (RequestOptions) null); + } + /** Report that the most recent payment attempt on the specified Payment Record was guaranteed. */ + public PaymentRecord reportPaymentAttemptGuaranteed( + String id, PaymentRecordReportPaymentAttemptGuaranteedParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_guaranteed", + ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + String id, PaymentRecordReportPaymentAttemptInformationalParams params) + throws StripeException { + return reportPaymentAttemptInformational(id, params, (RequestOptions) null); + } + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational(String id, RequestOptions options) + throws StripeException { + return reportPaymentAttemptInformational( + id, (PaymentRecordReportPaymentAttemptInformationalParams) null, options); + } + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational(String id) throws StripeException { + return reportPaymentAttemptInformational( + id, (PaymentRecordReportPaymentAttemptInformationalParams) null, (RequestOptions) null); + } + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + String id, + PaymentRecordReportPaymentAttemptInformationalParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_informational", + ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund(String id, PaymentRecordReportRefundParams params) + throws StripeException { + return reportRefund(id, params, (RequestOptions) null); + } + /** Report that the most recent payment attempt on the specified Payment Record was refunded. */ + public PaymentRecord reportRefund( + String id, PaymentRecordReportRefundParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v1/payment_records/%s/report_refund", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } + /** + * Report a new Payment Record. You may report a Payment Record as it is initialized and later + * report updates through the other report_* methods, or report Payment Records in a terminal + * state directly, through this method. + */ + public PaymentRecord reportPayment(PaymentRecordReportPaymentParams params) + throws StripeException { + return reportPayment(params, (RequestOptions) null); + } + /** + * Report a new Payment Record. You may report a Payment Record as it is initialized and later + * report updates through the other report_* methods, or report Payment Records in a terminal + * state directly, through this method. + */ + public PaymentRecord reportPayment( + PaymentRecordReportPaymentParams params, RequestOptions options) throws StripeException { + String path = "/v1/payment_records/report_payment"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } +} diff --git a/src/main/java/com/stripe/service/PayoutService.java b/src/main/java/com/stripe/service/PayoutService.java index 5b0df02199a..b46edd7bcb7 100644 --- a/src/main/java/com/stripe/service/PayoutService.java +++ b/src/main/java/com/stripe/service/PayoutService.java @@ -218,8 +218,8 @@ public Payout cancel(String payout, PayoutCancelParams params, RequestOptions op } /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -230,8 +230,8 @@ public Payout reverse(String payout, PayoutReverseParams params) throws StripeEx } /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -242,8 +242,8 @@ public Payout reverse(String payout, RequestOptions options) throws StripeExcept } /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and @@ -254,8 +254,8 @@ public Payout reverse(String payout) throws StripeException { } /** * Reverses a payout by debiting the destination bank account. At this time, you can only reverse - * payouts for connected accounts to US bank accounts. If the payout is manual and in the {@code - * pending} status, use {@code /v1/payouts/:id/cancel} instead. + * payouts for connected accounts to US and Canadian bank accounts. If the payout is manual and in + * the {@code pending} status, use {@code /v1/payouts/:id/cancel} instead. * *

By requesting a reversal through {@code /v1/payouts/:id/reverse}, you confirm that the * authorized signatory of the selected bank account authorizes the debit on the bank account and diff --git a/src/main/java/com/stripe/service/PromotionCodeService.java b/src/main/java/com/stripe/service/PromotionCodeService.java index 706d2adbc87..42cefa9cdbb 100644 --- a/src/main/java/com/stripe/service/PromotionCodeService.java +++ b/src/main/java/com/stripe/service/PromotionCodeService.java @@ -49,15 +49,15 @@ public StripeCollection list( return this.request(request, new TypeToken>() {}.getType()); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public PromotionCode create(PromotionCodeCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public PromotionCode create(PromotionCodeCreateParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/RadarService.java b/src/main/java/com/stripe/service/RadarService.java index ab27ef3a18d..c3281a95d64 100644 --- a/src/main/java/com/stripe/service/RadarService.java +++ b/src/main/java/com/stripe/service/RadarService.java @@ -13,6 +13,10 @@ public com.stripe.service.radar.EarlyFraudWarningService earlyFraudWarnings() { return new com.stripe.service.radar.EarlyFraudWarningService(this.getResponseGetter()); } + public com.stripe.service.radar.PaymentEvaluationService paymentEvaluations() { + return new com.stripe.service.radar.PaymentEvaluationService(this.getResponseGetter()); + } + public com.stripe.service.radar.ValueListItemService valueListItems() { return new com.stripe.service.radar.ValueListItemService(this.getResponseGetter()); } 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/TaxService.java b/src/main/java/com/stripe/service/TaxService.java index 58b250a5063..1d5409dde43 100644 --- a/src/main/java/com/stripe/service/TaxService.java +++ b/src/main/java/com/stripe/service/TaxService.java @@ -9,6 +9,10 @@ public TaxService(StripeResponseGetter responseGetter) { super(responseGetter); } + public com.stripe.service.tax.AssociationService associations() { + return new com.stripe.service.tax.AssociationService(this.getResponseGetter()); + } + public com.stripe.service.tax.CalculationService calculations() { return new com.stripe.service.tax.CalculationService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/TerminalService.java b/src/main/java/com/stripe/service/TerminalService.java index c1996484c08..467d19f458f 100644 --- a/src/main/java/com/stripe/service/TerminalService.java +++ b/src/main/java/com/stripe/service/TerminalService.java @@ -21,6 +21,10 @@ public com.stripe.service.terminal.LocationService locations() { return new com.stripe.service.terminal.LocationService(this.getResponseGetter()); } + public com.stripe.service.terminal.OnboardingLinkService onboardingLinks() { + return new com.stripe.service.terminal.OnboardingLinkService(this.getResponseGetter()); + } + public com.stripe.service.terminal.ReaderService readers() { return new com.stripe.service.terminal.ReaderService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/V1Services.java b/src/main/java/com/stripe/service/V1Services.java index 2d5b8e47c84..1801908a9c6 100644 --- a/src/main/java/com/stripe/service/V1Services.java +++ b/src/main/java/com/stripe/service/V1Services.java @@ -37,6 +37,10 @@ public com.stripe.service.BalanceService balance() { return new com.stripe.service.BalanceService(this.getResponseGetter()); } + public com.stripe.service.BalanceSettingsService balanceSettings() { + return new com.stripe.service.BalanceSettingsService(this.getResponseGetter()); + } + public com.stripe.service.BalanceTransactionService balanceTransactions() { return new com.stripe.service.BalanceTransactionService(this.getResponseGetter()); } @@ -149,6 +153,10 @@ public com.stripe.service.MandateService mandates() { return new com.stripe.service.MandateService(this.getResponseGetter()); } + public com.stripe.service.PaymentAttemptRecordService paymentAttemptRecords() { + return new com.stripe.service.PaymentAttemptRecordService(this.getResponseGetter()); + } + public com.stripe.service.PaymentIntentService paymentIntents() { return new com.stripe.service.PaymentIntentService(this.getResponseGetter()); } @@ -169,6 +177,10 @@ public com.stripe.service.PaymentMethodService paymentMethods() { return new com.stripe.service.PaymentMethodService(this.getResponseGetter()); } + public com.stripe.service.PaymentRecordService paymentRecords() { + return new com.stripe.service.PaymentRecordService(this.getResponseGetter()); + } + public com.stripe.service.PayoutService payouts() { return new com.stripe.service.PayoutService(this.getResponseGetter()); } 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/checkout/SessionService.java b/src/main/java/com/stripe/service/checkout/SessionService.java index 1fd61f54801..b5a1799a1f1 100644 --- a/src/main/java/com/stripe/service/checkout/SessionService.java +++ b/src/main/java/com/stripe/service/checkout/SessionService.java @@ -100,8 +100,8 @@ public Session retrieve(String session, SessionRetrieveParams params, RequestOpt /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session, SessionUpdateParams params) throws StripeException { return update(session, params, (RequestOptions) null); @@ -109,8 +109,8 @@ public Session update(String session, SessionUpdateParams params) throws StripeE /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session, RequestOptions options) throws StripeException { return update(session, (SessionUpdateParams) null, options); @@ -118,8 +118,8 @@ public Session update(String session, RequestOptions options) throws StripeExcep /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session) throws StripeException { return update(session, (SessionUpdateParams) null, (RequestOptions) null); @@ -127,8 +127,8 @@ public Session update(String session) throws StripeException { /** * Updates a Checkout Session object. * - *

Related guide: Dynamically - * update Checkout. + *

Related guide: Dynamically + * update a Checkout Session. */ public Session update(String session, SessionUpdateParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/financialconnections/AccountService.java b/src/main/java/com/stripe/service/financialconnections/AccountService.java index 6976aef0222..7a9d5421601 100644 --- a/src/main/java/com/stripe/service/financialconnections/AccountService.java +++ b/src/main/java/com/stripe/service/financialconnections/AccountService.java @@ -135,14 +135,14 @@ public Account refresh(String account, AccountRefreshParams params, RequestOptio } /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public Account subscribe(String account, AccountSubscribeParams params) throws StripeException { return subscribe(account, params, (RequestOptions) null); } /** * Subscribes to periodic refreshes of data associated with a Financial Connections {@code - * Account}. + * Account}. When the account status is active, data is typically refreshed once a day. */ public Account subscribe(String account, AccountSubscribeParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/radar/PaymentEvaluationService.java b/src/main/java/com/stripe/service/radar/PaymentEvaluationService.java new file mode 100644 index 00000000000..44a70e5f163 --- /dev/null +++ b/src/main/java/com/stripe/service/radar/PaymentEvaluationService.java @@ -0,0 +1,43 @@ +// File generated from our OpenAPI spec +package com.stripe.service.radar; + +import com.stripe.exception.StripeException; +import com.stripe.model.radar.PaymentEvaluation; +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.radar.PaymentEvaluationCreateParams; + +public final class PaymentEvaluationService extends ApiService { + public PaymentEvaluationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public PaymentEvaluation create(PaymentEvaluationCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * Request a Radar API fraud risk score from Stripe for a payment before sending it for external + * processor authorization. + */ + public PaymentEvaluation create(PaymentEvaluationCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v1/radar/payment_evaluations"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentEvaluation.class); + } +} diff --git a/src/main/java/com/stripe/service/tax/AssociationService.java b/src/main/java/com/stripe/service/tax/AssociationService.java new file mode 100644 index 00000000000..b10b004975c --- /dev/null +++ b/src/main/java/com/stripe/service/tax/AssociationService.java @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +package com.stripe.service.tax; + +import com.stripe.exception.StripeException; +import com.stripe.model.tax.Association; +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.AssociationFindParams; + +public final class AssociationService extends ApiService { + public AssociationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Finds a tax association object by PaymentIntent id. */ + public Association find(AssociationFindParams params) throws StripeException { + return find(params, (RequestOptions) null); + } + /** Finds a tax association object by PaymentIntent id. */ + public Association find(AssociationFindParams params, RequestOptions options) + throws StripeException { + String path = "/v1/tax/associations/find"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Association.class); + } +} diff --git a/src/main/java/com/stripe/service/terminal/LocationService.java b/src/main/java/com/stripe/service/terminal/LocationService.java index a12d3a5f8d7..33c074d6ef7 100644 --- a/src/main/java/com/stripe/service/terminal/LocationService.java +++ b/src/main/java/com/stripe/service/terminal/LocationService.java @@ -128,6 +128,22 @@ public StripeCollection list(LocationListParams params, RequestOptions public Location create(LocationCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } + /** + * Creates a new {@code Location} object. For further details, including which address fields are + * required in each country, see the Manage locations guide. + */ + public Location create(RequestOptions options) throws StripeException { + return create((LocationCreateParams) null, options); + } + /** + * Creates a new {@code Location} object. For further details, including which address fields are + * required in each country, see the Manage locations guide. + */ + public Location create() throws StripeException { + return create((LocationCreateParams) null, (RequestOptions) null); + } /** * Creates a new {@code Location} object. For further details, including which address fields are * required in each country, see the Programmatic + * Cancellation for more details. + */ public Reader cancelAction(String reader, ReaderCancelActionParams params) throws StripeException { return cancelAction(reader, params, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(String reader, RequestOptions options) throws StripeException { return cancelAction(reader, (ReaderCancelActionParams) null, options); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(String reader) throws StripeException { return cancelAction(reader, (ReaderCancelActionParams) null, (RequestOptions) null); } - /** Cancels the current reader action. */ + /** + * Cancels the current reader action. See Programmatic + * Cancellation for more details. + */ public Reader cancelAction(String reader, ReaderCancelActionParams params, RequestOptions options) throws StripeException { String path = @@ -171,12 +187,20 @@ public Reader cancelAction(String reader, ReaderCancelActionParams params, Reque options); return this.request(request, Reader.class); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs(String reader, ReaderCollectInputsParams params) throws StripeException { return collectInputs(reader, params, (RequestOptions) null); } - /** Initiates an input collection flow on a Reader. */ + /** + * Initiates an input + * collection flow on a Reader to display input forms and collect information from your + * customers. + */ public Reader collectInputs( String reader, ReaderCollectInputsParams params, RequestOptions options) throws StripeException { @@ -193,7 +217,9 @@ public Reader collectInputs( } /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod(String reader, ReaderCollectPaymentMethodParams params) throws StripeException { @@ -201,7 +227,9 @@ public Reader collectPaymentMethod(String reader, ReaderCollectPaymentMethodPara } /** * Initiates a payment flow on a Reader and updates the PaymentIntent with card details before - * manual confirmation. + * manual confirmation. See Collecting + * a Payment method for more details. */ public Reader collectPaymentMethod( String reader, ReaderCollectPaymentMethodParams params, RequestOptions options) @@ -218,12 +246,20 @@ public Reader collectPaymentMethod( options); return this.request(request, Reader.class); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent(String reader, ReaderConfirmPaymentIntentParams params) throws StripeException { return confirmPaymentIntent(reader, params, (RequestOptions) null); } - /** Finalizes a payment on a Reader. */ + /** + * Finalizes a payment on a Reader. See Confirming + * a Payment for more details. + */ public Reader confirmPaymentIntent( String reader, ReaderConfirmPaymentIntentParams params, RequestOptions options) throws StripeException { @@ -239,12 +275,20 @@ public Reader confirmPaymentIntent( options); return this.request(request, Reader.class); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent(String reader, ReaderProcessPaymentIntentParams params) throws StripeException { return processPaymentIntent(reader, params, (RequestOptions) null); } - /** Initiates a payment flow on a Reader. */ + /** + * Initiates a payment flow on a Reader. See process + * the payment for more details. + */ public Reader processPaymentIntent( String reader, ReaderProcessPaymentIntentParams params, RequestOptions options) throws StripeException { @@ -260,12 +304,20 @@ public Reader processPaymentIntent( options); return this.request(request, Reader.class); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent(String reader, ReaderProcessSetupIntentParams params) throws StripeException { return processSetupIntent(reader, params, (RequestOptions) null); } - /** Initiates a setup intent flow on a Reader. */ + /** + * Initiates a SetupIntent flow on a Reader. See Save + * directly without charging for more details. + */ public Reader processSetupIntent( String reader, ReaderProcessSetupIntentParams params, RequestOptions options) throws StripeException { @@ -281,20 +333,36 @@ public Reader processSetupIntent( options); return this.request(request, Reader.class); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(String reader, ReaderRefundPaymentParams params) throws StripeException { return refundPayment(reader, params, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(String reader, RequestOptions options) throws StripeException { return refundPayment(reader, (ReaderRefundPaymentParams) null, options); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment(String reader) throws StripeException { return refundPayment(reader, (ReaderRefundPaymentParams) null, (RequestOptions) null); } - /** Initiates a refund on a Reader. */ + /** + * Initiates an in-person refund on a Reader. See Refund + * an Interac Payment for more details. + */ public Reader refundPayment( String reader, ReaderRefundPaymentParams params, RequestOptions options) throws StripeException { @@ -309,12 +377,18 @@ public Reader refundPayment( options); return this.request(request, Reader.class); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay(String reader, ReaderSetReaderDisplayParams params) throws StripeException { return setReaderDisplay(reader, params, (RequestOptions) null); } - /** Sets reader display to show cart details. */ + /** + * Sets the reader display to show cart details. + */ public Reader setReaderDisplay( String reader, ReaderSetReaderDisplayParams params, RequestOptions options) throws StripeException { 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/EventDestinationService.java b/src/main/java/com/stripe/service/v2/core/EventDestinationService.java index 8553d0ac58e..db78a3f2f36 100644 --- a/src/main/java/com/stripe/service/v2/core/EventDestinationService.java +++ b/src/main/java/com/stripe/service/v2/core/EventDestinationService.java @@ -3,9 +3,10 @@ import com.google.gson.reflect.TypeToken; import com.stripe.exception.StripeException; -import com.stripe.model.v2.Event; -import com.stripe.model.v2.EventDestination; +import com.stripe.model.v2.DeletedObject; import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.EventDestination; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -67,15 +68,15 @@ public EventDestination create(EventDestinationCreateParams params, RequestOptio return this.request(request, EventDestination.class); } /** Delete an event destination. */ - public EventDestination delete(String id) throws StripeException { + public DeletedObject delete(String id) throws StripeException { return delete(id, (RequestOptions) null); } /** Delete an event destination. */ - public EventDestination delete(String id, RequestOptions options) throws StripeException { + public DeletedObject delete(String id, RequestOptions options) throws StripeException { String path = String.format("/v2/core/event_destinations/%s", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.DELETE, path, null, options); - return this.request(request, EventDestination.class); + return this.request(request, DeletedObject.class); } /** Retrieves the details of an event destination. */ public EventDestination retrieve(String id, EventDestinationRetrieveParams params) diff --git a/src/main/java/com/stripe/service/v2/core/EventService.java b/src/main/java/com/stripe/service/v2/core/EventService.java index 5732a916f2f..c461aa97db6 100644 --- a/src/main/java/com/stripe/service/v2/core/EventService.java +++ b/src/main/java/com/stripe/service/v2/core/EventService.java @@ -3,8 +3,8 @@ import com.google.gson.reflect.TypeToken; import com.stripe.exception.StripeException; -import com.stripe.model.v2.Event; import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.core.Event; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -24,6 +24,14 @@ public StripeCollection list(EventListParams params) throws StripeExcepti return list(params, (RequestOptions) null); } /** List events, going back up to 30 days. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((EventListParams) null, options); + } + /** List events, going back up to 30 days. */ + public StripeCollection list() throws StripeException { + return list((EventListParams) null, (RequestOptions) null); + } + /** List events, going back up to 30 days. */ public StripeCollection list(EventListParams params, RequestOptions options) throws StripeException { String path = "/v2/core/events"; 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/BaseStripeTest.java b/src/test/java/com/stripe/BaseStripeTest.java index e91ddd7ed5d..8ce1971f866 100644 --- a/src/test/java/com/stripe/BaseStripeTest.java +++ b/src/test/java/com/stripe/BaseStripeTest.java @@ -7,7 +7,7 @@ import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.stripe.exception.StripeException; -import com.stripe.model.StripeObjectInterface; +import com.stripe.model.StripeObject; import com.stripe.net.*; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; @@ -173,7 +173,7 @@ public static void verifyRequest( verifyRequest(method, path, params, null); } - public static void verifyRequest( + public static void verifyRequest( ApiResource.RequestMethod method, String path, Map params, @@ -185,12 +185,12 @@ public static void verifyRequest( * Verifies that a request was made with the provided parameters. * * @param method HTTP method (GET, POST or DELETE) - * @param path request path (e.g. "/v1/charges"). Can also be an abolute URL. + * @param path request path (e.g. "/v1/charges"). Can also be an absolute URL. * @param params map containing the parameters. If null, the parameters are not checked. * @param options request options. If null, the options are not checked. */ @SuppressWarnings("AssertionFailureIgnored") - public static void verifyRequest( + public static void verifyRequest( BaseAddress baseAddress, ApiResource.RequestMethod method, String path, @@ -216,8 +216,8 @@ public static void verifyRequest( } @SuppressWarnings("AssertionFailureIgnored") - public static void verifyRequest( - Consumer assertOnApiRequest) throws StripeException { + public static void verifyRequest(Consumer assertOnApiRequest) + throws StripeException { ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(ApiRequest.class); List exceptions = new ArrayList(); @@ -249,7 +249,7 @@ public static void verifyRequest( } @SuppressWarnings("AssertionFailureIgnored") - public static void verifyStripeRequest( + public static void verifyStripeRequest( Consumer assertOnStripeRequest) throws StripeException { ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(StripeRequest.class); @@ -292,7 +292,7 @@ public static void verifyNoMoreRequests() { * @see BaseStripeTest#stubRequest(ApiResource.RequestMethod, String, Map, RequestOptions, Class, * String) */ - public static void stubRequest( + public static void stubRequest( ApiResource.RequestMethod method, String path, Type typeToken, String response) throws StripeException { stubRequest(BaseAddress.API, method, path, null, null, typeToken, response); @@ -304,7 +304,7 @@ public static void stubRequest( * @see BaseStripeTest#stubRequest(ApiResource.RequestMethod, String, Map, RequestOptions, Class, * String) */ - public static void stubRequest( + public static void stubRequest( ApiResource.RequestMethod method, String path, Map params, @@ -319,13 +319,13 @@ public static void stubRequest( * stripe-mock yet. * * @param method HTTP method (GET, POST or DELETE) - * @param path request path (e.g. "/v1/charges"). Can also be an abolute URL. + * @param path request path (e.g. "/v1/charges"). Can also be an absolute URL. * @param params map containing the parameters. If null, the parameters are not checked. * @param options request options. If null, the options are not checked. * @param typeToken Class of the API resource that will be returned for the stubbed request. * @param response JSON payload of the API resource that will be returned for the stubbed request. */ - public static void stubRequest( + public static void stubRequest( BaseAddress baseAddress, ApiResource.RequestMethod method, String path, @@ -355,13 +355,13 @@ public static void stubRequest( * stripe-mock yet. * * @param method HTTP method (GET, POST or DELETE) - * @param path request path (e.g. "/v1/charges"). Can also be an abolute URL. + * @param path request path (e.g. "/v1/charges"). Can also be an absolute URL. * @param params map containing the parameters. If null, the parameters are not checked. * @param options request options. If null, the options are not checked. * @param typeToken Class of the API resource that will be returned for the stubbed request. * @param response JSON payload of the API resource that will be returned for the stubbed request. */ - public static void stubRequestReturnError( + public static void stubRequestReturnError( BaseAddress baseAddress, ApiResource.RequestMethod method, String path, @@ -380,8 +380,8 @@ public static void stubRequestReturnError( } /** Stubs an OAuth API request. stripe-mock does not supported OAuth endpoints at this time. */ - public static void stubOAuthRequest( - Class clazz, String response) throws StripeException { + public static void stubOAuthRequest(Class clazz, String response) + throws StripeException { Mockito.doReturn(ApiResource.GSON.fromJson(response, clazz)) .when(networkSpy) .request(Mockito.any(ApiRequest.class), Mockito.any()); diff --git a/src/test/java/com/stripe/StripeClientTest.java b/src/test/java/com/stripe/StripeClientTest.java index a0355e86273..7a644d2e8a6 100644 --- a/src/test/java/com/stripe/StripeClientTest.java +++ b/src/test/java/com/stripe/StripeClientTest.java @@ -2,6 +2,7 @@ import static org.junit.Assert.assertThrows; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -9,20 +10,29 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonObject; +import com.stripe.events.UnknownEventNotification; +import com.stripe.events.V1BillingMeterErrorReportTriggeredEvent; +import com.stripe.events.V1BillingMeterErrorReportTriggeredEventNotification; +import com.stripe.events.V1BillingMeterNoMeterFoundEventNotification; import com.stripe.exception.SignatureVerificationException; import com.stripe.exception.StripeException; -import com.stripe.model.ThinEvent; +import com.stripe.model.billing.Meter; import com.stripe.model.terminal.Reader; +import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.EventNotification; import com.stripe.net.*; +import com.stripe.net.ApiResource.RequestMethod; import java.lang.reflect.Type; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.time.Instant; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; import org.mockito.Mockito; import org.mockito.stubbing.Answer; @@ -129,7 +139,8 @@ public void checksWebhookSignature() throws InvalidKeyException, NoSuchAlgorithmException, SignatureVerificationException { StripeClient client = new StripeClient("sk_123"); - String payload = "{\n \"id\": \"evt_test_webhook\",\n \"object\": \"event\"\n}"; + String payload = + "{\n \"id\": \"evt_test_webhook\",\n \"type\": \"v1.whatever\",\n \"object\": \"event\"\n}"; String secret = "whsec_test_secret"; Map options = new HashMap<>(); @@ -138,7 +149,7 @@ public void checksWebhookSignature() String signature = WebhookTest.generateSigHeader(options); - ThinEvent e = client.parseThinEvent(payload, signature, secret); + EventNotification e = client.parseEventNotification(payload, signature, secret); assertEquals(e.getId(), "evt_test_webhook"); } @@ -147,44 +158,56 @@ public void failsWebhookVerification() throws InvalidKeyException, NoSuchAlgorithmException, SignatureVerificationException { StripeClient client = new StripeClient("sk_123"); - String payload = "{\n \"id\": \"evt_test_webhook\",\n \"object\": \"event\"\n}"; + String payload = + "{\n \"id\": \"evt_test_webhook\",\n \"type\": \"v1.whatever\",\n \"object\": \"event\"\n}"; String secret = "whsec_test_secret"; String signature = "bad signature"; assertThrows( SignatureVerificationException.class, () -> { - client.parseThinEvent(payload, signature, secret); + client.parseEventNotification(payload, signature, secret); }); } - static final String v2PushEventWithRelatedObject = + static final String v2EventNotificationWithRelatedObject = "{\n" + " \"id\": \"evt_234\",\n" + " \"object\": \"event\",\n" - + " \"type\": \"financial_account.balance.opened\",\n" + + " \"type\": \"v1.billing.meter.error_report_triggered\",\n" + " \"livemode\": false,\n" + + " \"context\": \"org_123\",\n" + " \"created\": \"2022-02-15T00:27:45.330Z\",\n" - + " \"context\": \"context 123\",\n" + " \"related_object\": {\n" - + " \"id\": \"fa_123\",\n" - + " \"type\": \"financial_account\",\n" - + " \"url\": \"/v2/financial_accounts/fa_123\",\n" - + " \"stripe_context\": \"acct_123\"\n" - + " }\n" + + " \"id\": \"meter_123\",\n" + + " \"type\": \"billing.meter\",\n" + + " \"url\": \"/v1/billing/meter/meter_123\"" + + " },\n" + + " \"reason\": { \"type\": \"request\", \"request\": {\n" + + " \"id\": \"abc123\", \"idempotency_key\": \"qwer\"}\n" + + " }" + "}"; - static final String v2PushEventWithoutRelatedObject = + static final String v2EventNotificationWithoutRelatedObject = "{\n" + " \"id\": \"evt_234\",\n" + " \"object\": \"event\",\n" - + " \"type\": \"financial_account.balance.opened\",\n" + + " \"type\": \"v1.billing.meter.no_meter_found\",\n" + + " \"livemode\": false,\n" + + " \"created\": \"2022-02-15T00:27:45.330Z\"\n" + + "}"; + + static final String v2UnknownEventNotification = + "{\n" + + " \"id\": \"evt_234\",\n" + + " \"object\": \"event\",\n" + + " \"type\": \"v1.imaginary_event\",\n" + " \"livemode\": false,\n" + " \"created\": \"2022-02-15T00:27:45.330Z\"\n" + "}"; @Test - public void parsesThinEventWithoutRelatedObject() + public void parsesEventNotificationWithoutRelatedObject() throws InvalidKeyException, NoSuchAlgorithmException, SignatureVerificationException { StripeClient client = new StripeClient("sk_123"); @@ -192,22 +215,22 @@ public void parsesThinEventWithoutRelatedObject() String secret = "whsec_test_secret"; Map options = new HashMap<>(); - options.put("payload", v2PushEventWithoutRelatedObject); + options.put("payload", v2EventNotificationWithoutRelatedObject); options.put("secret", secret); String signature = WebhookTest.generateSigHeader(options); - ThinEvent baseThinEvent = - client.parseThinEvent(v2PushEventWithoutRelatedObject, signature, secret); - assertNotNull(baseThinEvent); - assertEquals("evt_234", baseThinEvent.getId()); - assertEquals("financial_account.balance.opened", baseThinEvent.getType()); - assertEquals(Instant.parse("2022-02-15T00:27:45.330Z"), baseThinEvent.created); - assertNull(baseThinEvent.context); - assertNull(baseThinEvent.relatedObject); + EventNotification eventNotification = + client.parseEventNotification(v2EventNotificationWithoutRelatedObject, signature, secret); + assertNotNull(eventNotification); + assertEquals("evt_234", eventNotification.getId()); + assertEquals("v1.billing.meter.no_meter_found", eventNotification.getType()); + assertEquals(Instant.parse("2022-02-15T00:27:45.330Z"), eventNotification.created); + assertNull(eventNotification.context); + assertInstanceOf(V1BillingMeterNoMeterFoundEventNotification.class, eventNotification); } @Test - public void parsesThinEventWithRelatedObject() + public void parsesEventNotificationWithRelatedObject() throws InvalidKeyException, NoSuchAlgorithmException, SignatureVerificationException { StripeClient client = new StripeClient("sk_123"); @@ -215,21 +238,69 @@ public void parsesThinEventWithRelatedObject() String secret = "whsec_test_secret"; Map options = new HashMap<>(); - options.put("payload", v2PushEventWithRelatedObject); + options.put("payload", v2EventNotificationWithRelatedObject); options.put("secret", secret); String signature = WebhookTest.generateSigHeader(options); - ThinEvent baseThinEvent = - client.parseThinEvent(v2PushEventWithRelatedObject, signature, secret); - assertNotNull(baseThinEvent); - assertEquals("evt_234", baseThinEvent.getId()); - assertEquals("financial_account.balance.opened", baseThinEvent.getType()); - assertEquals(Instant.parse("2022-02-15T00:27:45.330Z"), baseThinEvent.created); - assertEquals("context 123", baseThinEvent.context); - assertNotNull(baseThinEvent.relatedObject); - assertEquals("fa_123", baseThinEvent.relatedObject.id); - assertEquals("financial_account", baseThinEvent.relatedObject.type); - assertEquals("/v2/financial_accounts/fa_123", baseThinEvent.relatedObject.url); + EventNotification eventNotification = + client.parseEventNotification(v2EventNotificationWithRelatedObject, signature, secret); + assertNotNull(eventNotification); + assertEquals("evt_234", eventNotification.getId()); + assertEquals("v1.billing.meter.error_report_triggered", eventNotification.getType()); + assertEquals(Instant.parse("2022-02-15T00:27:45.330Z"), eventNotification.created); + assertEquals("org_123", eventNotification.getContext().toString()); + assertInstanceOf(V1BillingMeterErrorReportTriggeredEventNotification.class, eventNotification); + assertEquals("request", eventNotification.getReason().getType()); + assertEquals("abc123", eventNotification.getReason().getRequest().getId()); + + V1BillingMeterErrorReportTriggeredEventNotification e = + (V1BillingMeterErrorReportTriggeredEventNotification) eventNotification; + + assertNotNull(e.getRelatedObject()); + assertEquals("meter_123", e.getRelatedObject().getId()); + assertEquals("billing.meter", e.getRelatedObject().getType()); + assertEquals("/v1/billing/meter/meter_123", e.getRelatedObject().getUrl()); + } + + @Test + public void parsesUnknownEventNotification() + throws InvalidKeyException, NoSuchAlgorithmException, StripeException { + + StripeClient client = new StripeClient(networkSpy); + + // the existing stubRequest doesn't support rawRequest, so we'll stub manually here + Mockito.doAnswer( + invocation -> { + RawApiRequest request = invocation.getArgument(0); + String path = request.getPath(); + + if (request.getMethod() == RequestMethod.GET + && path.equals("/v2/core/events/evt_234")) { + return new StripeResponse( + 200, + HttpHeaders.of(Collections.emptyMap()), + "{\"id\": \"evt_234\", \"object\": \"v2.core.event\",\"type\": \"v1.imaginary\",\"data\": {}}"); + } + + throw new Exception( + String.format( + "Unexpected rawRequest made: %s %s", request.getMethod(), request.getPath())); + }) + .when(networkSpy) + .rawRequest(Mockito.any()); + + EventNotification eventNotification = + EventNotification.fromJson(v2UnknownEventNotification, client); + + assertNotNull(eventNotification); + assertEquals("evt_234", eventNotification.getId()); + assertEquals("v1.imaginary_event", eventNotification.getType()); + assertInstanceOf(UnknownEventNotification.class, eventNotification); + UnknownEventNotification e = (UnknownEventNotification) eventNotification; + + assertNull(e.getRelatedObject()); + assertNull(e.fetchRelatedObject()); // doesn't work, but doesn't throw + assertInstanceOf(Event.class, e.fetchEvent()); } @Test @@ -277,4 +348,56 @@ public void stripeClientWithStripeContextInV1Api() throws StripeException { assertEquals("ctx", stripeRequest.headers().firstValue("Stripe-Context").get()); }); } + + @Test + public void parseEventNotificationAndPull() + throws StripeException, InvalidKeyException, NoSuchAlgorithmException { + StripeClient client = new StripeClient(networkSpy); + + // the existing stubRequest doesn't support rawRequest, so we'll stub manually here + Mockito.doAnswer( + invocation -> { + RawApiRequest request = invocation.getArgument(0); + String path = request.getPath(); + + if (request.getMethod() == RequestMethod.GET) { + if (path.equals("/v2/core/events/evt_234")) { + return new StripeResponse( + 200, + HttpHeaders.of(Collections.emptyMap()), + "{\"id\": \"evt_234\", \"object\": \"v2.core.event\",\"type\": \"v1.billing.meter.error_report_triggered\",\"data\": {}}"); + } else if (path.equals("/v1/billing/meter/meter_123")) { + return new StripeResponse( + 200, + HttpHeaders.of(Collections.emptyMap()), + "{\"id\": \"meter_123\", \"object\": \"billing.meter\", \"display_name\": \"Test Meter\"}"); + } + } + throw new Exception( + String.format( + "Unexpected rawRequest made: %s %s", request.getMethod(), request.getPath())); + }) + .when(networkSpy) + .rawRequest(Mockito.any()); + + EventNotification eventNotification = + EventNotification.fromJson(v2EventNotificationWithRelatedObject, client); + + assertInstanceOf(V1BillingMeterErrorReportTriggeredEventNotification.class, eventNotification); + + V1BillingMeterErrorReportTriggeredEventNotification en = + (V1BillingMeterErrorReportTriggeredEventNotification) eventNotification; + + assertInstanceOf(V1BillingMeterErrorReportTriggeredEvent.class, en.fetchEvent()); + assertInstanceOf(Meter.class, en.fetchRelatedObject()); + + // we should have made 2 API requests + ArgumentCaptor requestCaptor = ArgumentCaptor.forClass(RawApiRequest.class); + Mockito.verify(networkSpy, Mockito.times(2)).rawRequest(requestCaptor.capture()); + + // and we should have included 'Stripe-Context' in both + for (RawApiRequest v : requestCaptor.getAllValues()) { + assertEquals("org_123", v.getOptions().getStripeContext()); + } + } } diff --git a/src/test/java/com/stripe/StripeContextIntegrationTest.java b/src/test/java/com/stripe/StripeContextIntegrationTest.java new file mode 100644 index 00000000000..9d12dd3f3c0 --- /dev/null +++ b/src/test/java/com/stripe/StripeContextIntegrationTest.java @@ -0,0 +1,156 @@ +package com.stripe; + +import static org.junit.jupiter.api.Assertions.*; + +import com.stripe.model.v2.core.EventNotification; +import com.stripe.net.RawRequestOptions; +import com.stripe.net.RequestOptions; +import java.util.Arrays; +import org.junit.jupiter.api.Test; + +public class StripeContextIntegrationTest { + + @Test + public void testRequestOptionsWithStringContext() { + RequestOptions options = RequestOptions.builder().setStripeContext("a/b/c").build(); + + assertEquals("a/b/c", options.getStripeContext()); + } + + @Test + public void testRawRequestOptionsWithStringContext() { + RawRequestOptions options = RawRequestOptions.builder().setStripeContext("a/b/c").build(); + + assertEquals("a/b/c", options.getStripeContext()); + } + + @Test + public void testRequestOptionsWithContextObject() { + StripeContext context = new StripeContext(Arrays.asList("a", "b", "c")); + RequestOptions options = RequestOptions.builder().setStripeContext(context).build(); + + assertEquals("a/b/c", options.getStripeContext()); + } + + @Test + public void testRequestOptionsWithNullContext() { + RequestOptions options = RequestOptions.builder().setStripeContext(new StripeContext()).build(); + + assertEquals("", options.getStripeContext()); + } + + @Test + public void testStripeClientBuilderWithStringContext() { + StripeClient.StripeClientBuilder builder = + StripeClient.builder().setApiKey("sk_test_123").setStripeContext("a/b/c"); + + assertEquals("a/b/c", builder.getStripeContext()); + } + + @Test + public void testStripeClientBuilderWithContextObject() { + StripeContext context = new StripeContext(Arrays.asList("a", "b", "c")); + StripeClient.StripeClientBuilder builder = + StripeClient.builder().setApiKey("sk_test_123").setStripeContext(context); + + assertEquals("a/b/c", builder.getStripeContext()); + } + + @Test + public void testStripeClientBuilderWithNullContext() { + StripeClient.StripeClientBuilder builder = + StripeClient.builder().setApiKey("sk_test_123").setStripeContext((StripeContext) null); + + assertNull(builder.getStripeContext()); + } + + @Test + public void testStripeClientBuilderEmptyContextOverwrites() { + StripeClient.StripeClientBuilder builder = + StripeClient.builder() + .setApiKey("sk_test_123") + .setStripeContext("ctx_123") + .setStripeContext(new StripeContext()); + + assertEquals("", builder.getStripeContext()); + } + + @Test + public void testStripeClientBuilderWithEmptyContext() { + StripeClient.StripeClientBuilder builder = + StripeClient.builder().setApiKey("sk_test_123").setStripeContext(new StripeContext()); + + assertEquals("", builder.getStripeContext()); + } + + @Test + public void testEventNotificationParsing() { + String payload = + "{\"id\":\"evt_123\",\"type\":\"test.event\",\"created\":\"2023-01-01T00:00:00Z\",\"livemode\":false,\"context\":\"a/b/c\"}"; + StripeClient client = new StripeClient("sk_test_123"); + + EventNotification notification = EventNotification.fromJson(payload, client); + + assertNotNull(notification.context); + assertEquals(Arrays.asList("a", "b", "c"), notification.context.getSegments()); + assertEquals("a/b/c", notification.context.toString()); + } + + @Test + public void testEventNotificationNoContext() { + String payload = + "{\"id\":\"evt_123\",\"type\":\"test.event\",\"created\":\"2023-01-01T00:00:00Z\",\"livemode\":false}"; + StripeClient client = new StripeClient("sk_test_123"); + + EventNotification notification = EventNotification.fromJson(payload, client); + + assertNull(notification.getContext()); + } + + @Test + public void testEventNotificationEmptyContext() { + String payload = + "{\"id\":\"evt_123\",\"type\":\"test.event\",\"created\":\"2023-01-01T00:00:00Z\",\"livemode\":false,\"context\":\"\"}"; + StripeClient client = new StripeClient("sk_test_123"); + + EventNotification notification = EventNotification.fromJson(payload, client); + + assertNull(notification.getContext()); + } + + @Test + public void testEventNotificationNullContext() { + String payload = + "{\"id\":\"evt_123\",\"type\":\"test.event\",\"created\":\"2023-01-01T00:00:00Z\",\"livemode\":false,\"context\":null}"; + StripeClient client = new StripeClient("sk_test_123"); + + EventNotification notification = EventNotification.fromJson(payload, client); + + assertNull(notification.getContext()); + } + + @Test + public void testContextBuilderPattern() { + // Test the builder pattern works well with StripeContext + StripeContext baseContext = StripeContext.parse("workspace_123"); + + RequestOptions options = + RequestOptions.builder() + .setApiKey("sk_test_123") + .setStripeContext(baseContext.push("account_456")) + .build(); + + assertEquals("workspace_123/account_456", options.getStripeContext()); + } + + @Test + public void testContextCompatibility() { + // Test that both string and StripeContext work equivalently + RequestOptions stringOptions = RequestOptions.builder().setStripeContext("a/b/c").build(); + + StripeContext context = new StripeContext(Arrays.asList("a", "b", "c")); + RequestOptions contextOptions = RequestOptions.builder().setStripeContext(context).build(); + + assertEquals(stringOptions.getStripeContext(), contextOptions.getStripeContext()); + } +} diff --git a/src/test/java/com/stripe/StripeContextTest.java b/src/test/java/com/stripe/StripeContextTest.java new file mode 100644 index 00000000000..e4b4a2dec1c --- /dev/null +++ b/src/test/java/com/stripe/StripeContextTest.java @@ -0,0 +1,173 @@ +package com.stripe; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import org.junit.jupiter.api.Test; + +public class StripeContextTest { + + @Test + public void testDefaultConstructor() { + StripeContext context = new StripeContext(); + assertEquals(Collections.emptyList(), context.getSegments()); + } + + @Test + public void testConstructorWithSegments() { + List segments = Arrays.asList("a", "b", "c"); + StripeContext context = new StripeContext(segments); + assertEquals(segments, context.getSegments()); + } + + @Test + public void testConstructorWithNullSegments() { + StripeContext context = new StripeContext(null); + assertEquals(Collections.emptyList(), context.getSegments()); + } + + @Test + public void testPush() { + StripeContext context = new StripeContext(Arrays.asList("a", "b")); + StripeContext newContext = context.push("c"); + + // Original context unchanged + assertEquals(Arrays.asList("a", "b"), context.getSegments()); + // New context has added segment + assertEquals(Arrays.asList("a", "b", "c"), newContext.getSegments()); + // Different objects + assertNotSame(context, newContext); + } + + @Test + public void testPopWithSegments() { + StripeContext context = new StripeContext(Arrays.asList("a", "b", "c")); + StripeContext newContext = context.pop(); + + // Original context unchanged + assertEquals(Arrays.asList("a", "b", "c"), context.getSegments()); + // New context has removed last segment + assertEquals(Arrays.asList("a", "b"), newContext.getSegments()); + // Different objects + assertNotSame(context, newContext); + } + + @Test + public void testPopEmpty() { + StripeContext context = new StripeContext(); + assertThrows(IllegalStateException.class, () -> context.pop()); + } + + @Test + public void testToStringEmpty() { + StripeContext context = new StripeContext(); + // useful for clearing context + assertEquals("", context.toString()); + } + + @Test + public void testToStringSingleSegment() { + StripeContext context = new StripeContext(Arrays.asList("a")); + assertEquals("a", context.toString()); + } + + @Test + public void testToStringMultipleSegments() { + StripeContext context = new StripeContext(Arrays.asList("a", "b", "c")); + assertEquals("a/b/c", context.toString()); + } + + @Test + public void testParseEmptyString() { + StripeContext context = StripeContext.parse(""); + assertEquals(Collections.emptyList(), context.getSegments()); + } + + @Test + public void testParseNull() { + StripeContext context = StripeContext.parse(null); + assertEquals(Collections.emptyList(), context.getSegments()); + } + + @Test + public void testParseSingleSegment() { + StripeContext context = StripeContext.parse("a"); + assertEquals(Arrays.asList("a"), context.getSegments()); + } + + @Test + public void testParseMultipleSegments() { + StripeContext context = StripeContext.parse("a/b/c"); + assertEquals(Arrays.asList("a", "b", "c"), context.getSegments()); + } + + @Test + public void testEquals() { + StripeContext context1 = new StripeContext(Arrays.asList("a", "b")); + StripeContext context2 = new StripeContext(Arrays.asList("a", "b")); + StripeContext context3 = new StripeContext(Arrays.asList("a", "c")); + + assertEquals(context1, context2); + assertNotEquals(context1, context3); + assertNotEquals(context1, "a/b"); + assertNotEquals(context1, null); + } + + @Test + public void testHashCode() { + StripeContext context1 = new StripeContext(Arrays.asList("a", "b")); + StripeContext context2 = new StripeContext(Arrays.asList("a", "b")); + + assertEquals(context1.hashCode(), context2.hashCode()); + } + + @Test + public void testImmutableSegments() { + List originalSegments = Arrays.asList("a", "b"); + StripeContext context = new StripeContext(originalSegments); + + // Getting segments should return an unmodifiable list + List segments = context.getSegments(); + assertThrows(UnsupportedOperationException.class, () -> segments.add("c")); + } + + @Test + public void testContextManipulationPattern() { + // Common usage: start with base context, add child contexts + StripeContext base = StripeContext.parse("workspace_123"); + StripeContext child = base.push("account_456"); + StripeContext grandchild = child.push("customer_789"); + + assertEquals("workspace_123", base.toString()); + assertEquals("workspace_123/account_456", child.toString()); + assertEquals("workspace_123/account_456/customer_789", grandchild.toString()); + + // Go back up the hierarchy + StripeContext backToChild = grandchild.pop(); + StripeContext backToBase = backToChild.pop(); + + assertEquals("workspace_123/account_456", backToChild.toString()); + assertEquals("workspace_123", backToBase.toString()); + } + + @Test + public void testContextImmutability() { + StripeContext original = new StripeContext(Arrays.asList("a", "b")); + + // Multiple operations on the same context + StripeContext pushed = original.push("c"); + StripeContext popped = original.pop(); + + // Original remains unchanged + assertEquals(Arrays.asList("a", "b"), original.getSegments()); + assertEquals(Arrays.asList("a", "b", "c"), pushed.getSegments()); + assertEquals(Arrays.asList("a"), popped.getSegments()); + + // All are different objects + assertNotSame(original, pushed); + assertNotSame(original, popped); + assertNotSame(pushed, popped); + } +} diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index dd1bdc86832..44f6f8fea82 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -3207,11 +3207,11 @@ public void testCoreEventsGetServices() throws StripeException { "/v2/core/events/ll_123", null, null, - com.stripe.model.v2.Event.class, - "{\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\",\"livemode\":true}"); + com.stripe.model.v2.core.Event.class, + "{\"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.Event event = client.v2().core().events().retrieve("ll_123"); + com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("ll_123"); assertNotNull(event); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/core/events/ll_123", null, null); @@ -5118,9 +5118,7 @@ public void testCustomersSourcesPostServices() throws StripeException { StripeClient client = new StripeClient(networkSpy); com.stripe.param.CustomerPaymentSourceUpdateParams params = - com.stripe.param.CustomerPaymentSourceUpdateParams.builder() - .setAccountHolderName("Kamil") - .build(); + com.stripe.param.CustomerPaymentSourceUpdateParams.builder().setName("Kamil").build(); com.stripe.model.PaymentSource paymentSource = client.v1().customers().paymentSources().update("cus_123", "card_123", params); @@ -5138,9 +5136,7 @@ public void testCustomersSourcesPostServicesNonNamespaced() throws StripeExcepti StripeClient client = new StripeClient(networkSpy); com.stripe.param.CustomerPaymentSourceUpdateParams params = - com.stripe.param.CustomerPaymentSourceUpdateParams.builder() - .setAccountHolderName("Kamil") - .build(); + com.stripe.param.CustomerPaymentSourceUpdateParams.builder().setName("Kamil").build(); com.stripe.model.PaymentSource paymentSource = client.customers().paymentSources().update("cus_123", "card_123", params); @@ -12812,7 +12808,13 @@ public void testPromotionCodesGet2ServicesNonNamespaced() throws StripeException @Test public void testPromotionCodesPost() throws StripeException { PromotionCodeCreateParams params = - PromotionCodeCreateParams.builder().setCoupon("Z4OV52SU").build(); + PromotionCodeCreateParams.builder() + .setPromotion( + PromotionCodeCreateParams.Promotion.builder() + .setType(PromotionCodeCreateParams.Promotion.Type.COUPON) + .setCoupon("Z4OV52SU") + .build()) + .build(); PromotionCode promotionCode = PromotionCode.create(params); assertNotNull(promotionCode); @@ -12829,7 +12831,13 @@ public void testPromotionCodesPostServices() throws StripeException { StripeClient client = new StripeClient(networkSpy); com.stripe.param.PromotionCodeCreateParams params = - com.stripe.param.PromotionCodeCreateParams.builder().setCoupon("Z4OV52SU").build(); + com.stripe.param.PromotionCodeCreateParams.builder() + .setPromotion( + com.stripe.param.PromotionCodeCreateParams.Promotion.builder() + .setType(com.stripe.param.PromotionCodeCreateParams.Promotion.Type.COUPON) + .setCoupon("Z4OV52SU") + .build()) + .build(); com.stripe.model.PromotionCode promotionCode = client.v1().promotionCodes().create(params); assertNotNull(promotionCode); @@ -12846,7 +12854,13 @@ public void testPromotionCodesPostServicesNonNamespaced() throws StripeException StripeClient client = new StripeClient(networkSpy); com.stripe.param.PromotionCodeCreateParams params = - com.stripe.param.PromotionCodeCreateParams.builder().setCoupon("Z4OV52SU").build(); + com.stripe.param.PromotionCodeCreateParams.builder() + .setPromotion( + com.stripe.param.PromotionCodeCreateParams.Promotion.builder() + .setType(com.stripe.param.PromotionCodeCreateParams.Promotion.Type.COUPON) + .setCoupon("Z4OV52SU") + .build()) + .build(); com.stripe.model.PromotionCode promotionCode = client.promotionCodes().create(params); assertNotNull(promotionCode); @@ -16017,7 +16031,6 @@ public void testSubscriptionSchedulesPost() throws StripeException { .setPrice("price_xxxxxxxxxxxxx") .setQuantity(1L) .build()) - .setIterations(12L) .build()) .build(); @@ -16047,7 +16060,6 @@ public void testSubscriptionSchedulesPostServices() throws StripeException { .setPrice("price_xxxxxxxxxxxxx") .setQuantity(1L) .build()) - .setIterations(12L) .build()) .build(); @@ -16078,7 +16090,6 @@ public void testSubscriptionSchedulesPostServicesNonNamespaced() throws StripeEx .setPrice("price_xxxxxxxxxxxxx") .setQuantity(1L) .build()) - .setIterations(12L) .build()) .build(); @@ -24478,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( @@ -24487,14 +24919,14 @@ public void testV2CoreEventGetServices() throws StripeException { null, null, new TypeToken< - com.stripe.model.v2.StripeCollection>() {}.getType(), - "{\"data\":[{\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":null,\"type\":\"type\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + com.stripe.model.v2.StripeCollection>() {}.getType(), + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventListParams params = - com.stripe.param.v2.core.EventListParams.builder().setObjectId("object_id").build(); + com.stripe.param.v2.core.EventListParams.builder().build(); - com.stripe.model.v2.StripeCollection stripeCollection = + com.stripe.model.v2.StripeCollection stripeCollection = client.v2().core().events().list(params); assertNotNull(stripeCollection); verifyRequest( @@ -24509,11 +24941,11 @@ public void testV2CoreEventGet2Services() throws StripeException { "/v2/core/events/id_123", null, null, - com.stripe.model.v2.Event.class, - "{\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":null,\"type\":\"type\",\"livemode\":true}"); + com.stripe.model.v2.core.Event.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.Event event = client.v2().core().events().retrieve("id_123"); + com.stripe.model.v2.core.Event event = client.v2().core().events().retrieve("id_123"); assertNotNull(event); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/core/events/id_123", null, null); @@ -24529,15 +24961,15 @@ public void testV2CoreEventDestinationGetServices() throws StripeException { null, new TypeToken< com.stripe.model.v2.StripeCollection< - com.stripe.model.v2.EventDestination>>() {}.getType(), - "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}],\"next_page_url\":null,\"previous_page_url\":null}"); + com.stripe.model.v2.core.EventDestination>>() {}.getType(), + "{\"data\":[{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"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.EventDestinationListParams params = com.stripe.param.v2.core.EventDestinationListParams.builder().build(); - com.stripe.model.v2.StripeCollection stripeCollection = - client.v2().core().eventDestinations().list(params); + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().core().eventDestinations().list(params); assertNotNull(stripeCollection); verifyRequest( BaseAddress.API, @@ -24555,8 +24987,8 @@ public void testV2CoreEventDestinationPostServices() throws StripeException { "/v2/core/event_destinations", null, null, - com.stripe.model.v2.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); + com.stripe.model.v2.core.EventDestination.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventDestinationCreateParams params = @@ -24568,7 +25000,7 @@ public void testV2CoreEventDestinationPostServices() throws StripeException { .setType(com.stripe.param.v2.core.EventDestinationCreateParams.Type.AMAZON_EVENTBRIDGE) .build(); - com.stripe.model.v2.EventDestination eventDestination = + com.stripe.model.v2.core.EventDestination eventDestination = client.v2().core().eventDestinations().create(params); assertNotNull(eventDestination); verifyRequest( @@ -24587,13 +25019,13 @@ public void testV2CoreEventDestinationDeleteServices() throws StripeException { "/v2/core/event_destinations/id_123", null, null, - com.stripe.model.v2.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); + com.stripe.model.v2.DeletedObject.class, + "{\"id\":\"abc_123\",\"object\":\"some.object.tag\"}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.EventDestination eventDestination = + com.stripe.model.v2.DeletedObject deletedObject = client.v2().core().eventDestinations().delete("id_123"); - assertNotNull(eventDestination); + assertNotNull(deletedObject); verifyRequest( BaseAddress.API, ApiResource.RequestMethod.DELETE, @@ -24610,14 +25042,14 @@ public void testV2CoreEventDestinationGet2Services() throws StripeException { "/v2/core/event_destinations/id_123", null, null, - com.stripe.model.v2.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); + com.stripe.model.v2.core.EventDestination.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventDestinationRetrieveParams params = com.stripe.param.v2.core.EventDestinationRetrieveParams.builder().build(); - com.stripe.model.v2.EventDestination eventDestination = + com.stripe.model.v2.core.EventDestination eventDestination = client.v2().core().eventDestinations().retrieve("id_123", params); assertNotNull(eventDestination); verifyRequest( @@ -24636,14 +25068,14 @@ public void testV2CoreEventDestinationPost2Services() throws StripeException { "/v2/core/event_destinations/id_123", null, null, - com.stripe.model.v2.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); + com.stripe.model.v2.core.EventDestination.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.EventDestinationUpdateParams params = com.stripe.param.v2.core.EventDestinationUpdateParams.builder().build(); - com.stripe.model.v2.EventDestination eventDestination = + com.stripe.model.v2.core.EventDestination eventDestination = client.v2().core().eventDestinations().update("id_123", params); assertNotNull(eventDestination); verifyRequest( @@ -24662,11 +25094,11 @@ public void testV2CoreEventDestinationPost3Services() throws StripeException { "/v2/core/event_destinations/id_123/disable", null, null, - com.stripe.model.v2.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); + com.stripe.model.v2.core.EventDestination.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.EventDestination eventDestination = + com.stripe.model.v2.core.EventDestination eventDestination = client.v2().core().eventDestinations().disable("id_123"); assertNotNull(eventDestination); verifyRequest( @@ -24685,11 +25117,11 @@ public void testV2CoreEventDestinationPost4Services() throws StripeException { "/v2/core/event_destinations/id_123/enable", null, null, - com.stripe.model.v2.EventDestination.class, - "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"events_from\":null,\"id\":\"obj_123\",\"metadata\":null,\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"snapshot_api_version\":null,\"status\":\"disabled\",\"status_details\":null,\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true,\"amazon_eventbridge\":null,\"webhook_endpoint\":null}"); + com.stripe.model.v2.core.EventDestination.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"description\":\"description\",\"enabled_events\":[\"enabled_events\"],\"event_payload\":\"thin\",\"id\":\"obj_123\",\"name\":\"name\",\"object\":\"v2.core.event_destination\",\"status\":\"disabled\",\"type\":\"amazon_eventbridge\",\"updated\":\"1970-01-03T17:07:10.277Z\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.EventDestination eventDestination = + com.stripe.model.v2.core.EventDestination eventDestination = client.v2().core().eventDestinations().enable("id_123"); assertNotNull(eventDestination); verifyRequest( @@ -24708,11 +25140,11 @@ public void testV2CoreEventDestinationPost5Services() throws StripeException { "/v2/core/event_destinations/id_123/ping", null, null, - com.stripe.model.v2.Event.class, - "{\"context\":null,\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":null,\"type\":\"type\",\"livemode\":true}"); + com.stripe.model.v2.core.Event.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"object\":\"v2.core.event\",\"type\":\"type\"}"); StripeClient client = new StripeClient(networkSpy); - com.stripe.model.v2.Event event = client.v2().core().eventDestinations().ping("id_123"); + com.stripe.model.v2.core.Event event = client.v2().core().eventDestinations().ping("id_123"); assertNotNull(event); verifyRequest( BaseAddress.API, diff --git a/src/test/java/com/stripe/functional/PromotionCodeTest.java b/src/test/java/com/stripe/functional/PromotionCodeTest.java deleted file mode 100644 index 3252c08951d..00000000000 --- a/src/test/java/com/stripe/functional/PromotionCodeTest.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.stripe.functional; - -import static org.junit.jupiter.api.Assertions.assertNotNull; - -import com.stripe.BaseStripeTest; -import com.stripe.exception.StripeException; -import com.stripe.model.PromotionCode; -import com.stripe.model.PromotionCodeCollection; -import com.stripe.net.ApiResource; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Test; - -public class PromotionCodeTest extends BaseStripeTest { - public static final String PROMOTION_CODE_ID = "promo_123"; - - private PromotionCode getPromotionCodeFixture() throws StripeException { - final PromotionCode promotionCode = PromotionCode.retrieve(PROMOTION_CODE_ID); - resetNetworkSpy(); - return promotionCode; - } - - @Test - public void testCreate() throws StripeException { - final Map params = new HashMap<>(); - params.put("coupon", "co_123"); - params.put("code", "MYCODE"); - - final PromotionCode promotionCode = PromotionCode.create(params); - - assertNotNull(promotionCode); - verifyRequest(ApiResource.RequestMethod.POST, String.format("/v1/promotion_codes"), params); - } - - @Test - public void testRetrieve() throws StripeException { - final PromotionCode promotionCode = PromotionCode.retrieve(PROMOTION_CODE_ID); - - assertNotNull(promotionCode); - verifyRequest( - ApiResource.RequestMethod.GET, String.format("/v1/promotion_codes/%s", PROMOTION_CODE_ID)); - } - - @Test - public void testUpdate() throws StripeException { - final PromotionCode promotionCode = getPromotionCodeFixture(); - - final Map metadata = new HashMap<>(); - metadata.put("key", "value"); - final Map params = new HashMap<>(); - params.put("metadata", metadata); - - final PromotionCode updatedPromotionCode = promotionCode.update(params); - - assertNotNull(updatedPromotionCode); - verifyRequest( - ApiResource.RequestMethod.POST, - String.format("/v1/promotion_codes/%s", promotionCode.getId()), - params); - } - - @Test - public void testList() throws StripeException { - final Map params = new HashMap<>(); - params.put("limit", 1); - - final PromotionCodeCollection promotionCodes = PromotionCode.list(params); - - assertNotNull(promotionCodes); - verifyRequest(ApiResource.RequestMethod.GET, String.format("/v1/promotion_codes")); - } -} diff --git a/src/test/java/com/stripe/model/v2/EventTests.java b/src/test/java/com/stripe/model/v2/EventTests.java index 8e06a7405e3..dabebb682b8 100644 --- a/src/test/java/com/stripe/model/v2/EventTests.java +++ b/src/test/java/com/stripe/model/v2/EventTests.java @@ -6,6 +6,7 @@ import com.stripe.events.V1BillingMeterErrorReportTriggeredEvent; import com.stripe.exception.StripeException; import com.stripe.model.billing.Meter; +import com.stripe.model.v2.core.Event; import com.stripe.net.ApiResource; import java.io.IOException; import java.time.Instant; @@ -121,9 +122,9 @@ public void retrieveObjectFetchesAndDeserializesObject() throws StripeException, Meter.class, getResourceAsString("/api_fixtures/billing_meter.json")); - assertEquals("/v1/billing/meters/meter_123", event.getRelatedObject().url); - assertEquals("meter_123", event.getRelatedObject().id); - assertEquals("billing.meter", event.getRelatedObject().type); + assertEquals("/v1/billing/meters/meter_123", event.getRelatedObject().getUrl()); + assertEquals("meter_123", event.getRelatedObject().getId()); + assertEquals("billing.meter", event.getRelatedObject().getType()); Meter meter = event.fetchRelatedObject(); diff --git a/src/test/java/com/stripe/net/FormEncoderTest.java b/src/test/java/com/stripe/net/FormEncoderTest.java index e3e0289628c..65bc3aefc7d 100644 --- a/src/test/java/com/stripe/net/FormEncoderTest.java +++ b/src/test/java/com/stripe/net/FormEncoderTest.java @@ -26,10 +26,8 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; -import javax.annotation.Nullable; import lombok.AllArgsConstructor; import lombok.Data; -import lombok.RequiredArgsConstructor; import org.hamcrest.CoreMatchers; import org.junit.jupiter.api.Test; @@ -130,12 +128,10 @@ public void testCreateQueryString() { org.junit.Assume.assumeTrue(!System.getProperty("java.version").startsWith("10.")); @Data - @RequiredArgsConstructor @AllArgsConstructor class TestCase { private final Map data; private final String want; - @Nullable private Boolean arrayAsRepeated = false; } List testCases = @@ -376,18 +372,16 @@ class TestCase { "array", new Object[] {new String[] {"foo", "bar"}, new int[] {1, 2, 3}}), "array[0][0]=foo&array[0][1]=bar&array[1][0]=1&array[1][1]=2&array[1][2]=3")); - // Array (arrayAsRepeated) - add(new TestCase(Collections.singletonMap("array", new String[] {}), "", true)); + // Array + add(new TestCase(Collections.singletonMap("array", new String[] {}), "array=")); add( new TestCase( Collections.singletonMap("array", new String[] {"1", "2", "3"}), - "array=1&array=2&array=3", - true)); + "array[0]=1&array[1]=2&array[2]=3")); add( new TestCase( Collections.singletonMap("array", new Object[] {123, "foo"}), - "array=123&array=foo", - true)); + "array[0]=123&array[1]=foo")); // Collection add( new TestCase( @@ -429,9 +423,7 @@ class TestCase { }; for (TestCase testCase : testCases) { - assertEquals( - testCase.getWant(), - FormEncoder.createQueryString(testCase.getData(), testCase.getArrayAsRepeated())); + assertEquals(testCase.getWant(), FormEncoder.createQueryString(testCase.getData())); } } @@ -481,7 +473,7 @@ class TestCase { }; for (TestCase testCase : testCases) { - assertEquals(testCase.getWant(), FormEncoder.flattenParams(testCase.getData(), false)); + assertEquals(testCase.getWant(), FormEncoder.flattenParams(testCase.getData())); } } diff --git a/src/test/java/com/stripe/net/RequestOptionsTest.java b/src/test/java/com/stripe/net/RequestOptionsTest.java index 156ee92a1e3..605ab6e7481 100644 --- a/src/test/java/com/stripe/net/RequestOptionsTest.java +++ b/src/test/java/com/stripe/net/RequestOptionsTest.java @@ -2,6 +2,7 @@ import static org.junit.jupiter.api.Assertions.*; +import com.stripe.StripeContext; import com.stripe.net.RequestOptions.RequestOptionsBuilder; import java.net.InetSocketAddress; import java.net.PasswordAuthentication; @@ -169,6 +170,57 @@ public void mergeOverwritesClientOptions() { assertEquals("5", merged.getStripeContext()); } + @Test + public void clientContextIsUsedWhenRequestNull() { + StripeResponseGetterOptions clientOptions = + TestStripeResponseGetterOptions.builder().setStripeContext("a/b/c").build(); + + RequestOptions requestOptions = + RequestOptions.builder().setStripeContext((StripeContext) null).build(); + + RequestOptions merged = RequestOptions.merge(clientOptions, requestOptions); + + assertEquals("a/b/c", merged.getStripeContext()); + } + + @Test + public void requestContextPrioritizedIfRequestSetNullString() { + StripeResponseGetterOptions clientOptions = + TestStripeResponseGetterOptions.builder().setStripeContext("a/b/c").build(); + + RequestOptions requestOptions = + RequestOptions.builder().setStripeContext((String) null).build(); + + RequestOptions merged = RequestOptions.merge(clientOptions, requestOptions); + + assertEquals("a/b/c", merged.getStripeContext()); + } + + @Test + public void mergeRequestOptionsWithEmptyContextOverwritesClientContext() { + StripeResponseGetterOptions clientOptions = + TestStripeResponseGetterOptions.builder().setStripeContext("a/b/c").build(); + + RequestOptions requestOptions = + RequestOptions.builder().setStripeContext(new StripeContext()).build(); + + RequestOptions merged = RequestOptions.merge(clientOptions, requestOptions); + + assertNull(merged.getStripeContext()); + } + + @Test + public void requestContextPrioritized() { + StripeResponseGetterOptions clientOptions = + TestStripeResponseGetterOptions.builder().setStripeContext("a/b/c").build(); + + RequestOptions requestOptions = RequestOptions.builder().setStripeContext("d/e/f").build(); + + RequestOptions merged = RequestOptions.merge(clientOptions, requestOptions); + + assertEquals("d/e/f", merged.getStripeContext()); + } + @Test public void mergeFallsBackToClientOptions() { Proxy clientProxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("localhost", 8080));