diff --git a/CHANGELOG.md b/CHANGELOG.md index aac494674ebf..0c3aae744f6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,48 @@ # Changelog +## 33.2.0 - 2026-07-29 +This release changes the pinned API version to 2026-07-29.dahlia. + +* [#2257](https://github.com/stripe/stripe-java/pull/2257) Update generated code + * Add support for new resource `financialconnections.Authorization` + * Add support for `unreject` method on resource `Account` + * Add support for `list` method on resource `PaymentRecord` + * Add support for `smartDisputesManagement` on `AccountSession.components.disputes_list.features`, `AccountSession.components.payment_details.features`, `AccountSession.components.payment_disputes.features`, `AccountSession.components.payments.features`, `AccountSessionCreateParams.components.disputes_list.features`, `AccountSessionCreateParams.components.payment_details.features`, `AccountSessionCreateParams.components.payment_disputes.features`, and `AccountSessionCreateParams.components.payments.features` + * Add support for `administrativeAddress` and `principalPlaceOfBusiness` on `Account.company`, `AccountCreateParams.company`, `AccountUpdateParams.company`, and `TokenCreateParams.account.company` + * Add support for `sepaDebitPayments` on `AccountUpdateParams.settings` + * Remove support for `proofOfRegistration` on `AccountCreateParams.documents`. This field was limited-use and is being deprecated. + * Add support for `payoutsAction` on `AccountRejectParams` + * Remove support for `dynamicTaxRates` on `checkout.SessionCreateParams.line_items[]`. This field was limited-use and is being deprecated. + * Add support for `setupFutureUsage` on `PaymentIntent.payment_method_options.payco`, `PaymentIntent.payment_method_options.samsung_pay`, `PaymentIntentConfirmParams.payment_method_options.payco`, `PaymentIntentConfirmParams.payment_method_options.samsung_pay`, `PaymentIntentCreateParams.payment_method_options.payco`, `PaymentIntentCreateParams.payment_method_options.samsung_pay`, `PaymentIntentUpdateParams.payment_method_options.payco`, `PaymentIntentUpdateParams.payment_method_options.samsung_pay`, `PaymentLinkUpdateParams.payment_intent_data`, `checkout.Session.payment_method_options.payco`, `checkout.Session.payment_method_options.samsung_pay`, `checkout.SessionCreateParams.payment_method_options.payco`, and `checkout.SessionCreateParams.payment_method_options.samsung_pay` + * Add support for new values `bnp_paribas`, `citibank`, and `mbsb_bank` on enums `ConfirmationTokenCreateParams.payment_method_data.fpx.bank`, `PaymentIntentConfirmParams.payment_method_data.fpx.bank`, `PaymentIntentCreateParams.payment_method_data.fpx.bank`, `PaymentIntentUpdateParams.payment_method_data.fpx.bank`, `PaymentMethodCreateParams.fpx.bank`, `SetupIntentConfirmParams.payment_method_data.fpx.bank`, `SetupIntentCreateParams.payment_method_data.fpx.bank`, and `SetupIntentUpdateParams.payment_method_data.fpx.bank` + * Add support for new value `ic_nif` 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 `network` on `Dispute.payment_method_details.card` + * Add support for `limits` and `manualEntry` on `financialconnections.SessionCreateParams` and `financialconnections.Session` + * Add support for `requirePaymentMethodSupport` on `financialconnections.Session.filters` and `financialconnections.SessionCreateParams.filters` + * Add support for `bankAccountToken` on `financialconnections.Session` + * Add support for new values `alipay` and `mb_way` on enums `InvoiceCreateParams.payment_settings.paymentMethodTypes`, `InvoiceUpdateParams.payment_settings.paymentMethodTypes`, `SubscriptionCreateParams.payment_settings.paymentMethodTypes`, and `SubscriptionUpdateParams.payment_settings.paymentMethodTypes` + * Add support for new values `mass_transit_parking_tax` and `parking_tax` on enums `InvoiceAddLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `InvoiceLineItemUpdateParams.tax_amounts[].tax_rate_data.taxType`, `InvoiceUpdateLinesParams.lines[].tax_amounts[].tax_rate_data.taxType`, `TaxRateCreateParams.taxType`, and `TaxRateUpdateParams.taxType` + * Add support for `metadata` on `InvoiceCreatePreviewParams.subscription_details` + * Add support for `businessName` on `issuing.Card.shipping`, `issuing.CardCreateParams.shipping`, and `issuing.CardUpdateParams.shipping` + * Add support for `allowedPaymentMethodTypes` on `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `PaymentIntentUpdateParams`, `PaymentIntent`, `SetupIntentConfirmParams`, `SetupIntentCreateParams`, `SetupIntentUpdateParams`, and `SetupIntent` + * Add support for `referrer` on `PaymentIntentConfirmParams.radar_options` and `PaymentIntentCreateParams.radar_options` + * Add support for `consentCollection` and `shippingOptions` on `PaymentLinkUpdateParams` + * Add support for `customFields`, `description`, and `footer` on `Quote.invoice_settings`, `QuoteCreateParams.invoice_settings`, `QuoteUpdateParams.invoice_settings`, `SubscriptionSchedule.default_settings.invoice_settings`, `SubscriptionSchedule.phases[].invoice_settings`, `SubscriptionScheduleCreateParams.default_settings.invoice_settings`, `SubscriptionScheduleCreateParams.phases[].invoice_settings`, `SubscriptionScheduleUpdateParams.default_settings.invoice_settings`, and `SubscriptionScheduleUpdateParams.phases[].invoice_settings` + * Add support for `customerAccount` and `customer` on `Refund` + * Add support for `paymentMethod` on `Refund` and `Topup` + * Add support for `trial` on `SubscriptionSchedule.phases[]` + * Add support for `massTransitParkingTax` and `parkingTax` on `tax.Registration.country_options.us` and `tax.RegistrationCreateParams.country_options.us` + * Add support for new values `mass_transit_parking_tax` and `parking_tax` on enum `tax.RegistrationCreateParams.country_options.us.type` + * Add support for `initiatedBy` and `paymentMethodOptions` on `Topup` + * Add support for new values `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, `financial_connections.account.upcoming_deactivation`, `financial_connections.authorization.expected_deactivation_date_updated`, and `financial_connections.authorization.upcoming_deactivation` on enums `WebhookEndpointCreateParams.enabledEvents` and `WebhookEndpointUpdateParams.enabledEvents` + * Add support for new value `2026-07-29.dahlia` on enum `WebhookEndpointCreateParams.apiVersion` + * Add support for `additionalAddresses` 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 snapshot events `financial_connections.account.expected_deactivation_date_updated`, `financial_connections.account.supported_payment_method_types_updated`, and `financial_connections.account.upcoming_deactivation` with resource `financialconnections.Account` + * Add support for snapshot events `financial_connections.authorization.expected_deactivation_date_updated` and `financial_connections.authorization.upcoming_deactivation` with resource `financialconnections.Authorization` + ## 33.2.0-alpha.6 - 2026-07-22 * [#2254](https://github.com/stripe/stripe-java/pull/2254) Remove unnecessary logging from EventDataObjectDeserializer.java - * Deserializing an event webhook will no longer print `Stripe API version:...` to stdout. + * Deserializing an event webhook will no longer print `Stripe API version:...` to stdout. ## 33.2.0-alpha.5 - 2026-07-22 * [#2253](https://github.com/stripe/stripe-java/pull/2253) Update generated code for private-preview diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 006d837793d6..fb2246f920ae 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -2ceb45f50a72455c534a54d634b015602dc55f2d \ No newline at end of file +6fc967cafa78afc6c6adb86802a26217fa770522 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 115c3a68008e..5928ed650e7a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2345 \ No newline at end of file +v2350 \ No newline at end of file diff --git a/src/main/java/com/stripe/ApiVersion.java b/src/main/java/com/stripe/ApiVersion.java index 40a50d64461b..927c6ed2138e 100644 --- a/src/main/java/com/stripe/ApiVersion.java +++ b/src/main/java/com/stripe/ApiVersion.java @@ -2,5 +2,5 @@ package com.stripe; final class ApiVersion { - public static final String CURRENT = "2026-07-08.preview"; + public static final String CURRENT = "2026-07-29.preview"; } diff --git a/src/main/java/com/stripe/StripeEventNotificationHandler.java b/src/main/java/com/stripe/StripeEventNotificationHandler.java index f1f03ddd3fc0..7ec7c78e0832 100644 --- a/src/main/java/com/stripe/StripeEventNotificationHandler.java +++ b/src/main/java/com/stripe/StripeEventNotificationHandler.java @@ -382,8 +382,15 @@ import com.stripe.events.V2MoneyManagementReceivedCreditReturnedEventNotification; import com.stripe.events.V2MoneyManagementReceivedCreditSucceededEventNotification; import com.stripe.events.V2MoneyManagementReceivedDebitCanceledEventNotification; +import com.stripe.events.V2MoneyManagementReceivedDebitCreatedEventNotification; import com.stripe.events.V2MoneyManagementReceivedDebitFailedEventNotification; +import com.stripe.events.V2MoneyManagementReceivedDebitMandateCanceledEventNotification; +import com.stripe.events.V2MoneyManagementReceivedDebitMandateCreatedEventNotification; +import com.stripe.events.V2MoneyManagementReceivedDebitMandateExpiredEventNotification; +import com.stripe.events.V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification; +import com.stripe.events.V2MoneyManagementReceivedDebitMandateUpdatedEventNotification; import com.stripe.events.V2MoneyManagementReceivedDebitPendingEventNotification; +import com.stripe.events.V2MoneyManagementReceivedDebitScheduledEventNotification; import com.stripe.events.V2MoneyManagementReceivedDebitSucceededEventNotification; import com.stripe.events.V2MoneyManagementReceivedDebitUpdatedEventNotification; import com.stripe.events.V2MoneyManagementRecipientVerificationCreatedEventNotification; @@ -420,8 +427,11 @@ import com.stripe.events.V2ReportingReportRunFailedEventNotification; import com.stripe.events.V2ReportingReportRunSucceededEventNotification; import com.stripe.events.V2ReportingReportRunUpdatedEventNotification; +import com.stripe.events.V2SignalsAccountEvaluationCompleteEventNotification; import com.stripe.events.V2SignalsAccountSignalFraudulentMerchantReadyEventNotification; +import com.stripe.events.V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification; import com.stripe.events.V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification; +import com.stripe.events.V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification; import com.stripe.exception.SignatureVerificationException; import com.stripe.model.v2.core.EventNotification; import java.util.ArrayList; @@ -2826,6 +2836,12 @@ public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitCanceled( return this; } + public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitCreated( + Callback callback) { + this.register("v2.money_management.received_debit.created", callback); + return this; + } + public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitFailed( Callback callback) { this.register("v2.money_management.received_debit.failed", callback); @@ -2838,6 +2854,12 @@ public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitPending( return this; } + public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitScheduled( + Callback callback) { + this.register("v2.money_management.received_debit.scheduled", callback); + return this; + } + public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitSucceeded( Callback callback) { this.register("v2.money_management.received_debit.succeeded", callback); @@ -2850,6 +2872,37 @@ public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitUpdated( return this; } + public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitMandateCanceled( + Callback callback) { + this.register("v2.money_management.received_debit_mandate.canceled", callback); + return this; + } + + public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitMandateCreated( + Callback callback) { + this.register("v2.money_management.received_debit_mandate.created", callback); + return this; + } + + public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitMandateExpired( + Callback callback) { + this.register("v2.money_management.received_debit_mandate.expired", callback); + return this; + } + + public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitMandatePendingCancellation( + Callback + callback) { + this.register("v2.money_management.received_debit_mandate.pending_cancellation", callback); + return this; + } + + public StripeEventNotificationHandler onV2MoneyManagementReceivedDebitMandateUpdated( + Callback callback) { + this.register("v2.money_management.received_debit_mandate.updated", callback); + return this; + } + public StripeEventNotificationHandler onV2MoneyManagementRecipientVerificationCreated( Callback callback) { this.register("v2.money_management.recipient_verification.created", callback); @@ -3054,17 +3107,35 @@ public StripeEventNotificationHandler onV2ReportingReportRunUpdated( return this; } + public StripeEventNotificationHandler onV2SignalsAccountEvaluationComplete( + Callback callback) { + this.register("v2.signals.account_evaluation.complete", callback); + return this; + } + public StripeEventNotificationHandler onV2SignalsAccountSignalFraudulentMerchantReady( Callback callback) { this.register("v2.signals.account_signal.fraudulent_merchant_ready", callback); return this; } + public StripeEventNotificationHandler onV2SignalsAccountSignalFraudulentWebsiteReady( + Callback callback) { + this.register("v2.signals.account_signal.fraudulent_website_ready", callback); + return this; + } + public StripeEventNotificationHandler onV2SignalsAccountSignalMerchantDelinquencyReady( Callback callback) { this.register("v2.signals.account_signal.merchant_delinquency_ready", callback); return this; } + + public StripeEventNotificationHandler onV2SignalsAccountSignalPaymentDelinquencyExposureReady( + Callback callback) { + this.register("v2.signals.account_signal.payment_delinquency_exposure_ready", callback); + return this; + } // notification-handler-methods: The end of the section generated from our OpenAPI spec /** diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCreatedEvent.java new file mode 100644 index 000000000000..96061f8aba91 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCreatedEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedDebit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitCreatedEvent 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 ReceivedDebit fetchRelatedObject() throws StripeException { + return (ReceivedDebit) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCreatedEventNotification.java new file mode 100644 index 000000000000..e94b47e35b50 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCreatedEventNotification.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.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitCreatedEventNotification + 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 ReceivedDebit fetchRelatedObject() throws StripeException { + return (ReceivedDebit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCanceledEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCanceledEvent.java new file mode 100644 index 000000000000..7eb98911783c --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCanceledEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandateCanceledEvent 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCanceledEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCanceledEventNotification.java new file mode 100644 index 000000000000..aa2e45fc5560 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCanceledEventNotification.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.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandateCanceledEventNotification + 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitMandateCanceledEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitMandateCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCreatedEvent.java new file mode 100644 index 000000000000..9c1f4a090e3f --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCreatedEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandateCreatedEvent 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCreatedEventNotification.java new file mode 100644 index 000000000000..e37a9da55716 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateCreatedEventNotification.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.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandateCreatedEventNotification + 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitMandateCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitMandateCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateExpiredEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateExpiredEvent.java new file mode 100644 index 000000000000..c2d1f6359f0d --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateExpiredEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandateExpiredEvent 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateExpiredEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateExpiredEventNotification.java new file mode 100644 index 000000000000..7092e218368a --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateExpiredEventNotification.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.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandateExpiredEventNotification + 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitMandateExpiredEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitMandateExpiredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandatePendingCancellationEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandatePendingCancellationEvent.java new file mode 100644 index 000000000000..4367862959d4 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandatePendingCancellationEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandatePendingCancellationEvent 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification.java new file mode 100644 index 000000000000..f63b7140e0a0 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification.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.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification + 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitMandatePendingCancellationEvent fetchEvent() + throws StripeException { + return (V2MoneyManagementReceivedDebitMandatePendingCancellationEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateUpdatedEvent.java new file mode 100644 index 000000000000..4ae4e106ea1c --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateUpdatedEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandateUpdatedEvent 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateUpdatedEventNotification.java new file mode 100644 index 000000000000..860408b811c7 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitMandateUpdatedEventNotification.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.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitMandateUpdatedEventNotification + 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 ReceivedDebitMandate fetchRelatedObject() throws StripeException { + return (ReceivedDebitMandate) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitMandateUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitMandateUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitScheduledEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitScheduledEvent.java new file mode 100644 index 000000000000..20dddf1f3ae5 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitScheduledEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.moneymanagement.ReceivedDebit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitScheduledEvent 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 ReceivedDebit fetchRelatedObject() throws StripeException { + return (ReceivedDebit) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitScheduledEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitScheduledEventNotification.java new file mode 100644 index 000000000000..a927bd3e0951 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitScheduledEventNotification.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.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitScheduledEventNotification + 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 ReceivedDebit fetchRelatedObject() throws StripeException { + return (ReceivedDebit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitScheduledEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitScheduledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2SignalsAccountEvaluationCompleteEvent.java b/src/main/java/com/stripe/events/V2SignalsAccountEvaluationCompleteEvent.java new file mode 100644 index 000000000000..a93ab3d27c1d --- /dev/null +++ b/src/main/java/com/stripe/events/V2SignalsAccountEvaluationCompleteEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.signals.AccountEvaluation; +import lombok.Getter; + +@Getter +public final class V2SignalsAccountEvaluationCompleteEvent 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 AccountEvaluation fetchRelatedObject() throws StripeException { + return (AccountEvaluation) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2SignalsAccountEvaluationCompleteEventNotification.java b/src/main/java/com/stripe/events/V2SignalsAccountEvaluationCompleteEventNotification.java new file mode 100644 index 000000000000..9dee2730d9e6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2SignalsAccountEvaluationCompleteEventNotification.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.EventNotification; +import com.stripe.model.v2.signals.AccountEvaluation; +import lombok.Getter; + +@Getter +public final class V2SignalsAccountEvaluationCompleteEventNotification 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 AccountEvaluation fetchRelatedObject() throws StripeException { + return (AccountEvaluation) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2SignalsAccountEvaluationCompleteEvent fetchEvent() throws StripeException { + return (V2SignalsAccountEvaluationCompleteEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentMerchantReadyEvent.java b/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentMerchantReadyEvent.java index 341e0c58622e..19fa5fa681a4 100644 --- a/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentMerchantReadyEvent.java +++ b/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentMerchantReadyEvent.java @@ -2,7 +2,10 @@ package com.stripe.events; import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; import com.stripe.model.v2.core.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.signals.AccountSignal; import java.math.BigDecimal; import java.time.Instant; import java.util.List; @@ -27,9 +30,6 @@ public static final class EventData { /** Fraudulent merchant signal data. Present when type is fraudulent_merchant. */ @SerializedName("fraudulent_merchant") FraudulentMerchant fraudulentMerchant; - /** Unique identifier for this account signal. */ - @SerializedName("id") - String id; /** * The type of account signal. Currently only fraudulent_merchant is supported. * @@ -91,4 +91,14 @@ public static final class Indicator { } } } + + @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 AccountSignal fetchRelatedObject() throws StripeException { + return (AccountSignal) super.fetchRelatedObject(this.relatedObject); + } } diff --git a/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentMerchantReadyEventNotification.java b/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentMerchantReadyEventNotification.java index 2b6612ac981f..67adc0ae2b6c 100644 --- a/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentMerchantReadyEventNotification.java +++ b/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentMerchantReadyEventNotification.java @@ -1,11 +1,25 @@ // 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.EventNotification; +import com.stripe.model.v2.signals.AccountSignal; +import lombok.Getter; +@Getter public final class V2SignalsAccountSignalFraudulentMerchantReadyEventNotification 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 AccountSignal fetchRelatedObject() throws StripeException { + return (AccountSignal) super.fetchRelatedObject(this.relatedObject); + } /** Retrieve the corresponding full event from the Stripe API. */ @Override public V2SignalsAccountSignalFraudulentMerchantReadyEvent fetchEvent() throws StripeException { diff --git a/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentWebsiteReadyEvent.java b/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentWebsiteReadyEvent.java new file mode 100644 index 000000000000..92d27e241e6b --- /dev/null +++ b/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentWebsiteReadyEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.signals.AccountSignal; +import lombok.Getter; + +@Getter +public final class V2SignalsAccountSignalFraudulentWebsiteReadyEvent 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 AccountSignal fetchRelatedObject() throws StripeException { + return (AccountSignal) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification.java b/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification.java new file mode 100644 index 000000000000..0e70c50ca4c5 --- /dev/null +++ b/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification.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.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.signals.AccountSignal; +import lombok.Getter; + +@Getter +public final class V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification + 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 AccountSignal fetchRelatedObject() throws StripeException { + return (AccountSignal) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2SignalsAccountSignalFraudulentWebsiteReadyEvent fetchEvent() throws StripeException { + return (V2SignalsAccountSignalFraudulentWebsiteReadyEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent.java b/src/main/java/com/stripe/events/V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent.java new file mode 100644 index 000000000000..194ae5a6bc32 --- /dev/null +++ b/src/main/java/com/stripe/events/V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent.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.Event; +import com.stripe.model.v2.core.Event.RelatedObject; +import com.stripe.model.v2.signals.AccountSignal; +import lombok.Getter; + +@Getter +public final class V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent 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 AccountSignal fetchRelatedObject() throws StripeException { + return (AccountSignal) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification.java b/src/main/java/com/stripe/events/V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification.java new file mode 100644 index 000000000000..b3b940273514 --- /dev/null +++ b/src/main/java/com/stripe/events/V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification.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.Event.RelatedObject; +import com.stripe.model.v2.core.EventNotification; +import com.stripe.model.v2.signals.AccountSignal; +import lombok.Getter; + +@Getter +public final class V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification + 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 AccountSignal fetchRelatedObject() throws StripeException { + return (AccountSignal) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent fetchEvent() + throws StripeException { + return (V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 0ca54ae973df..49150f3707ba 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -15,6 +15,7 @@ import com.stripe.param.AccountPersonsParams; import com.stripe.param.AccountRejectParams; import com.stripe.param.AccountRetrieveParams; +import com.stripe.param.AccountUnrejectParams; import com.stripe.param.AccountUpdateParams; import java.util.List; import java.util.Map; @@ -625,6 +626,104 @@ public static Account retrieve(AccountRetrieveParams params, RequestOptions opti return getGlobalResponseGetter().request(request, Account.class); } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject() throws StripeException { + return unreject((Map) null, (RequestOptions) null); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(RequestOptions options) throws StripeException { + return unreject((Map) null, options); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(Map params) throws StripeException { + return unreject(params, (RequestOptions) null); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(Map params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/accounts/%s/unreject", ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, Account.class); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(AccountUnrejectParams params) throws StripeException { + return unreject(params, (RequestOptions) null); + } + + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(AccountUnrejectParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/accounts/%s/unreject", 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, Account.class); + } + /** * Updates a connected account by setting the * values of the parameters passed. Any parameters not provided are left unchanged. @@ -2405,8 +2504,8 @@ public static class Requirements extends StripeObject { /** * 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. + * current_deadline}, these fields will appear in {@code past_due} as well, and the account will + * be disabled. */ @SerializedName("currently_due") List currentlyDue; diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index 3c81d402978e..44a3dc0b2561 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -1802,7 +1802,7 @@ public static class GiftCard extends StripeObject { /** * The brand of the gift card. * - *

One of {@code fiserv_valuelink}, {@code givex}, or {@code svs}. + *

Equal to {@code svs}. */ @SerializedName("brand") String brand; diff --git a/src/main/java/com/stripe/model/FxQuote.java b/src/main/java/com/stripe/model/FxQuote.java index 4ff71a163815..431da4823a10 100644 --- a/src/main/java/com/stripe/model/FxQuote.java +++ b/src/main/java/com/stripe/model/FxQuote.java @@ -20,9 +20,9 @@ /** * The FX Quotes API provides three functions: - View Stripe's current exchange rate for any given - * currency pair. - Extend quoted rates for a 1-hour period or a 24-hour period, minimizing - * uncertainty from FX fluctuations. - Preview the FX fees Stripe will charge on your FX - * transaction, allowing you to anticipate specific settlement amounts before payment costs. + * currency pair. - Extend quoted rates for up to a 24-hour period, minimizing uncertainty from FX + * fluctuations. - Preview the FX fees Stripe will charge on your FX transaction, allowing you to + * anticipate specific settlement amounts before payment costs. * *

View the * docs @@ -41,9 +41,8 @@ public class FxQuote extends ApiResource implements HasId { String id; /** - * The duration the exchange rate quote remains valid from creation time. Allowed values are none, - * hour, and day. Note that for the test mode API available in alpha, you can request an extended - * quote, but it won't be usable for any transactions. + * The duration that the quote is locked for, from creation time. The quote will be usable for the + * duration specified. * *

One of {@code day}, {@code five_minutes}, {@code hour}, or {@code none}. */ @@ -126,16 +125,16 @@ public static FxQuote create(FxQuoteCreateParams params, RequestOptions options) } /** - * Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, - * with the most recent FX quotes appearing first. + * Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most + * recent FX quotes appearing first. */ public static FxQuoteCollection list(Map params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, - * with the most recent FX quotes appearing first. + * Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most + * recent FX quotes appearing first. */ public static FxQuoteCollection list(Map params, RequestOptions options) throws StripeException { @@ -146,16 +145,16 @@ public static FxQuoteCollection list(Map params, RequestOptions } /** - * Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, - * with the most recent FX quotes appearing first. + * Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most + * recent FX quotes appearing first. */ public static FxQuoteCollection list(FxQuoteListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, - * with the most recent FX quotes appearing first. + * Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most + * recent FX quotes appearing first. */ public static FxQuoteCollection list(FxQuoteListParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/model/GiftCard.java b/src/main/java/com/stripe/model/GiftCard.java index 84a882c6151b..ffb93030a978 100644 --- a/src/main/java/com/stripe/model/GiftCard.java +++ b/src/main/java/com/stripe/model/GiftCard.java @@ -29,7 +29,7 @@ public class GiftCard extends ApiResource implements HasId { /** * The brand of the gift card. * - *

One of {@code fiserv_valuelink}, {@code givex}, or {@code svs}. + *

Equal to {@code svs}. */ @SerializedName("brand") String brand; diff --git a/src/main/java/com/stripe/model/GiftCardOperation.java b/src/main/java/com/stripe/model/GiftCardOperation.java index b8bf388b39ee..ff9a91b870d2 100644 --- a/src/main/java/com/stripe/model/GiftCardOperation.java +++ b/src/main/java/com/stripe/model/GiftCardOperation.java @@ -60,7 +60,7 @@ public class GiftCardOperation extends ApiResource implements HasId { * invalid_number}, {@code invalid_pin}, {@code invalid_track_data}, {@code lost_card}, {@code * lost_or_stolen_card}, {@code pin_required}, {@code pin_tries_exceeded}, {@code * processing_error}, {@code provider_unavailable}, {@code stolen_card}, {@code suspected_fraud}, - * or {@code timeout}. + * {@code timeout}, or {@code try_again_later}. */ @SerializedName("failure_code") String failureCode; diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index a22681c39ae7..fad150afe180 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -2135,7 +2135,7 @@ public static class GiftCard extends StripeObject { /** * The brand of the gift card. * - *

One of {@code fiserv_valuelink}, {@code givex}, or {@code svs}. + *

Equal to {@code svs}. */ @SerializedName("brand") String brand; diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index 569df284cf55..78fd429a60d3 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -10,6 +10,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.PaymentRecordCreateParams; +import com.stripe.param.PaymentRecordListParams; import com.stripe.param.PaymentRecordReportPaymentAttemptCanceledParams; import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams; import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams; @@ -178,6 +179,41 @@ public PaymentRecord create(PaymentRecordCreateParams params, RequestOptions opt return getResponseGetter().request(request, PaymentRecord.class); } + /** List all the Payment Records for a given merchant. */ + public static PaymentRecordCollection list(Map params) throws StripeException { + return list(params, (RequestOptions) null); + } + + /** List all the Payment Records for a given merchant. */ + public static PaymentRecordCollection list(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/payment_records"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, PaymentRecordCollection.class); + } + + /** List all the Payment Records for a given merchant. */ + public static PaymentRecordCollection list(PaymentRecordListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + + /** List all the Payment Records for a given merchant. */ + public static PaymentRecordCollection list(PaymentRecordListParams params, RequestOptions options) + throws StripeException { + String path = "/v1/payment_records"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, PaymentRecordCollection.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 diff --git a/src/main/java/com/stripe/model/PaymentRecordCollection.java b/src/main/java/com/stripe/model/PaymentRecordCollection.java new file mode 100644 index 000000000000..ebcbb0e6970d --- /dev/null +++ b/src/main/java/com/stripe/model/PaymentRecordCollection.java @@ -0,0 +1,4 @@ +// File generated from our OpenAPI spec +package com.stripe.model; + +public class PaymentRecordCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/Refund.java b/src/main/java/com/stripe/model/Refund.java index d59919fda264..74bb9d521a22 100644 --- a/src/main/java/com/stripe/model/Refund.java +++ b/src/main/java/com/stripe/model/Refund.java @@ -57,6 +57,16 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @SerializedName("currency") String currency; + /** ID of the customer of this refund. */ + @SerializedName("customer") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField customer; + + /** ID of the account of this refund. */ + @SerializedName("customer_account") + String customerAccount; + /** * An arbitrary string attached to the object. You can use this for displaying to users (available * on non-card refunds only). @@ -122,6 +132,12 @@ public class Refund extends ApiResource implements MetadataStore, Balanc @Setter(lombok.AccessLevel.NONE) ExpandableField paymentIntent; + /** ID of the payment method associated with this refund. */ + @SerializedName("payment_method") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField paymentMethod; + /** * Provides the reason for why the refund is pending. Possible values are: {@code processing}, * {@code insufficient_funds}, or {@code charge_pending}. @@ -212,6 +228,24 @@ public void setChargeObject(Charge expandableObject) { this.charge = new ExpandableField(expandableObject.getId(), expandableObject); } + /** Get ID of expandable {@code customer} object. */ + public String getCustomer() { + return (this.customer != null) ? this.customer.getId() : null; + } + + public void setCustomer(String id) { + this.customer = ApiResource.setExpandableFieldId(id, this.customer); + } + + /** Get expanded {@code customer}. */ + public Customer getCustomerObject() { + return (this.customer != null) ? this.customer.getExpanded() : null; + } + + public void setCustomerObject(Customer expandableObject) { + this.customer = new ExpandableField(expandableObject.getId(), expandableObject); + } + /** Get ID of expandable {@code failureBalanceTransaction} object. */ public String getFailureBalanceTransaction() { return (this.failureBalanceTransaction != null) ? this.failureBalanceTransaction.getId() : null; @@ -253,6 +287,25 @@ public void setPaymentIntentObject(PaymentIntent expandableObject) { new ExpandableField(expandableObject.getId(), expandableObject); } + /** 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); + } + /** Get ID of expandable {@code sourceTransferReversal} object. */ public String getSourceTransferReversal() { return (this.sourceTransferReversal != null) ? this.sourceTransferReversal.getId() : null; @@ -1371,10 +1424,12 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(balanceTransaction, responseGetter); trySetResponseGetter(charge, responseGetter); + trySetResponseGetter(customer, responseGetter); trySetResponseGetter(destinationDetails, responseGetter); trySetResponseGetter(failureBalanceTransaction, responseGetter); trySetResponseGetter(nextAction, responseGetter); trySetResponseGetter(paymentIntent, responseGetter); + trySetResponseGetter(paymentMethod, responseGetter); trySetResponseGetter(presentmentDetails, responseGetter); trySetResponseGetter(sourceTransferReversal, responseGetter); trySetResponseGetter(transferReversal, responseGetter); diff --git a/src/main/java/com/stripe/model/SetupIntent.java b/src/main/java/com/stripe/model/SetupIntent.java index 5e8e1567cab5..f74616246a61 100644 --- a/src/main/java/com/stripe/model/SetupIntent.java +++ b/src/main/java/com/stripe/model/SetupIntent.java @@ -55,6 +55,13 @@ @Setter @EqualsAndHashCode(callSuper = false) public class SetupIntent extends ApiResource implements HasId, MetadataStore { + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods in + * this list when determining the payment methods to offer. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** ID of the Connect application that created the SetupIntent. */ @SerializedName("application") @Getter(lombok.AccessLevel.NONE) diff --git a/src/main/java/com/stripe/model/TaxId.java b/src/main/java/com/stripe/model/TaxId.java index bc8c5cec2323..fe2675400d14 100644 --- a/src/main/java/com/stripe/model/TaxId.java +++ b/src/main/java/com/stripe/model/TaxId.java @@ -86,18 +86,19 @@ public class TaxId extends ApiResource implements HasId { * {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, * {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code * eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, - * {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, - * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, - * {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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 gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, + * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; diff --git a/src/main/java/com/stripe/model/TaxRate.java b/src/main/java/com/stripe/model/TaxRate.java index 72799fe33e52..c598c1a88c37 100644 --- a/src/main/java/com/stripe/model/TaxRate.java +++ b/src/main/java/com/stripe/model/TaxRate.java @@ -159,8 +159,9 @@ public class TaxRate extends ApiResource implements HasId, MetadataStoreOne of {@code amusement_tax}, {@code communications_tax}, {@code gst}, {@code hst}, {@code - * igst}, {@code jct}, {@code lease_tax}, {@code pst}, {@code qst}, {@code retail_delivery_fee}, - * {@code rst}, {@code sales_tax}, {@code service_tax}, or {@code vat}. + * igst}, {@code jct}, {@code lease_tax}, {@code mass_transit_parking_tax}, {@code parking_tax}, + * {@code pst}, {@code qst}, {@code retail_delivery_fee}, {@code rst}, {@code sales_tax}, {@code + * service_tax}, or {@code vat}. */ @SerializedName("tax_type") String taxType; diff --git a/src/main/java/com/stripe/model/Topup.java b/src/main/java/com/stripe/model/Topup.java index e5de6e76025b..7a952a3041e3 100644 --- a/src/main/java/com/stripe/model/Topup.java +++ b/src/main/java/com/stripe/model/Topup.java @@ -81,6 +81,14 @@ public class Topup extends ApiResource implements MetadataStore, BalanceT @SerializedName("id") String id; + /** + * Indicates whether the top-up was initiated by Stripe or by the user. + * + *

One of {@code stripe}, or {@code user}. + */ + @SerializedName("initiated_by") + String initiatedBy; + /** * If the object exists in live mode, the value is {@code true}. If the object exists in test * mode, the value is {@code false}. @@ -105,6 +113,19 @@ public class Topup extends ApiResource implements MetadataStore, BalanceT @SerializedName("object") String object; + /** + * The ID of a PaymentMethod representing the payment method used for the top-up. A PaymentMethod + * of type {@code us_bank_account} can be used. + */ + @SerializedName("payment_method") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField paymentMethod; + + /** Payment-method-specific configuration for this top-up. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + /** The source field is deprecated. It might not always be present in the API response. */ @SerializedName("source") Source source; @@ -149,6 +170,25 @@ public void setBalanceTransactionObject(BalanceTransaction expandableObject) { new ExpandableField(expandableObject.getId(), expandableObject); } + /** 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); + } + /** Cancels a top-up. Only pending top-ups can be canceled. */ public Topup cancel() throws StripeException { return cancel((Map) null, (RequestOptions) null); @@ -343,10 +383,45 @@ public Topup update(TopupUpdateParams params, RequestOptions options) throws Str return getResponseGetter().request(request, Topup.class); } + /** + * For more details about PaymentMethodOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions extends StripeObject { + /** + * If this top-up is to be used with a {@code us_bank_account} payment method, this sub-hash + * contains configuration for it. + */ + @SerializedName("us_bank_account") + UsBankAccount usBankAccount; + + /** + * For more details about UsBankAccount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UsBankAccount extends StripeObject { + /** + * The US bank transfer network used for this top-up. The default is {@code ach}. + * + *

Equal to {@code ach}. + */ + @SerializedName("network") + String network; + } + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(balanceTransaction, responseGetter); + trySetResponseGetter(paymentMethod, responseGetter); + trySetResponseGetter(paymentMethodOptions, responseGetter); trySetResponseGetter(source, responseGetter); } } diff --git a/src/main/java/com/stripe/model/billing/CreditGrant.java b/src/main/java/com/stripe/model/billing/CreditGrant.java index 0cc4f44e5a5c..57ed06b13501 100644 --- a/src/main/java/com/stripe/model/billing/CreditGrant.java +++ b/src/main/java/com/stripe/model/billing/CreditGrant.java @@ -553,6 +553,14 @@ public static class Scope extends StripeObject { @SerializedName("prices") List prices; + /** + * The rate cards that credit grants can apply to. The credit grant applies to any metered + * item billed under one of these rate cards. Cannot be used in combination with {@code + * price_type}, {@code prices}, or {@code billable_items}. + */ + @SerializedName("rate_cards") + List rateCards; + /** * For more details about BillableItem, please refer to the API Reference. @@ -580,6 +588,20 @@ public static class Price extends StripeObject implements HasId { @SerializedName("id") String id; } + + /** + * For more details about RateCard, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RateCard extends StripeObject implements HasId { + /** Unique identifier for the object. */ + @Getter(onMethod_ = {@Override}) + @SerializedName("id") + String id; + } } } diff --git a/src/main/java/com/stripe/model/crypto/CustomerConsumerWallet.java b/src/main/java/com/stripe/model/crypto/CustomerConsumerWallet.java index 046d8d0d54e4..bf227f44ffd8 100644 --- a/src/main/java/com/stripe/model/crypto/CustomerConsumerWallet.java +++ b/src/main/java/com/stripe/model/crypto/CustomerConsumerWallet.java @@ -38,8 +38,8 @@ public class CustomerConsumerWallet extends ApiResource implements HasId { * The blockchain network for this wallet * *

One of {@code aptos}, {@code avalanche}, {@code base}, {@code bitcoin}, {@code ethereum}, - * {@code optimism}, {@code polygon}, {@code solana}, {@code stellar}, {@code sui}, or {@code - * worldchain}. + * {@code optimism}, {@code polygon}, {@code solana}, {@code stellar}, {@code sui}, {@code tempo}, + * or {@code worldchain}. */ @SerializedName("network") String network; diff --git a/src/main/java/com/stripe/model/crypto/DepositAddress.java b/src/main/java/com/stripe/model/crypto/DepositAddress.java index 6f2ba1a02a6b..08bdfa6cdef1 100644 --- a/src/main/java/com/stripe/model/crypto/DepositAddress.java +++ b/src/main/java/com/stripe/model/crypto/DepositAddress.java @@ -22,17 +22,26 @@ /** * A crypto deposit address is a blockchain address that can be used by a merchant for deposit mode * crypto payments. + * + *

Related guide: Machine payments */ @Getter @Setter @EqualsAndHashCode(callSuper = false) public class DepositAddress extends ApiResource implements HasId { + /** The on-chain address where funds can be received. */ @SerializedName("address") String address; + /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @SerializedName("created") Long created; + /** + * If set, this deposit address is scoped to a Customer and can only receive funds + * from that customer. Otherwise, this deposit address can receive funds from any customer. + */ @SerializedName("customer") String customer; @@ -41,6 +50,10 @@ public class DepositAddress extends ApiResource implements HasId { @SerializedName("id") String id; + /** + * If the object exists in live mode, the value is {@code true}. If the object exists in test + * mode, the value is {@code false}. + */ @SerializedName("livemode") Boolean livemode; @@ -52,6 +65,11 @@ public class DepositAddress extends ApiResource implements HasId { @SerializedName("metadata") Map metadata; + /** + * The blockchain network where this address can accept funds. + * + *

One of {@code base}, {@code solana}, or {@code tempo}. + */ @SerializedName("network") String network; @@ -63,6 +81,7 @@ public class DepositAddress extends ApiResource implements HasId { @SerializedName("object") String object; + /** The tokens that can be sent to this deposit address on its network. */ @SerializedName("supported_tokens") List supportedTokens; diff --git a/src/main/java/com/stripe/model/crypto/OnrampSession.java b/src/main/java/com/stripe/model/crypto/OnrampSession.java index 2f8fd1ab1d4c..5d835fe3c55b 100644 --- a/src/main/java/com/stripe/model/crypto/OnrampSession.java +++ b/src/main/java/com/stripe/model/crypto/OnrampSession.java @@ -414,8 +414,8 @@ public static class TransactionDetails extends StripeObject { * destination_networks} is set, it must be a value in that array. * *

One of {@code avalanche}, {@code base}, {@code bitcoin}, {@code ethereum}, {@code - * optimism}, {@code polygon}, {@code solana}, {@code stellar}, {@code sui}, or {@code - * worldchain}. + * optimism}, {@code polygon}, {@code solana}, {@code stellar}, {@code sui}, {@code tempo}, or + * {@code worldchain}. */ @SerializedName("destination_network") String destinationNetwork; @@ -544,6 +544,10 @@ public static class WalletAddresses extends StripeObject { @SerializedName("sui") String sui; + /** A Tempo address. */ + @SerializedName("tempo") + String tempo; + /** A worldchain address. */ @SerializedName("worldchain") String worldchain; diff --git a/src/main/java/com/stripe/model/financialconnections/Session.java b/src/main/java/com/stripe/model/financialconnections/Session.java index 512f548f393f..367e2874730a 100644 --- a/src/main/java/com/stripe/model/financialconnections/Session.java +++ b/src/main/java/com/stripe/model/financialconnections/Session.java @@ -8,6 +8,7 @@ import com.stripe.model.ExpandableField; import com.stripe.model.HasId; import com.stripe.model.StripeObject; +import com.stripe.model.Token; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -38,6 +39,29 @@ public class Session extends ApiResource implements HasId { @SerializedName("accounts") AccountCollection accounts; + /** + * 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 + * 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. + * + *

If you can't use client-side tokenization, you can also create tokens using the API with + * either your publishable or secret API key. If your integration uses this method, you're + * responsible for any PCI compliance that it might require, and you must keep your secret API key + * safe. Unlike with client-side tokenization, your customer's information isn't sent directly to + * 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 External accounts. Radar, our integrated solution for automatic fraud + * protection, performs best with integrations that use client-side tokenization. + */ + @SerializedName("bank_account_token") + Token bankAccountToken; + /** A value that will be passed to the client to launch the authentication flow. */ @SerializedName("client_secret") String clientSecret; @@ -449,6 +473,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(accountHolder, responseGetter); trySetResponseGetter(accounts, responseGetter); + trySetResponseGetter(bankAccountToken, responseGetter); trySetResponseGetter(filters, responseGetter); trySetResponseGetter(hosted, responseGetter); trySetResponseGetter(limits, responseGetter); diff --git a/src/main/java/com/stripe/model/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index 096d0d4f13be..4cf52f429b5e 100644 --- a/src/main/java/com/stripe/model/issuing/Authorization.java +++ b/src/main/java/com/stripe/model/issuing/Authorization.java @@ -143,6 +143,10 @@ public class Authorization extends ApiResource @SerializedName("fuel") Fuel fuel; + /** Details about the IIAS FSA/HSA healthcare amounts on this authorization. */ + @SerializedName("healthcare") + Healthcare healthcare; + /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -1418,6 +1422,66 @@ public static class Fuel extends StripeObject { BigDecimal unitCostDecimal; } + /** + * For more details about Healthcare, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Healthcare extends StripeObject { + /** + * Clinic and urgent care sub-amount for Visa only. Null if the merchant did not include this + * amount. + */ + @SerializedName("clinic_amount") + Long clinicAmount; + + /** + * Three-letter ISO currency + * code, in lowercase. Must be a supported + * currency. + */ + @SerializedName("currency") + String currency; + + /** Dental care sub-amount for Visa only. Null if the merchant did not include this amount. */ + @SerializedName("dental_amount") + Long dentalAmount; + + /** Prescription drug sub-amount. Null if the merchant did not include this amount. */ + @SerializedName("prescription_amount") + Long prescriptionAmount; + + /** + * The type of healthcare transaction. {@code medical} for FSA/HSA-eligible healthcare + * purchases; {@code transit_for_healthcare} for FSA/HSA-eligible transit for healthcare + * purchases. + * + *

One of {@code medical}, or {@code transit_for_healthcare}. + */ + @SerializedName("purchase_type") + String purchaseType; + + /** Total FSA/HSA-eligible amount in the smallest currency unit. */ + @SerializedName("total_qualified_amount") + Long totalQualifiedAmount; + + /** + * IIAS verification status from the merchant terminal. For Visa, this value will always be + * iias_verified. + * + *

One of {@code iias_merchant_exempt}, {@code iias_merchant_not_certified}, {@code + * iias_verified}, or {@code not_verified}. + */ + @SerializedName("verification_status") + String verificationStatus; + + /** Vision/optical sub-amount. Null if the merchant did not include this amount. */ + @SerializedName("vision_amount") + Long visionAmount; + } + /** * For more details about MerchantData, please refer to the API Reference. @@ -2516,6 +2580,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(enrichedMerchantData, responseGetter); trySetResponseGetter(fleet, responseGetter); trySetResponseGetter(fuel, responseGetter); + trySetResponseGetter(healthcare, responseGetter); trySetResponseGetter(merchantData, responseGetter); trySetResponseGetter(networkData, responseGetter); trySetResponseGetter(pendingRequest, responseGetter); diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index e3d9f529d4f6..b64587603ea0 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -160,6 +160,20 @@ public class Card extends ApiResource implements HasId, MetadataStore { @Setter(lombok.AccessLevel.NONE) ExpandableField personalizationDesign; + /** + * The product code the card is currently enrolled under. {@code product_graduation_state} + * reflects any in-flight product graduation and whether the card network has confirmed it. + */ + @SerializedName("product_code") + String productCode; + + /** + * State of the product graduation request on this card. Only present when a product graduation + * has been requested. + */ + @SerializedName("product_graduation_state") + ProductGraduationState productGraduationState; + /** The program that this card belongs to — will not be nil. */ @SerializedName("program") String program; @@ -489,6 +503,28 @@ public static class CancelAfter extends StripeObject { } } + /** + * For more details about ProductGraduationState, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProductGraduationState extends StripeObject { + /** + * Status of the product graduation request. {@code pending} while awaiting card network + * confirmation, {@code succeeded} once confirmed, {@code failed} if rejected. + * + *

One of {@code failed}, {@code pending}, or {@code succeeded}. + */ + @SerializedName("state") + String state; + + /** The product code the card graduation is targeting. */ + @SerializedName("target_product_code") + String targetProductCode; + } + /** * For more details about Redaction, please refer to the API * Reference. @@ -1169,6 +1205,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(latestFraudWarning, responseGetter); trySetResponseGetter(lifecycleControls, responseGetter); trySetResponseGetter(personalizationDesign, responseGetter); + trySetResponseGetter(productGraduationState, responseGetter); trySetResponseGetter(redaction, responseGetter); trySetResponseGetter(replacedBy, responseGetter); trySetResponseGetter(replacementFor, responseGetter); diff --git a/src/main/java/com/stripe/model/productcatalog/TrialOffer.java b/src/main/java/com/stripe/model/productcatalog/TrialOffer.java index 94cff33ed06e..23b85e0f76db 100644 --- a/src/main/java/com/stripe/model/productcatalog/TrialOffer.java +++ b/src/main/java/com/stripe/model/productcatalog/TrialOffer.java @@ -14,6 +14,8 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.productcatalog.TrialOfferCreateParams; +import com.stripe.param.productcatalog.TrialOfferListParams; +import com.stripe.param.productcatalog.TrialOfferRetrieveParams; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -118,6 +120,74 @@ public static TrialOffer create(TrialOfferCreateParams params, RequestOptions op return getGlobalResponseGetter().request(request, TrialOffer.class); } + /** Returns a list of trial offers. */ + public static TrialOfferCollection list(Map params) throws StripeException { + return list(params, (RequestOptions) null); + } + + /** Returns a list of trial offers. */ + public static TrialOfferCollection list(Map params, RequestOptions options) + throws StripeException { + String path = "/v1/product_catalog/trial_offers"; + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, TrialOfferCollection.class); + } + + /** Returns a list of trial offers. */ + public static TrialOfferCollection list(TrialOfferListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + + /** Returns a list of trial offers. */ + public static TrialOfferCollection list(TrialOfferListParams params, RequestOptions options) + throws StripeException { + String path = "/v1/product_catalog/trial_offers"; + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return getGlobalResponseGetter().request(request, TrialOfferCollection.class); + } + + /** Retrieves the trial offer with the given ID. */ + public static TrialOffer retrieve(String id) throws StripeException { + return retrieve(id, (Map) null, (RequestOptions) null); + } + + /** Retrieves the trial offer with the given ID. */ + public static TrialOffer retrieve(String id, RequestOptions options) throws StripeException { + return retrieve(id, (Map) null, options); + } + + /** Retrieves the trial offer with the given ID. */ + public static TrialOffer retrieve(String id, Map params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/product_catalog/trial_offers/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, params, options); + return getGlobalResponseGetter().request(request, TrialOffer.class); + } + + /** Retrieves the trial offer with the given ID. */ + public static TrialOffer retrieve( + String id, TrialOfferRetrieveParams params, RequestOptions options) throws StripeException { + String path = String.format("/v1/product_catalog/trial_offers/%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, TrialOffer.class); + } + /** * For more details about Duration, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/productcatalog/TrialOfferCollection.java b/src/main/java/com/stripe/model/productcatalog/TrialOfferCollection.java new file mode 100644 index 000000000000..2e589c42649c --- /dev/null +++ b/src/main/java/com/stripe/model/productcatalog/TrialOfferCollection.java @@ -0,0 +1,6 @@ +// File generated from our OpenAPI spec +package com.stripe.model.productcatalog; + +import com.stripe.model.StripeCollection; + +public class TrialOfferCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java index 0df58493277a..de8d3dc1d9f8 100644 --- a/src/main/java/com/stripe/model/radar/PaymentEvaluation.java +++ b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java @@ -628,6 +628,10 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("billing_details") BillingDetails billingDetails; + /** Card details associated with the payment evaluation. */ + @SerializedName("card") + Card card; + /** The payment method used in this payment evaluation. */ @SerializedName("payment_method") @Getter(lombok.AccessLevel.NONE) @@ -710,6 +714,28 @@ public static class Address extends StripeObject { String state; } } + + /** Card details attached to this payment evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** 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; + + /** First six digits of the card number. */ + @SerializedName("first6") + String first6; + + /** Last four digits of the card number. */ + @SerializedName("last4") + String last4; + } } /** Shipping details attached to this payment. */ diff --git a/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java b/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java index e0df3e8ca78c..4dbb9ed0db48 100644 --- a/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java +++ b/src/main/java/com/stripe/model/sharedpayment/GrantedToken.java @@ -180,7 +180,7 @@ public static class PaymentMethodDetails extends StripeObject { * name matching this value. It contains additional information specific to the PaymentMethod * type. * - *

One of {@code affirm}, {@code card}, {@code klarna}, {@code link}, or {@code shop_pay}. + *

One of {@code affirm}, {@code card}, {@code klarna}, or {@code link}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/sharedpayment/IssuedToken.java b/src/main/java/com/stripe/model/sharedpayment/IssuedToken.java index e9ea2297a76b..84d546aba1c6 100644 --- a/src/main/java/com/stripe/model/sharedpayment/IssuedToken.java +++ b/src/main/java/com/stripe/model/sharedpayment/IssuedToken.java @@ -121,6 +121,10 @@ public class IssuedToken extends ApiResource implements HasId { @SerializedName("usage_limits") UsageLimits usageLimits; + /** Set to true when using Stripe.js, iOS, or Android client-side SDKs to handle next actions. */ + @SerializedName("use_stripe_sdk") + Boolean useStripeSdk; + /** Creates a new SharedPaymentIssuedToken object. */ public static IssuedToken create(Map params) throws StripeException { return create(params, (RequestOptions) null); diff --git a/src/main/java/com/stripe/model/tax/Location.java b/src/main/java/com/stripe/model/tax/Location.java index e303834a2c9e..34c0ca266a25 100644 --- a/src/main/java/com/stripe/model/tax/Location.java +++ b/src/main/java/com/stripe/model/tax/Location.java @@ -41,6 +41,13 @@ public class Location extends ApiResource implements HasId { @SerializedName("id") String id; + /** + * If the object exists in live mode, the value is {@code true}. If the object exists in test + * mode, the value is {@code false}. + */ + @SerializedName("livemode") + Boolean livemode; + /** * String representing the object's type. Objects of the same type share the same value. * diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index ccfd05a09c09..083c624ec4fe 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -246,6 +246,9 @@ public final class EventDataClassLookup { classLookup.put( "v2.money_management.received_debit", com.stripe.model.v2.moneymanagement.ReceivedDebit.class); + classLookup.put( + "v2.money_management.received_debit_mandate", + com.stripe.model.v2.moneymanagement.ReceivedDebitMandate.class); classLookup.put( "v2.money_management.recipient_verification", com.stripe.model.v2.moneymanagement.RecipientVerification.class); @@ -274,6 +277,12 @@ public final class EventDataClassLookup { classLookup.put("v2.reporting.report", com.stripe.model.v2.reporting.Report.class); classLookup.put("v2.reporting.report_run", com.stripe.model.v2.reporting.ReportRun.class); + classLookup.put("v2.risk.inquiry", com.stripe.model.v2.risk.Inquiry.class); + + classLookup.put( + "v2.signals.account_activity", com.stripe.model.v2.signals.AccountActivity.class); + classLookup.put( + "v2.signals.account_evaluation", com.stripe.model.v2.signals.AccountEvaluation.class); classLookup.put("v2.signals.account_signal", com.stripe.model.v2.signals.AccountSignal.class); classLookup.put("v2.tax.manual_rule", com.stripe.model.v2.tax.ManualRule.class); @@ -1184,18 +1193,39 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.money_management.received_debit.canceled", com.stripe.events.V2MoneyManagementReceivedDebitCanceledEvent.class); + eventClassLookup.put( + "v2.money_management.received_debit.created", + com.stripe.events.V2MoneyManagementReceivedDebitCreatedEvent.class); eventClassLookup.put( "v2.money_management.received_debit.failed", com.stripe.events.V2MoneyManagementReceivedDebitFailedEvent.class); eventClassLookup.put( "v2.money_management.received_debit.pending", com.stripe.events.V2MoneyManagementReceivedDebitPendingEvent.class); + eventClassLookup.put( + "v2.money_management.received_debit.scheduled", + com.stripe.events.V2MoneyManagementReceivedDebitScheduledEvent.class); eventClassLookup.put( "v2.money_management.received_debit.succeeded", com.stripe.events.V2MoneyManagementReceivedDebitSucceededEvent.class); eventClassLookup.put( "v2.money_management.received_debit.updated", com.stripe.events.V2MoneyManagementReceivedDebitUpdatedEvent.class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.canceled", + com.stripe.events.V2MoneyManagementReceivedDebitMandateCanceledEvent.class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.created", + com.stripe.events.V2MoneyManagementReceivedDebitMandateCreatedEvent.class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.expired", + com.stripe.events.V2MoneyManagementReceivedDebitMandateExpiredEvent.class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.pending_cancellation", + com.stripe.events.V2MoneyManagementReceivedDebitMandatePendingCancellationEvent.class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.updated", + com.stripe.events.V2MoneyManagementReceivedDebitMandateUpdatedEvent.class); eventClassLookup.put( "v2.money_management.recipient_verification.created", com.stripe.events.V2MoneyManagementRecipientVerificationCreatedEvent.class); @@ -1297,11 +1327,20 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.reporting.report_run.updated", com.stripe.events.V2ReportingReportRunUpdatedEvent.class); + eventClassLookup.put( + "v2.signals.account_evaluation.complete", + com.stripe.events.V2SignalsAccountEvaluationCompleteEvent.class); eventClassLookup.put( "v2.signals.account_signal.fraudulent_merchant_ready", com.stripe.events.V2SignalsAccountSignalFraudulentMerchantReadyEvent.class); + eventClassLookup.put( + "v2.signals.account_signal.fraudulent_website_ready", + com.stripe.events.V2SignalsAccountSignalFraudulentWebsiteReadyEvent.class); eventClassLookup.put( "v2.signals.account_signal.merchant_delinquency_ready", com.stripe.events.V2SignalsAccountSignalMerchantDelinquencyReadyEvent.class); + eventClassLookup.put( + "v2.signals.account_signal.payment_delinquency_exposure_ready", + com.stripe.events.V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent.class); } } diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java index dc2764d48bf4..4441a51834b1 100644 --- a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -1074,18 +1074,40 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.money_management.received_debit.canceled", com.stripe.events.V2MoneyManagementReceivedDebitCanceledEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_debit.created", + com.stripe.events.V2MoneyManagementReceivedDebitCreatedEventNotification.class); eventClassLookup.put( "v2.money_management.received_debit.failed", com.stripe.events.V2MoneyManagementReceivedDebitFailedEventNotification.class); eventClassLookup.put( "v2.money_management.received_debit.pending", com.stripe.events.V2MoneyManagementReceivedDebitPendingEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_debit.scheduled", + com.stripe.events.V2MoneyManagementReceivedDebitScheduledEventNotification.class); eventClassLookup.put( "v2.money_management.received_debit.succeeded", com.stripe.events.V2MoneyManagementReceivedDebitSucceededEventNotification.class); eventClassLookup.put( "v2.money_management.received_debit.updated", com.stripe.events.V2MoneyManagementReceivedDebitUpdatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.canceled", + com.stripe.events.V2MoneyManagementReceivedDebitMandateCanceledEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.created", + com.stripe.events.V2MoneyManagementReceivedDebitMandateCreatedEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.expired", + com.stripe.events.V2MoneyManagementReceivedDebitMandateExpiredEventNotification.class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.pending_cancellation", + com.stripe.events.V2MoneyManagementReceivedDebitMandatePendingCancellationEventNotification + .class); + eventClassLookup.put( + "v2.money_management.received_debit_mandate.updated", + com.stripe.events.V2MoneyManagementReceivedDebitMandateUpdatedEventNotification.class); eventClassLookup.put( "v2.money_management.recipient_verification.created", com.stripe.events.V2MoneyManagementRecipientVerificationCreatedEventNotification.class); @@ -1191,11 +1213,21 @@ public final class EventNotificationClassLookup { eventClassLookup.put( "v2.reporting.report_run.updated", com.stripe.events.V2ReportingReportRunUpdatedEventNotification.class); + eventClassLookup.put( + "v2.signals.account_evaluation.complete", + com.stripe.events.V2SignalsAccountEvaluationCompleteEventNotification.class); eventClassLookup.put( "v2.signals.account_signal.fraudulent_merchant_ready", com.stripe.events.V2SignalsAccountSignalFraudulentMerchantReadyEventNotification.class); + eventClassLookup.put( + "v2.signals.account_signal.fraudulent_website_ready", + com.stripe.events.V2SignalsAccountSignalFraudulentWebsiteReadyEventNotification.class); eventClassLookup.put( "v2.signals.account_signal.merchant_delinquency_ready", com.stripe.events.V2SignalsAccountSignalMerchantDelinquencyReadyEventNotification.class); + eventClassLookup.put( + "v2.signals.account_signal.payment_delinquency_exposure_ready", + com.stripe.events.V2SignalsAccountSignalPaymentDelinquencyExposureReadyEventNotification + .class); } } diff --git a/src/main/java/com/stripe/model/v2/billing/Intent.java b/src/main/java/com/stripe/model/v2/billing/Intent.java index f30c249e8764..994cbc35bd57 100644 --- a/src/main/java/com/stripe/model/v2/billing/Intent.java +++ b/src/main/java/com/stripe/model/v2/billing/Intent.java @@ -77,10 +77,18 @@ public class Intent extends StripeObject implements HasId { @Setter @EqualsAndHashCode(callSuper = false) public static class AmountDetails extends StripeObject { + /** The outstanding amount after discount, tax, and customer balance application. */ + @SerializedName("amount_due") + String amountDue; + /** Three-letter ISO currency code, in lowercase. Must be a supported currency. */ @SerializedName("currency") String currency; + /** The customer's account balance applied to the amount. */ + @SerializedName("customer_balance_applied") + String customerBalanceApplied; + /** Amount of discount applied. */ @SerializedName("discount") String discount; diff --git a/src/main/java/com/stripe/model/v2/core/Account.java b/src/main/java/com/stripe/model/v2/core/Account.java index f2ec178b2ab0..53c9ff5c32b9 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -2143,6 +2143,10 @@ public static class Merchant extends StripeObject { @SerializedName("card_payments") CardPayments cardPayments; + /** Settings for gross settlement. */ + @SerializedName("gross_settlement") + GrossSettlement grossSettlement; + /** Settings specific to Konbini payments on the account. */ @SerializedName("konbini_payments") KonbiniPayments konbiniPayments; @@ -6819,6 +6823,24 @@ public static class DeclineOn extends StripeObject { } } + /** Settings for gross settlement. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GrossSettlement extends StripeObject { + /** The ID of the payment method to use for gross settlement payouts. */ + @SerializedName("payment_method") + String paymentMethod; + + /** + * Whether to collect a payment method for gross settlement. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("payment_method_collection") + String paymentMethodCollection; + } + /** Settings specific to Konbini payments on the account. */ @Getter @Setter @@ -14884,6 +14906,10 @@ public static class MoneyManager extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BusinessDetails extends StripeObject { + /** Additional addresses associated with the business. */ + @SerializedName("additional_addresses") + List additionalAddresses; + /** The company’s primary address. */ @SerializedName("address") Address address; @@ -14958,6 +14984,54 @@ public static class BusinessDetails extends StripeObject { @SerializedName("structure") String structure; + /** + * 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. + * + *

One of {@code administrative}, or {@code principal_place_of_business}. + */ + @SerializedName("purpose") + String purpose; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + /** Town or district. */ + @SerializedName("town") + String town; + } + /** The company’s primary address. */ @Getter @Setter diff --git a/src/main/java/com/stripe/model/v2/iam/ActivityLog.java b/src/main/java/com/stripe/model/v2/iam/ActivityLog.java index fadbbbe57e1a..14e2cdf12ec4 100644 --- a/src/main/java/com/stripe/model/v2/iam/ActivityLog.java +++ b/src/main/java/com/stripe/model/v2/iam/ActivityLog.java @@ -230,6 +230,14 @@ public static class UserRoles extends StripeObject { @SerializedName("old_roles") List oldRoles; + /** + * Source of the role change. + * + *

One of {@code dashboard}, {@code scim}, or {@code sso}. + */ + @SerializedName("source") + String source; + /** Email address of the user whose roles were changed. */ @SerializedName("user_email") String userEmail; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/DebitDispute.java b/src/main/java/com/stripe/model/v2/moneymanagement/DebitDispute.java index 948317f08d5e..2e8cec2810d3 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/DebitDispute.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/DebitDispute.java @@ -97,7 +97,7 @@ public static class BankTransfer extends StripeObject { /** * The bank network the dispute was originated on. * - *

Equal to {@code ach}. + *

One of {@code ach}, or {@code bacs}. */ @SerializedName("network") String network; @@ -105,7 +105,9 @@ public static class BankTransfer extends StripeObject { /** * The reason for the dispute. * - *

One of {@code incorrect_amount_or_date}, or {@code unauthorized}. + *

One of {@code beneficiary_unrecognized}, {@code incorrect_amount_or_date}, {@code + * mandate_canceled}, {@code mandate_canceled_by_stripe}, {@code no_advance_notice}, {@code + * originator_requested}, {@code signature_invalid}, or {@code unauthorized}. */ @SerializedName("reason") String reason; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java index 5be73f57d57c..97ed004ff6dc 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAccount.java @@ -72,14 +72,6 @@ public class FinancialAccount extends StripeObject implements HasId { @SerializedName("livemode") Boolean livemode; - /** - * If this is a managed FinancialAccount, {@code managed_by} indicates the product that created - * and manages this FinancialAccount. For managed FinancialAccounts, creation of money management - * resources can only be orchestrated by the managing product. - */ - @SerializedName("managed_by") - ManagedBy managedBy; - /** Metadata associated with the FinancialAccount. */ @SerializedName("metadata") Map metadata; @@ -233,24 +225,6 @@ public static class Platform extends StripeObject { } } - /** - * If this is a managed FinancialAccount, {@code managed_by} indicates the product that created - * and manages this FinancialAccount. For managed FinancialAccounts, creation of money management - * resources can only be orchestrated by the managing product. - */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class ManagedBy extends StripeObject { - /** - * Enum describing the Stripe product that is managing this FinancialAccount. - * - *

Equal to {@code multiprocessor_settlement}. - */ - @SerializedName("type") - String type; - } - /** * If this is a {@code multiprocessor_settlement} FinancialAccount, this hash includes details * specific to {@code multiprocessor_settlement} FinancialAccounts. diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java index 6be2162a4017..469111cff885 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java @@ -91,6 +91,10 @@ public class OutboundPayment extends StripeObject implements HasId { @SerializedName("outbound_payment_quote") String outboundPaymentQuote; + /** The PayoutIntent ID that triggered this OutboundPayment. */ + @SerializedName("payout_intent") + String payoutIntent; + /** * The purpose of the OutboundPayment. * diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java index 02bb5746bf6d..8a3630bf1ecf 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java @@ -161,8 +161,8 @@ public static class BalanceTransfer extends StripeObject { String outboundTransfer; /** The ID of the payout object that originated the ReceivedCredit. */ - @SerializedName("payout_v1") - String payoutV1; + @SerializedName("payout") + String payout; /** The ID of the v1 transfer object that originated the ReceivedCredit. */ @SerializedName("transfer") @@ -171,8 +171,8 @@ public static class BalanceTransfer extends StripeObject { /** * Open Enum. The type of Stripe Money Movement that originated the ReceivedCredit. * - *

One of {@code outbound_payment}, {@code outbound_transfer}, {@code transfer}, or {@code - * payout_v1}. + *

One of {@code outbound_payment}, {@code outbound_transfer}, {@code payout}, {@code + * transfer}, or {@code payout_v1}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java index 8fc60e1796a8..ac12fc8803a0 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java @@ -89,11 +89,19 @@ public class ReceivedDebit extends StripeObject implements HasId { @SerializedName("receipt_url") String receiptUrl; + /** + * The time at which the scheduled ReceivedDebit is expected to settle. Represented as a RFC 3339 + * date & time UTC value in millisecond precision, for example: {@code + * 2022-09-18T13:22:18.123Z}. Only present when status is {@code scheduled}. + */ + @SerializedName("settles_at") + Instant settlesAt; + /** * Open Enum. The status of the ReceivedDebit. * - *

One of {@code canceled}, {@code failed}, {@code pending}, {@code returned}, or {@code - * succeeded}. + *

One of {@code canceled}, {@code failed}, {@code pending}, {@code returned}, {@code + * scheduled}, or {@code succeeded}. */ @SerializedName("status") String status; @@ -154,10 +162,17 @@ public static class BankTransfer extends StripeObject { @SerializedName("financial_address") String financialAddress; + /** + * Object containing details of the GB Bank Account that originated the debit. Present when the + * debit was originated via BACS. + */ + @SerializedName("gb_bank_account") + GbBankAccount gbBankAccount; + /** * Open Enum. Indicates the origin type through which this debit was initiated. * - *

Equal to {@code us_bank_account}. + *

One of {@code gb_bank_account}, or {@code us_bank_account}. */ @SerializedName("origin_type") String originType; @@ -165,7 +180,7 @@ public static class BankTransfer extends StripeObject { /** * Open Enum. The type of the payment method used to originate the debit. * - *

Equal to {@code us_bank_account}. + *

One of {@code gb_bank_account}, or {@code us_bank_account}. */ @SerializedName("payment_method_type") String paymentMethodType; @@ -174,11 +189,54 @@ public static class BankTransfer extends StripeObject { @SerializedName("statement_descriptor") String statementDescriptor; - /** The payment method used to originate the debit. */ + /** + * Object containing details of the US Bank Account that originated the debit. Present when the + * debit was originated via ACH. + */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; - /** The payment method used to originate the debit. */ + /** + * Object containing details of the GB Bank Account that originated the debit. Present when the + * debit was originated via BACS. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GbBankAccount extends StripeObject { + /** The name of the account holder that originated the debit. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The name of the bank the debit originated from. */ + @SerializedName("bank_name") + String bankName; + + /** Last 4 digits of the bank account number. */ + @SerializedName("last4") + String last4; + + /** + * Open Enum. The bank network the debit was originated on. + * + *

Equal to {@code bacs}. + */ + @SerializedName("network") + String network; + + /** The ID of the mandate associated with this debit. */ + @SerializedName("received_debit_mandate") + String receivedDebitMandate; + + /** The sort code of the bank that originated the debit. */ + @SerializedName("sort_code") + String sortCode; + } + + /** + * Object containing details of the US Bank Account that originated the debit. Present when the + * debit was originated via ACH. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -301,7 +359,7 @@ public static class Failed extends StripeObject { * Open Enum. The reason for the failure of the ReceivedDebit. * *

One of {@code capability_inactive}, {@code financial_address_inactive}, {@code - * insufficient_funds}, or {@code stripe_rejected}. + * insufficient_funds}, {@code no_mandate}, or {@code stripe_rejected}. */ @SerializedName("reason") String reason; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebitMandate.java b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebitMandate.java new file mode 100644 index 000000000000..f42f86f4f8f0 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebitMandate.java @@ -0,0 +1,187 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.moneymanagement; + +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; + +/** + * A ReceivedDebitMandate represents an authorization from a third party to debit a financial + * account on a recurring basis. + */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class ReceivedDebitMandate extends StripeObject implements HasId { + /** + * This object stores details about the originating bank transfer that resulted in the + * ReceivedDebitMandate. Present if {@code type} field value is {@code bank_transfer}. + */ + @SerializedName("bank_transfer") + BankTransfer bankTransfer; + + /** + * The time at which the ReceivedDebitMandate was created. Represented as a RFC 3339 date & + * time UTC value in millisecond precision, for example: {@code 2026-06-03T13:22:18.123Z}. + */ + @SerializedName("created") + Instant created; + + /** + * The currency of the ReceivedDebitMandate in ISO 4217 format. This is the currency that debits + * will be collected in. + */ + @SerializedName("currency") + String currency; + + /** Financial account ID associated with this mandate. */ + @SerializedName("financial_account") + String financialAccount; + + /** The unique identifier for the ReceivedDebitMandate. */ + @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; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.money_management.received_debit_mandate}. + */ + @SerializedName("object") + String object; + + /** + * The status of the ReceivedDebitMandate. + * + *

One of {@code active}, {@code canceled}, {@code expired}, or {@code pending_cancellation}. + */ + @SerializedName("status") + String status; + + /** Detailed information that elaborates on the specific status of the ReceivedDebitMandate. */ + @SerializedName("status_details") + StatusDetails statusDetails; + + /** Timestamps describing when the mandate changed status. */ + @SerializedName("status_transitions") + StatusTransitions statusTransitions; + + /** + * The type of the ReceivedDebitMandate. + * + *

Equal to {@code bank_transfer}. + */ + @SerializedName("type") + String type; + + /** + * This object stores details about the originating bank transfer that resulted in the + * ReceivedDebitMandate. Present if {@code type} field value is {@code bank_transfer}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankTransfer extends StripeObject { + /** The name of the account holder that initiated the debit. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The financial address associated with this mandate. */ + @SerializedName("financial_address") + String financialAddress; + + /** + * The bank transfer network for this mandate. + * + *

Equal to {@code bacs}. + */ + @SerializedName("network") + String network; + + /** The bank transfer reference provided by the bank. */ + @SerializedName("reference") + String reference; + } + + /** Detailed information that elaborates on the specific status of the ReceivedDebitMandate. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusDetails extends StripeObject { + /** If the mandate is canceled, this field provides more details on the cancellation reason. */ + @SerializedName("canceled") + Canceled canceled; + + /** If the mandate is canceled, this field provides more details on the cancellation reason. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Canceled extends StripeObject { + /** + * The {@code canceled} status reason. + * + *

One of {@code canceled_by_beneficiary}, {@code canceled_by_stripe}, or {@code + * user_action}. + */ + @SerializedName("reason") + String reason; + } + } + + /** Timestamps describing when the mandate changed status. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusTransitions extends StripeObject { + /** + * Timestamp describing when the ReceivedDebitMandate changed status to {@code active}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision. + */ + @SerializedName("activated_at") + Instant activatedAt; + + /** + * Timestamp describing when the ReceivedDebitMandate changed status to {@code canceled}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision for example: + * 2026-06-03T13:22:18.123Z. + */ + @SerializedName("canceled_at") + Instant canceledAt; + + /** + * Timestamp describing when the ReceivedDebitMandate was created. Represented as a RFC 3339 + * date & time UTC value in millisecond precision for example: 2026-06-03T13:22:18.123Z. + */ + @SerializedName("created_at") + Instant createdAt; + + /** + * Timestamp describing when the ReceivedDebitMandate changed status to {@code expired}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2026-06-03T13:22:18.123Z. + */ + @SerializedName("expired_at") + Instant expiredAt; + + /** + * Timestamp describing when the ReceivedDebitMandate changed status to {@code + * pending_cancellation}. Represented as a RFC 3339 date & time UTC value in millisecond + * precision. + */ + @SerializedName("pending_cancellation_at") + Instant pendingCancellationAt; + } +} diff --git a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java index 3b738f503e51..cf19f9fa112f 100644 --- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java +++ b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java @@ -167,6 +167,10 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("status") String status; + /** Provides a way to schedule deferred payments for cards and debits, in YYYY-MM-DD format. */ + @SerializedName("target_date") + String targetDate; + /** Test clock that can be used to advance the retry attempts in a sandbox. */ @SerializedName("test_clock") String testClock; diff --git a/src/main/java/com/stripe/model/v2/risk/Inquiry.java b/src/main/java/com/stripe/model/v2/risk/Inquiry.java new file mode 100644 index 000000000000..759944ec2cd6 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/risk/Inquiry.java @@ -0,0 +1,112 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.risk; + +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 lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** A risk inquiry represents a request from Stripe for information about a connected account. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class Inquiry extends StripeObject implements HasId { + /** Data for appeal inquiries. Only present when type is appeal. */ + @SerializedName("appeal") + Appeal appeal; + + /** + * Data for authorization_documents inquiries. Only present when type is authorization_documents. + */ + @SerializedName("authorization_documents") + AuthorizationDocuments authorizationDocuments; + + /** Time at which the inquiry was closed. */ + @SerializedName("closed_at") + Instant closedAt; + + /** Time at which the inquiry was created. */ + @SerializedName("created") + Instant created; + + /** Unique identifier for the inquiry. */ + @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; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.risk.inquiry}. + */ + @SerializedName("object") + String object; + + /** Time at which the inquiry was opened. */ + @SerializedName("opened_at") + Instant openedAt; + + /** Data for product_removal inquiries. Only present when type is product_removal. */ + @SerializedName("product_removal") + ProductRemoval productRemoval; + + /** + * The current status of the inquiry. + * + *

One of {@code closed}, or {@code open}. + */ + @SerializedName("status") + String status; + + /** + * The type of inquiry. + * + *

One of {@code appeal}, {@code authorization_documents}, or {@code product_removal}. + */ + @SerializedName("type") + String type; + + /** Data for appeal inquiries. Only present when type is appeal. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Appeal extends StripeObject { + /** A text explanation for the appeal. */ + @SerializedName("explanation") + String explanation; + } + + /** + * Data for authorization_documents inquiries. Only present when type is authorization_documents. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AuthorizationDocuments extends StripeObject { + /** IDs of uploaded files to attach as authorization documents. */ + @SerializedName("files") + List files; + } + + /** Data for product_removal inquiries. Only present when type is product_removal. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProductRemoval extends StripeObject { + /** The timestamp when the prohibited items were removed. */ + @SerializedName("items_removed_at") + Instant itemsRemovedAt; + } +} diff --git a/src/main/java/com/stripe/model/v2/signals/AccountActivity.java b/src/main/java/com/stripe/model/v2/signals/AccountActivity.java new file mode 100644 index 000000000000..0c3d09c220c9 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/signals/AccountActivity.java @@ -0,0 +1,270 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.signals; + +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 Activity resource for the Signals API. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class AccountActivity extends StripeObject implements HasId { + /** The account, customer, or inline account data associated with the activity. */ + @SerializedName("account_details") + AccountDetails accountDetails; + + /** The account evaluation this activity is associated with, when applicable. */ + @SerializedName("account_evaluation") + String accountEvaluation; + + /** Timestamp at which the account activity was created. */ + @SerializedName("created") + Instant created; + + /** Unique identifier for the account activity. */ + @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; + + /** Details for the login attempt. Present only when type is login_attempt. */ + @SerializedName("login_attempt") + LoginAttempt loginAttempt; + + /** Details for the login decision. Present only when type is login_decision. */ + @SerializedName("login_decision") + LoginDecision loginDecision; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.signals.account_activity}. + */ + @SerializedName("object") + String object; + + /** Timestamp at which the activity occurred. Defaults to the created time if not provided. */ + @SerializedName("occurred_at") + Instant occurredAt; + + /** Details for the registration attempt. Present only when type is registration_attempt. */ + @SerializedName("registration_attempt") + RegistrationAttempt registrationAttempt; + + /** Details for the registration decision. Present only when type is registration_decision. */ + @SerializedName("registration_decision") + RegistrationDecision registrationDecision; + + /** + * The type of activity. + * + *

One of {@code login_attempt}, {@code login_decision}, {@code registration_attempt}, or + * {@code registration_decision}. + */ + @SerializedName("type") + String type; + + /** The account, customer, or inline account data associated with the activity. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountDetails extends StripeObject { + /** The v2 account ID of the account. */ + @SerializedName("account") + String account; + + /** The v1 customer ID of the account, for users not yet migrated to v2/accounts. */ + @SerializedName("customer") + String customer; + + /** Inline account data to evaluate without creating a v2 account. */ + @SerializedName("data") + Data data; + + /** Inline account data to evaluate without creating a v2 account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Data extends StripeObject { + /** Default account settings. */ + @SerializedName("defaults") + Defaults defaults; + + /** Identity data. */ + @SerializedName("identity") + Identity identity; + + /** Default account settings. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Defaults extends StripeObject { + /** Account profile data. */ + @SerializedName("profile") + Profile profile; + + /** Account profile data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Profile extends StripeObject { + /** The business URL. */ + @SerializedName("business_url") + String businessUrl; + + /** Doing business as (DBA) name. */ + @SerializedName("doing_business_as") + String doingBusinessAs; + + /** Description of the account's product or service. */ + @SerializedName("product_description") + String productDescription; + } + } + + /** Identity data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Identity extends StripeObject { + /** Business details for identity data. */ + @SerializedName("business_details") + BusinessDetails businessDetails; + + /** Business details for identity data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BusinessDetails extends StripeObject { + /** Registered business name. */ + @SerializedName("registered_name") + String registeredName; + } + } + } + } + + /** Details for the login attempt. Present only when type is login_attempt. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LoginAttempt extends StripeObject { + /** Client details captured for the attempt. */ + @SerializedName("client_details") + ClientDetails clientDetails; + + /** Client details captured for the attempt. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ClientDetails extends StripeObject { + /** Raw client details for the activity, when a Radar session is not available. */ + @SerializedName("data") + Data data; + + /** The Radar session ID capturing client details for the activity. */ + @SerializedName("radar_session") + String radarSession; + + /** Raw client details for the activity, when a Radar session is not available. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Data extends StripeObject { + /** The IP address associated with the activity. */ + @SerializedName("ip") + String ip; + + /** The referrer associated with the activity. */ + @SerializedName("referrer") + String referrer; + + /** The user agent associated with the activity. */ + @SerializedName("user_agent") + String userAgent; + } + } + } + + /** Details for the login decision. Present only when type is login_decision. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LoginDecision extends StripeObject { + /** + * The action the merchant took following the evaluation. + * + *

One of {@code allowed}, {@code blocked}, or {@code restricted}. + */ + @SerializedName("status") + String status; + } + + /** Details for the registration attempt. Present only when type is registration_attempt. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationAttempt extends StripeObject { + /** Client details captured for the attempt. */ + @SerializedName("client_details") + ClientDetails clientDetails; + + /** Client details captured for the attempt. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ClientDetails extends StripeObject { + /** Raw client details for the activity, when a Radar session is not available. */ + @SerializedName("data") + Data data; + + /** The Radar session ID capturing client details for the activity. */ + @SerializedName("radar_session") + String radarSession; + + /** Raw client details for the activity, when a Radar session is not available. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Data extends StripeObject { + /** The IP address associated with the activity. */ + @SerializedName("ip") + String ip; + + /** The referrer associated with the activity. */ + @SerializedName("referrer") + String referrer; + + /** The user agent associated with the activity. */ + @SerializedName("user_agent") + String userAgent; + } + } + } + + /** Details for the registration decision. Present only when type is registration_decision. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationDecision extends StripeObject { + /** + * The action the merchant took following the evaluation. + * + *

One of {@code allowed}, {@code blocked}, or {@code restricted}. + */ + @SerializedName("status") + String status; + } +} diff --git a/src/main/java/com/stripe/model/v2/signals/AccountEvaluation.java b/src/main/java/com/stripe/model/v2/signals/AccountEvaluation.java new file mode 100644 index 000000000000..440eac16c13e --- /dev/null +++ b/src/main/java/com/stripe/model/v2/signals/AccountEvaluation.java @@ -0,0 +1,252 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2.signals; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.HasId; +import com.stripe.model.StripeObject; +import java.math.BigDecimal; +import java.time.Instant; +import java.util.List; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; + +/** Account Evaluation resource for the Signals API. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class AccountEvaluation extends StripeObject implements HasId { + /** Account activity recorded alongside this evaluation, when applicable. */ + @SerializedName("account_activity_details") + AccountActivityDetails accountActivityDetails; + + /** The account, customer, or inline account data being evaluated. */ + @SerializedName("account_details") + AccountDetails accountDetails; + + /** Timestamp at which the evaluation was created. */ + @SerializedName("created") + Instant created; + + /** Signal results that are available for the evaluation. */ + @SerializedName("evaluated_signals") + EvaluatedSignals evaluatedSignals; + + /** Unique identifier for the account evaluation. */ + @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; + + /** + * String representing the object's type. Objects of the same type share the same value of the + * object field. + * + *

Equal to {@code v2.signals.account_evaluation}. + */ + @SerializedName("object") + String object; + + /** List of signals still pending evaluation. */ + @SerializedName("pending_signals") + List pendingSignals; + + /** List of signals requested for evaluation. */ + @SerializedName("requested_signals") + List requestedSignals; + + /** Account activity recorded alongside this evaluation, when applicable. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountActivityDetails extends StripeObject { + /** The ID of the account activity created or associated with the evaluation. */ + @SerializedName("account_activity") + String accountActivity; + } + + /** The account, customer, or inline account data being evaluated. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AccountDetails extends StripeObject { + /** The v2 account ID of the account. */ + @SerializedName("account") + String account; + + /** The v1 customer ID of the account, for users not yet migrated to v2/accounts. */ + @SerializedName("customer") + String customer; + + /** Inline account data to evaluate without creating a v2 account. */ + @SerializedName("data") + Data data; + + /** Inline account data to evaluate without creating a v2 account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Data extends StripeObject { + /** Default account settings. */ + @SerializedName("defaults") + Defaults defaults; + + /** Identity data. */ + @SerializedName("identity") + Identity identity; + + /** Default account settings. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Defaults extends StripeObject { + /** Account profile data. */ + @SerializedName("profile") + Profile profile; + + /** Account profile data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Profile extends StripeObject { + /** The business URL. */ + @SerializedName("business_url") + String businessUrl; + + /** Doing business as (DBA) name. */ + @SerializedName("doing_business_as") + String doingBusinessAs; + + /** Description of the account's product or service. */ + @SerializedName("product_description") + String productDescription; + } + } + + /** Identity data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Identity extends StripeObject { + /** Business details for identity data. */ + @SerializedName("business_details") + BusinessDetails businessDetails; + + /** Business details for identity data. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BusinessDetails extends StripeObject { + /** Registered business name. */ + @SerializedName("registered_name") + String registeredName; + } + } + } + } + + /** Signal results that are available for the evaluation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EvaluatedSignals extends StripeObject { + /** Fraudulent website result for the evaluation, when available. */ + @SerializedName("fraudulent_website") + FraudulentWebsite fraudulentWebsite; + + /** User account-sharing result for the evaluation, when available. */ + @SerializedName("user_account_sharing") + UserAccountSharing userAccountSharing; + + /** User multi-accounting result for the evaluation, when available. */ + @SerializedName("user_multi_accounting") + UserMultiAccounting userMultiAccounting; + + /** Fraudulent website result for the evaluation, when available. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FraudulentWebsite extends StripeObject { + /** Human-readable details about the fraudulent website evaluation, when available. */ + @SerializedName("details") + String details; + + /** Timestamp at which the signal was evaluated. */ + @SerializedName("evaluated_at") + Instant evaluatedAt; + + /** + * Categorical assessment of the fraudulent website risk. + * + *

One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code + * not_assessed}, or {@code unknown}. + */ + @SerializedName("risk_level") + String riskLevel; + + /** The account signal ID containing the full fraudulent website signal result. */ + @SerializedName("signal") + String signal; + } + + /** User account-sharing result for the evaluation, when available. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserAccountSharing extends StripeObject { + /** Timestamp at which the signal was evaluated. */ + @SerializedName("evaluated_at") + Instant evaluatedAt; + + /** + * Categorical assessment of the account-sharing risk. + * + *

One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code + * not_assessed}, or {@code unknown}. + */ + @SerializedName("risk_level") + String riskLevel; + + /** The specific risk score for the account, between 0.00 and 100.00, when available. */ + @SerializedName("score") + BigDecimal score; + + /** The account signal ID containing the full user account-sharing signal result. */ + @SerializedName("signal") + String signal; + } + + /** User multi-accounting result for the evaluation, when available. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserMultiAccounting extends StripeObject { + /** Timestamp at which the signal was evaluated. */ + @SerializedName("evaluated_at") + Instant evaluatedAt; + + /** + * Categorical assessment of the multi-accounting risk. + * + *

One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code + * not_assessed}, or {@code unknown}. + */ + @SerializedName("risk_level") + String riskLevel; + + /** The specific risk score for the account, between 0.00 and 100.00, when available. */ + @SerializedName("score") + BigDecimal score; + + /** The account signal ID containing the full user multi-accounting signal result. */ + @SerializedName("signal") + String signal; + } + } +} diff --git a/src/main/java/com/stripe/model/v2/signals/AccountSignal.java b/src/main/java/com/stripe/model/v2/signals/AccountSignal.java index cbd9784274ee..2af0f72d1f7a 100644 --- a/src/main/java/com/stripe/model/v2/signals/AccountSignal.java +++ b/src/main/java/com/stripe/model/v2/signals/AccountSignal.java @@ -1,8 +1,10 @@ // File generated from our OpenAPI spec package com.stripe.model.v2.signals; +import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; +import com.stripe.model.StringInt64TypeAdapter; import com.stripe.model.StripeObject; import java.math.BigDecimal; import java.time.Instant; @@ -25,6 +27,10 @@ public class AccountSignal extends StripeObject implements HasId { @SerializedName("account_details") AccountDetails accountDetails; + /** The account evaluation that produced this signal, if applicable. */ + @SerializedName("account_evaluation") + String accountEvaluation; + /** Timestamp at which the signal was created. */ @SerializedName("created") Instant created; @@ -33,6 +39,10 @@ public class AccountSignal extends StripeObject implements HasId { @SerializedName("fraudulent_merchant") FraudulentMerchant fraudulentMerchant; + /** Data for the fraudulent website signal. Present only when type is fraudulent_website. */ + @SerializedName("fraudulent_website") + FraudulentWebsite fraudulentWebsite; + /** Unique identifier for the account signal. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -58,15 +68,31 @@ public class AccountSignal extends StripeObject implements HasId { @SerializedName("object") String object; + /** + * Data for the payment delinquency exposure signal. Present only when type is + * payment_delinquency_exposure. + */ + @SerializedName("payment_delinquency_exposure") + PaymentDelinquencyExposure paymentDelinquencyExposure; + /** * The type of signal. * - *

One of {@code fraudulent_merchant}, {@code merchant_delinquency}, or {@code - * payment_delinquency_exposure}. + *

One of {@code fraudulent_merchant}, {@code fraudulent_website}, {@code + * merchant_delinquency}, {@code payment_delinquency_exposure}, {@code user_account_sharing}, or + * {@code user_multi_accounting}. */ @SerializedName("type") String type; + /** Data for the user account-sharing signal. Present only when type is user_account_sharing. */ + @SerializedName("user_account_sharing") + UserAccountSharing userAccountSharing; + + /** Data for the user multi-accounting signal. Present only when type is user_multi_accounting. */ + @SerializedName("user_multi_accounting") + UserMultiAccounting userMultiAccounting; + /** The account or customer this signal is associated with. */ @Getter @Setter @@ -147,6 +173,25 @@ public static class Indicator extends StripeObject { } } + /** Data for the fraudulent website signal. Present only when type is fraudulent_website. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FraudulentWebsite extends StripeObject { + /** Human-readable details about the fraudulent website evaluation. */ + @SerializedName("details") + String details; + + /** + * Categorical assessment of the fraudulent website risk. + * + *

One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code + * not_assessed}, or {@code unknown}. + */ + @SerializedName("risk_level") + String riskLevel; + } + /** Data for the merchant delinquency signal. Present only when type is merchant_delinquency. */ @Getter @Setter @@ -211,4 +256,118 @@ public static class Indicator extends StripeObject { String indicator; } } + + /** + * Data for the payment delinquency exposure signal. Present only when type is + * payment_delinquency_exposure. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDelinquencyExposure extends StripeObject { + /** Additional details about the exposure assessment. */ + @SerializedName("additional_details") + AdditionalDetails additionalDetails; + + /** The exposure amount if this account becomes delinquent. */ + @SerializedName("exposure_amount") + ExposureAmount exposureAmount; + + /** Additional details about the exposure assessment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AdditionalDetails extends StripeObject { + /** Total payments still exposed to dispute or refund risk in the event of delinquency. */ + @SerializedName("gross_exposure_amount") + GrossExposureAmount grossExposureAmount; + + /** + * Percentage of Gross Exposure expected to be disputed or refunded and materialize as a loss + * in the event of delinquency. + */ + @SerializedName("loss_given_default_in_percentages") + Long lossGivenDefaultInPercentages; + + /** Predicted window size in days until dispute is raised. */ + @SerializedName("predicted_dispute_window_in_days") + Long predictedDisputeWindowInDays; + + /** Total payments still exposed to dispute or refund risk in the event of delinquency. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GrossExposureAmount extends StripeObject { + /** ISO 4217 currency code. */ + @SerializedName("currency") + String currency; + + /** Amount in minor units for the given currency. */ + @SerializedName("value") + @JsonAdapter(StringInt64TypeAdapter.class) + Long value; + } + } + + /** The exposure amount if this account becomes delinquent. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ExposureAmount extends StripeObject { + /** ISO 4217 currency code. */ + @SerializedName("currency") + String currency; + + /** Amount in minor units for the given currency. */ + @SerializedName("value") + @JsonAdapter(StringInt64TypeAdapter.class) + Long value; + } + } + + /** Data for the user account-sharing signal. Present only when type is user_account_sharing. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserAccountSharing extends StripeObject { + /** + * Categorical assessment of the account-sharing risk. + * + *

One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code + * not_assessed}, or {@code unknown}. + */ + @SerializedName("risk_level") + String riskLevel; + + /** + * The specific risk score for the account, between 0.00 and 100.00. Absent when risk level is + * not_assessed or unknown, or when the user is not on a product tier that includes numeric + * scores. + */ + @SerializedName("score") + BigDecimal score; + } + + /** Data for the user multi-accounting signal. Present only when type is user_multi_accounting. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UserMultiAccounting extends StripeObject { + /** + * Categorical assessment of the multi-accounting risk. + * + *

One of {@code elevated}, {@code highest}, {@code low}, {@code normal}, {@code + * not_assessed}, or {@code unknown}. + */ + @SerializedName("risk_level") + String riskLevel; + + /** + * The specific risk score for the account, between 0.00 and 100.00. Absent when risk level is + * not_assessed or unknown, or when the user is not on a product tier that includes numeric + * scores. + */ + @SerializedName("score") + BigDecimal score; + } } diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index 16a02594f6e0..c6eb4d1b14a1 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -9139,6 +9139,9 @@ public static class Company { @SerializedName("address_kanji") AddressKanji addressKanji; + @SerializedName("administrative_address") + AdministrativeAddress administrativeAddress; + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -9226,6 +9229,9 @@ public static class Company { @SerializedName("phone") String phone; + @SerializedName("principal_place_of_business") + PrincipalPlaceOfBusiness principalPlaceOfBusiness; + /** When the business was incorporated or registered. */ @SerializedName("registration_date") Object registrationDate; @@ -9284,6 +9290,7 @@ private Company( Address address, AddressKana addressKana, AddressKanji addressKanji, + AdministrativeAddress administrativeAddress, Boolean directorsProvided, DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, @@ -9297,6 +9304,7 @@ private Company( OwnershipDeclaration ownershipDeclaration, ApiRequestParams.EnumParam ownershipExemptionReason, String phone, + PrincipalPlaceOfBusiness principalPlaceOfBusiness, Object registrationDate, String registrationNumber, RepresentativeDeclaration representativeDeclaration, @@ -9308,6 +9316,7 @@ private Company( this.address = address; this.addressKana = addressKana; this.addressKanji = addressKanji; + this.administrativeAddress = administrativeAddress; this.directorsProvided = directorsProvided; this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; @@ -9321,6 +9330,7 @@ private Company( this.ownershipDeclaration = ownershipDeclaration; this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; + this.principalPlaceOfBusiness = principalPlaceOfBusiness; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; this.representativeDeclaration = representativeDeclaration; @@ -9342,6 +9352,8 @@ public static class Builder { private AddressKanji addressKanji; + private AdministrativeAddress administrativeAddress; + private Boolean directorsProvided; private DirectorshipDeclaration directorshipDeclaration; @@ -9368,6 +9380,8 @@ public static class Builder { private String phone; + private PrincipalPlaceOfBusiness principalPlaceOfBusiness; + private Object registrationDate; private String registrationNumber; @@ -9390,6 +9404,7 @@ public AccountCreateParams.Company build() { this.address, this.addressKana, this.addressKanji, + this.administrativeAddress, this.directorsProvided, this.directorshipDeclaration, this.executivesProvided, @@ -9403,6 +9418,7 @@ public AccountCreateParams.Company build() { this.ownershipDeclaration, this.ownershipExemptionReason, this.phone, + this.principalPlaceOfBusiness, this.registrationDate, this.registrationNumber, this.representativeDeclaration, @@ -9431,6 +9447,12 @@ public Builder setAddressKanji(AccountCreateParams.Company.AddressKanji addressK return this; } + public Builder setAdministrativeAddress( + AccountCreateParams.Company.AdministrativeAddress administrativeAddress) { + this.administrativeAddress = administrativeAddress; + return this; + } + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -9575,6 +9597,12 @@ public Builder setPhone(String phone) { return this; } + public Builder setPrincipalPlaceOfBusiness( + AccountCreateParams.Company.PrincipalPlaceOfBusiness principalPlaceOfBusiness) { + this.principalPlaceOfBusiness = principalPlaceOfBusiness; + return this; + } + /** When the business was incorporated or registered. */ public Builder setRegistrationDate( AccountCreateParams.Company.RegistrationDate registrationDate) { @@ -10168,6 +10196,168 @@ public Builder setTown(String town) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdministrativeAddress { + /** 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 AdministrativeAddress( + 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.Company.AdministrativeAddress build() { + return new AccountCreateParams.Company.AdministrativeAddress( + 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.Company.AdministrativeAddress#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.AdministrativeAddress#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 DirectorshipDeclaration { @@ -10371,6 +10561,168 @@ public Builder setUserAgent(String userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrincipalPlaceOfBusiness { + /** 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 PrincipalPlaceOfBusiness( + 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.Company.PrincipalPlaceOfBusiness build() { + return new AccountCreateParams.Company.PrincipalPlaceOfBusiness( + 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.Company.PrincipalPlaceOfBusiness#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.PrincipalPlaceOfBusiness#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 RegistrationDate { @@ -11569,13 +11921,6 @@ public static class Documents { @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; @@ -11589,7 +11934,6 @@ private Documents( CompanyTaxIdVerification companyTaxIdVerification, Map extraParams, ProofOfAddress proofOfAddress, - ProofOfRegistration proofOfRegistration, ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership) { this.bankAccountOwnershipVerification = bankAccountOwnershipVerification; this.companyLicense = companyLicense; @@ -11599,7 +11943,6 @@ private Documents( this.companyTaxIdVerification = companyTaxIdVerification; this.extraParams = extraParams; this.proofOfAddress = proofOfAddress; - this.proofOfRegistration = proofOfRegistration; this.proofOfUltimateBeneficialOwnership = proofOfUltimateBeneficialOwnership; } @@ -11624,8 +11967,6 @@ public static class Builder { private ProofOfAddress proofOfAddress; - private ProofOfRegistration proofOfRegistration; - private ProofOfUltimateBeneficialOwnership proofOfUltimateBeneficialOwnership; /** Finalize and obtain parameter instance from this builder. */ @@ -11639,7 +11980,6 @@ public AccountCreateParams.Documents build() { this.companyTaxIdVerification, this.extraParams, this.proofOfAddress, - this.proofOfRegistration, this.proofOfUltimateBeneficialOwnership); } @@ -11736,16 +12076,6 @@ public Builder setProofOfAddress( return this; } - /** - * One or more documents showing the company’s proof of registration with the national - * business registry. - */ - public Builder setProofOfRegistration( - AccountCreateParams.Documents.ProofOfRegistration proofOfRegistration) { - this.proofOfRegistration = proofOfRegistration; - return this; - } - /** One or more documents that demonstrate proof of ultimate beneficial ownership. */ public Builder setProofOfUltimateBeneficialOwnership( AccountCreateParams.Documents.ProofOfUltimateBeneficialOwnership @@ -12433,188 +12763,6 @@ public Builder addAllFile(List elements) { } } - @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; - - /** - * 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 ProofOfRegistration( - Map extraParams, List files, Signer signer) { - this.extraParams = extraParams; - this.files = files; - this.signer = signer; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - 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.signer); - } - - /** - * Add a key/value pair to `extraParams` map. A 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#extraParams} for the - * field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A 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#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.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.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; - } - - /** 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; - } - } - } - } - @Getter @EqualsAndHashCode(callSuper = false) public static class ProofOfUltimateBeneficialOwnership { diff --git a/src/main/java/com/stripe/param/AccountRejectParams.java b/src/main/java/com/stripe/param/AccountRejectParams.java index 317d9c26c965..8fbc2d841c0b 100644 --- a/src/main/java/com/stripe/param/AccountRejectParams.java +++ b/src/main/java/com/stripe/param/AccountRejectParams.java @@ -26,6 +26,13 @@ public class AccountRejectParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * Whether to pause payouts on the account as part of the rejection. Defaults to {@code pause}. + * Use {@code none} to leave payouts enabled. + */ + @SerializedName("payouts_action") + PayoutsAction payoutsAction; + /** * Required. The reason for rejecting the account. Can be {@code fraud}, {@code * terms_of_service}, or {@code other}. @@ -33,9 +40,14 @@ public class AccountRejectParams extends ApiRequestParams { @SerializedName("reason") String reason; - private AccountRejectParams(List expand, Map extraParams, String reason) { + private AccountRejectParams( + List expand, + Map extraParams, + PayoutsAction payoutsAction, + String reason) { this.expand = expand; this.extraParams = extraParams; + this.payoutsAction = payoutsAction; this.reason = reason; } @@ -48,11 +60,14 @@ public static class Builder { private Map extraParams; + private PayoutsAction payoutsAction; + private String reason; /** Finalize and obtain parameter instance from this builder. */ public AccountRejectParams build() { - return new AccountRejectParams(this.expand, this.extraParams, this.reason); + return new AccountRejectParams( + this.expand, this.extraParams, this.payoutsAction, this.reason); } /** @@ -107,6 +122,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Whether to pause payouts on the account as part of the rejection. Defaults to {@code pause}. + * Use {@code none} to leave payouts enabled. + */ + public Builder setPayoutsAction(AccountRejectParams.PayoutsAction payoutsAction) { + this.payoutsAction = payoutsAction; + return this; + } + /** * Required. The reason for rejecting the account. Can be {@code fraud}, {@code * terms_of_service}, or {@code other}. @@ -116,4 +140,19 @@ public Builder setReason(String reason) { return this; } } + + public enum PayoutsAction implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("pause") + PAUSE("pause"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PayoutsAction(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/AccountSessionCreateParams.java b/src/main/java/com/stripe/param/AccountSessionCreateParams.java index a5375814622e..26479edb3927 100644 --- a/src/main/java/com/stripe/param/AccountSessionCreateParams.java +++ b/src/main/java/com/stripe/param/AccountSessionCreateParams.java @@ -3316,17 +3316,26 @@ public static class Features { @SerializedName("refund_management") Boolean refundManagement; + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; + private Features( Boolean capturePayments, Boolean destinationOnBehalfOfChargeManagement, Boolean disputeManagement, Map extraParams, - Boolean refundManagement) { + Boolean refundManagement, + Boolean smartDisputesManagement) { this.capturePayments = capturePayments; this.destinationOnBehalfOfChargeManagement = destinationOnBehalfOfChargeManagement; this.disputeManagement = disputeManagement; this.extraParams = extraParams; this.refundManagement = refundManagement; + this.smartDisputesManagement = smartDisputesManagement; } public static Builder builder() { @@ -3344,6 +3353,8 @@ public static class Builder { private Boolean refundManagement; + private Boolean smartDisputesManagement; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.DisputesList.Features build() { return new AccountSessionCreateParams.Components.DisputesList.Features( @@ -3351,7 +3362,8 @@ public AccountSessionCreateParams.Components.DisputesList.Features build() { this.destinationOnBehalfOfChargeManagement, this.disputeManagement, this.extraParams, - this.refundManagement); + this.refundManagement, + this.smartDisputesManagement); } /** @@ -3417,6 +3429,15 @@ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; } + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults + * to the value of {@code dispute_management}. + */ + public Builder setSmartDisputesManagement(Boolean smartDisputesManagement) { + this.smartDisputesManagement = smartDisputesManagement; + return this; + } } } } @@ -5108,17 +5129,26 @@ public static class Features { @SerializedName("refund_management") Boolean refundManagement; + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; + private Features( Boolean capturePayments, Boolean destinationOnBehalfOfChargeManagement, Boolean disputeManagement, Map extraParams, - Boolean refundManagement) { + Boolean refundManagement, + Boolean smartDisputesManagement) { this.capturePayments = capturePayments; this.destinationOnBehalfOfChargeManagement = destinationOnBehalfOfChargeManagement; this.disputeManagement = disputeManagement; this.extraParams = extraParams; this.refundManagement = refundManagement; + this.smartDisputesManagement = smartDisputesManagement; } public static Builder builder() { @@ -5136,6 +5166,8 @@ public static class Builder { private Boolean refundManagement; + private Boolean smartDisputesManagement; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.PaymentDetails.Features build() { return new AccountSessionCreateParams.Components.PaymentDetails.Features( @@ -5143,7 +5175,8 @@ public AccountSessionCreateParams.Components.PaymentDetails.Features build() { this.destinationOnBehalfOfChargeManagement, this.disputeManagement, this.extraParams, - this.refundManagement); + this.refundManagement, + this.smartDisputesManagement); } /** @@ -5209,6 +5242,15 @@ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; } + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults + * to the value of {@code dispute_management}. + */ + public Builder setSmartDisputesManagement(Boolean smartDisputesManagement) { + this.smartDisputesManagement = smartDisputesManagement; + return this; + } } } } @@ -5329,15 +5371,24 @@ public static class Features { @SerializedName("refund_management") Boolean refundManagement; + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; + private Features( Boolean destinationOnBehalfOfChargeManagement, Boolean disputeManagement, Map extraParams, - Boolean refundManagement) { + Boolean refundManagement, + Boolean smartDisputesManagement) { this.destinationOnBehalfOfChargeManagement = destinationOnBehalfOfChargeManagement; this.disputeManagement = disputeManagement; this.extraParams = extraParams; this.refundManagement = refundManagement; + this.smartDisputesManagement = smartDisputesManagement; } public static Builder builder() { @@ -5353,13 +5404,16 @@ public static class Builder { private Boolean refundManagement; + private Boolean smartDisputesManagement; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.PaymentDisputes.Features build() { return new AccountSessionCreateParams.Components.PaymentDisputes.Features( this.destinationOnBehalfOfChargeManagement, this.disputeManagement, this.extraParams, - this.refundManagement); + this.refundManagement, + this.smartDisputesManagement); } /** @@ -5416,6 +5470,15 @@ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; } + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults + * to the value of {@code dispute_management}. + */ + public Builder setSmartDisputesManagement(Boolean smartDisputesManagement) { + this.smartDisputesManagement = smartDisputesManagement; + return this; + } } } } @@ -5692,17 +5755,26 @@ public static class Features { @SerializedName("refund_management") Boolean refundManagement; + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults to + * the value of {@code dispute_management}. + */ + @SerializedName("smart_disputes_management") + Boolean smartDisputesManagement; + private Features( Boolean capturePayments, Boolean destinationOnBehalfOfChargeManagement, Boolean disputeManagement, Map extraParams, - Boolean refundManagement) { + Boolean refundManagement, + Boolean smartDisputesManagement) { this.capturePayments = capturePayments; this.destinationOnBehalfOfChargeManagement = destinationOnBehalfOfChargeManagement; this.disputeManagement = disputeManagement; this.extraParams = extraParams; this.refundManagement = refundManagement; + this.smartDisputesManagement = smartDisputesManagement; } public static Builder builder() { @@ -5720,6 +5792,8 @@ public static class Builder { private Boolean refundManagement; + private Boolean smartDisputesManagement; + /** Finalize and obtain parameter instance from this builder. */ public AccountSessionCreateParams.Components.Payments.Features build() { return new AccountSessionCreateParams.Components.Payments.Features( @@ -5727,7 +5801,8 @@ public AccountSessionCreateParams.Components.Payments.Features build() { this.destinationOnBehalfOfChargeManagement, this.disputeManagement, this.extraParams, - this.refundManagement); + this.refundManagement, + this.smartDisputesManagement); } /** @@ -5791,6 +5866,15 @@ public Builder setRefundManagement(Boolean refundManagement) { this.refundManagement = refundManagement; return this; } + + /** + * Whether to allow connected accounts to submit disputes using Smart Disputes. Defaults + * to the value of {@code dispute_management}. + */ + public Builder setSmartDisputesManagement(Boolean smartDisputesManagement) { + this.smartDisputesManagement = smartDisputesManagement; + return this; + } } } } diff --git a/src/main/java/com/stripe/param/AccountUnrejectParams.java b/src/main/java/com/stripe/param/AccountUnrejectParams.java new file mode 100644 index 000000000000..d86214732d88 --- /dev/null +++ b/src/main/java/com/stripe/param/AccountUnrejectParams.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 AccountUnrejectParams 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 AccountUnrejectParams(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 AccountUnrejectParams build() { + return new AccountUnrejectParams(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 + * AccountUnrejectParams#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 + * AccountUnrejectParams#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 + * AccountUnrejectParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountUnrejectParams#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/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 5933a921d85c..31d0ae509bea 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -9237,6 +9237,9 @@ public static class Company { @SerializedName("address_kanji") AddressKanji addressKanji; + @SerializedName("administrative_address") + AdministrativeAddress administrativeAddress; + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -9324,6 +9327,9 @@ public static class Company { @SerializedName("phone") Object phone; + @SerializedName("principal_place_of_business") + PrincipalPlaceOfBusiness principalPlaceOfBusiness; + @SerializedName("registration_date") Object registrationDate; @@ -9381,6 +9387,7 @@ private Company( Address address, AddressKana addressKana, AddressKanji addressKanji, + AdministrativeAddress administrativeAddress, Boolean directorsProvided, DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, @@ -9394,6 +9401,7 @@ private Company( OwnershipDeclaration ownershipDeclaration, ApiRequestParams.EnumParam ownershipExemptionReason, Object phone, + PrincipalPlaceOfBusiness principalPlaceOfBusiness, Object registrationDate, Object registrationNumber, RepresentativeDeclaration representativeDeclaration, @@ -9405,6 +9413,7 @@ private Company( this.address = address; this.addressKana = addressKana; this.addressKanji = addressKanji; + this.administrativeAddress = administrativeAddress; this.directorsProvided = directorsProvided; this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; @@ -9418,6 +9427,7 @@ private Company( this.ownershipDeclaration = ownershipDeclaration; this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; + this.principalPlaceOfBusiness = principalPlaceOfBusiness; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; this.representativeDeclaration = representativeDeclaration; @@ -9439,6 +9449,8 @@ public static class Builder { private AddressKanji addressKanji; + private AdministrativeAddress administrativeAddress; + private Boolean directorsProvided; private DirectorshipDeclaration directorshipDeclaration; @@ -9465,6 +9477,8 @@ public static class Builder { private Object phone; + private PrincipalPlaceOfBusiness principalPlaceOfBusiness; + private Object registrationDate; private Object registrationNumber; @@ -9487,6 +9501,7 @@ public AccountUpdateParams.Company build() { this.address, this.addressKana, this.addressKanji, + this.administrativeAddress, this.directorsProvided, this.directorshipDeclaration, this.executivesProvided, @@ -9500,6 +9515,7 @@ public AccountUpdateParams.Company build() { this.ownershipDeclaration, this.ownershipExemptionReason, this.phone, + this.principalPlaceOfBusiness, this.registrationDate, this.registrationNumber, this.representativeDeclaration, @@ -9528,6 +9544,12 @@ public Builder setAddressKanji(AccountUpdateParams.Company.AddressKanji addressK return this; } + public Builder setAdministrativeAddress( + AccountUpdateParams.Company.AdministrativeAddress administrativeAddress) { + this.administrativeAddress = administrativeAddress; + return this; + } + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -9711,6 +9733,12 @@ public Builder setPhone(EmptyParam phone) { return this; } + public Builder setPrincipalPlaceOfBusiness( + AccountUpdateParams.Company.PrincipalPlaceOfBusiness principalPlaceOfBusiness) { + this.principalPlaceOfBusiness = principalPlaceOfBusiness; + return this; + } + public Builder setRegistrationDate( AccountUpdateParams.Company.RegistrationDate registrationDate) { this.registrationDate = registrationDate; @@ -10473,6 +10501,210 @@ public Builder setTown(EmptyParam town) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AdministrativeAddress { + /** 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + Object state; + + private AdministrativeAddress( + 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.Company.AdministrativeAddress build() { + return new AccountUpdateParams.Company.AdministrativeAddress( + 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.Company.AdministrativeAddress#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.AdministrativeAddress#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, 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 DirectorshipDeclaration { @@ -10703,6 +10935,210 @@ public Builder setUserAgent(EmptyParam userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrincipalPlaceOfBusiness { + /** 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, such as the street, PO Box, or company name. */ + @SerializedName("line1") + Object line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + Object line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** + * State, county, province, or region (ISO + * 3166-2). + */ + @SerializedName("state") + Object state; + + private PrincipalPlaceOfBusiness( + 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.Company.PrincipalPlaceOfBusiness build() { + return new AccountUpdateParams.Company.PrincipalPlaceOfBusiness( + 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.Company.PrincipalPlaceOfBusiness#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A 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.PrincipalPlaceOfBusiness#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** + * State, 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 RegistrationDate { @@ -15471,6 +15907,10 @@ public static class Settings { @SerializedName("paypay_payments") PaypayPayments paypayPayments; + /** Settings specific to SEPA Direct Debit payments. */ + @SerializedName("sepa_debit_payments") + SepaDebitPayments sepaDebitPayments; + /** Settings specific to the account's use of Smart Disputes. */ @SerializedName("smart_disputes") SmartDisputes smartDisputes; @@ -15495,6 +15935,7 @@ private Settings( Payments payments, Payouts payouts, PaypayPayments paypayPayments, + SepaDebitPayments sepaDebitPayments, SmartDisputes smartDisputes, TaxForms taxForms, Treasury treasury) { @@ -15509,6 +15950,7 @@ private Settings( this.payments = payments; this.payouts = payouts; this.paypayPayments = paypayPayments; + this.sepaDebitPayments = sepaDebitPayments; this.smartDisputes = smartDisputes; this.taxForms = taxForms; this.treasury = treasury; @@ -15541,6 +15983,8 @@ public static class Builder { private PaypayPayments paypayPayments; + private SepaDebitPayments sepaDebitPayments; + private SmartDisputes smartDisputes; private TaxForms taxForms; @@ -15561,6 +16005,7 @@ public AccountUpdateParams.Settings build() { this.payments, this.payouts, this.paypayPayments, + this.sepaDebitPayments, this.smartDisputes, this.taxForms, this.treasury); @@ -15657,6 +16102,13 @@ public Builder setPaypayPayments(AccountUpdateParams.Settings.PaypayPayments pay return this; } + /** Settings specific to SEPA Direct Debit payments. */ + public Builder setSepaDebitPayments( + AccountUpdateParams.Settings.SepaDebitPayments sepaDebitPayments) { + this.sepaDebitPayments = sepaDebitPayments; + return this; + } + /** Settings specific to the account's use of Smart Disputes. */ public Builder setSmartDisputes(AccountUpdateParams.Settings.SmartDisputes smartDisputes) { this.smartDisputes = smartDisputes; @@ -18058,6 +18510,84 @@ public enum GoodsType implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaDebitPayments { + /** The business creditor id for european payments. */ + @SerializedName("creditor_id") + Object creditorId; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 SepaDebitPayments(Object creditorId, Map extraParams) { + this.creditorId = creditorId; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object creditorId; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Settings.SepaDebitPayments build() { + return new AccountUpdateParams.Settings.SepaDebitPayments( + this.creditorId, this.extraParams); + } + + /** The business creditor id for european payments. */ + public Builder setCreditorId(String creditorId) { + this.creditorId = creditorId; + return this; + } + + /** The business creditor id for european payments. */ + public Builder setCreditorId(EmptyParam creditorId) { + this.creditorId = creditorId; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Settings.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.Settings.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; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SmartDisputes { diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java index 825bddf715d3..4784d0c53d0f 100644 --- a/src/main/java/com/stripe/param/ChargeCaptureParams.java +++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java @@ -3920,16 +3920,16 @@ public static class Tax { Boolean taxExemptIndicator; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -3941,12 +3941,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax build() { return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -3986,40 +3987,39 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addTax( - ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addAllTax( - List - elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addAllTaxItem( + List elements) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -4042,7 +4042,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -4063,8 +4063,8 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax build() { - return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax( + public ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem build() { + return new ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -4078,8 +4078,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} - * for the field documentation. + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} for + * the field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -4093,8 +4093,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 - * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} - * for the field documentation. + * ChargeCaptureParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} for + * the field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -8420,14 +8420,14 @@ public static class Tax { Map extraParams; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, - List taxes) { + List taxItems) { this.extraParams = extraParams; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -8437,12 +8437,12 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List taxes; + private List taxItems; /** Finalize and obtain parameter instance from this builder. */ public ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax build() { return new ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax( - this.extraParams, this.taxes); + this.extraParams, this.taxItems); } /** @@ -8476,39 +8476,39 @@ public Builder putAllExtraParam(Map map) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addTax( - ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addAllTax( - List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addAllTaxItem( + List elements) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -8531,7 +8531,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -8552,8 +8552,8 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax build() { - return new ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + public ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem build() { + return new ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -8567,7 +8567,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} for + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -8582,7 +8582,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 - * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} for + * ChargeCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -11266,16 +11266,16 @@ public static class Tax { Boolean taxExemptIndicator; /** Tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -11287,12 +11287,12 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List taxItems; /** Finalize and obtain parameter instance from this builder. */ public ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax build() { return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -11332,39 +11332,39 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addTax( - ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addAllTax( - List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addAllTaxItem( + List elements) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -11387,7 +11387,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -11408,8 +11408,8 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax build() { - return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + public ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem build() { + return new ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -11423,7 +11423,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} for + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -11438,7 +11438,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 - * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} for + * ChargeCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index 02397ca92991..2cd2912ca97d 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -4438,16 +4438,16 @@ public static class Tax { Boolean taxExemptIndicator; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -4459,12 +4459,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax build() { return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -4504,39 +4505,39 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addTax( - ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addAllTax( - List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addAllTaxItem( + List elements) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -4559,7 +4560,7 @@ public static class InnerTax { @SerializedName("type") Object type; - private InnerTax(Long amount, Map extraParams, Long rate, Object type) { + private TaxItem(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -4580,8 +4581,8 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax build() { - return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax( + public ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem build() { + return new ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -4595,7 +4596,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} for + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -4610,7 +4611,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 - * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} for + * ChargeUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -9357,14 +9358,14 @@ public static class Tax { Map extraParams; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, - List taxes) { + List taxItems) { this.extraParams = extraParams; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -9374,12 +9375,12 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List taxes; + private List taxItems; /** Finalize and obtain parameter instance from this builder. */ public ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax build() { return new ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax( - this.extraParams, this.taxes); + this.extraParams, this.taxItems); } /** @@ -9413,39 +9414,39 @@ public Builder putAllExtraParam(Map map) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addTax( - ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addAllTax( - List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addAllTaxItem( + List elements) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -9468,7 +9469,7 @@ public static class InnerTax { @SerializedName("type") Object type; - private InnerTax(Long amount, Map extraParams, Long rate, Object type) { + private TaxItem(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -9489,8 +9490,8 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax build() { - return new ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + public ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem build() { + return new ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -9504,8 +9505,8 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} for - * the field documentation. + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} for the + * field documentation. */ public Builder putExtraParam(String key, Object value) { if (this.extraParams == null) { @@ -9519,8 +9520,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 - * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} for - * the field documentation. + * ChargeUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} for the + * field documentation. */ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { @@ -12465,16 +12466,16 @@ public static class Tax { Boolean taxExemptIndicator; /** Tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -12486,12 +12487,12 @@ public static class Builder { private Boolean taxExemptIndicator; - private List taxes; + private List taxItems; /** Finalize and obtain parameter instance from this builder. */ public ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax build() { return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -12531,39 +12532,39 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addTax( - ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addAllTax( - List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addAllTaxItem( + List elements) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -12586,7 +12587,7 @@ public static class InnerTax { @SerializedName("type") Object type; - private InnerTax(Long amount, Map extraParams, Long rate, Object type) { + private TaxItem(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -12607,8 +12608,8 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax build() { - return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + public ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem build() { + return new ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -12622,7 +12623,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the * original map. See {@link - * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} for + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} for * the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12637,7 +12638,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 - * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} for + * ChargeUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} for * the field documentation. */ public Builder putAllExtraParam(Map map) { diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index 57b940989010..fb82c42f4e3f 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -3450,12 +3450,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -3474,6 +3480,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index 0a8e143438ff..daed8d21f123 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -1733,18 +1733,18 @@ public static class TaxIdData { * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code - * li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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} + * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, + * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, + * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code + * li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -1812,18 +1812,19 @@ public Builder putAllExtraParam(Map map) { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code - * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code - * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code - * py_ruc}, {@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 hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code + * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code + * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 + * pl_nip}, {@code py_ruc}, {@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; @@ -1997,6 +1998,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java index c17435beb692..a366ab20ee43 100644 --- a/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerTaxIdCreateParams.java @@ -36,18 +36,18 @@ public class CustomerTaxIdCreateParams extends ApiRequestParams { * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, - * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, - * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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 gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, + * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, + * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code + * py_ruc}, {@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; @@ -145,18 +145,18 @@ public Builder putAllExtraParam(Map map) { * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code - * li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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} + * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, + * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, + * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code + * li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -330,6 +330,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/GiftCardCreateParams.java b/src/main/java/com/stripe/param/GiftCardCreateParams.java index 100e483a290b..dd576795fc8c 100644 --- a/src/main/java/com/stripe/param/GiftCardCreateParams.java +++ b/src/main/java/com/stripe/param/GiftCardCreateParams.java @@ -178,12 +178,6 @@ public Builder setPin(String pin) { } public enum Brand implements ApiRequestParams.EnumParam { - @SerializedName("fiserv_valuelink") - FISERV_VALUELINK("fiserv_valuelink"), - - @SerializedName("givex") - GIVEX("givex"), - @SerializedName("svs") SVS("svs"); diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java index f28b67641e85..bbae27b350c3 100644 --- a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java @@ -2290,6 +2290,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index d3eff3aa6e78..43733f0f1f1c 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -1429,18 +1429,19 @@ public static class TaxId { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code - * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code - * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code - * py_ruc}, {@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 hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code + * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code + * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 + * pl_nip}, {@code py_ruc}, {@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; @@ -1511,19 +1512,19 @@ public Builder putAllExtraParam(Map map) { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code - * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, - * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code - * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, - * {@code py_ruc}, {@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} + * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code + * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -1697,6 +1698,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), @@ -17518,6 +17522,15 @@ public static class SubscriptionDetails { @SerializedName("items") List items; + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual 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; + /** * Previews the invoice that would be generated when pausing the subscription. Passing an empty * hash won't preview pausing and instead returns the next invoice. @@ -17586,6 +17599,7 @@ private SubscriptionDetails( Object defaultTaxRates, Map extraParams, List items, + Object metadata, Pause pause, Prebilling prebilling, ProrationBehavior prorationBehavior, @@ -17602,6 +17616,7 @@ private SubscriptionDetails( this.defaultTaxRates = defaultTaxRates; this.extraParams = extraParams; this.items = items; + this.metadata = metadata; this.pause = pause; this.prebilling = prebilling; this.prorationBehavior = prorationBehavior; @@ -17634,6 +17649,8 @@ public static class Builder { private List items; + private Object metadata; + private Pause pause; private Prebilling prebilling; @@ -17660,6 +17677,7 @@ public InvoiceCreatePreviewParams.SubscriptionDetails build() { this.defaultTaxRates, this.extraParams, this.items, + this.metadata, this.pause, this.prebilling, this.prorationBehavior, @@ -17904,6 +17922,57 @@ public Builder addAllItem( 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 + * InvoiceCreatePreviewParams.SubscriptionDetails#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 InvoiceCreatePreviewParams.SubscriptionDetails#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; + } + /** * Previews the invoice that would be generated when pausing the subscription. Passing an * empty hash won't preview pausing and instead returns the next invoice. diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java index 65215d3cd335..701a9eb630cf 100644 --- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java @@ -2257,6 +2257,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java index d60eed9e9410..7b35d9086709 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java @@ -2317,6 +2317,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java index 54ef504b9dba..e58df1858ab3 100644 --- a/src/main/java/com/stripe/param/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/OrderCreateParams.java @@ -15879,18 +15879,19 @@ public static class TaxId { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code - * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code - * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code - * py_ruc}, {@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 hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code + * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code + * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 + * pl_nip}, {@code py_ruc}, {@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; @@ -15960,19 +15961,19 @@ public Builder putAllExtraParam(Map map) { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code - * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, - * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code - * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, - * {@code py_ruc}, {@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} + * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code + * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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(OrderCreateParams.TaxDetails.TaxId.Type type) { this.type = type; @@ -16146,6 +16147,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java index f6f86fd0c882..dd97c92d6d68 100644 --- a/src/main/java/com/stripe/param/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/OrderUpdateParams.java @@ -17208,18 +17208,19 @@ public static class TaxId { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code - * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code - * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code - * py_ruc}, {@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 hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code + * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code + * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 + * pl_nip}, {@code py_ruc}, {@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; @@ -17289,19 +17290,19 @@ public Builder putAllExtraParam(Map map) { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code - * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, - * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code - * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, - * {@code py_ruc}, {@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} + * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code + * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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(OrderUpdateParams.TaxDetails.TaxId.Type type) { this.type = type; @@ -17481,6 +17482,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index d6766a295e18..ae5b38befde5 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -6481,17 +6481,17 @@ public static class Tax { Boolean taxExemptIndicator; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List - taxes) { + List + taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -6503,13 +6503,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax build() { return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -6549,41 +6549,40 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the * field documentation. */ - public Builder addTax( - PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax - element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -6606,7 +6605,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -6627,10 +6626,10 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + public PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem build() { return new PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax - .InnerTax(this.amount, this.extraParams, this.rate, this.type); + .TaxItem(this.amount, this.extraParams, this.rate, this.type); } /** Tax amount. */ @@ -6643,7 +6642,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.CarRentalData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -6658,7 +6657,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 - * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -11028,14 +11027,15 @@ public static class Tax { Map extraParams; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, - List taxes) { + List + taxItems) { this.extraParams = extraParams; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -11045,13 +11045,13 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax build() { return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax( - this.extraParams, this.taxes); + this.extraParams, this.taxItems); } /** @@ -11085,40 +11085,40 @@ public Builder putAllExtraParam(Map map) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addTax( - PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -11141,7 +11141,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -11162,9 +11162,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax + public PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem build() { - return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + return new PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -11178,7 +11178,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.FlightData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -11193,7 +11193,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 - * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -13906,17 +13906,17 @@ public static class Tax { Boolean taxExemptIndicator; /** Tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List - taxes) { + List + taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -13928,13 +13928,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax build() { return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -13974,40 +13974,40 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addTax( - PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -14030,7 +14030,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -14051,9 +14051,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax + public PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem build() { - return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + return new PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -14067,7 +14067,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.LodgingData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -14082,7 +14082,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 - * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCaptureParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index ad471ffb151f..3717a86b40bd 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -7589,17 +7589,17 @@ public static class Tax { Boolean taxExemptIndicator; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List - taxes) { + List + taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -7611,13 +7611,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax build() { return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -7657,41 +7657,40 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the * field documentation. */ - public Builder addTax( - PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax - element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -7714,7 +7713,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -7735,10 +7734,10 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + public PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem build() { return new PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax - .InnerTax(this.amount, this.extraParams, this.rate, this.type); + .TaxItem(this.amount, this.extraParams, this.rate, this.type); } /** Tax amount. */ @@ -7751,7 +7750,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.CarRentalData.Total.Tax.InnerTax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -7766,7 +7765,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.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12136,14 +12135,15 @@ public static class Tax { Map extraParams; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, - List taxes) { + List + taxItems) { this.extraParams = extraParams; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -12153,13 +12153,13 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax build() { return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax( - this.extraParams, this.taxes); + this.extraParams, this.taxItems); } /** @@ -12193,40 +12193,40 @@ public Builder putAllExtraParam(Map map) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addTax( - PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -12249,7 +12249,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -12270,9 +12270,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax + public PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.TaxItem build() { - return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + return new PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -12286,7 +12286,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.FlightData.Total.Tax.InnerTax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12301,7 +12301,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.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -15014,17 +15014,17 @@ public static class Tax { Boolean taxExemptIndicator; /** Tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List - taxes) { + List + taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -15036,13 +15036,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax build() { return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -15082,40 +15082,40 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addTax( - PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -15138,7 +15138,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -15159,9 +15159,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax + public PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.TaxItem build() { - return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + return new PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -15175,7 +15175,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.LodgingData.Total.Tax.InnerTax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -15190,7 +15190,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.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} + * PaymentIntentConfirmParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -19908,12 +19908,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -19932,6 +19938,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -44223,9 +44232,35 @@ public static class Payco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payco(ApiRequestParams.EnumParam captureMethod, 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 Payco( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -44237,10 +44272,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.Payco build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.Payco( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -44301,6 +44338,33 @@ public Builder putAllExtraParam(Map map) { 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( + PaymentIntentConfirmParams.PaymentMethodOptions.Payco.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -44314,6 +44378,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @@ -47003,10 +47079,35 @@ public static class SamsungPay { @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 SamsungPay( - ApiRequestParams.EnumParam captureMethod, Map extraParams) { + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -47018,10 +47119,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.PaymentMethodOptions.SamsungPay build() { return new PaymentIntentConfirmParams.PaymentMethodOptions.SamsungPay( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -47083,6 +47186,33 @@ public Builder putAllExtraParam(Map map) { 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( + PaymentIntentConfirmParams.PaymentMethodOptions.SamsungPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -47096,6 +47226,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @@ -50970,6 +51112,13 @@ public static class RadarOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + @SerializedName("referrer") + Object referrer; + /** * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on @@ -50978,8 +51127,9 @@ public static class RadarOptions { @SerializedName("session") String session; - private RadarOptions(Map extraParams, String session) { + private RadarOptions(Map extraParams, Object referrer, String session) { this.extraParams = extraParams; + this.referrer = referrer; this.session = session; } @@ -50990,11 +51140,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Object referrer; + private String session; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentConfirmParams.RadarOptions build() { - return new PaymentIntentConfirmParams.RadarOptions(this.extraParams, this.session); + return new PaymentIntentConfirmParams.RadarOptions( + this.extraParams, this.referrer, this.session); } /** @@ -51024,6 +51177,24 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + public Builder setReferrer(EmptyParam referrer) { + this.referrer = referrer; + return this; + } + /** * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 7ab45f48f872..d513c5f829f5 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -8112,17 +8112,17 @@ public static class Tax { Boolean taxExemptIndicator; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List - taxes) { + List + taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -8134,13 +8134,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax build() { return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -8180,40 +8180,40 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addTax( - PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -8236,7 +8236,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -8257,10 +8257,10 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + public PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem build() { - return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax - .InnerTax(this.amount, this.extraParams, this.rate, this.type); + return new PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem( + this.amount, this.extraParams, this.rate, this.type); } /** Tax amount. */ @@ -8273,7 +8273,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.CarRentalData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -8288,7 +8288,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.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCreateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -12652,14 +12652,15 @@ public static class Tax { Map extraParams; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, - List taxes) { + List + taxItems) { this.extraParams = extraParams; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -12669,13 +12670,13 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax build() { return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax( - this.extraParams, this.taxes); + this.extraParams, this.taxItems); } /** @@ -12709,40 +12710,40 @@ public Builder putAllExtraParam(Map map) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addTax( - PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -12765,7 +12766,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -12786,9 +12787,8 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.InnerTax - build() { - return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + public PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.TaxItem build() { + return new PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -12802,7 +12802,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.FlightData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -12817,7 +12817,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.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCreateParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -15518,16 +15518,17 @@ public static class Tax { Boolean taxExemptIndicator; /** Tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List + taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -15539,13 +15540,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax build() { return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -15585,40 +15586,40 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addTax( - PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -15641,7 +15642,7 @@ public static class InnerTax { @SerializedName("type") String type; - private InnerTax(Long amount, Map extraParams, Long rate, String type) { + private TaxItem(Long amount, Map extraParams, Long rate, String type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -15662,9 +15663,9 @@ public static class Builder { private String type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax + public PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem build() { - return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + return new PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -15678,7 +15679,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.LodgingData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -15693,7 +15694,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.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} + * PaymentIntentCreateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -20396,12 +20397,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -20420,6 +20427,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -44687,9 +44697,35 @@ public static class Payco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payco(ApiRequestParams.EnumParam captureMethod, 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 Payco( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -44701,10 +44737,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.Payco build() { return new PaymentIntentCreateParams.PaymentMethodOptions.Payco( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -44765,6 +44803,33 @@ public Builder putAllExtraParam(Map map) { 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( + PaymentIntentCreateParams.PaymentMethodOptions.Payco.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -44778,6 +44843,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @@ -47463,10 +47540,35 @@ public static class SamsungPay { @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 SamsungPay( - ApiRequestParams.EnumParam captureMethod, Map extraParams) { + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -47478,10 +47580,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.PaymentMethodOptions.SamsungPay build() { return new PaymentIntentCreateParams.PaymentMethodOptions.SamsungPay( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -47542,6 +47646,33 @@ public Builder putAllExtraParam(Map map) { 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( + PaymentIntentCreateParams.PaymentMethodOptions.SamsungPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -47555,6 +47686,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @@ -51509,6 +51652,13 @@ public static class RadarOptions { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + @SerializedName("referrer") + Object referrer; + /** * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on @@ -51517,8 +51667,9 @@ public static class RadarOptions { @SerializedName("session") String session; - private RadarOptions(Map extraParams, String session) { + private RadarOptions(Map extraParams, Object referrer, String session) { this.extraParams = extraParams; + this.referrer = referrer; this.session = session; } @@ -51529,11 +51680,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Object referrer; + private String session; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentCreateParams.RadarOptions build() { - return new PaymentIntentCreateParams.RadarOptions(this.extraParams, this.session); + return new PaymentIntentCreateParams.RadarOptions( + this.extraParams, this.referrer, this.session); } /** @@ -51562,6 +51716,24 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** + * The referrer URL of the current checkout session. You can use this to supply session-level + * referrer data when a Radar Session isn't available or doesn't contain a referrer. + */ + public Builder setReferrer(EmptyParam referrer) { + this.referrer = referrer; + return this; + } + /** * A Radar Session is a snapshot of * the browser metadata and device details that help Radar make more accurate predictions on diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index 436acf354b7e..909e11b2ecf9 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -8220,17 +8220,17 @@ public static class Tax { Boolean taxExemptIndicator; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List - taxes) { + List + taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -8242,13 +8242,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax build() { return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -8288,40 +8288,40 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addTax( - PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -8344,7 +8344,7 @@ public static class InnerTax { @SerializedName("type") Object type; - private InnerTax(Long amount, Map extraParams, Long rate, Object type) { + private TaxItem(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -8365,10 +8365,10 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.InnerTax + public PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem build() { - return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax - .InnerTax(this.amount, this.extraParams, this.rate, this.type); + return new PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem( + this.amount, this.extraParams, this.rate, this.type); } /** Tax amount. */ @@ -8381,7 +8381,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.CarRentalData.Total.Tax.InnerTax#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -8396,7 +8396,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.PaymentDetails.CarRentalData.Total.Tax.InnerTax#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.CarRentalData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -13182,14 +13182,15 @@ public static class Tax { Map extraParams; /** Array of tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, - List taxes) { + List + taxItems) { this.extraParams = extraParams; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -13199,13 +13200,13 @@ public static Builder builder() { public static class Builder { private Map extraParams; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax build() { return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax( - this.extraParams, this.taxes); + this.extraParams, this.taxItems); } /** @@ -13239,40 +13240,40 @@ public Builder putAllExtraParam(Map map) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addTax( - PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax#taxes} for the field + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax#taxItems} for the field * documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount. */ @SerializedName("amount") Long amount; @@ -13295,7 +13296,7 @@ public static class InnerTax { @SerializedName("type") Object type; - private InnerTax(Long amount, Map extraParams, Long rate, Object type) { + private TaxItem(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -13316,9 +13317,8 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax - build() { - return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.InnerTax( + public PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem build() { + return new PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -13332,7 +13332,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.FlightData.Total.Tax.InnerTax#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -13347,7 +13347,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.PaymentDetails.FlightData.Total.Tax.InnerTax#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.FlightData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -16312,16 +16312,17 @@ public static class Tax { Boolean taxExemptIndicator; /** Tax details. */ - @SerializedName("taxes") - List taxes; + @SerializedName("tax_items") + List taxItems; private Tax( Map extraParams, Boolean taxExemptIndicator, - List taxes) { + List + taxItems) { this.extraParams = extraParams; this.taxExemptIndicator = taxExemptIndicator; - this.taxes = taxes; + this.taxItems = taxItems; } public static Builder builder() { @@ -16333,13 +16334,13 @@ public static class Builder { private Boolean taxExemptIndicator; - private List - taxes; + private List + taxItems; /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax build() { return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax( - this.extraParams, this.taxExemptIndicator, this.taxes); + this.extraParams, this.taxExemptIndicator, this.taxItems); } /** @@ -16379,40 +16380,40 @@ public Builder setTaxExemptIndicator(Boolean taxExemptIndicator) { } /** - * Add an element to `taxes` list. A list is initialized for the first `add/addAll` + * Add an element to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addTax( - PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax element) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + public Builder addTaxItem( + PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem element) { + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.add(element); + this.taxItems.add(element); return this; } /** - * Add all elements to `taxes` list. A list is initialized for the first `add/addAll` + * Add all elements to `taxItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link - * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxes} for the field - * documentation. + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax#taxItems} for the + * field documentation. */ - public Builder addAllTax( - List + public Builder addAllTaxItem( + List elements) { - if (this.taxes == null) { - this.taxes = new ArrayList<>(); + if (this.taxItems == null) { + this.taxItems = new ArrayList<>(); } - this.taxes.addAll(elements); + this.taxItems.addAll(elements); return this; } } @Getter @EqualsAndHashCode(callSuper = false) - public static class InnerTax { + public static class TaxItem { /** Tax amount in cents. */ @SerializedName("amount") Long amount; @@ -16435,7 +16436,7 @@ public static class InnerTax { @SerializedName("type") Object type; - private InnerTax(Long amount, Map extraParams, Long rate, Object type) { + private TaxItem(Long amount, Map extraParams, Long rate, Object type) { this.amount = amount; this.extraParams = extraParams; this.rate = rate; @@ -16456,9 +16457,9 @@ public static class Builder { private Object type; /** Finalize and obtain parameter instance from this builder. */ - public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax + public PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem build() { - return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.InnerTax( + return new PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem( this.amount, this.extraParams, this.rate, this.type); } @@ -16472,7 +16473,7 @@ public Builder setAmount(Long amount) { * Add a key/value pair to `extraParams` map. 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.LodgingData.Total.Tax.InnerTax#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -16487,7 +16488,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.PaymentDetails.LodgingData.Total.Tax.InnerTax#extraParams} + * PaymentIntentUpdateParams.PaymentDetails.LodgingData.Total.Tax.TaxItem#extraParams} * for the field documentation. */ public Builder putAllExtraParam(Map map) { @@ -21460,12 +21461,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -21484,6 +21491,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -46750,9 +46760,35 @@ public static class Payco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payco(ApiRequestParams.EnumParam captureMethod, 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 Payco( + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -46764,10 +46800,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.Payco build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.Payco( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -46828,6 +46866,33 @@ public Builder putAllExtraParam(Map map) { 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( + PaymentIntentUpdateParams.PaymentMethodOptions.Payco.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -46841,6 +46906,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @@ -49615,10 +49692,35 @@ public static class SamsungPay { @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 SamsungPay( - ApiRequestParams.EnumParam captureMethod, Map extraParams) { + ApiRequestParams.EnumParam captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -49630,10 +49732,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public PaymentIntentUpdateParams.PaymentMethodOptions.SamsungPay build() { return new PaymentIntentUpdateParams.PaymentMethodOptions.SamsungPay( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** @@ -49694,6 +49798,33 @@ public Builder putAllExtraParam(Map map) { 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( + PaymentIntentUpdateParams.PaymentMethodOptions.SamsungPay.SetupFutureUsage + setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -49707,6 +49838,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index a9cb78632bb1..2824a03e0733 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -37,6 +37,10 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { @SerializedName("billing_address_collection") BillingAddressCollection billingAddressCollection; + /** Configure fields to gather active consent from customers. */ + @SerializedName("consent_collection") + ConsentCollection consentCollection; + /** * Collect additional information from your customer using custom fields. Up to 3 fields are * supported. You can't set this parameter if {@code ui_mode} is {@code custom}. @@ -162,6 +166,14 @@ public class PaymentLinkUpdateParams extends ApiRequestParams { @SerializedName("shipping_address_collection") Object shippingAddressCollection; + /** + * The shipping rate options to apply to checkout sessions created by this + * payment link. + */ + @SerializedName("shipping_options") + Object shippingOptions; + /** * 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 (); + } + ((List) this.shippingOptions).add(element); + return this; + } + + /** + * Add all elements to `shippingOptions` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * PaymentLinkUpdateParams#shippingOptions} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllShippingOption(List elements) { + if (this.shippingOptions == null || this.shippingOptions instanceof EmptyParam) { + this.shippingOptions = new ArrayList(); + } + ((List) this.shippingOptions).addAll(elements); + return this; + } + + /** + * The shipping rate options to apply to checkout sessions created by this + * payment link. + */ + public Builder setShippingOptions(EmptyParam shippingOptions) { + this.shippingOptions = shippingOptions; + return this; + } + + /** + * The shipping rate options to apply to checkout sessions created by this + * payment link. + */ + public Builder setShippingOptions( + List shippingOptions) { + this.shippingOptions = shippingOptions; + return this; + } + /** * 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 extraParams; + + /** + * 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("payment_method_reuse_agreement") + PaymentMethodReuseAgreement paymentMethodReuseAgreement; + + /** + * 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 and US customers. + */ + @SerializedName("promotions") + Promotions promotions; + + /** + * 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 ConsentCollection( + Map extraParams, + PaymentMethodReuseAgreement paymentMethodReuseAgreement, + Promotions promotions, + TermsOfService termsOfService) { + this.extraParams = extraParams; + this.paymentMethodReuseAgreement = paymentMethodReuseAgreement; + this.promotions = promotions; + this.termsOfService = termsOfService; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private PaymentMethodReuseAgreement paymentMethodReuseAgreement; + + private Promotions promotions; + + private TermsOfService termsOfService; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.ConsentCollection build() { + return new PaymentLinkUpdateParams.ConsentCollection( + this.extraParams, + 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 + * PaymentLinkUpdateParams.ConsentCollection#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.ConsentCollection#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * 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 setPaymentMethodReuseAgreement( + PaymentLinkUpdateParams.ConsentCollection.PaymentMethodReuseAgreement + paymentMethodReuseAgreement) { + this.paymentMethodReuseAgreement = paymentMethodReuseAgreement; + 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 and US customers. + */ + public Builder setPromotions( + PaymentLinkUpdateParams.ConsentCollection.Promotions promotions) { + this.promotions = promotions; + 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( + PaymentLinkUpdateParams.ConsentCollection.TermsOfService termsOfService) { + this.termsOfService = termsOfService; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodReuseAgreement { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @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 PaymentLinkUpdateParams.ConsentCollection.PaymentMethodReuseAgreement build() { + return new PaymentLinkUpdateParams.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 + * PaymentLinkUpdateParams.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 + * PaymentLinkUpdateParams.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( + PaymentLinkUpdateParams.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 { @@ -4069,6 +4410,30 @@ public static class PaymentIntentData { @SerializedName("metadata") Object metadata; + /** + * Indicates that you intend to 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 + * their payment details will be saved. + * + *

When setting this to {@code off_session}, Checkout will show a notice to the customer that + * their payment details will be saved and used for future payments. + * + *

If a Customer has been provided or Checkout creates a new Customer,Checkout will attach + * the payment method to the Customer. + * + *

If Checkout does not create a Customer, the payment method is not attached to a Customer. + * To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + * + *

When processing card payments, Checkout also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + */ + @SerializedName("setup_future_usage") + ApiRequestParams.EnumParam setupFutureUsage; + /** * 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 @@ -4104,12 +4469,14 @@ private PaymentIntentData( Object description, Map extraParams, Object metadata, + ApiRequestParams.EnumParam setupFutureUsage, Object statementDescriptor, Object statementDescriptorSuffix, Object transferGroup) { this.description = description; this.extraParams = extraParams; this.metadata = metadata; + this.setupFutureUsage = setupFutureUsage; this.statementDescriptor = statementDescriptor; this.statementDescriptorSuffix = statementDescriptorSuffix; this.transferGroup = transferGroup; @@ -4126,6 +4493,8 @@ public static class Builder { private Object metadata; + private ApiRequestParams.EnumParam setupFutureUsage; + private Object statementDescriptor; private Object statementDescriptorSuffix; @@ -4138,6 +4507,7 @@ public PaymentLinkUpdateParams.PaymentIntentData build() { this.description, this.extraParams, this.metadata, + this.setupFutureUsage, this.statementDescriptor, this.statementDescriptorSuffix, this.transferGroup); @@ -4232,6 +4602,61 @@ public Builder setMetadata(Map metadata) { return this; } + /** + * Indicates that you intend to 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 their payment details will be saved. + * + *

When setting this to {@code off_session}, Checkout will show a notice to the customer + * that their payment details will be saved and used for future payments. + * + *

If a Customer has been provided or Checkout creates a new Customer,Checkout will attach + * the payment method to the Customer. + * + *

If Checkout does not create a Customer, the payment method is not attached to a + * Customer. To reuse the payment method, you can retrieve it from the Checkout Session's + * PaymentIntent. + * + *

When processing card payments, Checkout also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + */ + public Builder setSetupFutureUsage( + PaymentLinkUpdateParams.PaymentIntentData.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } + + /** + * Indicates that you intend to 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 their payment details will be saved. + * + *

When setting this to {@code off_session}, Checkout will show a notice to the customer + * that their payment details will be saved and used for future payments. + * + *

If a Customer has been provided or Checkout creates a new Customer,Checkout will attach + * the payment method to the Customer. + * + *

If Checkout does not create a Customer, the payment method is not attached to a + * Customer. To reuse the payment method, you can retrieve it from the Checkout Session's + * PaymentIntent. + * + *

When processing card payments, Checkout also uses {@code setup_future_usage} to + * dynamically optimize your payment flow and comply with regional legislation and network + * rules, such as SCA. + */ + public Builder setSetupFutureUsage(EmptyParam setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + 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 @@ -4306,6 +4731,21 @@ public Builder setTransferGroup(EmptyParam transferGroup) { return this; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("off_session") + OFF_SESSION("off_session"), + + @SerializedName("on_session") + ON_SESSION("on_session"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @@ -5678,6 +6118,81 @@ public enum AllowedCountry implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingOption { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Shipping Rate to use for this shipping option. */ + @SerializedName("shipping_rate") + Object shippingRate; + + private ShippingOption(Map extraParams, Object shippingRate) { + this.extraParams = extraParams; + this.shippingRate = shippingRate; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object shippingRate; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentLinkUpdateParams.ShippingOption build() { + return new PaymentLinkUpdateParams.ShippingOption(this.extraParams, this.shippingRate); + } + + /** + * Add a key/value pair to `extraParams` map. 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.ShippingOption#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.ShippingOption#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 Shipping Rate to use for this shipping option. */ + public Builder setShippingRate(String shippingRate) { + this.shippingRate = shippingRate; + return this; + } + + /** The ID of the Shipping Rate to use for this shipping option. */ + public Builder setShippingRate(EmptyParam shippingRate) { + this.shippingRate = shippingRate; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SubscriptionData { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index ac3c4bb83859..7d2981310ad1 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -3577,12 +3577,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -3601,6 +3607,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), diff --git a/src/main/java/com/stripe/param/PaymentRecordListParams.java b/src/main/java/com/stripe/param/PaymentRecordListParams.java new file mode 100644 index 000000000000..7c9f6ada1ec6 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordListParams.java @@ -0,0 +1,205 @@ +// 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 PaymentRecordListParams extends ApiRequestParams { + /** Only return Payment Records that were created after this unix timestamp. */ + @SerializedName("created_after") + Long createdAfter; + + /** Only return Payment Records that were created before this unix timestamp. */ + @SerializedName("created_before") + Long createdBefore; + + /** + * 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 PaymentRecordListParams( + Long createdAfter, + Long createdBefore, + String endingBefore, + List expand, + Map extraParams, + Long limit, + String startingAfter) { + this.createdAfter = createdAfter; + this.createdBefore = createdBefore; + 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 Long createdAfter; + + private Long createdBefore; + + private String endingBefore; + + private List expand; + + private Map extraParams; + + private Long limit; + + private String startingAfter; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordListParams build() { + return new PaymentRecordListParams( + this.createdAfter, + this.createdBefore, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.startingAfter); + } + + /** Only return Payment Records that were created after this unix timestamp. */ + public Builder setCreatedAfter(Long createdAfter) { + this.createdAfter = createdAfter; + return this; + } + + /** Only return Payment Records that were created before this unix timestamp. */ + public Builder setCreatedBefore(Long createdBefore) { + this.createdBefore = createdBefore; + 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 + * {@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 + * PaymentRecordListParams#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 + * PaymentRecordListParams#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 + * PaymentRecordListParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordListParams#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/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java index b1ec1a03e53e..764a9f6c1ca0 100644 --- a/src/main/java/com/stripe/param/QuoteCreateParams.java +++ b/src/main/java/com/stripe/param/QuoteCreateParams.java @@ -1420,6 +1420,10 @@ public Builder setQuote(String quote) { @Getter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings { + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay the invoice generated by this quote. This * value will be {@code null} for quotes where {@code collection_method=charge_automatically}. @@ -1427,6 +1431,10 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @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 @@ -1436,6 +1444,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding and * support information of the specified account. @@ -1443,9 +1455,18 @@ public static class InvoiceSettings { @SerializedName("issuer") Issuer issuer; - private InvoiceSettings(Long daysUntilDue, Map extraParams, Issuer issuer) { + private InvoiceSettings( + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -1454,16 +1475,69 @@ public static Builder builder() { } public static class Builder { + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public QuoteCreateParams.InvoiceSettings build() { return new QuoteCreateParams.InvoiceSettings( - this.daysUntilDue, this.extraParams, this.issuer); + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); + } + + /** + * 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 + * QuoteCreateParams.InvoiceSettings#customFields} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField(QuoteCreateParams.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = new ArrayList(); + } + ((List) 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 + * QuoteCreateParams.InvoiceSettings#customFields} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = new ArrayList(); + } + ((List) this.customFields).addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List customFields) { + this.customFields = customFields; + return this; } /** @@ -1475,6 +1549,18 @@ public Builder setDaysUntilDue(Long daysUntilDue) { 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 a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1501,6 +1587,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Footer to be displayed on the invoice. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1511,6 +1609,100 @@ public Builder setIssuer(QuoteCreateParams.InvoiceSettings.Issuer issuer) { } } + @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. + */ + @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 QuoteCreateParams.InvoiceSettings.CustomField build() { + return new QuoteCreateParams.InvoiceSettings.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 QuoteCreateParams.InvoiceSettings.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 QuoteCreateParams.InvoiceSettings.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. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { diff --git a/src/main/java/com/stripe/param/QuoteUpdateParams.java b/src/main/java/com/stripe/param/QuoteUpdateParams.java index 6f7c35db1ed6..7bcf3b25860d 100644 --- a/src/main/java/com/stripe/param/QuoteUpdateParams.java +++ b/src/main/java/com/stripe/param/QuoteUpdateParams.java @@ -1327,6 +1327,10 @@ public enum Type implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class InvoiceSettings { + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay the invoice generated by this quote. This * value will be {@code null} for quotes where {@code collection_method=charge_automatically}. @@ -1334,6 +1338,10 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @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 @@ -1343,6 +1351,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding and * support information of the specified account. @@ -1350,9 +1362,18 @@ public static class InvoiceSettings { @SerializedName("issuer") Issuer issuer; - private InvoiceSettings(Long daysUntilDue, Map extraParams, Issuer issuer) { + private InvoiceSettings( + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -1361,16 +1382,69 @@ public static Builder builder() { } public static class Builder { + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public QuoteUpdateParams.InvoiceSettings build() { return new QuoteUpdateParams.InvoiceSettings( - this.daysUntilDue, this.extraParams, this.issuer); + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); + } + + /** + * 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 + * QuoteUpdateParams.InvoiceSettings#customFields} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField(QuoteUpdateParams.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = new ArrayList(); + } + ((List) 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 + * QuoteUpdateParams.InvoiceSettings#customFields} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = new ArrayList(); + } + ((List) this.customFields).addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List customFields) { + this.customFields = customFields; + return this; } /** @@ -1382,6 +1456,18 @@ public Builder setDaysUntilDue(Long daysUntilDue) { 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 a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1408,6 +1494,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Footer to be displayed on the invoice. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1418,6 +1516,117 @@ public Builder setIssuer(QuoteUpdateParams.InvoiceSettings.Issuer issuer) { } } + @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. + */ + @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 QuoteUpdateParams.InvoiceSettings.CustomField build() { + return new QuoteUpdateParams.InvoiceSettings.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 QuoteUpdateParams.InvoiceSettings.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 QuoteUpdateParams.InvoiceSettings.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. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index 1cf17eceaa91..3cd9dfd553f1 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -14,6 +14,15 @@ @Getter @EqualsAndHashCode(callSuper = false) public class SetupIntentConfirmParams extends ApiRequestParams { + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods in + * this list when determining the payment methods to offer. A list of valid payment method types + * can be found here. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** * ID of the ConfirmationToken used to confirm this SetupIntent. * @@ -79,6 +88,7 @@ public class SetupIntentConfirmParams extends ApiRequestParams { Boolean useStripeSdk; private SetupIntentConfirmParams( + List allowedPaymentMethodTypes, String confirmationToken, List expand, Map extraParams, @@ -89,6 +99,7 @@ private SetupIntentConfirmParams( String returnUrl, SetupDetails setupDetails, Boolean useStripeSdk) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; this.confirmationToken = confirmationToken; this.expand = expand; this.extraParams = extraParams; @@ -106,6 +117,8 @@ public static Builder builder() { } public static class Builder { + private List allowedPaymentMethodTypes; + private String confirmationToken; private List expand; @@ -129,6 +142,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SetupIntentConfirmParams build() { return new SetupIntentConfirmParams( + this.allowedPaymentMethodTypes, this.confirmationToken, this.expand, this.extraParams, @@ -141,6 +155,34 @@ public SetupIntentConfirmParams build() { this.useStripeSdk); } + /** + * Add an element to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentConfirmParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllowedPaymentMethodType( + SetupIntentConfirmParams.AllowedPaymentMethodType element) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentConfirmParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllAllowedPaymentMethodType( + List elements) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.addAll(elements); + return this; + } + /** * ID of the ConfirmationToken used to confirm this SetupIntent. * @@ -3854,12 +3896,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -3878,6 +3926,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -13601,4 +13652,301 @@ public enum Enabled implements ApiRequestParams.EnumParam { } } } + + public enum AllowedPaymentMethodType 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("bizum") + BIZUM("bizum"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boku_promptpay") + BOKU_PROMPTPAY("boku_promptpay"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("capchase_pay") + CAPCHASE_PAY("capchase_pay"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("check_scan") + CHECK_SCAN("check_scan"), + + @SerializedName("click_to_pay") + CLICK_TO_PAY("click_to_pay"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("demo_pay") + DEMO_PAY("demo_pay"), + + @SerializedName("duitnow") + DUITNOW("duitnow"), + + @SerializedName("dummy_auth_push") + DUMMY_AUTH_PUSH("dummy_auth_push"), + + @SerializedName("dummy_passthrough_card") + DUMMY_PASSTHROUGH_CARD("dummy_passthrough_card"), + + @SerializedName("edenred") + EDENRED("edenred"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("gcash") + GCASH("gcash"), + + @SerializedName("getbalance") + GETBALANCE("getbalance"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("knet") + KNET("knet"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("kr_market") + KR_MARKET("kr_market"), + + @SerializedName("kriya") + KRIYA("kriya"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("momo") + MOMO("momo"), + + @SerializedName("mondu") + MONDU("mondu"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("netbanking") + NETBANKING("netbanking"), + + @SerializedName("ng_bank") + NG_BANK("ng_bank"), + + @SerializedName("ng_bank_transfer") + NG_BANK_TRANSFER("ng_bank_transfer"), + + @SerializedName("ng_card") + NG_CARD("ng_card"), + + @SerializedName("ng_market") + NG_MARKET("ng_market"), + + @SerializedName("ng_ussd") + NG_USSD("ng_ussd"), + + @SerializedName("ng_wallet") + NG_WALLET("ng_wallet"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("octopus") + OCTOPUS("octopus"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("paper_check") + PAPER_CHECK("paper_check"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("scalapay") + SCALAPAY("scalapay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sequra") + SEQURA("sequra"), + + @SerializedName("shop_pay") + SHOP_PAY("shop_pay"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("south_korea_market") + SOUTH_KOREA_MARKET("south_korea_market"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("sunbit") + SUNBIT("sunbit"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("tamara") + TAMARA("tamara"), + + @SerializedName("test_pay") + TEST_PAY("test_pay"), + + @SerializedName("truemoney") + TRUEMONEY("truemoney"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("upi") + UPI("upi"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("us_cash_voucher") + US_CASH_VOUCHER("us_cash_voucher"), + + @SerializedName("vipps") + VIPPS("vipps"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("wero") + WERO("wero"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedPaymentMethodType(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index aad568ebce00..2aab90c55fd0 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -14,6 +14,15 @@ @Getter @EqualsAndHashCode(callSuper = false) public class SetupIntentCreateParams extends ApiRequestParams { + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods in + * this list when determining the payment methods to offer. A list of valid payment method types + * can be found here. + */ + @SerializedName("allowed_payment_method_types") + List allowedPaymentMethodTypes; + /** * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. * @@ -195,6 +204,7 @@ public class SetupIntentCreateParams extends ApiRequestParams { Boolean useStripeSdk; private SetupIntentCreateParams( + List allowedPaymentMethodTypes, Boolean attachToSelf, AutomaticPaymentMethods automaticPaymentMethods, Boolean confirm, @@ -219,6 +229,7 @@ private SetupIntentCreateParams( SingleUse singleUse, Usage usage, Boolean useStripeSdk) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; this.attachToSelf = attachToSelf; this.automaticPaymentMethods = automaticPaymentMethods; this.confirm = confirm; @@ -250,6 +261,8 @@ public static Builder builder() { } public static class Builder { + private List allowedPaymentMethodTypes; + private Boolean attachToSelf; private AutomaticPaymentMethods automaticPaymentMethods; @@ -301,6 +314,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SetupIntentCreateParams build() { return new SetupIntentCreateParams( + this.allowedPaymentMethodTypes, this.attachToSelf, this.automaticPaymentMethods, this.confirm, @@ -327,6 +341,34 @@ public SetupIntentCreateParams build() { this.useStripeSdk); } + /** + * Add an element to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentCreateParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllowedPaymentMethodType( + SetupIntentCreateParams.AllowedPaymentMethodType element) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentCreateParams#allowedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllAllowedPaymentMethodType( + List elements) { + if (this.allowedPaymentMethodTypes == null) { + this.allowedPaymentMethodTypes = new ArrayList<>(); + } + this.allowedPaymentMethodTypes.addAll(elements); + return this; + } + /** * If present, the SetupIntent's payment method will be attached to the in-context Stripe * Account. @@ -4390,12 +4432,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -4414,6 +4462,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -14238,6 +14289,303 @@ public Builder putAllExtraParam(Map map) { } } + public enum AllowedPaymentMethodType 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("bizum") + BIZUM("bizum"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boku_promptpay") + BOKU_PROMPTPAY("boku_promptpay"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("capchase_pay") + CAPCHASE_PAY("capchase_pay"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("check_scan") + CHECK_SCAN("check_scan"), + + @SerializedName("click_to_pay") + CLICK_TO_PAY("click_to_pay"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("demo_pay") + DEMO_PAY("demo_pay"), + + @SerializedName("duitnow") + DUITNOW("duitnow"), + + @SerializedName("dummy_auth_push") + DUMMY_AUTH_PUSH("dummy_auth_push"), + + @SerializedName("dummy_passthrough_card") + DUMMY_PASSTHROUGH_CARD("dummy_passthrough_card"), + + @SerializedName("edenred") + EDENRED("edenred"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("gcash") + GCASH("gcash"), + + @SerializedName("getbalance") + GETBALANCE("getbalance"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("knet") + KNET("knet"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("kr_market") + KR_MARKET("kr_market"), + + @SerializedName("kriya") + KRIYA("kriya"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("momo") + MOMO("momo"), + + @SerializedName("mondu") + MONDU("mondu"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("netbanking") + NETBANKING("netbanking"), + + @SerializedName("ng_bank") + NG_BANK("ng_bank"), + + @SerializedName("ng_bank_transfer") + NG_BANK_TRANSFER("ng_bank_transfer"), + + @SerializedName("ng_card") + NG_CARD("ng_card"), + + @SerializedName("ng_market") + NG_MARKET("ng_market"), + + @SerializedName("ng_ussd") + NG_USSD("ng_ussd"), + + @SerializedName("ng_wallet") + NG_WALLET("ng_wallet"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("octopus") + OCTOPUS("octopus"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("paper_check") + PAPER_CHECK("paper_check"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("scalapay") + SCALAPAY("scalapay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sequra") + SEQURA("sequra"), + + @SerializedName("shop_pay") + SHOP_PAY("shop_pay"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("south_korea_market") + SOUTH_KOREA_MARKET("south_korea_market"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("sunbit") + SUNBIT("sunbit"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("tamara") + TAMARA("tamara"), + + @SerializedName("test_pay") + TEST_PAY("test_pay"), + + @SerializedName("truemoney") + TRUEMONEY("truemoney"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("upi") + UPI("upi"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("us_cash_voucher") + US_CASH_VOUCHER("us_cash_voucher"), + + @SerializedName("vipps") + VIPPS("vipps"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("wero") + WERO("wero"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedPaymentMethodType(String value) { + this.value = value; + } + } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index be4ba5e710c1..03ae620c217a 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -14,6 +14,15 @@ @Getter @EqualsAndHashCode(callSuper = false) public class SetupIntentUpdateParams extends ApiRequestParams { + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods in + * this list when determining the payment methods to offer. A list of valid payment method types + * can be found here. + */ + @SerializedName("allowed_payment_method_types") + Object allowedPaymentMethodTypes; + /** * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. * @@ -124,6 +133,7 @@ public class SetupIntentUpdateParams extends ApiRequestParams { SetupDetails setupDetails; private SetupIntentUpdateParams( + Object allowedPaymentMethodTypes, Boolean attachToSelf, Object customer, Object customerAccount, @@ -139,6 +149,7 @@ private SetupIntentUpdateParams( PaymentMethodOptions paymentMethodOptions, List paymentMethodTypes, SetupDetails setupDetails) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; this.attachToSelf = attachToSelf; this.customer = customer; this.customerAccount = customerAccount; @@ -161,6 +172,8 @@ public static Builder builder() { } public static class Builder { + private Object allowedPaymentMethodTypes; + private Boolean attachToSelf; private Object customer; @@ -194,6 +207,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SetupIntentUpdateParams build() { return new SetupIntentUpdateParams( + this.allowedPaymentMethodTypes, this.attachToSelf, this.customer, this.customerAccount, @@ -211,6 +225,65 @@ public SetupIntentUpdateParams build() { this.setupDetails); } + /** + * Add an element to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentUpdateParams#allowedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllowedPaymentMethodType( + SetupIntentUpdateParams.AllowedPaymentMethodType element) { + if (this.allowedPaymentMethodTypes == null + || this.allowedPaymentMethodTypes instanceof EmptyParam) { + this.allowedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.allowedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `allowedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SetupIntentUpdateParams#allowedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllAllowedPaymentMethodType( + List elements) { + if (this.allowedPaymentMethodTypes == null + || this.allowedPaymentMethodTypes instanceof EmptyParam) { + this.allowedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.allowedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods + * in this list when determining the payment methods to offer. A list of valid payment method + * types can be found here. + */ + public Builder setAllowedPaymentMethodTypes(EmptyParam allowedPaymentMethodTypes) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; + return this; + } + + /** + * The list of payment method types to allow for this SetupIntent. Stripe will only use methods + * in this list when determining the payment methods to offer. A list of valid payment method + * types can be found here. + */ + public Builder setAllowedPaymentMethodTypes( + List allowedPaymentMethodTypes) { + this.allowedPaymentMethodTypes = allowedPaymentMethodTypes; + return this; + } + /** * If present, the SetupIntent's payment method will be attached to the in-context Stripe * Account. @@ -3867,12 +3940,18 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("bank_rakyat") BANK_RAKYAT("bank_rakyat"), + @SerializedName("bnp_paribas") + BNP_PARIBAS("bnp_paribas"), + @SerializedName("bsn") BSN("bsn"), @SerializedName("cimb") CIMB("cimb"), + @SerializedName("citibank") + CITIBANK("citibank"), + @SerializedName("deutsche_bank") DEUTSCHE_BANK("deutsche_bank"), @@ -3891,6 +3970,9 @@ public enum Bank implements ApiRequestParams.EnumParam { @SerializedName("maybank2u") MAYBANK2U("maybank2u"), + @SerializedName("mbsb_bank") + MBSB_BANK("mbsb_bank"), + @SerializedName("ocbc") OCBC("ocbc"), @@ -13922,6 +14004,303 @@ public enum Enabled implements ApiRequestParams.EnumParam { } } + public enum AllowedPaymentMethodType 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("bizum") + BIZUM("bizum"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boku_promptpay") + BOKU_PROMPTPAY("boku_promptpay"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("capchase_pay") + CAPCHASE_PAY("capchase_pay"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("check_scan") + CHECK_SCAN("check_scan"), + + @SerializedName("click_to_pay") + CLICK_TO_PAY("click_to_pay"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("demo_pay") + DEMO_PAY("demo_pay"), + + @SerializedName("duitnow") + DUITNOW("duitnow"), + + @SerializedName("dummy_auth_push") + DUMMY_AUTH_PUSH("dummy_auth_push"), + + @SerializedName("dummy_passthrough_card") + DUMMY_PASSTHROUGH_CARD("dummy_passthrough_card"), + + @SerializedName("edenred") + EDENRED("edenred"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("gcash") + GCASH("gcash"), + + @SerializedName("getbalance") + GETBALANCE("getbalance"), + + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("knet") + KNET("knet"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("kr_market") + KR_MARKET("kr_market"), + + @SerializedName("kriya") + KRIYA("kriya"), + + @SerializedName("link") + LINK("link"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("momo") + MOMO("momo"), + + @SerializedName("mondu") + MONDU("mondu"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("netbanking") + NETBANKING("netbanking"), + + @SerializedName("ng_bank") + NG_BANK("ng_bank"), + + @SerializedName("ng_bank_transfer") + NG_BANK_TRANSFER("ng_bank_transfer"), + + @SerializedName("ng_card") + NG_CARD("ng_card"), + + @SerializedName("ng_market") + NG_MARKET("ng_market"), + + @SerializedName("ng_ussd") + NG_USSD("ng_ussd"), + + @SerializedName("ng_wallet") + NG_WALLET("ng_wallet"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("octopus") + OCTOPUS("octopus"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("paper_check") + PAPER_CHECK("paper_check"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("scalapay") + SCALAPAY("scalapay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("sequra") + SEQURA("sequra"), + + @SerializedName("shop_pay") + SHOP_PAY("shop_pay"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("south_korea_market") + SOUTH_KOREA_MARKET("south_korea_market"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("sunbit") + SUNBIT("sunbit"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("tamara") + TAMARA("tamara"), + + @SerializedName("test_pay") + TEST_PAY("test_pay"), + + @SerializedName("truemoney") + TRUEMONEY("truemoney"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("upi") + UPI("upi"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("us_cash_voucher") + US_CASH_VOUCHER("us_cash_voucher"), + + @SerializedName("vipps") + VIPPS("vipps"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("wero") + WERO("wero"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AllowedPaymentMethodType(String value) { + this.value = value; + } + } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("acss_debit") ACSS_DEBIT("acss_debit"), diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java index 827d6689bed4..7cb7b10c1e33 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java @@ -1797,6 +1797,9 @@ public static class InvoiceSettings { @SerializedName("account_tax_ids") Object accountTaxIds; + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -1805,6 +1808,9 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + @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. @@ -1814,6 +1820,9 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1822,10 +1831,19 @@ public static class InvoiceSettings { Issuer issuer; private InvoiceSettings( - Object accountTaxIds, Long daysUntilDue, Map extraParams, Issuer issuer) { + Object accountTaxIds, + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { this.accountTaxIds = accountTaxIds; + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -1836,16 +1854,28 @@ public static Builder builder() { public static class Builder { private Object accountTaxIds; + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings build() { return new SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings( - this.accountTaxIds, this.daysUntilDue, this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); } /** @@ -1897,6 +1927,59 @@ public Builder setAccountTaxIds(List accountTaxIds) { return this; } + /** + * 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 + * SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings#customFields} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.CustomField>(); + } + ((List) + 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 + * SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings#customFields} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List + elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + public Builder setCustomFields( + List + customFields) { + this.customFields = customFields; + return this; + } + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -1907,6 +1990,16 @@ public Builder setDaysUntilDue(Long daysUntilDue) { return this; } + public Builder setDescription(String description) { + this.description = description; + return this; + } + + 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 @@ -1937,6 +2030,16 @@ public Builder putAllExtraParam(Map map) { return this; } + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1948,6 +2051,106 @@ public Builder setIssuer( } } + @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. + */ + @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 SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.CustomField + build() { + return new SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.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 + * SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.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 + * SubscriptionScheduleCreateParams.DefaultSettings.InvoiceSettings.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. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { @@ -6598,6 +6801,10 @@ public static class InvoiceSettings { @SerializedName("account_tax_ids") Object accountTaxIds; + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -6606,6 +6813,10 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @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. @@ -6615,6 +6826,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -6623,10 +6838,19 @@ public static class InvoiceSettings { Issuer issuer; private InvoiceSettings( - Object accountTaxIds, Long daysUntilDue, Map extraParams, Issuer issuer) { + Object accountTaxIds, + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { this.accountTaxIds = accountTaxIds; + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -6637,16 +6861,28 @@ public static Builder builder() { public static class Builder { private Object accountTaxIds; + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleCreateParams.Phase.InvoiceSettings build() { return new SubscriptionScheduleCreateParams.Phase.InvoiceSettings( - this.accountTaxIds, this.daysUntilDue, this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); } /** @@ -6697,6 +6933,57 @@ public Builder setAccountTaxIds(List accountTaxIds) { return this; } + /** + * 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 + * SubscriptionScheduleCreateParams.Phase.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + SubscriptionScheduleCreateParams.Phase.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + 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 + * SubscriptionScheduleCreateParams.Phase.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List customFields) { + this.customFields = customFields; + return this; + } + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -6707,6 +6994,18 @@ public Builder setDaysUntilDue(Long daysUntilDue) { 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 a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -6735,6 +7034,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Footer to be displayed on the invoice. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -6746,6 +7057,105 @@ public Builder setIssuer( } } + @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. + */ + @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 SubscriptionScheduleCreateParams.Phase.InvoiceSettings.CustomField build() { + return new SubscriptionScheduleCreateParams.Phase.InvoiceSettings.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 + * SubscriptionScheduleCreateParams.Phase.InvoiceSettings.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 + * SubscriptionScheduleCreateParams.Phase.InvoiceSettings.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. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java index f2c7d38a7cc9..190d21f5ee25 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java @@ -1586,6 +1586,9 @@ public static class InvoiceSettings { @SerializedName("account_tax_ids") Object accountTaxIds; + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -1594,6 +1597,9 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + @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. @@ -1603,6 +1609,9 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1611,10 +1620,19 @@ public static class InvoiceSettings { Issuer issuer; private InvoiceSettings( - Object accountTaxIds, Long daysUntilDue, Map extraParams, Issuer issuer) { + Object accountTaxIds, + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { this.accountTaxIds = accountTaxIds; + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -1625,16 +1643,28 @@ public static Builder builder() { public static class Builder { private Object accountTaxIds; + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings build() { return new SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings( - this.accountTaxIds, this.daysUntilDue, this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); } /** @@ -1686,6 +1716,59 @@ public Builder setAccountTaxIds(List accountTaxIds) { return this; } + /** + * 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 + * SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings#customFields} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField>(); + } + ((List) + 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 + * SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings#customFields} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List + elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList< + SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField>(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + public Builder setCustomFields( + List + customFields) { + this.customFields = customFields; + return this; + } + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -1696,6 +1779,16 @@ public Builder setDaysUntilDue(Long daysUntilDue) { return this; } + public Builder setDescription(String description) { + this.description = description; + return this; + } + + 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 @@ -1726,6 +1819,16 @@ public Builder putAllExtraParam(Map map) { return this; } + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -1737,6 +1840,124 @@ public Builder setIssuer( } } + @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. + */ + @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 SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.CustomField + build() { + return new SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.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 + * SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.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 + * SubscriptionScheduleUpdateParams.DefaultSettings.InvoiceSettings.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. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { @@ -6567,6 +6788,10 @@ public static class InvoiceSettings { @SerializedName("account_tax_ids") Object accountTaxIds; + /** A list of up to 4 custom fields to be displayed on the invoice. */ + @SerializedName("custom_fields") + Object customFields; + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -6575,6 +6800,10 @@ public static class InvoiceSettings { @SerializedName("days_until_due") Long daysUntilDue; + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @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. @@ -6584,6 +6813,10 @@ public static class InvoiceSettings { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Footer to be displayed on the invoice. */ + @SerializedName("footer") + Object footer; + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -6592,10 +6825,19 @@ public static class InvoiceSettings { Issuer issuer; private InvoiceSettings( - Object accountTaxIds, Long daysUntilDue, Map extraParams, Issuer issuer) { + Object accountTaxIds, + Object customFields, + Long daysUntilDue, + Object description, + Map extraParams, + Object footer, + Issuer issuer) { this.accountTaxIds = accountTaxIds; + this.customFields = customFields; this.daysUntilDue = daysUntilDue; + this.description = description; this.extraParams = extraParams; + this.footer = footer; this.issuer = issuer; } @@ -6606,16 +6848,28 @@ public static Builder builder() { public static class Builder { private Object accountTaxIds; + private Object customFields; + private Long daysUntilDue; + private Object description; + private Map extraParams; + private Object footer; + private Issuer issuer; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleUpdateParams.Phase.InvoiceSettings build() { return new SubscriptionScheduleUpdateParams.Phase.InvoiceSettings( - this.accountTaxIds, this.daysUntilDue, this.extraParams, this.issuer); + this.accountTaxIds, + this.customFields, + this.daysUntilDue, + this.description, + this.extraParams, + this.footer, + this.issuer); } /** @@ -6666,6 +6920,57 @@ public Builder setAccountTaxIds(List accountTaxIds) { return this; } + /** + * 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 + * SubscriptionScheduleUpdateParams.Phase.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addCustomField( + SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.CustomField element) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + 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 + * SubscriptionScheduleUpdateParams.Phase.InvoiceSettings#customFields} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllCustomField( + List elements) { + if (this.customFields == null || this.customFields instanceof EmptyParam) { + this.customFields = + new ArrayList(); + } + ((List) + this.customFields) + .addAll(elements); + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields(EmptyParam customFields) { + this.customFields = customFields; + return this; + } + + /** A list of up to 4 custom fields to be displayed on the invoice. */ + public Builder setCustomFields( + List customFields) { + this.customFields = customFields; + return this; + } + /** * Number of days within which a customer must pay invoices generated by this subscription * schedule. This value will be {@code null} for subscription schedules where {@code @@ -6676,6 +6981,18 @@ public Builder setDaysUntilDue(Long daysUntilDue) { 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 a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -6704,6 +7021,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Footer to be displayed on the invoice. */ + public Builder setFooter(String footer) { + this.footer = footer; + return this; + } + + /** Footer to be displayed on the invoice. */ + public Builder setFooter(EmptyParam footer) { + this.footer = footer; + return this; + } + /** * The connected account that issues the invoice. The invoice is presented with the branding * and support information of the specified account. @@ -6715,6 +7044,123 @@ public Builder setIssuer( } } + @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. + */ + @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 SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.CustomField build() { + return new SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.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 + * SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.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 + * SubscriptionScheduleUpdateParams.Phase.InvoiceSettings.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. + */ + public Builder setValue(String value) { + this.value = value; + return this; + } + + /** + * Required. The value of the custom field. This may be up to 140 + * characters. + */ + public Builder setValue(EmptyParam value) { + this.value = value; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Issuer { diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index 03fc936d249d..2102c60c037d 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -80,7 +80,7 @@ public class SubscriptionUpdateParams extends ApiRequestParams { /** * Indicate whether this subscription should cancel at the end of the current period ({@code - * current_period_end}). Defaults to {@code false}. + * current_period_end}). */ @SerializedName("cancel_at_period_end") Boolean cancelAtPeriodEnd; @@ -657,7 +657,7 @@ public Builder setCancelAt(EmptyParam cancelAt) { /** * Indicate whether this subscription should cancel at the end of the current period ({@code - * current_period_end}). Defaults to {@code false}. + * current_period_end}). */ public Builder setCancelAtPeriodEnd(Boolean cancelAtPeriodEnd) { this.cancelAtPeriodEnd = cancelAtPeriodEnd; diff --git a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java index fa900046df73..0501f843cccd 100644 --- a/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCollectionCreateParams.java @@ -36,18 +36,18 @@ public class TaxIdCollectionCreateParams extends ApiRequestParams { * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, - * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, - * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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 gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, + * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, + * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code + * py_ruc}, {@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; @@ -145,18 +145,18 @@ public Builder putAllExtraParam(Map map) { * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code - * li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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} + * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, + * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, + * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code + * li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -330,6 +330,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/TaxIdCreateParams.java b/src/main/java/com/stripe/param/TaxIdCreateParams.java index e6d2b3bbf58c..0e0d94f95009 100644 --- a/src/main/java/com/stripe/param/TaxIdCreateParams.java +++ b/src/main/java/com/stripe/param/TaxIdCreateParams.java @@ -40,18 +40,18 @@ public class TaxIdCreateParams extends ApiRequestParams { * ch_vat}, {@code cl_tin}, {@code cm_niu}, {@code cn_tin}, {@code co_nit}, {@code cr_tin}, {@code * cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code * et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, - * {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, - * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, - * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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 gi_tin}, {@code gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, + * {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, + * {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code + * py_ruc}, {@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; @@ -159,18 +159,18 @@ public Builder setOwner(TaxIdCreateParams.Owner owner) { * {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, {@code ec_ruc}, {@code * eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code eu_vat}, {@code fo_vat}, * {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, {@code hk_br}, {@code - * hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, {@code is_vat}, - * {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, - * {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code - * li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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} + * hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code il_vat}, {@code in_gst}, + * {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, {@code ke_pin}, + * {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code la_tin}, {@code + * li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -485,6 +485,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/TaxRateCreateParams.java b/src/main/java/com/stripe/param/TaxRateCreateParams.java index ab45cf457765..e0bebfd3c178 100644 --- a/src/main/java/com/stripe/param/TaxRateCreateParams.java +++ b/src/main/java/com/stripe/param/TaxRateCreateParams.java @@ -334,6 +334,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/TaxRateUpdateParams.java b/src/main/java/com/stripe/param/TaxRateUpdateParams.java index af68f049e23f..c23ebbf3aada 100644 --- a/src/main/java/com/stripe/param/TaxRateUpdateParams.java +++ b/src/main/java/com/stripe/param/TaxRateUpdateParams.java @@ -368,6 +368,12 @@ public enum TaxType implements ApiRequestParams.EnumParam { @SerializedName("lease_tax") LEASE_TAX("lease_tax"), + @SerializedName("mass_transit_parking_tax") + MASS_TRANSIT_PARKING_TAX("mass_transit_parking_tax"), + + @SerializedName("parking_tax") + PARKING_TAX("parking_tax"), + @SerializedName("pst") PST("pst"), diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 0f7265161271..2dca517d1654 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -382,6 +382,9 @@ public static class Company { @SerializedName("address_kanji") AddressKanji addressKanji; + @SerializedName("administrative_address") + AdministrativeAddress administrativeAddress; + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} after * creating all the company's directors with the @@ -476,6 +479,9 @@ public static class Company { @SerializedName("phone") String phone; + @SerializedName("principal_place_of_business") + PrincipalPlaceOfBusiness principalPlaceOfBusiness; + /** When the business was incorporated or registered. */ @SerializedName("registration_date") Object registrationDate; @@ -534,6 +540,7 @@ private Company( Address address, AddressKana addressKana, AddressKanji addressKanji, + AdministrativeAddress administrativeAddress, Boolean directorsProvided, DirectorshipDeclaration directorshipDeclaration, Boolean executivesProvided, @@ -548,6 +555,7 @@ private Company( Boolean ownershipDeclarationShownAndSigned, ApiRequestParams.EnumParam ownershipExemptionReason, String phone, + PrincipalPlaceOfBusiness principalPlaceOfBusiness, Object registrationDate, String registrationNumber, RepresentativeDeclaration representativeDeclaration, @@ -559,6 +567,7 @@ private Company( this.address = address; this.addressKana = addressKana; this.addressKanji = addressKanji; + this.administrativeAddress = administrativeAddress; this.directorsProvided = directorsProvided; this.directorshipDeclaration = directorshipDeclaration; this.executivesProvided = executivesProvided; @@ -573,6 +582,7 @@ private Company( this.ownershipDeclarationShownAndSigned = ownershipDeclarationShownAndSigned; this.ownershipExemptionReason = ownershipExemptionReason; this.phone = phone; + this.principalPlaceOfBusiness = principalPlaceOfBusiness; this.registrationDate = registrationDate; this.registrationNumber = registrationNumber; this.representativeDeclaration = representativeDeclaration; @@ -594,6 +604,8 @@ public static class Builder { private AddressKanji addressKanji; + private AdministrativeAddress administrativeAddress; + private Boolean directorsProvided; private DirectorshipDeclaration directorshipDeclaration; @@ -622,6 +634,8 @@ public static class Builder { private String phone; + private PrincipalPlaceOfBusiness principalPlaceOfBusiness; + private Object registrationDate; private String registrationNumber; @@ -644,6 +658,7 @@ public TokenCreateParams.Account.Company build() { this.address, this.addressKana, this.addressKanji, + this.administrativeAddress, this.directorsProvided, this.directorshipDeclaration, this.executivesProvided, @@ -658,6 +673,7 @@ public TokenCreateParams.Account.Company build() { this.ownershipDeclarationShownAndSigned, this.ownershipExemptionReason, this.phone, + this.principalPlaceOfBusiness, this.registrationDate, this.registrationNumber, this.representativeDeclaration, @@ -687,6 +703,12 @@ public Builder setAddressKanji( return this; } + public Builder setAdministrativeAddress( + TokenCreateParams.Account.Company.AdministrativeAddress administrativeAddress) { + this.administrativeAddress = administrativeAddress; + return this; + } + /** * Whether the company's directors have been provided. Set this Boolean to {@code true} * after creating all the company's directors with 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 AdministrativeAddress( + 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 TokenCreateParams.Account.Company.AdministrativeAddress build() { + return new TokenCreateParams.Account.Company.AdministrativeAddress( + 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 TokenCreateParams.Account.Company.AdministrativeAddress#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.AdministrativeAddress#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 DirectorshipDeclaration { @@ -1649,6 +1840,169 @@ public Builder setUserAgent(String userAgent) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PrincipalPlaceOfBusiness { + /** 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 PrincipalPlaceOfBusiness( + 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 TokenCreateParams.Account.Company.PrincipalPlaceOfBusiness build() { + return new TokenCreateParams.Account.Company.PrincipalPlaceOfBusiness( + 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 TokenCreateParams.Account.Company.PrincipalPlaceOfBusiness#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.PrincipalPlaceOfBusiness#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 RegistrationDate { diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index c66ebc2ecfb1..6d5a8368d7c1 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -657,7 +657,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2026_05_27_DAHLIA("2026-05-27.dahlia"), @SerializedName("2026-06-24.dahlia") - VERSION_2026_06_24_DAHLIA("2026-06-24.dahlia"); + VERSION_2026_06_24_DAHLIA("2026-06-24.dahlia"), + + @SerializedName("2026-07-29.dahlia") + VERSION_2026_07_29_DAHLIA("2026-07-29.dahlia"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java index 3a595097c6a8..459b3e987f48 100644 --- a/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java +++ b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java @@ -278,16 +278,26 @@ public static class ApplicabilityScope { @SerializedName("prices") List prices; + /** + * A list of rate cards that the credit grant can apply to. The credit grant applies to any + * metered item billed under one of these rate cards. Cannot be used in combination with + * {@code price_type}, {@code prices}, or {@code billable_items}. + */ + @SerializedName("rate_cards") + List rateCards; + private ApplicabilityScope( List billableItems, Map extraParams, PriceType priceType, - List prices) { + List prices, + List rateCards) { this.billableItems = billableItems; this.extraParams = extraParams; this.priceType = priceType; this.prices = prices; + this.rateCards = rateCards; } public static Builder builder() { @@ -304,10 +314,13 @@ public static class Builder { private List prices; + private List + rateCards; + /** Finalize and obtain parameter instance from this builder. */ public CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope build() { return new CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope( - this.billableItems, this.extraParams, this.priceType, this.prices); + this.billableItems, this.extraParams, this.priceType, this.prices, this.rateCards); } /** @@ -408,6 +421,36 @@ public Builder addAllPrice( this.prices.addAll(elements); return this; } + + /** + * Add an element to `rateCards` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope#rateCards} for the field + * documentation. + */ + public Builder addRateCard( + CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.RateCard element) { + if (this.rateCards == null) { + this.rateCards = new ArrayList<>(); + } + this.rateCards.add(element); + return this; + } + + /** + * Add all elements to `rateCards` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope#rateCards} for the field + * documentation. + */ + public Builder addAllRateCard( + List elements) { + if (this.rateCards == null) { + this.rateCards = new ArrayList<>(); + } + this.rateCards.addAll(elements); + return this; + } } @Getter @@ -560,6 +603,81 @@ public Builder setId(String id) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RateCard { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 rate card ID this credit grant should apply to. */ + @SerializedName("id") + String id; + + private RateCard(Map extraParams, String id) { + this.extraParams = extraParams; + this.id = id; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String id; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.RateCard build() { + return new CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.RateCard( + this.extraParams, this.id); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.RateCard#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * CreditBalanceSummaryRetrieveParams.Filter.ApplicabilityScope.RateCard#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 rate card ID this credit grant should apply to. */ + public Builder setId(String id) { + this.id = id; + return this; + } + } + } + public enum PriceType implements ApiRequestParams.EnumParam { @SerializedName("metered") METERED("metered"); diff --git a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java index 9064364873f1..17bc2b4280af 100644 --- a/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java +++ b/src/main/java/com/stripe/param/billing/CreditGrantCreateParams.java @@ -712,15 +712,25 @@ public static class Scope { @SerializedName("prices") List prices; + /** + * A list of rate cards that the credit grant can apply to. The credit grant applies to any + * metered item billed under one of these rate cards. Cannot be used in combination with + * {@code price_type}, {@code prices}, or {@code billable_items}. + */ + @SerializedName("rate_cards") + List rateCards; + private Scope( List billableItems, Map extraParams, PriceType priceType, - List prices) { + List prices, + List rateCards) { this.billableItems = billableItems; this.extraParams = extraParams; this.priceType = priceType; this.prices = prices; + this.rateCards = rateCards; } public static Builder builder() { @@ -736,10 +746,12 @@ public static class Builder { private List prices; + private List rateCards; + /** Finalize and obtain parameter instance from this builder. */ public CreditGrantCreateParams.ApplicabilityConfig.Scope build() { return new CreditGrantCreateParams.ApplicabilityConfig.Scope( - this.billableItems, this.extraParams, this.priceType, this.prices); + this.billableItems, this.extraParams, this.priceType, this.prices, this.rateCards); } /** @@ -836,6 +848,34 @@ public Builder addAllPrice( this.prices.addAll(elements); return this; } + + /** + * Add an element to `rateCards` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * CreditGrantCreateParams.ApplicabilityConfig.Scope#rateCards} for the field documentation. + */ + public Builder addRateCard( + CreditGrantCreateParams.ApplicabilityConfig.Scope.RateCard element) { + if (this.rateCards == null) { + this.rateCards = new ArrayList<>(); + } + this.rateCards.add(element); + return this; + } + + /** + * Add all elements to `rateCards` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * CreditGrantCreateParams.ApplicabilityConfig.Scope#rateCards} for the field documentation. + */ + public Builder addAllRateCard( + List elements) { + if (this.rateCards == null) { + this.rateCards = new ArrayList<>(); + } + this.rateCards.addAll(elements); + return this; + } } @Getter @@ -986,6 +1026,79 @@ public Builder setId(String id) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RateCard { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 rate card ID this credit grant should apply to. */ + @SerializedName("id") + String id; + + private RateCard(Map extraParams, String id) { + this.extraParams = extraParams; + this.id = id; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String id; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditGrantCreateParams.ApplicabilityConfig.Scope.RateCard build() { + return new CreditGrantCreateParams.ApplicabilityConfig.Scope.RateCard( + this.extraParams, this.id); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditGrantCreateParams.ApplicabilityConfig.Scope.RateCard#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditGrantCreateParams.ApplicabilityConfig.Scope.RateCard#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 rate card ID this credit grant should apply to. */ + public Builder setId(String id) { + this.id = id; + return this; + } + } + } + public enum PriceType implements ApiRequestParams.EnumParam { @SerializedName("metered") METERED("metered"); diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index 87a05e898982..d36b2b035686 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -7943,15 +7943,6 @@ public static class LineItem { @SerializedName("adjustable_quantity") AdjustableQuantity adjustableQuantity; - /** - * 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. You can't set this parameter if - * {@code ui_mode} is {@code custom}. - */ - @SerializedName("dynamic_tax_rates") - List dynamicTaxRates; - /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -8001,7 +7992,6 @@ public static class LineItem { private LineItem( AdjustableQuantity adjustableQuantity, - List dynamicTaxRates, Map extraParams, Map metadata, String price, @@ -8009,7 +7999,6 @@ private LineItem( Long quantity, List taxRates) { this.adjustableQuantity = adjustableQuantity; - this.dynamicTaxRates = dynamicTaxRates; this.extraParams = extraParams; this.metadata = metadata; this.price = price; @@ -8025,8 +8014,6 @@ public static Builder builder() { public static class Builder { private AdjustableQuantity adjustableQuantity; - private List dynamicTaxRates; - private Map extraParams; private Map metadata; @@ -8043,7 +8030,6 @@ public static class Builder { public SessionCreateParams.LineItem build() { return new SessionCreateParams.LineItem( this.adjustableQuantity, - this.dynamicTaxRates, this.extraParams, this.metadata, this.price, @@ -8062,32 +8048,6 @@ public Builder setAdjustableQuantity( return this; } - /** - * Add an element to `dynamicTaxRates` list. A list is initialized for the first `add/addAll` - * call, and subsequent calls adds additional elements to the original list. See {@link - * SessionCreateParams.LineItem#dynamicTaxRates} for the field documentation. - */ - public Builder addDynamicTaxRate(String element) { - if (this.dynamicTaxRates == null) { - this.dynamicTaxRates = new ArrayList<>(); - } - this.dynamicTaxRates.add(element); - return this; - } - - /** - * Add all elements to `dynamicTaxRates` list. A list is initialized for the first - * `add/addAll` call, and subsequent calls adds additional elements to the original list. See - * {@link SessionCreateParams.LineItem#dynamicTaxRates} for the field documentation. - */ - public Builder addAllDynamicTaxRate(List elements) { - if (this.dynamicTaxRates == null) { - this.dynamicTaxRates = new ArrayList<>(); - } - this.dynamicTaxRates.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 @@ -17683,9 +17643,35 @@ public static class Payco { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private Payco(CaptureMethod captureMethod, 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 Payco( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -17697,10 +17683,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Payco build() { return new SessionCreateParams.PaymentMethodOptions.Payco( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** Controls when the funds will be captured from the customer's account. */ @@ -17737,6 +17725,32 @@ public Builder putAllExtraParam(Map map) { 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.Payco.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -17750,6 +17764,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter @@ -19415,9 +19441,35 @@ public static class SamsungPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private SamsungPay(CaptureMethod captureMethod, 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 SamsungPay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { this.captureMethod = captureMethod; this.extraParams = extraParams; + this.setupFutureUsage = setupFutureUsage; } public static Builder builder() { @@ -19429,10 +19481,12 @@ public static class Builder { private Map extraParams; + private SetupFutureUsage setupFutureUsage; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.SamsungPay build() { return new SessionCreateParams.PaymentMethodOptions.SamsungPay( - this.captureMethod, this.extraParams); + this.captureMethod, this.extraParams, this.setupFutureUsage); } /** Controls when the funds will be captured from the customer's account. */ @@ -19469,6 +19523,32 @@ public Builder putAllExtraParam(Map map) { 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.SamsungPay.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; + } } public enum CaptureMethod implements ApiRequestParams.EnumParam { @@ -19482,6 +19562,18 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } } @Getter diff --git a/src/main/java/com/stripe/param/crypto/DepositAddressCreateParams.java b/src/main/java/com/stripe/param/crypto/DepositAddressCreateParams.java index 6476cf89186f..a249899884cd 100644 --- a/src/main/java/com/stripe/param/crypto/DepositAddressCreateParams.java +++ b/src/main/java/com/stripe/param/crypto/DepositAddressCreateParams.java @@ -13,6 +13,11 @@ @Getter @EqualsAndHashCode(callSuper = false) public class DepositAddressCreateParams extends ApiRequestParams { + /** + * If set, this deposit address is scoped to a Customer and can only receive funds + * from that customer. Otherwise, this deposit address can receive funds from any customer. + */ @SerializedName("customer") String customer; @@ -29,10 +34,15 @@ public class DepositAddressCreateParams extends ApiRequestParams { @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. + */ @SerializedName("metadata") Map metadata; - /** Required. */ + /** Required. The blockchain network to generate a deposit address for. */ @SerializedName("network") Network network; @@ -70,6 +80,11 @@ public DepositAddressCreateParams build() { this.customer, this.expand, this.extraParams, this.metadata, this.network); } + /** + * If set, this deposit address is scoped to a Customer and can only receive funds + * from that customer. Otherwise, this deposit address can receive funds from any customer. + */ public Builder setCustomer(String customer) { this.customer = customer; return this; @@ -153,7 +168,7 @@ public Builder putAllMetadata(Map map) { return this; } - /** Required. */ + /** Required. The blockchain network to generate a deposit address for. */ public Builder setNetwork(DepositAddressCreateParams.Network network) { this.network = network; return this; diff --git a/src/main/java/com/stripe/param/crypto/DepositAddressListParams.java b/src/main/java/com/stripe/param/crypto/DepositAddressListParams.java index 373c4211c879..6bd38e21dad2 100644 --- a/src/main/java/com/stripe/param/crypto/DepositAddressListParams.java +++ b/src/main/java/com/stripe/param/crypto/DepositAddressListParams.java @@ -13,12 +13,18 @@ @Getter @EqualsAndHashCode(callSuper = false) public class DepositAddressListParams extends ApiRequestParams { + /** Only return the deposit address matching this on-chain address. */ @SerializedName("address") String address; + /** + * Only return deposit addresses scoped to this Customer. + */ @SerializedName("customer") String customer; + /** Only return deposit addresses belonging to this customer account. */ @SerializedName("customer_account") String customerAccount; @@ -51,6 +57,7 @@ public class DepositAddressListParams extends ApiRequestParams { @SerializedName("limit") Long limit; + /** Only return deposit addresses for this blockchain network. */ @SerializedName("network") Network network; @@ -121,16 +128,22 @@ public DepositAddressListParams build() { this.startingAfter); } + /** Only return the deposit address matching this on-chain address. */ public Builder setAddress(String address) { this.address = address; return this; } + /** + * Only return deposit addresses scoped to this Customer. + */ public Builder setCustomer(String customer) { this.customer = customer; return this; } + /** Only return deposit addresses belonging to this customer account. */ public Builder setCustomerAccount(String customerAccount) { this.customerAccount = customerAccount; return this; @@ -208,6 +221,7 @@ public Builder setLimit(Long limit) { return this; } + /** Only return deposit addresses for this blockchain network. */ public Builder setNetwork(DepositAddressListParams.Network network) { this.network = network; return this; diff --git a/src/main/java/com/stripe/param/crypto/OnrampSessionCreateParams.java b/src/main/java/com/stripe/param/crypto/OnrampSessionCreateParams.java index 2605269d84b3..a2a3c92989d5 100644 --- a/src/main/java/com/stripe/param/crypto/OnrampSessionCreateParams.java +++ b/src/main/java/com/stripe/param/crypto/OnrampSessionCreateParams.java @@ -790,6 +790,9 @@ public enum DestinationNetwork implements ApiRequestParams.EnumParam { @SerializedName("sui") SUI("sui"), + @SerializedName("tempo") + TEMPO("tempo"), + @SerializedName("worldchain") WORLDCHAIN("worldchain"); diff --git a/src/main/java/com/stripe/param/crypto/OnrampSessionListParams.java b/src/main/java/com/stripe/param/crypto/OnrampSessionListParams.java index b005e6e4b4b9..a9b83d09dd8c 100644 --- a/src/main/java/com/stripe/param/crypto/OnrampSessionListParams.java +++ b/src/main/java/com/stripe/param/crypto/OnrampSessionListParams.java @@ -391,6 +391,9 @@ public enum DestinationNetwork implements ApiRequestParams.EnumParam { @SerializedName("sui") SUI("sui"), + @SerializedName("tempo") + TEMPO("tempo"), + @SerializedName("worldchain") WORLDCHAIN("worldchain"); diff --git a/src/main/java/com/stripe/param/crypto/OnrampTransactionLimitsRetrieveParams.java b/src/main/java/com/stripe/param/crypto/OnrampTransactionLimitsRetrieveParams.java index f0042b3d941e..8af8926c5751 100644 --- a/src/main/java/com/stripe/param/crypto/OnrampTransactionLimitsRetrieveParams.java +++ b/src/main/java/com/stripe/param/crypto/OnrampTransactionLimitsRetrieveParams.java @@ -197,6 +197,9 @@ public enum DestinationNetwork implements ApiRequestParams.EnumParam { @SerializedName("sui") SUI("sui"), + @SerializedName("tempo") + TEMPO("tempo"), + @SerializedName("worldchain") WORLDCHAIN("worldchain"); diff --git a/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java b/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java index be210e3dd572..7c95ca3a5e0d 100644 --- a/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/financialconnections/SessionCreateParams.java @@ -479,15 +479,24 @@ public static class Filters { @SerializedName("institution") String institution; + /** + * Whether the session should require payment method support and successful account number + * retrieval before completion. + */ + @SerializedName("require_payment_method_support") + RequirePaymentMethodSupport requirePaymentMethodSupport; + private Filters( List accountSubcategories, List countries, Map extraParams, - String institution) { + String institution, + RequirePaymentMethodSupport requirePaymentMethodSupport) { this.accountSubcategories = accountSubcategories; this.countries = countries; this.extraParams = extraParams; this.institution = institution; + this.requirePaymentMethodSupport = requirePaymentMethodSupport; } public static Builder builder() { @@ -503,10 +512,16 @@ public static class Builder { private String institution; + private RequirePaymentMethodSupport requirePaymentMethodSupport; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.Filters build() { return new SessionCreateParams.Filters( - this.accountSubcategories, this.countries, this.extraParams, this.institution); + this.accountSubcategories, + this.countries, + this.extraParams, + this.institution, + this.requirePaymentMethodSupport); } /** @@ -593,6 +608,16 @@ public Builder setInstitution(String institution) { this.institution = institution; return this; } + + /** + * Whether the session should require payment method support and successful account number + * retrieval before completion. + */ + public Builder setRequirePaymentMethodSupport( + SessionCreateParams.Filters.RequirePaymentMethodSupport requirePaymentMethodSupport) { + this.requirePaymentMethodSupport = requirePaymentMethodSupport; + return this; + } } public enum AccountSubcategory implements ApiRequestParams.EnumParam { @@ -618,6 +643,24 @@ public enum AccountSubcategory implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum RequirePaymentMethodSupport implements ApiRequestParams.EnumParam { + @SerializedName("all") + ALL("all"), + + @SerializedName("at_least_one") + AT_LEAST_ONE("at_least_one"), + + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequirePaymentMethodSupport(String value) { + this.value = value; + } + } } @Getter @@ -867,7 +910,10 @@ public enum Mode implements ApiRequestParams.EnumParam { AUTOMATIC("automatic"), @SerializedName("custom") - CUSTOM("custom"); + CUSTOM("custom"), + + @SerializedName("disabled") + DISABLED("disabled"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java index a6855a4dcba8..1685f9914613 100644 --- a/src/main/java/com/stripe/param/issuing/CardCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardCreateParams.java @@ -86,6 +86,10 @@ public class CardCreateParams extends ApiRequestParams { @SerializedName("pin") Pin pin; + /** The product code to request via product graduation. */ + @SerializedName("product_code") + String productCode; + /** The card this is meant to be a replacement for (if any). */ @SerializedName("replacement_for") String replacementFor; @@ -138,6 +142,7 @@ private CardCreateParams( Map metadata, String personalizationDesign, Pin pin, + String productCode, String replacementFor, ReplacementReason replacementReason, Object secondLine, @@ -156,6 +161,7 @@ private CardCreateParams( this.metadata = metadata; this.personalizationDesign = personalizationDesign; this.pin = pin; + this.productCode = productCode; this.replacementFor = replacementFor; this.replacementReason = replacementReason; this.secondLine = secondLine; @@ -192,6 +198,8 @@ public static class Builder { private Pin pin; + private String productCode; + private String replacementFor; private ReplacementReason replacementReason; @@ -220,6 +228,7 @@ public CardCreateParams build() { this.metadata, this.personalizationDesign, this.pin, + this.productCode, this.replacementFor, this.replacementReason, this.secondLine, @@ -373,6 +382,12 @@ public Builder setPin(CardCreateParams.Pin pin) { return this; } + /** The product code to request via product graduation. */ + public Builder setProductCode(String productCode) { + this.productCode = productCode; + return this; + } + /** The card this is meant to be a replacement for (if any). */ public Builder setReplacementFor(String replacementFor) { this.replacementFor = replacementFor; @@ -664,6 +679,15 @@ public static class Shipping { @SerializedName("address_validation") AddressValidation addressValidation; + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + @SerializedName("business_name") + String businessName; + /** Customs information for the shipment. */ @SerializedName("customs") Customs customs; @@ -700,6 +724,7 @@ public static class Shipping { private Shipping( Address address, AddressValidation addressValidation, + String businessName, Customs customs, Map extraParams, String name, @@ -709,6 +734,7 @@ private Shipping( Type type) { this.address = address; this.addressValidation = addressValidation; + this.businessName = businessName; this.customs = customs; this.extraParams = extraParams; this.name = name; @@ -727,6 +753,8 @@ public static class Builder { private AddressValidation addressValidation; + private String businessName; + private Customs customs; private Map extraParams; @@ -746,6 +774,7 @@ public CardCreateParams.Shipping build() { return new CardCreateParams.Shipping( this.address, this.addressValidation, + this.businessName, this.customs, this.extraParams, this.name, @@ -768,6 +797,17 @@ public Builder setAddressValidation( return this; } + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + /** Customs information for the shipment. */ public Builder setCustoms(CardCreateParams.Shipping.Customs customs) { this.customs = customs; diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index 5ea56176d2aa..dfccd0ed6cc4 100644 --- a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java @@ -47,6 +47,10 @@ public class CardUpdateParams extends ApiRequestParams { @SerializedName("pin") Pin pin; + /** The product code to request via product graduation. */ + @SerializedName("product_code") + Object productCode; + /** Updated shipping information for the card. */ @SerializedName("shipping") Shipping shipping; @@ -75,6 +79,7 @@ private CardUpdateParams( Object metadata, Object personalizationDesign, Pin pin, + Object productCode, Shipping shipping, SpendingControls spendingControls, Status status) { @@ -84,6 +89,7 @@ private CardUpdateParams( this.metadata = metadata; this.personalizationDesign = personalizationDesign; this.pin = pin; + this.productCode = productCode; this.shipping = shipping; this.spendingControls = spendingControls; this.status = status; @@ -106,6 +112,8 @@ public static class Builder { private Pin pin; + private Object productCode; + private Shipping shipping; private SpendingControls spendingControls; @@ -121,6 +129,7 @@ public CardUpdateParams build() { this.metadata, this.personalizationDesign, this.pin, + this.productCode, this.shipping, this.spendingControls, this.status); @@ -250,6 +259,18 @@ public Builder setPin(CardUpdateParams.Pin pin) { return this; } + /** The product code to request via product graduation. */ + public Builder setProductCode(String productCode) { + this.productCode = productCode; + return this; + } + + /** The product code to request via product graduation. */ + public Builder setProductCode(EmptyParam productCode) { + this.productCode = productCode; + return this; + } + /** Updated shipping information for the card. */ public Builder setShipping(CardUpdateParams.Shipping shipping) { this.shipping = shipping; @@ -364,6 +385,15 @@ public static class Shipping { @SerializedName("address_validation") AddressValidation addressValidation; + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + @SerializedName("business_name") + Object businessName; + /** Customs information for the shipment. */ @SerializedName("customs") Customs customs; @@ -400,6 +430,7 @@ public static class Shipping { private Shipping( Address address, AddressValidation addressValidation, + Object businessName, Customs customs, Map extraParams, Object name, @@ -409,6 +440,7 @@ private Shipping( Type type) { this.address = address; this.addressValidation = addressValidation; + this.businessName = businessName; this.customs = customs; this.extraParams = extraParams; this.name = name; @@ -427,6 +459,8 @@ public static class Builder { private AddressValidation addressValidation; + private Object businessName; + private Customs customs; private Map extraParams; @@ -446,6 +480,7 @@ public CardUpdateParams.Shipping build() { return new CardUpdateParams.Shipping( this.address, this.addressValidation, + this.businessName, this.customs, this.extraParams, this.name, @@ -468,6 +503,28 @@ public Builder setAddressValidation( return this; } + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** + * The name of the business at the shipping address, used on the shipping label to ensure + * delivery when the card is shipped to a cardholder's workplace. Allowed characters: {@code + * A-Z}, {@code a-z}, {@code 0-9}, {@code }, {@code .}, {@code -}. All other characters are + * stripped or ASCII-normalized when printed. + */ + public Builder setBusinessName(EmptyParam businessName) { + this.businessName = businessName; + return this; + } + /** Customs information for the shipment. */ public Builder setCustoms(CardUpdateParams.Shipping.Customs customs) { this.customs = customs; diff --git a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java index 4ec3e67fc74e..aff36d6e36f8 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java @@ -52,6 +52,10 @@ public class CardholderUpdateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** The cardholder's name. This will be printed on cards issued to them. */ + @SerializedName("name") + Object name; + /** * The cardholder's phone number. This is required for all cardholders who will be creating EU * cards. See the 3D Secure documentation @@ -89,6 +93,7 @@ private CardholderUpdateParams( Map extraParams, Individual individual, Map metadata, + Object name, Object phoneNumber, List preferredLocales, SpendingControls spendingControls, @@ -100,6 +105,7 @@ private CardholderUpdateParams( this.extraParams = extraParams; this.individual = individual; this.metadata = metadata; + this.name = name; this.phoneNumber = phoneNumber; this.preferredLocales = preferredLocales; this.spendingControls = spendingControls; @@ -125,6 +131,8 @@ public static class Builder { private Map metadata; + private Object name; + private Object phoneNumber; private List preferredLocales; @@ -143,6 +151,7 @@ public CardholderUpdateParams build() { this.extraParams, this.individual, this.metadata, + this.name, this.phoneNumber, this.preferredLocales, this.spendingControls, @@ -257,6 +266,18 @@ public Builder putAllMetadata(Map map) { return this; } + /** The cardholder's name. This will be printed on cards issued to them. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The cardholder's name. This will be printed on cards issued to them. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + /** * The cardholder's phone number. This is required for all cardholders who will be creating EU * cards. See the 3D Secure diff --git a/src/main/java/com/stripe/param/productcatalog/TrialOfferListParams.java b/src/main/java/com/stripe/param/productcatalog/TrialOfferListParams.java new file mode 100644 index 000000000000..664462d9ef56 --- /dev/null +++ b/src/main/java/com/stripe/param/productcatalog/TrialOfferListParams.java @@ -0,0 +1,340 @@ +// File generated from our OpenAPI spec +package com.stripe.param.productcatalog; + +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 TrialOfferListParams extends ApiRequestParams { + /** Only return trial offers 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 + * {@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; + + /** Only return trial offers that reference these prices (during the trial period). */ + @SerializedName("prices") + List prices; + + /** + * 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 TrialOfferListParams( + Object created, + String endingBefore, + List expand, + Map extraParams, + Long limit, + List prices, + String startingAfter) { + this.created = created; + this.endingBefore = endingBefore; + this.expand = expand; + this.extraParams = extraParams; + this.limit = limit; + this.prices = prices; + this.startingAfter = startingAfter; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object created; + + private String endingBefore; + + private List expand; + + private Map extraParams; + + private Long limit; + + private List prices; + + private String startingAfter; + + /** Finalize and obtain parameter instance from this builder. */ + public TrialOfferListParams build() { + return new TrialOfferListParams( + this.created, + this.endingBefore, + this.expand, + this.extraParams, + this.limit, + this.prices, + this.startingAfter); + } + + /** Only return trial offers that were created during the given date interval. */ + public Builder setCreated(TrialOfferListParams.Created created) { + this.created = created; + return this; + } + + /** Only return trial offers 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 + * {@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 + * TrialOfferListParams#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 + * TrialOfferListParams#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 + * TrialOfferListParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link TrialOfferListParams#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; + } + + /** + * Add an element to `prices` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * TrialOfferListParams#prices} for the field documentation. + */ + public Builder addPrice(String element) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.add(element); + return this; + } + + /** + * Add all elements to `prices` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * TrialOfferListParams#prices} for the field documentation. + */ + public Builder addAllPrice(List elements) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.addAll(elements); + 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; + } + } + + @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 TrialOfferListParams.Created build() { + return new TrialOfferListParams.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 + * TrialOfferListParams.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 TrialOfferListParams.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/productcatalog/TrialOfferRetrieveParams.java b/src/main/java/com/stripe/param/productcatalog/TrialOfferRetrieveParams.java new file mode 100644 index 000000000000..6d24a0f0f375 --- /dev/null +++ b/src/main/java/com/stripe/param/productcatalog/TrialOfferRetrieveParams.java @@ -0,0 +1,100 @@ +// File generated from our OpenAPI spec +package com.stripe.param.productcatalog; + +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 TrialOfferRetrieveParams 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 TrialOfferRetrieveParams(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 TrialOfferRetrieveParams build() { + return new TrialOfferRetrieveParams(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 + * TrialOfferRetrieveParams#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 + * TrialOfferRetrieveParams#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 + * TrialOfferRetrieveParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link TrialOfferRetrieveParams#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/radar/PaymentEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java index 7dd2a6ba1516..6dc7c1ab314c 100644 --- a/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java +++ b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java @@ -1046,7 +1046,7 @@ public static class PaymentMethodDetails { @SerializedName("billing_details") BillingDetails billingDetails; - /** Masked PAN card details to use as an alternative to a payment_method token. */ + /** Masked/raw PAN card details to use as an alternative to a payment_method token. */ @SerializedName("card") Card card; @@ -1101,7 +1101,7 @@ public Builder setBillingDetails( return this; } - /** Masked PAN card details to use as an alternative to a payment_method token. */ + /** Masked/raw PAN card details to use as an alternative to a payment_method token. */ public Builder setCard( PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.Card card) { this.card = card; @@ -1439,6 +1439,10 @@ public Builder setState(String state) { @Getter @EqualsAndHashCode(callSuper = false) public static class Card { + /** The CVC of the card. */ + @SerializedName("cvc") + String cvc; + /** Required. Two-digit number representing the card's expiration month. */ @SerializedName("exp_month") Long expMonth; @@ -1457,25 +1461,33 @@ public static class Card { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. First six digits of the card number. */ + /** First six digits of the card number. */ @SerializedName("first6") String first6; - /** Required. Last four digits of the card number. */ + /** Last four digits of the card number. */ @SerializedName("last4") String last4; + /** The card number, as a string without any separators. */ + @SerializedName("number") + String number; + private Card( + String cvc, Long expMonth, Long expYear, Map extraParams, String first6, - String last4) { + String last4, + String number) { + this.cvc = cvc; this.expMonth = expMonth; this.expYear = expYear; this.extraParams = extraParams; this.first6 = first6; this.last4 = last4; + this.number = number; } public static Builder builder() { @@ -1483,6 +1495,8 @@ public static Builder builder() { } public static class Builder { + private String cvc; + private Long expMonth; private Long expYear; @@ -1493,10 +1507,24 @@ public static class Builder { private String last4; + private String number; + /** Finalize and obtain parameter instance from this builder. */ public PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.Card build() { return new PaymentEvaluationCreateParams.PaymentDetails.PaymentMethodDetails.Card( - this.expMonth, this.expYear, this.extraParams, this.first6, this.last4); + this.cvc, + this.expMonth, + this.expYear, + this.extraParams, + this.first6, + this.last4, + this.number); + } + + /** The CVC of the card. */ + public Builder setCvc(String cvc) { + this.cvc = cvc; + return this; } /** @@ -1545,17 +1573,23 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. First six digits of the card number. */ + /** First six digits of the card number. */ public Builder setFirst6(String first6) { this.first6 = first6; return this; } - /** Required. Last four digits of the card number. */ + /** Last four digits of the card number. */ public Builder setLast4(String last4) { this.last4 = last4; return this; } + + /** The card number, as a string without any separators. */ + public Builder setNumber(String number) { + this.number = number; + return this; + } } } } diff --git a/src/main/java/com/stripe/param/sharedpayment/IssuedTokenCreateParams.java b/src/main/java/com/stripe/param/sharedpayment/IssuedTokenCreateParams.java index 28597e3946ce..9d5950861252 100644 --- a/src/main/java/com/stripe/param/sharedpayment/IssuedTokenCreateParams.java +++ b/src/main/java/com/stripe/param/sharedpayment/IssuedTokenCreateParams.java @@ -66,6 +66,10 @@ public class IssuedTokenCreateParams extends ApiRequestParams { @SerializedName("usage_limits") UsageLimits usageLimits; + /** Set to true when using Stripe.js, iOS, or Android client-side SDKs to handle next actions. */ + @SerializedName("use_stripe_sdk") + Boolean useStripeSdk; + private IssuedTokenCreateParams( List expand, Map extraParams, @@ -74,7 +78,8 @@ private IssuedTokenCreateParams( SellerDetails sellerDetails, SetupFutureUsage setupFutureUsage, Map sharedMetadata, - UsageLimits usageLimits) { + UsageLimits usageLimits, + Boolean useStripeSdk) { this.expand = expand; this.extraParams = extraParams; this.paymentMethod = paymentMethod; @@ -83,6 +88,7 @@ private IssuedTokenCreateParams( this.setupFutureUsage = setupFutureUsage; this.sharedMetadata = sharedMetadata; this.usageLimits = usageLimits; + this.useStripeSdk = useStripeSdk; } public static Builder builder() { @@ -106,6 +112,8 @@ public static class Builder { private UsageLimits usageLimits; + private Boolean useStripeSdk; + /** Finalize and obtain parameter instance from this builder. */ public IssuedTokenCreateParams build() { return new IssuedTokenCreateParams( @@ -116,7 +124,8 @@ public IssuedTokenCreateParams build() { this.sellerDetails, this.setupFutureUsage, this.sharedMetadata, - this.usageLimits); + this.usageLimits, + this.useStripeSdk); } /** @@ -238,6 +247,14 @@ public Builder setUsageLimits(IssuedTokenCreateParams.UsageLimits usageLimits) { this.usageLimits = usageLimits; return this; } + + /** + * Set to true when using Stripe.js, iOS, or Android client-side SDKs to handle next actions. + */ + public Builder setUseStripeSdk(Boolean useStripeSdk) { + this.useStripeSdk = useStripeSdk; + return this; + } } @Getter diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index c0b14665f4e4..4dbc3b267c56 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -59,9 +59,11 @@ public class CalculationCreateParams extends ApiRequestParams { ShippingCost shippingCost; /** - * Timestamp of date at which the tax rules and rates in effect applies for the calculation. - * Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours - * in the future. + * The calculation uses the tax rules and rates that are in effect at this timestamp. You can use + * a date up to 31 days in the past or up to 31 days in the future. If you use a future date, + * Stripe doesn't guarantee that the expected tax rules and rate being used match the actual rules + * and rate that will be in effect on that date. We deploy tax changes before their effective + * date, but not within a fixed window. */ @SerializedName("tax_date") Long taxDate; @@ -240,9 +242,11 @@ public Builder setShippingCost(CalculationCreateParams.ShippingCost shippingCost } /** - * Timestamp of date at which the tax rules and rates in effect applies for the calculation. - * Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 - * hours in the future. + * The calculation uses the tax rules and rates that are in effect at this timestamp. You can + * use a date up to 31 days in the past or up to 31 days in the future. If you use a future + * date, Stripe doesn't guarantee that the expected tax rules and rate being used match the + * actual rules and rate that will be in effect on that date. We deploy tax changes before their + * effective date, but not within a fixed window. */ public Builder setTaxDate(Long taxDate) { this.taxDate = taxDate; @@ -640,18 +644,19 @@ public static class TaxId { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, {@code * eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code gn_nif}, - * {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, {@code - * in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code jp_trn}, - * {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, {@code - * la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code - * py_ruc}, {@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 hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, {@code + * il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, + * {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code + * kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 + * pl_nip}, {@code py_ruc}, {@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; @@ -722,19 +727,19 @@ public Builder putAllExtraParam(Map map) { * cn_tin}, {@code co_nit}, {@code cr_tin}, {@code cv_nif}, {@code de_stn}, {@code do_rcn}, * {@code ec_ruc}, {@code eg_tin}, {@code es_cif}, {@code et_tin}, {@code eu_oss_vat}, * {@code eu_vat}, {@code fo_vat}, {@code gb_vat}, {@code ge_vat}, {@code gi_tin}, {@code - * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code id_npwp}, {@code il_vat}, - * {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code jp_rn}, {@code - * jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, {@code kz_bin}, - * {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, - * {@code py_ruc}, {@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} + * gn_nif}, {@code hk_br}, {@code hr_oib}, {@code hu_tin}, {@code ic_nif}, {@code id_npwp}, + * {@code il_vat}, {@code in_gst}, {@code is_vat}, {@code it_cf}, {@code jp_cn}, {@code + * jp_rn}, {@code jp_trn}, {@code ke_pin}, {@code kg_tin}, {@code kh_tin}, {@code kr_brn}, + * {@code kz_bin}, {@code la_tin}, {@code li_uid}, {@code li_vat}, {@code lk_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 pl_nip}, {@code py_ruc}, {@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; @@ -908,6 +913,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("hu_tin") HU_TIN("hu_tin"), + @SerializedName("ic_nif") + IC_NIF("ic_nif"), + @SerializedName("id_npwp") ID_NPWP("id_npwp"), diff --git a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java index d2d19e9b6d8e..baa99d506faa 100644 --- a/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/RegistrationCreateParams.java @@ -15771,6 +15771,14 @@ public static class Us { @SerializedName("luxury_tax") LuxuryTax luxuryTax; + /** Options for the mass transit parking tax registration. */ + @SerializedName("mass_transit_parking_tax") + MassTransitParkingTax massTransitParkingTax; + + /** Options for the parking tax registration. */ + @SerializedName("parking_tax") + ParkingTax parkingTax; + /** Options for the resort tax registration. */ @SerializedName("resort_tax") ResortTax resortTax; @@ -15805,6 +15813,8 @@ private Us( LocalAmusementTax localAmusementTax, LocalLeaseTax localLeaseTax, LuxuryTax luxuryTax, + MassTransitParkingTax massTransitParkingTax, + ParkingTax parkingTax, ResortTax resortTax, String state, StateSalesTax stateSalesTax, @@ -15820,6 +15830,8 @@ private Us( this.localAmusementTax = localAmusementTax; this.localLeaseTax = localLeaseTax; this.luxuryTax = luxuryTax; + this.massTransitParkingTax = massTransitParkingTax; + this.parkingTax = parkingTax; this.resortTax = resortTax; this.state = state; this.stateSalesTax = stateSalesTax; @@ -15852,6 +15864,10 @@ public static class Builder { private LuxuryTax luxuryTax; + private MassTransitParkingTax massTransitParkingTax; + + private ParkingTax parkingTax; + private ResortTax resortTax; private String state; @@ -15875,6 +15891,8 @@ public RegistrationCreateParams.CountryOptions.Us build() { this.localAmusementTax, this.localLeaseTax, this.luxuryTax, + this.massTransitParkingTax, + this.parkingTax, this.resortTax, this.state, this.stateSalesTax, @@ -15973,6 +15991,21 @@ public Builder setLuxuryTax( return this; } + /** Options for the mass transit parking tax registration. */ + public Builder setMassTransitParkingTax( + RegistrationCreateParams.CountryOptions.Us.MassTransitParkingTax + massTransitParkingTax) { + this.massTransitParkingTax = massTransitParkingTax; + return this; + } + + /** Options for the parking tax registration. */ + public Builder setParkingTax( + RegistrationCreateParams.CountryOptions.Us.ParkingTax parkingTax) { + this.parkingTax = parkingTax; + return this; + } + /** Options for the resort tax registration. */ public Builder setResortTax( RegistrationCreateParams.CountryOptions.Us.ResortTax resortTax) { @@ -16745,6 +16778,170 @@ public Builder setJurisdiction(String jurisdiction) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MassTransitParkingTax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 jurisdiction code representing the local + * jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + + private MassTransitParkingTax(Map extraParams, String jurisdiction) { + this.extraParams = extraParams; + this.jurisdiction = jurisdiction; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String jurisdiction; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Us.MassTransitParkingTax build() { + return new RegistrationCreateParams.CountryOptions.Us.MassTransitParkingTax( + this.extraParams, this.jurisdiction); + } + + /** + * Add a key/value pair to `extraParams` map. 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.Us.MassTransitParkingTax#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Us.MassTransitParkingTax#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 jurisdiction code representing the local + * jurisdiction. + */ + public Builder setJurisdiction(String jurisdiction) { + this.jurisdiction = jurisdiction; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ParkingTax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 jurisdiction code representing the local + * jurisdiction. + */ + @SerializedName("jurisdiction") + String jurisdiction; + + private ParkingTax(Map extraParams, String jurisdiction) { + this.extraParams = extraParams; + this.jurisdiction = jurisdiction; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String jurisdiction; + + /** Finalize and obtain parameter instance from this builder. */ + public RegistrationCreateParams.CountryOptions.Us.ParkingTax build() { + return new RegistrationCreateParams.CountryOptions.Us.ParkingTax( + this.extraParams, this.jurisdiction); + } + + /** + * Add a key/value pair to `extraParams` map. 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.Us.ParkingTax#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. 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.Us.ParkingTax#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 jurisdiction code representing the local + * jurisdiction. + */ + public Builder setJurisdiction(String jurisdiction) { + this.jurisdiction = jurisdiction; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class ResortTax { diff --git a/src/main/java/com/stripe/param/terminal/ReaderActivateGiftCardParams.java b/src/main/java/com/stripe/param/terminal/ReaderActivateGiftCardParams.java index 6e6586541a2b..ce12a35c9478 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderActivateGiftCardParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderActivateGiftCardParams.java @@ -241,12 +241,6 @@ public Builder putAllExtraParam(Map map) { } public enum Brand implements ApiRequestParams.EnumParam { - @SerializedName("fiserv_valuelink") - FISERV_VALUELINK("fiserv_valuelink"), - - @SerializedName("givex") - GIVEX("givex"), - @SerializedName("svs") SVS("svs"); diff --git a/src/main/java/com/stripe/param/terminal/ReaderCashoutGiftCardParams.java b/src/main/java/com/stripe/param/terminal/ReaderCashoutGiftCardParams.java index 87d1f327df82..138415fe510e 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCashoutGiftCardParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCashoutGiftCardParams.java @@ -127,12 +127,6 @@ public Builder setOnBehalfOf(String onBehalfOf) { } public enum Brand implements ApiRequestParams.EnumParam { - @SerializedName("fiserv_valuelink") - FISERV_VALUELINK("fiserv_valuelink"), - - @SerializedName("givex") - GIVEX("givex"), - @SerializedName("svs") SVS("svs"); diff --git a/src/main/java/com/stripe/param/terminal/ReaderCheckGiftCardBalanceParams.java b/src/main/java/com/stripe/param/terminal/ReaderCheckGiftCardBalanceParams.java index 1cf743df2877..80cf4c7eb117 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCheckGiftCardBalanceParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCheckGiftCardBalanceParams.java @@ -127,12 +127,6 @@ public Builder setOnBehalfOf(String onBehalfOf) { } public enum Brand implements ApiRequestParams.EnumParam { - @SerializedName("fiserv_valuelink") - FISERV_VALUELINK("fiserv_valuelink"), - - @SerializedName("givex") - GIVEX("givex"), - @SerializedName("svs") SVS("svs"); diff --git a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java index 54356a77b74e..e87968dc95cd 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderCollectPaymentMethodParams.java @@ -377,12 +377,6 @@ public enum AllowRedisplay implements ApiRequestParams.EnumParam { } public enum GiftCardBrand implements ApiRequestParams.EnumParam { - @SerializedName("fiserv_valuelink") - FISERV_VALUELINK("fiserv_valuelink"), - - @SerializedName("givex") - GIVEX("givex"), - @SerializedName("svs") SVS("svs"); diff --git a/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java b/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java index e1ff2e6accd4..540077b14e56 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderPresentPaymentMethodParams.java @@ -38,6 +38,10 @@ public class ReaderPresentPaymentMethodParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Simulated data for the gift_card payment method. */ + @SerializedName("gift_card") + GiftCard giftCard; + /** Simulated data for the interac_present payment method. */ @SerializedName("interac_present") InteracPresent interacPresent; @@ -52,6 +56,7 @@ private ReaderPresentPaymentMethodParams( CardPresent cardPresent, List expand, Map extraParams, + GiftCard giftCard, InteracPresent interacPresent, Type type) { this.amountTip = amountTip; @@ -59,6 +64,7 @@ private ReaderPresentPaymentMethodParams( this.cardPresent = cardPresent; this.expand = expand; this.extraParams = extraParams; + this.giftCard = giftCard; this.interacPresent = interacPresent; this.type = type; } @@ -78,6 +84,8 @@ public static class Builder { private Map extraParams; + private GiftCard giftCard; + private InteracPresent interacPresent; private Type type; @@ -90,6 +98,7 @@ public ReaderPresentPaymentMethodParams build() { this.cardPresent, this.expand, this.extraParams, + this.giftCard, this.interacPresent, this.type); } @@ -164,6 +173,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Simulated data for the gift_card payment method. */ + public Builder setGiftCard(ReaderPresentPaymentMethodParams.GiftCard giftCard) { + this.giftCard = giftCard; + return this; + } + /** Simulated data for the interac_present payment method. */ public Builder setInteracPresent( ReaderPresentPaymentMethodParams.InteracPresent interacPresent) { @@ -363,6 +378,102 @@ public Builder setNumber(String number) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class GiftCard { + /** Required. The brand of the gift card. */ + @SerializedName("brand") + Brand brand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Simulated track 2 data for the gift card payment method. */ + @SerializedName("track_2") + String track2; + + private GiftCard(Brand brand, Map extraParams, String track2) { + this.brand = brand; + this.extraParams = extraParams; + this.track2 = track2; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Brand brand; + + private Map extraParams; + + private String track2; + + /** Finalize and obtain parameter instance from this builder. */ + public ReaderPresentPaymentMethodParams.GiftCard build() { + return new ReaderPresentPaymentMethodParams.GiftCard( + this.brand, this.extraParams, this.track2); + } + + /** Required. The brand of the gift card. */ + public Builder setBrand(ReaderPresentPaymentMethodParams.GiftCard.Brand brand) { + this.brand = brand; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ReaderPresentPaymentMethodParams.GiftCard#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ReaderPresentPaymentMethodParams.GiftCard#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. Simulated track 2 data for the gift card payment method. */ + public Builder setTrack2(String track2) { + this.track2 = track2; + return this; + } + } + + public enum Brand implements ApiRequestParams.EnumParam { + @SerializedName("svs") + SVS("svs"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Brand(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class InteracPresent { @@ -440,6 +551,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("card_present") CARD_PRESENT("card_present"), + @SerializedName("gift_card") + GIFT_CARD("gift_card"), + @SerializedName("interac_present") INTERAC_PRESENT("interac_present"); diff --git a/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java b/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java index db8d42eb2ebc..c93ca0d390f7 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderProcessPaymentIntentParams.java @@ -400,12 +400,6 @@ public enum AllowRedisplay implements ApiRequestParams.EnumParam { } public enum GiftCardBrand implements ApiRequestParams.EnumParam { - @SerializedName("fiserv_valuelink") - FISERV_VALUELINK("fiserv_valuelink"), - - @SerializedName("givex") - GIVEX("givex"), - @SerializedName("svs") SVS("svs"); diff --git a/src/main/java/com/stripe/param/terminal/ReaderReloadGiftCardParams.java b/src/main/java/com/stripe/param/terminal/ReaderReloadGiftCardParams.java index 0581e04e9850..be0426354ff9 100644 --- a/src/main/java/com/stripe/param/terminal/ReaderReloadGiftCardParams.java +++ b/src/main/java/com/stripe/param/terminal/ReaderReloadGiftCardParams.java @@ -172,12 +172,6 @@ public Builder setOnBehalfOf(String onBehalfOf) { } public enum Brand implements ApiRequestParams.EnumParam { - @SerializedName("fiserv_valuelink") - FISERV_VALUELINK("fiserv_valuelink"), - - @SerializedName("givex") - GIVEX("givex"), - @SerializedName("svs") SVS("svs"); diff --git a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java index bcc01dae8ac7..ff0acf8da6e6 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -6710,6 +6710,10 @@ public static class Merchant { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Settings for gross settlement. */ + @SerializedName("gross_settlement") + GrossSettlement grossSettlement; + /** Settings specific to Konbini payments on the account. */ @SerializedName("konbini_payments") KonbiniPayments konbiniPayments; @@ -6743,6 +6747,7 @@ private Merchant( Capabilities capabilities, CardPayments cardPayments, Map extraParams, + GrossSettlement grossSettlement, KonbiniPayments konbiniPayments, String mcc, ScriptStatementDescriptor scriptStatementDescriptor, @@ -6754,6 +6759,7 @@ private Merchant( this.capabilities = capabilities; this.cardPayments = cardPayments; this.extraParams = extraParams; + this.grossSettlement = grossSettlement; this.konbiniPayments = konbiniPayments; this.mcc = mcc; this.scriptStatementDescriptor = scriptStatementDescriptor; @@ -6777,6 +6783,8 @@ public static class Builder { private Map extraParams; + private GrossSettlement grossSettlement; + private KonbiniPayments konbiniPayments; private String mcc; @@ -6797,6 +6805,7 @@ public AccountCreateParams.Configuration.Merchant build() { this.capabilities, this.cardPayments, this.extraParams, + this.grossSettlement, this.konbiniPayments, this.mcc, this.scriptStatementDescriptor, @@ -6863,6 +6872,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Settings for gross settlement. */ + public Builder setGrossSettlement( + AccountCreateParams.Configuration.Merchant.GrossSettlement grossSettlement) { + this.grossSettlement = grossSettlement; + return this; + } + /** Settings specific to Konbini payments on the account. */ public Builder setKonbiniPayments( AccountCreateParams.Configuration.Merchant.KonbiniPayments konbiniPayments) { @@ -19587,6 +19603,112 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class GrossSettlement { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 payment method to use for gross settlement payouts. */ + @SerializedName("payment_method") + String paymentMethod; + + /** Whether to collect a payment method for gross settlement. */ + @SerializedName("payment_method_collection") + PaymentMethodCollection paymentMethodCollection; + + private GrossSettlement( + Map extraParams, + String paymentMethod, + PaymentMethodCollection paymentMethodCollection) { + this.extraParams = extraParams; + this.paymentMethod = paymentMethod; + this.paymentMethodCollection = paymentMethodCollection; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String paymentMethod; + + private PaymentMethodCollection paymentMethodCollection; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Merchant.GrossSettlement build() { + return new AccountCreateParams.Configuration.Merchant.GrossSettlement( + this.extraParams, this.paymentMethod, this.paymentMethodCollection); + } + + /** + * Add a key/value pair to `extraParams` map. A map 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.GrossSettlement#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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.GrossSettlement#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 payment method to use for gross settlement payouts. */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** Whether to collect a payment method for gross settlement. */ + public Builder setPaymentMethodCollection( + AccountCreateParams.Configuration.Merchant.GrossSettlement.PaymentMethodCollection + paymentMethodCollection) { + this.paymentMethodCollection = paymentMethodCollection; + return this; + } + } + + public enum PaymentMethodCollection implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodCollection(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class KonbiniPayments { @@ -45023,6 +45145,10 @@ public Builder setUserAgent(String userAgent) { @Getter @EqualsAndHashCode(callSuper = false) public static class BusinessDetails { + /** Additional addresses associated with the business. */ + @SerializedName("additional_addresses") + List additionalAddresses; + /** The business registration address of the business entity. */ @SerializedName("address") Address address; @@ -45091,6 +45217,7 @@ public static class BusinessDetails { Structure structure; private BusinessDetails( + List additionalAddresses, Address address, AnnualRevenue annualRevenue, String complianceScreeningDescription, @@ -45105,6 +45232,7 @@ private BusinessDetails( ScriptAddresses scriptAddresses, ScriptNames scriptNames, Structure structure) { + this.additionalAddresses = additionalAddresses; this.address = address; this.annualRevenue = annualRevenue; this.complianceScreeningDescription = complianceScreeningDescription; @@ -45126,6 +45254,9 @@ public static Builder builder() { } public static class Builder { + private List + additionalAddresses; + private Address address; private AnnualRevenue annualRevenue; @@ -45157,6 +45288,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Identity.BusinessDetails build() { return new AccountCreateParams.Identity.BusinessDetails( + this.additionalAddresses, this.address, this.annualRevenue, this.complianceScreeningDescription, @@ -45173,6 +45305,36 @@ public AccountCreateParams.Identity.BusinessDetails build() { this.structure); } + /** + * 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.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAdditionalAddress( + AccountCreateParams.Identity.BusinessDetails.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.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + /** The business registration address of the business entity. */ public Builder setAddress(AccountCreateParams.Identity.BusinessDetails.Address address) { this.address = address; @@ -45315,6 +45477,211 @@ public Builder setStructure( } } + @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 AccountCreateParams.Identity.BusinessDetails.AdditionalAddress build() { + return new AccountCreateParams.Identity.BusinessDetails.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 + * AccountCreateParams.Identity.BusinessDetails.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.BusinessDetails.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.BusinessDetails.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("administrative") + ADMINISTRATIVE("administrative"), + + @SerializedName("principal_place_of_business") + PRINCIPAL_PLACE_OF_BUSINESS("principal_place_of_business"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Address { diff --git a/src/main/java/com/stripe/param/v2/core/AccountEvaluationCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountEvaluationCreateParams.java index 60026c95e24d..dcacb93ed21e 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountEvaluationCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountEvaluationCreateParams.java @@ -545,7 +545,13 @@ public Builder setRegisteredName(String registeredName) { public enum Signal implements ApiRequestParams.EnumParam { @SerializedName("fraudulent_website") - FRAUDULENT_WEBSITE("fraudulent_website"); + FRAUDULENT_WEBSITE("fraudulent_website"), + + @SerializedName("user_account_sharing") + USER_ACCOUNT_SHARING("user_account_sharing"), + + @SerializedName("user_multi_accounting") + USER_MULTI_ACCOUNTING("user_multi_accounting"); @Getter(onMethod_ = {@Override}) private final String 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 index b440dcb18ea3..74e27f9ca239 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java @@ -3177,6 +3177,10 @@ public Builder setShownAndAccepted(Boolean shownAndAccepted) { @Getter @EqualsAndHashCode(callSuper = false) public static class BusinessDetails { + /** Additional addresses associated with the business. */ + @SerializedName("additional_addresses") + List additionalAddresses; + /** The business registration address of the business entity. */ @SerializedName("address") Address address; @@ -3245,6 +3249,8 @@ public static class BusinessDetails { Structure structure; private BusinessDetails( + List + additionalAddresses, Address address, AnnualRevenue annualRevenue, String complianceScreeningDescription, @@ -3259,6 +3265,7 @@ private BusinessDetails( ScriptAddresses scriptAddresses, ScriptNames scriptNames, Structure structure) { + this.additionalAddresses = additionalAddresses; this.address = address; this.annualRevenue = annualRevenue; this.complianceScreeningDescription = complianceScreeningDescription; @@ -3280,6 +3287,9 @@ public static Builder builder() { } public static class Builder { + private List + additionalAddresses; + private Address address; private AnnualRevenue annualRevenue; @@ -3311,6 +3321,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountTokenCreateParams.Identity.BusinessDetails build() { return new AccountTokenCreateParams.Identity.BusinessDetails( + this.additionalAddresses, this.address, this.annualRevenue, this.complianceScreeningDescription, @@ -3327,6 +3338,36 @@ public AccountTokenCreateParams.Identity.BusinessDetails build() { this.structure); } + /** + * 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.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAdditionalAddress( + AccountTokenCreateParams.Identity.BusinessDetails.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.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + /** The business registration address of the business entity. */ public Builder setAddress( AccountTokenCreateParams.Identity.BusinessDetails.Address address) { @@ -3471,6 +3512,211 @@ public Builder setStructure( } } + @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.BusinessDetails.AdditionalAddress build() { + return new AccountTokenCreateParams.Identity.BusinessDetails.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.BusinessDetails.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.BusinessDetails.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.BusinessDetails.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("administrative") + ADMINISTRATIVE("administrative"), + + @SerializedName("principal_place_of_business") + PRINCIPAL_PLACE_OF_BUSINESS("principal_place_of_business"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Address { diff --git a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java index c96a1a9381f5..5091cd4da594 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -6977,6 +6977,10 @@ public static class Merchant { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Settings for gross settlement. */ + @SerializedName("gross_settlement") + GrossSettlement grossSettlement; + /** Settings specific to Konbini payments on the account. */ @SerializedName("konbini_payments") KonbiniPayments konbiniPayments; @@ -7014,6 +7018,7 @@ private Merchant( Capabilities capabilities, CardPayments cardPayments, Map extraParams, + GrossSettlement grossSettlement, KonbiniPayments konbiniPayments, Object mcc, ScriptStatementDescriptor scriptStatementDescriptor, @@ -7026,6 +7031,7 @@ private Merchant( this.capabilities = capabilities; this.cardPayments = cardPayments; this.extraParams = extraParams; + this.grossSettlement = grossSettlement; this.konbiniPayments = konbiniPayments; this.mcc = mcc; this.scriptStatementDescriptor = scriptStatementDescriptor; @@ -7051,6 +7057,8 @@ public static class Builder { private Map extraParams; + private GrossSettlement grossSettlement; + private KonbiniPayments konbiniPayments; private Object mcc; @@ -7072,6 +7080,7 @@ public AccountUpdateParams.Configuration.Merchant build() { this.capabilities, this.cardPayments, this.extraParams, + this.grossSettlement, this.konbiniPayments, this.mcc, this.scriptStatementDescriptor, @@ -7147,6 +7156,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Settings for gross settlement. */ + public Builder setGrossSettlement( + AccountUpdateParams.Configuration.Merchant.GrossSettlement grossSettlement) { + this.grossSettlement = grossSettlement; + return this; + } + /** Settings specific to Konbini payments on the account. */ public Builder setKonbiniPayments( AccountUpdateParams.Configuration.Merchant.KonbiniPayments konbiniPayments) { @@ -19920,6 +19936,118 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class GrossSettlement { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 payment method to use for gross settlement payouts. */ + @SerializedName("payment_method") + Object paymentMethod; + + /** Whether to collect a payment method for gross settlement. */ + @SerializedName("payment_method_collection") + PaymentMethodCollection paymentMethodCollection; + + private GrossSettlement( + Map extraParams, + Object paymentMethod, + PaymentMethodCollection paymentMethodCollection) { + this.extraParams = extraParams; + this.paymentMethod = paymentMethod; + this.paymentMethodCollection = paymentMethodCollection; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object paymentMethod; + + private PaymentMethodCollection paymentMethodCollection; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Merchant.GrossSettlement build() { + return new AccountUpdateParams.Configuration.Merchant.GrossSettlement( + this.extraParams, this.paymentMethod, this.paymentMethodCollection); + } + + /** + * Add a key/value pair to `extraParams` map. A map 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.GrossSettlement#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map 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.GrossSettlement#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 payment method to use for gross settlement payouts. */ + public Builder setPaymentMethod(String paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** The ID of the payment method to use for gross settlement payouts. */ + public Builder setPaymentMethod(EmptyParam paymentMethod) { + this.paymentMethod = paymentMethod; + return this; + } + + /** Whether to collect a payment method for gross settlement. */ + public Builder setPaymentMethodCollection( + AccountUpdateParams.Configuration.Merchant.GrossSettlement.PaymentMethodCollection + paymentMethodCollection) { + this.paymentMethodCollection = paymentMethodCollection; + return this; + } + } + + public enum PaymentMethodCollection implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentMethodCollection(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class KonbiniPayments { @@ -46521,6 +46649,10 @@ public Builder setUserAgent(EmptyParam userAgent) { @Getter @EqualsAndHashCode(callSuper = false) public static class BusinessDetails { + /** Additional addresses associated with the business. */ + @SerializedName("additional_addresses") + List additionalAddresses; + /** The business registration address of the business entity. */ @SerializedName("address") Address address; @@ -46589,6 +46721,7 @@ public static class BusinessDetails { Structure structure; private BusinessDetails( + List additionalAddresses, Address address, AnnualRevenue annualRevenue, Object complianceScreeningDescription, @@ -46603,6 +46736,7 @@ private BusinessDetails( ScriptAddresses scriptAddresses, ScriptNames scriptNames, Structure structure) { + this.additionalAddresses = additionalAddresses; this.address = address; this.annualRevenue = annualRevenue; this.complianceScreeningDescription = complianceScreeningDescription; @@ -46624,6 +46758,9 @@ public static Builder builder() { } public static class Builder { + private List + additionalAddresses; + private Address address; private AnnualRevenue annualRevenue; @@ -46655,6 +46792,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Identity.BusinessDetails build() { return new AccountUpdateParams.Identity.BusinessDetails( + this.additionalAddresses, this.address, this.annualRevenue, this.complianceScreeningDescription, @@ -46671,6 +46809,36 @@ public AccountUpdateParams.Identity.BusinessDetails build() { this.structure); } + /** + * 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.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAdditionalAddress( + AccountUpdateParams.Identity.BusinessDetails.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.BusinessDetails#additionalAddresses} for the + * field documentation. + */ + public Builder addAllAdditionalAddress( + List elements) { + if (this.additionalAddresses == null) { + this.additionalAddresses = new ArrayList<>(); + } + this.additionalAddresses.addAll(elements); + return this; + } + /** The business registration address of the business entity. */ public Builder setAddress(AccountUpdateParams.Identity.BusinessDetails.Address address) { this.address = address; @@ -46835,6 +47003,256 @@ public Builder setStructure( } } + @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.BusinessDetails.AdditionalAddress build() { + return new AccountUpdateParams.Identity.BusinessDetails.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.BusinessDetails.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.BusinessDetails.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.BusinessDetails.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("administrative") + ADMINISTRATIVE("administrative"), + + @SerializedName("principal_place_of_business") + PRINCIPAL_PLACE_OF_BUSINESS("principal_place_of_business"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Purpose(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Address { diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java index 5a5e2d6889a4..1cc891856fbc 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java @@ -53,10 +53,6 @@ public class OutboundPaymentCreateParams extends ApiRequestParams { @SerializedName("outbound_payment_quote") String outboundPaymentQuote; - /** The PayoutIntent ID that triggered this OutboundPayment. */ - @SerializedName("payout_intent") - String payoutIntent; - /** The purpose of the OutboundPayment. */ @SerializedName("purpose") Purpose purpose; @@ -92,7 +88,6 @@ private OutboundPaymentCreateParams( From from, Map metadata, String outboundPaymentQuote, - String payoutIntent, Purpose purpose, RecipientNotification recipientNotification, String recipientVerification, @@ -105,7 +100,6 @@ private OutboundPaymentCreateParams( this.from = from; this.metadata = metadata; this.outboundPaymentQuote = outboundPaymentQuote; - this.payoutIntent = payoutIntent; this.purpose = purpose; this.recipientNotification = recipientNotification; this.recipientVerification = recipientVerification; @@ -132,8 +126,6 @@ public static class Builder { private String outboundPaymentQuote; - private String payoutIntent; - private Purpose purpose; private RecipientNotification recipientNotification; @@ -154,7 +146,6 @@ public OutboundPaymentCreateParams build() { this.from, this.metadata, this.outboundPaymentQuote, - this.payoutIntent, this.purpose, this.recipientNotification, this.recipientVerification, @@ -253,12 +244,6 @@ public Builder setOutboundPaymentQuote(String outboundPaymentQuote) { return this; } - /** The PayoutIntent ID that triggered this OutboundPayment. */ - public Builder setPayoutIntent(String payoutIntent) { - this.payoutIntent = payoutIntent; - return this; - } - /** The purpose of the OutboundPayment. */ public Builder setPurpose(OutboundPaymentCreateParams.Purpose purpose) { this.purpose = purpose; diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedDebitListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedDebitListParams.java index e649837e7891..c671b6cc918a 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedDebitListParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedDebitListParams.java @@ -24,9 +24,15 @@ public class ReceivedDebitListParams extends ApiRequestParams { @SerializedName("limit") Long limit; - private ReceivedDebitListParams(Map extraParams, Long limit) { + /** Filter by the received debit mandate ID. */ + @SerializedName("received_debit_mandate") + String receivedDebitMandate; + + private ReceivedDebitListParams( + Map extraParams, Long limit, String receivedDebitMandate) { this.extraParams = extraParams; this.limit = limit; + this.receivedDebitMandate = receivedDebitMandate; } public static Builder builder() { @@ -38,9 +44,11 @@ public static class Builder { private Long limit; + private String receivedDebitMandate; + /** Finalize and obtain parameter instance from this builder. */ public ReceivedDebitListParams build() { - return new ReceivedDebitListParams(this.extraParams, this.limit); + return new ReceivedDebitListParams(this.extraParams, this.limit, this.receivedDebitMandate); } /** @@ -74,5 +82,11 @@ public Builder setLimit(Long limit) { this.limit = limit; return this; } + + /** Filter by the received debit mandate ID. */ + public Builder setReceivedDebitMandate(String receivedDebitMandate) { + this.receivedDebitMandate = receivedDebitMandate; + return this; + } } } diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedDebitMandateListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedDebitMandateListParams.java new file mode 100644 index 000000000000..41fac855091d --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/ReceivedDebitMandateListParams.java @@ -0,0 +1,178 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.moneymanagement; + +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 ReceivedDebitMandateListParams 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 ID of the FinancialAccount to filter by. */ + @SerializedName("financial_account") + String financialAccount; + + /** The page limit. */ + @SerializedName("limit") + Long limit; + + /** Filter by mandate status. */ + @SerializedName("statuses") + List statuses; + + /** The type of ReceivedDebitMandate to filter by. */ + @SerializedName("type") + Type type; + + private ReceivedDebitMandateListParams( + Map extraParams, + String financialAccount, + Long limit, + List statuses, + Type type) { + this.extraParams = extraParams; + this.financialAccount = financialAccount; + this.limit = limit; + this.statuses = statuses; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String financialAccount; + + private Long limit; + + private List statuses; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public ReceivedDebitMandateListParams build() { + return new ReceivedDebitMandateListParams( + this.extraParams, this.financialAccount, this.limit, this.statuses, 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 + * ReceivedDebitMandateListParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ReceivedDebitMandateListParams#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 FinancialAccount to filter by. */ + public Builder setFinancialAccount(String financialAccount) { + this.financialAccount = financialAccount; + return this; + } + + /** The page limit. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + + /** + * Add an element to `statuses` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * ReceivedDebitMandateListParams#statuses} for the field documentation. + */ + public Builder addStatus(ReceivedDebitMandateListParams.Status element) { + if (this.statuses == null) { + this.statuses = new ArrayList<>(); + } + this.statuses.add(element); + return this; + } + + /** + * Add all elements to `statuses` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * ReceivedDebitMandateListParams#statuses} for the field documentation. + */ + public Builder addAllStatus(List elements) { + if (this.statuses == null) { + this.statuses = new ArrayList<>(); + } + this.statuses.addAll(elements); + return this; + } + + /** The type of ReceivedDebitMandate to filter by. */ + public Builder setType(ReceivedDebitMandateListParams.Type type) { + this.type = type; + return this; + } + } + + public enum Status implements ApiRequestParams.EnumParam { + @SerializedName("active") + ACTIVE("active"), + + @SerializedName("canceled") + CANCELED("canceled"), + + @SerializedName("expired") + EXPIRED("expired"), + + @SerializedName("pending_cancellation") + PENDING_CANCELLATION("pending_cancellation"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Status(String value) { + this.value = value; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("bank_transfer") + BANK_TRANSFER("bank_transfer"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/testhelpers/FinancialAddressDebitParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/testhelpers/FinancialAddressDebitParams.java index 102cb0033ecf..31b9738683fd 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/testhelpers/FinancialAddressDebitParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/testhelpers/FinancialAddressDebitParams.java @@ -119,7 +119,10 @@ public Builder setStatementDescriptor(String statementDescriptor) { public enum Network implements ApiRequestParams.EnumParam { @SerializedName("ach") - ACH("ach"); + ACH("ach"), + + @SerializedName("bacs") + BACS("bacs"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java index 4017ba5941d1..4005c6da1c24 100644 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java @@ -114,6 +114,10 @@ public class OffSessionPaymentCreateParams extends ApiRequestParams { @SerializedName("statement_descriptor_suffix") String statementDescriptorSuffix; + /** Provides a way to schedule deferred payments for cards and debits, in YYYY-MM-DD format. */ + @SerializedName("target_date") + String targetDate; + /** Test clock that can be used to advance the retry attempts in a sandbox. */ @SerializedName("test_clock") String testClock; @@ -145,6 +149,7 @@ private OffSessionPaymentCreateParams( RetryDetails retryDetails, String statementDescriptor, String statementDescriptorSuffix, + String targetDate, String testClock, TransferData transferData) { this.amount = amount; @@ -165,6 +170,7 @@ private OffSessionPaymentCreateParams( this.retryDetails = retryDetails; this.statementDescriptor = statementDescriptor; this.statementDescriptorSuffix = statementDescriptorSuffix; + this.targetDate = targetDate; this.testClock = testClock; this.transferData = transferData; } @@ -210,6 +216,8 @@ public static class Builder { private String statementDescriptorSuffix; + private String targetDate; + private String testClock; private TransferData transferData; @@ -235,6 +243,7 @@ public OffSessionPaymentCreateParams build() { this.retryDetails, this.statementDescriptor, this.statementDescriptorSuffix, + this.targetDate, this.testClock, this.transferData); } @@ -407,6 +416,12 @@ public Builder setStatementDescriptorSuffix(String statementDescriptorSuffix) { return this; } + /** Provides a way to schedule deferred payments for cards and debits, in YYYY-MM-DD format. */ + public Builder setTargetDate(String targetDate) { + this.targetDate = targetDate; + return this; + } + /** Test clock that can be used to advance the retry attempts in a sandbox. */ public Builder setTestClock(String testClock) { this.testClock = testClock; diff --git a/src/main/java/com/stripe/param/v2/risk/InquiryListParams.java b/src/main/java/com/stripe/param/v2/risk/InquiryListParams.java new file mode 100644 index 000000000000..057dd992ca7f --- /dev/null +++ b/src/main/java/com/stripe/param/v2/risk/InquiryListParams.java @@ -0,0 +1,91 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.risk; + +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 InquiryListParams extends ApiRequestParams { + /** Required. The account to list inquiries 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; + + /** Maximum number of results to return. Default: 10. Valid range: 1-100. */ + @SerializedName("limit") + Long limit; + + private InquiryListParams(String account, Map extraParams, Long limit) { + this.account = account; + this.extraParams = extraParams; + this.limit = limit; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String account; + + private Map extraParams; + + private Long limit; + + /** Finalize and obtain parameter instance from this builder. */ + public InquiryListParams build() { + return new InquiryListParams(this.account, this.extraParams, this.limit); + } + + /** Required. The account to list inquiries 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 + * InquiryListParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InquiryListParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Maximum number of results to return. Default: 10. Valid range: 1-100. */ + public Builder setLimit(Long limit) { + this.limit = limit; + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/risk/InquiryUpdateParams.java b/src/main/java/com/stripe/param/v2/risk/InquiryUpdateParams.java new file mode 100644 index 000000000000..273c2370da8f --- /dev/null +++ b/src/main/java/com/stripe/param/v2/risk/InquiryUpdateParams.java @@ -0,0 +1,348 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.risk; + +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 InquiryUpdateParams extends ApiRequestParams { + /** Provide this for appeal inquiries. */ + @SerializedName("appeal") + Appeal appeal; + + /** Provide this for authorization_documents inquiries. */ + @SerializedName("authorization_documents") + AuthorizationDocuments authorizationDocuments; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Provide this for product_removal inquiries. */ + @SerializedName("product_removal") + ProductRemoval productRemoval; + + private InquiryUpdateParams( + Appeal appeal, + AuthorizationDocuments authorizationDocuments, + Map extraParams, + ProductRemoval productRemoval) { + this.appeal = appeal; + this.authorizationDocuments = authorizationDocuments; + this.extraParams = extraParams; + this.productRemoval = productRemoval; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Appeal appeal; + + private AuthorizationDocuments authorizationDocuments; + + private Map extraParams; + + private ProductRemoval productRemoval; + + /** Finalize and obtain parameter instance from this builder. */ + public InquiryUpdateParams build() { + return new InquiryUpdateParams( + this.appeal, this.authorizationDocuments, this.extraParams, this.productRemoval); + } + + /** Provide this for appeal inquiries. */ + public Builder setAppeal(InquiryUpdateParams.Appeal appeal) { + this.appeal = appeal; + return this; + } + + /** Provide this for authorization_documents inquiries. */ + public Builder setAuthorizationDocuments( + InquiryUpdateParams.AuthorizationDocuments authorizationDocuments) { + this.authorizationDocuments = authorizationDocuments; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InquiryUpdateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InquiryUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Provide this for product_removal inquiries. */ + public Builder setProductRemoval(InquiryUpdateParams.ProductRemoval productRemoval) { + this.productRemoval = productRemoval; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Appeal { + /** Required. A text explanation for the appeal. */ + @SerializedName("explanation") + Object explanation; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Appeal(Object explanation, Map extraParams) { + this.explanation = explanation; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object explanation; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public InquiryUpdateParams.Appeal build() { + return new InquiryUpdateParams.Appeal(this.explanation, this.extraParams); + } + + /** Required. A text explanation for the appeal. */ + public Builder setExplanation(String explanation) { + this.explanation = explanation; + return this; + } + + /** Required. A text explanation for the appeal. */ + public Builder setExplanation(EmptyParam explanation) { + this.explanation = explanation; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InquiryUpdateParams.Appeal#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InquiryUpdateParams.Appeal#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 AuthorizationDocuments { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. IDs of uploaded files to attach as authorization documents. */ + @SerializedName("files") + List files; + + private AuthorizationDocuments(Map extraParams, List files) { + this.extraParams = extraParams; + this.files = files; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private List files; + + /** Finalize and obtain parameter instance from this builder. */ + public InquiryUpdateParams.AuthorizationDocuments build() { + return new InquiryUpdateParams.AuthorizationDocuments(this.extraParams, this.files); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InquiryUpdateParams.AuthorizationDocuments#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InquiryUpdateParams.AuthorizationDocuments#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 + * InquiryUpdateParams.AuthorizationDocuments#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 + * InquiryUpdateParams.AuthorizationDocuments#files} for the field documentation. + */ + public Builder addAllFile(List elements) { + if (this.files == null) { + this.files = new ArrayList<>(); + } + this.files.addAll(elements); + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ProductRemoval { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level 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 timestamp when the prohibited items were removed. */ + @SerializedName("items_removed_at") + Instant itemsRemovedAt; + + private ProductRemoval(Map extraParams, Instant itemsRemovedAt) { + this.extraParams = extraParams; + this.itemsRemovedAt = itemsRemovedAt; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Instant itemsRemovedAt; + + /** Finalize and obtain parameter instance from this builder. */ + public InquiryUpdateParams.ProductRemoval build() { + return new InquiryUpdateParams.ProductRemoval(this.extraParams, this.itemsRemovedAt); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * InquiryUpdateParams.ProductRemoval#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link InquiryUpdateParams.ProductRemoval#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 timestamp when the prohibited items were removed. */ + public Builder setItemsRemovedAt(Instant itemsRemovedAt) { + this.itemsRemovedAt = itemsRemovedAt; + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/signals/AccountActivityCreateParams.java b/src/main/java/com/stripe/param/v2/signals/AccountActivityCreateParams.java new file mode 100644 index 000000000000..1005b762e616 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/signals/AccountActivityCreateParams.java @@ -0,0 +1,1425 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.signals; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import java.time.Instant; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class AccountActivityCreateParams extends ApiRequestParams { + /** The account, customer, or inline account data associated with the activity. */ + @SerializedName("account_details") + AccountDetails accountDetails; + + /** The account evaluation this activity is associated with, when applicable. */ + @SerializedName("account_evaluation") + String accountEvaluation; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 for the login attempt. Provide only when type is login_attempt. */ + @SerializedName("login_attempt") + LoginAttempt loginAttempt; + + /** Details for the login decision. Provide only when type is login_decision. */ + @SerializedName("login_decision") + LoginDecision loginDecision; + + /** Timestamp at which the activity occurred. Defaults to the created time if not provided. */ + @SerializedName("occurred_at") + Instant occurredAt; + + /** Details for the registration attempt. Provide only when type is registration_attempt. */ + @SerializedName("registration_attempt") + RegistrationAttempt registrationAttempt; + + /** Details for the registration decision. Provide only when type is registration_decision. */ + @SerializedName("registration_decision") + RegistrationDecision registrationDecision; + + /** Required. The type of activity. */ + @SerializedName("type") + Type type; + + private AccountActivityCreateParams( + AccountDetails accountDetails, + String accountEvaluation, + Map extraParams, + LoginAttempt loginAttempt, + LoginDecision loginDecision, + Instant occurredAt, + RegistrationAttempt registrationAttempt, + RegistrationDecision registrationDecision, + Type type) { + this.accountDetails = accountDetails; + this.accountEvaluation = accountEvaluation; + this.extraParams = extraParams; + this.loginAttempt = loginAttempt; + this.loginDecision = loginDecision; + this.occurredAt = occurredAt; + this.registrationAttempt = registrationAttempt; + this.registrationDecision = registrationDecision; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AccountDetails accountDetails; + + private String accountEvaluation; + + private Map extraParams; + + private LoginAttempt loginAttempt; + + private LoginDecision loginDecision; + + private Instant occurredAt; + + private RegistrationAttempt registrationAttempt; + + private RegistrationDecision registrationDecision; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams build() { + return new AccountActivityCreateParams( + this.accountDetails, + this.accountEvaluation, + this.extraParams, + this.loginAttempt, + this.loginDecision, + this.occurredAt, + this.registrationAttempt, + this.registrationDecision, + this.type); + } + + /** The account, customer, or inline account data associated with the activity. */ + public Builder setAccountDetails(AccountActivityCreateParams.AccountDetails accountDetails) { + this.accountDetails = accountDetails; + return this; + } + + /** The account evaluation this activity is associated with, when applicable. */ + public Builder setAccountEvaluation(String accountEvaluation) { + this.accountEvaluation = accountEvaluation; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountActivityCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountActivityCreateParams#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 for the login attempt. Provide only when type is login_attempt. */ + public Builder setLoginAttempt(AccountActivityCreateParams.LoginAttempt loginAttempt) { + this.loginAttempt = loginAttempt; + return this; + } + + /** Details for the login decision. Provide only when type is login_decision. */ + public Builder setLoginDecision(AccountActivityCreateParams.LoginDecision loginDecision) { + this.loginDecision = loginDecision; + return this; + } + + /** Timestamp at which the activity occurred. Defaults to the created time if not provided. */ + public Builder setOccurredAt(Instant occurredAt) { + this.occurredAt = occurredAt; + return this; + } + + /** Details for the registration attempt. Provide only when type is registration_attempt. */ + public Builder setRegistrationAttempt( + AccountActivityCreateParams.RegistrationAttempt registrationAttempt) { + this.registrationAttempt = registrationAttempt; + return this; + } + + /** Details for the registration decision. Provide only when type is registration_decision. */ + public Builder setRegistrationDecision( + AccountActivityCreateParams.RegistrationDecision registrationDecision) { + this.registrationDecision = registrationDecision; + return this; + } + + /** Required. The type of activity. */ + public Builder setType(AccountActivityCreateParams.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AccountDetails { + /** The v2 account ID of the account. */ + @SerializedName("account") + String account; + + /** The v1 customer ID of the account, for users not yet migrated to v2/accounts. */ + @SerializedName("customer") + String customer; + + /** Inline account data to evaluate without creating a v2 account. */ + @SerializedName("data") + Data data; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 AccountDetails( + String account, String customer, Data data, Map extraParams) { + this.account = account; + this.customer = customer; + this.data = data; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String account; + + private String customer; + + private Data data; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.AccountDetails build() { + return new AccountActivityCreateParams.AccountDetails( + this.account, this.customer, this.data, this.extraParams); + } + + /** The v2 account ID of the account. */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** The v1 customer ID of the account, for users not yet migrated to v2/accounts. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** Inline account data to evaluate without creating a v2 account. */ + public Builder setData(AccountActivityCreateParams.AccountDetails.Data data) { + this.data = data; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountActivityCreateParams.AccountDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountActivityCreateParams.AccountDetails#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 Data { + /** Default account settings. */ + @SerializedName("defaults") + Defaults defaults; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Identity data. */ + @SerializedName("identity") + Identity identity; + + private Data(Defaults defaults, Map extraParams, Identity identity) { + this.defaults = defaults; + this.extraParams = extraParams; + this.identity = identity; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Defaults defaults; + + private Map extraParams; + + private Identity identity; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.AccountDetails.Data build() { + return new AccountActivityCreateParams.AccountDetails.Data( + this.defaults, this.extraParams, this.identity); + } + + /** Default account settings. */ + public Builder setDefaults( + AccountActivityCreateParams.AccountDetails.Data.Defaults defaults) { + this.defaults = defaults; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountActivityCreateParams.AccountDetails.Data#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountActivityCreateParams.AccountDetails.Data#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Identity data. */ + public Builder setIdentity( + AccountActivityCreateParams.AccountDetails.Data.Identity identity) { + this.identity = identity; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Defaults { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Account profile data. */ + @SerializedName("profile") + Profile profile; + + private Defaults(Map extraParams, Profile profile) { + this.extraParams = extraParams; + this.profile = profile; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Profile profile; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.AccountDetails.Data.Defaults build() { + return new AccountActivityCreateParams.AccountDetails.Data.Defaults( + this.extraParams, this.profile); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountActivityCreateParams.AccountDetails.Data.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 AccountActivityCreateParams.AccountDetails.Data.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; + } + + /** Required. Account profile data. */ + public Builder setProfile( + AccountActivityCreateParams.AccountDetails.Data.Defaults.Profile profile) { + this.profile = profile; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Profile { + /** Required. The business URL. */ + @SerializedName("business_url") + String businessUrl; + + /** Doing business as (DBA) name. */ + @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; + + /** Description of the account's product or service. */ + @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 AccountActivityCreateParams.AccountDetails.Data.Defaults.Profile build() { + return new AccountActivityCreateParams.AccountDetails.Data.Defaults.Profile( + this.businessUrl, + this.doingBusinessAs, + this.extraParams, + this.productDescription); + } + + /** Required. The business URL. */ + public Builder setBusinessUrl(String businessUrl) { + this.businessUrl = businessUrl; + return this; + } + + /** Doing business as (DBA) name. */ + 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 + * AccountActivityCreateParams.AccountDetails.Data.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 + * AccountActivityCreateParams.AccountDetails.Data.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; + } + + /** Description of the account's product or service. */ + public Builder setProductDescription(String productDescription) { + this.productDescription = productDescription; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Identity { + /** Required. Business details for identity data. */ + @SerializedName("business_details") + BusinessDetails businessDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Identity(BusinessDetails businessDetails, Map extraParams) { + this.businessDetails = businessDetails; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BusinessDetails businessDetails; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.AccountDetails.Data.Identity build() { + return new AccountActivityCreateParams.AccountDetails.Data.Identity( + this.businessDetails, this.extraParams); + } + + /** Required. Business details for identity data. */ + public Builder setBusinessDetails( + AccountActivityCreateParams.AccountDetails.Data.Identity.BusinessDetails + businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountActivityCreateParams.AccountDetails.Data.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 AccountActivityCreateParams.AccountDetails.Data.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; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusinessDetails { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 business name. */ + @SerializedName("registered_name") + String registeredName; + + private BusinessDetails(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 AccountActivityCreateParams.AccountDetails.Data.Identity.BusinessDetails + build() { + return new AccountActivityCreateParams.AccountDetails.Data.Identity.BusinessDetails( + 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 + * AccountActivityCreateParams.AccountDetails.Data.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 + * AccountActivityCreateParams.AccountDetails.Data.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; + } + + /** Registered business name. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LoginAttempt { + /** Required. Client details captured for the attempt. */ + @SerializedName("client_details") + ClientDetails clientDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 LoginAttempt(ClientDetails clientDetails, Map extraParams) { + this.clientDetails = clientDetails; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ClientDetails clientDetails; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.LoginAttempt build() { + return new AccountActivityCreateParams.LoginAttempt(this.clientDetails, this.extraParams); + } + + /** Required. Client details captured for the attempt. */ + public Builder setClientDetails( + AccountActivityCreateParams.LoginAttempt.ClientDetails clientDetails) { + this.clientDetails = clientDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountActivityCreateParams.LoginAttempt#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountActivityCreateParams.LoginAttempt#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 ClientDetails { + /** Raw client details for the activity, when a Radar session is not available. */ + @SerializedName("data") + Data data; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Radar session ID capturing client details for the activity. */ + @SerializedName("radar_session") + String radarSession; + + private ClientDetails(Data data, Map extraParams, String radarSession) { + this.data = data; + this.extraParams = extraParams; + this.radarSession = radarSession; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Data data; + + private Map extraParams; + + private String radarSession; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.LoginAttempt.ClientDetails build() { + return new AccountActivityCreateParams.LoginAttempt.ClientDetails( + this.data, this.extraParams, this.radarSession); + } + + /** Raw client details for the activity, when a Radar session is not available. */ + public Builder setData(AccountActivityCreateParams.LoginAttempt.ClientDetails.Data data) { + this.data = data; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountActivityCreateParams.LoginAttempt.ClientDetails#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountActivityCreateParams.LoginAttempt.ClientDetails#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 Radar session ID capturing client details for the activity. */ + public Builder setRadarSession(String radarSession) { + this.radarSession = radarSession; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Data { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 associated with the activity. */ + @SerializedName("ip") + String ip; + + /** The referrer associated with the activity. */ + @SerializedName("referrer") + String referrer; + + /** The user agent associated with the activity. */ + @SerializedName("user_agent") + String userAgent; + + private Data( + Map extraParams, String ip, String referrer, String userAgent) { + this.extraParams = extraParams; + this.ip = ip; + this.referrer = referrer; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String ip; + + private String referrer; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.LoginAttempt.ClientDetails.Data build() { + return new AccountActivityCreateParams.LoginAttempt.ClientDetails.Data( + this.extraParams, this.ip, this.referrer, this.userAgent); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountActivityCreateParams.LoginAttempt.ClientDetails.Data#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountActivityCreateParams.LoginAttempt.ClientDetails.Data#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 associated with the activity. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The referrer associated with the activity. */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** The user agent associated with the activity. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LoginDecision { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level 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 action the merchant took following the evaluation. */ + @SerializedName("status") + Status status; + + private LoginDecision(Map extraParams, Status status) { + this.extraParams = extraParams; + this.status = status; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Status status; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.LoginDecision build() { + return new AccountActivityCreateParams.LoginDecision(this.extraParams, this.status); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountActivityCreateParams.LoginDecision#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountActivityCreateParams.LoginDecision#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 action the merchant took following the evaluation. */ + public Builder setStatus(AccountActivityCreateParams.LoginDecision.Status status) { + this.status = status; + return this; + } + } + + public enum Status implements ApiRequestParams.EnumParam { + @SerializedName("allowed") + ALLOWED("allowed"), + + @SerializedName("blocked") + BLOCKED("blocked"), + + @SerializedName("restricted") + RESTRICTED("restricted"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Status(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationAttempt { + /** Required. Client details captured for the attempt. */ + @SerializedName("client_details") + ClientDetails clientDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 RegistrationAttempt(ClientDetails clientDetails, Map extraParams) { + this.clientDetails = clientDetails; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ClientDetails clientDetails; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.RegistrationAttempt build() { + return new AccountActivityCreateParams.RegistrationAttempt( + this.clientDetails, this.extraParams); + } + + /** Required. Client details captured for the attempt. */ + public Builder setClientDetails( + AccountActivityCreateParams.RegistrationAttempt.ClientDetails clientDetails) { + this.clientDetails = clientDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountActivityCreateParams.RegistrationAttempt#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountActivityCreateParams.RegistrationAttempt#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 ClientDetails { + /** Raw client details for the activity, when a Radar session is not available. */ + @SerializedName("data") + Data data; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Radar session ID capturing client details for the activity. */ + @SerializedName("radar_session") + String radarSession; + + private ClientDetails(Data data, Map extraParams, String radarSession) { + this.data = data; + this.extraParams = extraParams; + this.radarSession = radarSession; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Data data; + + private Map extraParams; + + private String radarSession; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.RegistrationAttempt.ClientDetails build() { + return new AccountActivityCreateParams.RegistrationAttempt.ClientDetails( + this.data, this.extraParams, this.radarSession); + } + + /** Raw client details for the activity, when a Radar session is not available. */ + public Builder setData( + AccountActivityCreateParams.RegistrationAttempt.ClientDetails.Data data) { + this.data = data; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountActivityCreateParams.RegistrationAttempt.ClientDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountActivityCreateParams.RegistrationAttempt.ClientDetails#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 Radar session ID capturing client details for the activity. */ + public Builder setRadarSession(String radarSession) { + this.radarSession = radarSession; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Data { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level 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 associated with the activity. */ + @SerializedName("ip") + String ip; + + /** The referrer associated with the activity. */ + @SerializedName("referrer") + String referrer; + + /** The user agent associated with the activity. */ + @SerializedName("user_agent") + String userAgent; + + private Data( + Map extraParams, String ip, String referrer, String userAgent) { + this.extraParams = extraParams; + this.ip = ip; + this.referrer = referrer; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String ip; + + private String referrer; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.RegistrationAttempt.ClientDetails.Data build() { + return new AccountActivityCreateParams.RegistrationAttempt.ClientDetails.Data( + this.extraParams, this.ip, this.referrer, this.userAgent); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountActivityCreateParams.RegistrationAttempt.ClientDetails.Data#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountActivityCreateParams.RegistrationAttempt.ClientDetails.Data#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 associated with the activity. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The referrer associated with the activity. */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** The user agent associated with the activity. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationDecision { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level 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 action the merchant took following the evaluation. */ + @SerializedName("status") + Status status; + + private RegistrationDecision(Map extraParams, Status status) { + this.extraParams = extraParams; + this.status = status; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Status status; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountActivityCreateParams.RegistrationDecision build() { + return new AccountActivityCreateParams.RegistrationDecision(this.extraParams, this.status); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountActivityCreateParams.RegistrationDecision#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountActivityCreateParams.RegistrationDecision#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 action the merchant took following the evaluation. */ + public Builder setStatus(AccountActivityCreateParams.RegistrationDecision.Status status) { + this.status = status; + return this; + } + } + + public enum Status implements ApiRequestParams.EnumParam { + @SerializedName("allowed") + ALLOWED("allowed"), + + @SerializedName("blocked") + BLOCKED("blocked"), + + @SerializedName("restricted") + RESTRICTED("restricted"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Status(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("login_attempt") + LOGIN_ATTEMPT("login_attempt"), + + @SerializedName("login_decision") + LOGIN_DECISION("login_decision"), + + @SerializedName("registration_attempt") + REGISTRATION_ATTEMPT("registration_attempt"), + + @SerializedName("registration_decision") + REGISTRATION_DECISION("registration_decision"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/signals/AccountEvaluationCreateParams.java b/src/main/java/com/stripe/param/v2/signals/AccountEvaluationCreateParams.java new file mode 100644 index 000000000000..e3384c4d41e5 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/signals/AccountEvaluationCreateParams.java @@ -0,0 +1,1467 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.signals; + +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 AccountEvaluationCreateParams extends ApiRequestParams { + /** Account activity to record alongside this evaluation. */ + @SerializedName("account_activity_details") + AccountActivityDetails accountActivityDetails; + + /** Required. The account, customer, or inline account data to evaluate. */ + @SerializedName("account_details") + AccountDetails accountDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. List of signals to evaluate. */ + @SerializedName("requested_signals") + List requestedSignals; + + private AccountEvaluationCreateParams( + AccountActivityDetails accountActivityDetails, + AccountDetails accountDetails, + Map extraParams, + List requestedSignals) { + this.accountActivityDetails = accountActivityDetails; + this.accountDetails = accountDetails; + this.extraParams = extraParams; + this.requestedSignals = requestedSignals; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AccountActivityDetails accountActivityDetails; + + private AccountDetails accountDetails; + + private Map extraParams; + + private List requestedSignals; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams build() { + return new AccountEvaluationCreateParams( + this.accountActivityDetails, + this.accountDetails, + this.extraParams, + this.requestedSignals); + } + + /** Account activity to record alongside this evaluation. */ + public Builder setAccountActivityDetails( + AccountEvaluationCreateParams.AccountActivityDetails accountActivityDetails) { + this.accountActivityDetails = accountActivityDetails; + return this; + } + + /** Required. The account, customer, or inline account data to evaluate. */ + public Builder setAccountDetails(AccountEvaluationCreateParams.AccountDetails accountDetails) { + this.accountDetails = accountDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountEvaluationCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountEvaluationCreateParams#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 `requestedSignals` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountEvaluationCreateParams#requestedSignals} for the field documentation. + */ + public Builder addRequestedSignal(AccountEvaluationCreateParams.RequestedSignal element) { + if (this.requestedSignals == null) { + this.requestedSignals = new ArrayList<>(); + } + this.requestedSignals.add(element); + return this; + } + + /** + * Add all elements to `requestedSignals` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * AccountEvaluationCreateParams#requestedSignals} for the field documentation. + */ + public Builder addAllRequestedSignal( + List elements) { + if (this.requestedSignals == null) { + this.requestedSignals = new ArrayList<>(); + } + this.requestedSignals.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AccountActivityDetails { + /** The ID of an existing account activity to associate with the evaluation. */ + @SerializedName("account_activity") + String accountActivity; + + /** Inline activity data used to create a new account activity for the evaluation. */ + @SerializedName("data") + Data data; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 AccountActivityDetails( + String accountActivity, Data data, Map extraParams) { + this.accountActivity = accountActivity; + this.data = data; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String accountActivity; + + private Data data; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountActivityDetails build() { + return new AccountEvaluationCreateParams.AccountActivityDetails( + this.accountActivity, this.data, this.extraParams); + } + + /** The ID of an existing account activity to associate with the evaluation. */ + public Builder setAccountActivity(String accountActivity) { + this.accountActivity = accountActivity; + return this; + } + + /** Inline activity data used to create a new account activity for the evaluation. */ + public Builder setData(AccountEvaluationCreateParams.AccountActivityDetails.Data data) { + this.data = data; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountEvaluationCreateParams.AccountActivityDetails#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 Data { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 for the login attempt. Provide only when type is login_attempt. */ + @SerializedName("login_attempt") + LoginAttempt loginAttempt; + + /** Timestamp at which the activity occurred. Defaults to the created time if not provided. */ + @SerializedName("occurred_at") + Instant occurredAt; + + /** Details for the registration attempt. Provide only when type is registration_attempt. */ + @SerializedName("registration_attempt") + RegistrationAttempt registrationAttempt; + + /** + * Required. The type of activity. Must be registration_attempt or + * login_attempt. + */ + @SerializedName("type") + Type type; + + private Data( + Map extraParams, + LoginAttempt loginAttempt, + Instant occurredAt, + RegistrationAttempt registrationAttempt, + Type type) { + this.extraParams = extraParams; + this.loginAttempt = loginAttempt; + this.occurredAt = occurredAt; + this.registrationAttempt = registrationAttempt; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private LoginAttempt loginAttempt; + + private Instant occurredAt; + + private RegistrationAttempt registrationAttempt; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountActivityDetails.Data build() { + return new AccountEvaluationCreateParams.AccountActivityDetails.Data( + this.extraParams, + this.loginAttempt, + this.occurredAt, + this.registrationAttempt, + 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 AccountEvaluationCreateParams.AccountActivityDetails.Data#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountEvaluationCreateParams.AccountActivityDetails.Data#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 for the login attempt. Provide only when type is login_attempt. */ + public Builder setLoginAttempt( + AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt loginAttempt) { + this.loginAttempt = loginAttempt; + return this; + } + + /** + * Timestamp at which the activity occurred. Defaults to the created time if not provided. + */ + public Builder setOccurredAt(Instant occurredAt) { + this.occurredAt = occurredAt; + return this; + } + + /** Details for the registration attempt. Provide only when type is registration_attempt. */ + public Builder setRegistrationAttempt( + AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt + registrationAttempt) { + this.registrationAttempt = registrationAttempt; + return this; + } + + /** + * Required. The type of activity. Must be registration_attempt or + * login_attempt. + */ + public Builder setType( + AccountEvaluationCreateParams.AccountActivityDetails.Data.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LoginAttempt { + /** Required. Client details captured for the attempt. */ + @SerializedName("client_details") + ClientDetails clientDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 LoginAttempt(ClientDetails clientDetails, Map extraParams) { + this.clientDetails = clientDetails; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ClientDetails clientDetails; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt build() { + return new AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt( + this.clientDetails, this.extraParams); + } + + /** Required. Client details captured for the attempt. */ + public Builder setClientDetails( + AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt.ClientDetails + clientDetails) { + this.clientDetails = clientDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt#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 ClientDetails { + /** Raw client details for the activity, when a Radar session is not available. */ + @SerializedName("data") + InnerData data; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Radar session ID capturing client details for the activity. */ + @SerializedName("radar_session") + String radarSession; + + private ClientDetails( + InnerData data, Map extraParams, String radarSession) { + this.data = data; + this.extraParams = extraParams; + this.radarSession = radarSession; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private InnerData data; + + private Map extraParams; + + private String radarSession; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt + .ClientDetails + build() { + return new AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt + .ClientDetails(this.data, this.extraParams, this.radarSession); + } + + /** Raw client details for the activity, when a Radar session is not available. */ + public Builder setData( + AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt.ClientDetails + .InnerData + data) { + this.data = data; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt.ClientDetails#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt.ClientDetails#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 Radar session ID capturing client details for the activity. */ + public Builder setRadarSession(String radarSession) { + this.radarSession = radarSession; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InnerData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level 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 associated with the activity. */ + @SerializedName("ip") + String ip; + + /** The referrer associated with the activity. */ + @SerializedName("referrer") + String referrer; + + /** The user agent associated with the activity. */ + @SerializedName("user_agent") + String userAgent; + + private InnerData( + Map extraParams, String ip, String referrer, String userAgent) { + this.extraParams = extraParams; + this.ip = ip; + this.referrer = referrer; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String ip; + + private String referrer; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt + .ClientDetails.InnerData + build() { + return new AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt + .ClientDetails.InnerData( + this.extraParams, this.ip, this.referrer, this.userAgent); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt.ClientDetails.InnerData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.LoginAttempt.ClientDetails.InnerData#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 associated with the activity. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The referrer associated with the activity. */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** The user agent associated with the activity. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RegistrationAttempt { + /** Required. Client details captured for the attempt. */ + @SerializedName("client_details") + ClientDetails clientDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 RegistrationAttempt(ClientDetails clientDetails, Map extraParams) { + this.clientDetails = clientDetails; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ClientDetails clientDetails; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt + build() { + return new AccountEvaluationCreateParams.AccountActivityDetails.Data + .RegistrationAttempt(this.clientDetails, this.extraParams); + } + + /** Required. Client details captured for the attempt. */ + public Builder setClientDetails( + AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt + .ClientDetails + clientDetails) { + this.clientDetails = clientDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt#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 ClientDetails { + /** Raw client details for the activity, when a Radar session is not available. */ + @SerializedName("data") + InnerData data; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Radar session ID capturing client details for the activity. */ + @SerializedName("radar_session") + String radarSession; + + private ClientDetails( + InnerData data, Map extraParams, String radarSession) { + this.data = data; + this.extraParams = extraParams; + this.radarSession = radarSession; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private InnerData data; + + private Map extraParams; + + private String radarSession; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt + .ClientDetails + build() { + return new AccountEvaluationCreateParams.AccountActivityDetails.Data + .RegistrationAttempt.ClientDetails( + this.data, this.extraParams, this.radarSession); + } + + /** Raw client details for the activity, when a Radar session is not available. */ + public Builder setData( + AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt + .ClientDetails.InnerData + data) { + this.data = data; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt.ClientDetails#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt.ClientDetails#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 Radar session ID capturing client details for the activity. */ + public Builder setRadarSession(String radarSession) { + this.radarSession = radarSession; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InnerData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-level 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 associated with the activity. */ + @SerializedName("ip") + String ip; + + /** The referrer associated with the activity. */ + @SerializedName("referrer") + String referrer; + + /** The user agent associated with the activity. */ + @SerializedName("user_agent") + String userAgent; + + private InnerData( + Map extraParams, String ip, String referrer, String userAgent) { + this.extraParams = extraParams; + this.ip = ip; + this.referrer = referrer; + this.userAgent = userAgent; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String ip; + + private String referrer; + + private String userAgent; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt + .ClientDetails.InnerData + build() { + return new AccountEvaluationCreateParams.AccountActivityDetails.Data + .RegistrationAttempt.ClientDetails.InnerData( + this.extraParams, this.ip, this.referrer, this.userAgent); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt.ClientDetails.InnerData#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountEvaluationCreateParams.AccountActivityDetails.Data.RegistrationAttempt.ClientDetails.InnerData#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 associated with the activity. */ + public Builder setIp(String ip) { + this.ip = ip; + return this; + } + + /** The referrer associated with the activity. */ + public Builder setReferrer(String referrer) { + this.referrer = referrer; + return this; + } + + /** The user agent associated with the activity. */ + public Builder setUserAgent(String userAgent) { + this.userAgent = userAgent; + return this; + } + } + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("login_attempt") + LOGIN_ATTEMPT("login_attempt"), + + @SerializedName("login_decision") + LOGIN_DECISION("login_decision"), + + @SerializedName("registration_attempt") + REGISTRATION_ATTEMPT("registration_attempt"), + + @SerializedName("registration_decision") + REGISTRATION_DECISION("registration_decision"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AccountDetails { + /** The v2 account ID of the account. */ + @SerializedName("account") + String account; + + /** The v1 customer ID of the account, for users not yet migrated to v2/accounts. */ + @SerializedName("customer") + String customer; + + /** Inline account data to evaluate without creating a v2 account. */ + @SerializedName("data") + Data data; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 AccountDetails( + String account, String customer, Data data, Map extraParams) { + this.account = account; + this.customer = customer; + this.data = data; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String account; + + private String customer; + + private Data data; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountDetails build() { + return new AccountEvaluationCreateParams.AccountDetails( + this.account, this.customer, this.data, this.extraParams); + } + + /** The v2 account ID of the account. */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** The v1 customer ID of the account, for users not yet migrated to v2/accounts. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** Inline account data to evaluate without creating a v2 account. */ + public Builder setData(AccountEvaluationCreateParams.AccountDetails.Data data) { + this.data = data; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AccountEvaluationCreateParams.AccountDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AccountEvaluationCreateParams.AccountDetails#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 Data { + /** Default account settings. */ + @SerializedName("defaults") + Defaults defaults; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Identity data. */ + @SerializedName("identity") + Identity identity; + + private Data(Defaults defaults, Map extraParams, Identity identity) { + this.defaults = defaults; + this.extraParams = extraParams; + this.identity = identity; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Defaults defaults; + + private Map extraParams; + + private Identity identity; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountDetails.Data build() { + return new AccountEvaluationCreateParams.AccountDetails.Data( + this.defaults, this.extraParams, this.identity); + } + + /** Default account settings. */ + public Builder setDefaults( + AccountEvaluationCreateParams.AccountDetails.Data.Defaults defaults) { + this.defaults = defaults; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountEvaluationCreateParams.AccountDetails.Data#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountEvaluationCreateParams.AccountDetails.Data#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Identity data. */ + public Builder setIdentity( + AccountEvaluationCreateParams.AccountDetails.Data.Identity identity) { + this.identity = identity; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Defaults { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Account profile data. */ + @SerializedName("profile") + Profile profile; + + private Defaults(Map extraParams, Profile profile) { + this.extraParams = extraParams; + this.profile = profile; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Profile profile; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountDetails.Data.Defaults build() { + return new AccountEvaluationCreateParams.AccountDetails.Data.Defaults( + this.extraParams, this.profile); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountEvaluationCreateParams.AccountDetails.Data.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 AccountEvaluationCreateParams.AccountDetails.Data.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; + } + + /** Required. Account profile data. */ + public Builder setProfile( + AccountEvaluationCreateParams.AccountDetails.Data.Defaults.Profile profile) { + this.profile = profile; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Profile { + /** Required. The business URL. */ + @SerializedName("business_url") + String businessUrl; + + /** Doing business as (DBA) name. */ + @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; + + /** Description of the account's product or service. */ + @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 AccountEvaluationCreateParams.AccountDetails.Data.Defaults.Profile build() { + return new AccountEvaluationCreateParams.AccountDetails.Data.Defaults.Profile( + this.businessUrl, + this.doingBusinessAs, + this.extraParams, + this.productDescription); + } + + /** Required. The business URL. */ + public Builder setBusinessUrl(String businessUrl) { + this.businessUrl = businessUrl; + return this; + } + + /** Doing business as (DBA) name. */ + 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 + * AccountEvaluationCreateParams.AccountDetails.Data.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 + * AccountEvaluationCreateParams.AccountDetails.Data.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; + } + + /** Description of the account's product or service. */ + public Builder setProductDescription(String productDescription) { + this.productDescription = productDescription; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Identity { + /** Required. Business details for identity data. */ + @SerializedName("business_details") + BusinessDetails businessDetails; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Identity(BusinessDetails businessDetails, Map extraParams) { + this.businessDetails = businessDetails; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private BusinessDetails businessDetails; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountEvaluationCreateParams.AccountDetails.Data.Identity build() { + return new AccountEvaluationCreateParams.AccountDetails.Data.Identity( + this.businessDetails, this.extraParams); + } + + /** Required. Business details for identity data. */ + public Builder setBusinessDetails( + AccountEvaluationCreateParams.AccountDetails.Data.Identity.BusinessDetails + businessDetails) { + this.businessDetails = businessDetails; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountEvaluationCreateParams.AccountDetails.Data.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 AccountEvaluationCreateParams.AccountDetails.Data.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; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BusinessDetails { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 business name. */ + @SerializedName("registered_name") + String registeredName; + + private BusinessDetails(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 AccountEvaluationCreateParams.AccountDetails.Data.Identity.BusinessDetails + build() { + return new AccountEvaluationCreateParams.AccountDetails.Data.Identity.BusinessDetails( + 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 + * AccountEvaluationCreateParams.AccountDetails.Data.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 + * AccountEvaluationCreateParams.AccountDetails.Data.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; + } + + /** Registered business name. */ + public Builder setRegisteredName(String registeredName) { + this.registeredName = registeredName; + return this; + } + } + } + } + } + } + + public enum RequestedSignal implements ApiRequestParams.EnumParam { + @SerializedName("fraudulent_website") + FRAUDULENT_WEBSITE("fraudulent_website"), + + @SerializedName("user_account_sharing") + USER_ACCOUNT_SHARING("user_account_sharing"), + + @SerializedName("user_multi_accounting") + USER_MULTI_ACCOUNTING("user_multi_accounting"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RequestedSignal(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/signals/AccountSignalListParams.java b/src/main/java/com/stripe/param/v2/signals/AccountSignalListParams.java index 3421f10e94bd..282f4342fad1 100644 --- a/src/main/java/com/stripe/param/v2/signals/AccountSignalListParams.java +++ b/src/main/java/com/stripe/param/v2/signals/AccountSignalListParams.java @@ -222,11 +222,20 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("fraudulent_merchant") FRAUDULENT_MERCHANT("fraudulent_merchant"), + @SerializedName("fraudulent_website") + FRAUDULENT_WEBSITE("fraudulent_website"), + @SerializedName("merchant_delinquency") MERCHANT_DELINQUENCY("merchant_delinquency"), @SerializedName("payment_delinquency_exposure") - PAYMENT_DELINQUENCY_EXPOSURE("payment_delinquency_exposure"); + PAYMENT_DELINQUENCY_EXPOSURE("payment_delinquency_exposure"), + + @SerializedName("user_account_sharing") + USER_ACCOUNT_SHARING("user_account_sharing"), + + @SerializedName("user_multi_accounting") + USER_MULTI_ACCOUNTING("user_multi_accounting"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/service/AccountService.java b/src/main/java/com/stripe/service/AccountService.java index a88c8a6491d1..5c36b6428ab4 100644 --- a/src/main/java/com/stripe/service/AccountService.java +++ b/src/main/java/com/stripe/service/AccountService.java @@ -18,6 +18,7 @@ import com.stripe.param.AccountRejectParams; import com.stripe.param.AccountRetrieveCurrentParams; import com.stripe.param.AccountRetrieveParams; +import com.stripe.param.AccountUnrejectParams; import com.stripe.param.AccountUpdateParams; public final class AccountService extends ApiService { @@ -351,6 +352,67 @@ public Account reject(String account, AccountRejectParams params, RequestOptions options); return this.request(request, Account.class); } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(String account, AccountUnrejectParams params) throws StripeException { + return unreject(account, params, (RequestOptions) null); + } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(String account, RequestOptions options) throws StripeException { + return unreject(account, (AccountUnrejectParams) null, options); + } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(String account) throws StripeException { + return unreject(account, (AccountUnrejectParams) null, (RequestOptions) null); + } + /** + * With Connect, you can unreject accounts that you have previously rejected. + * + *

Only accounts that were rejected by your platform can be unrejected. This API cannot be used + * to unreject accounts that were rejected by Stripe. + * + *

Unreject will only enable charges and/or payouts if there are no other restrictions other + * than those placed by a previous rejection. If you have separately paused charges and/or payouts + * outside of rejection, those pauses will remain in place after unrejection. + */ + public Account unreject(String account, AccountUnrejectParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/accounts/%s/unreject", ApiResource.urlEncodeId(account)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Account.class); + } /** Serializes an Account delete request into a batch job JSONL line. */ public String serializeBatchDelete(String account) throws StripeException { return serializeBatchDelete(account, (RequestOptions) null); diff --git a/src/main/java/com/stripe/service/FxQuoteService.java b/src/main/java/com/stripe/service/FxQuoteService.java index e19a68c7719e..02018cc1c3b6 100644 --- a/src/main/java/com/stripe/service/FxQuoteService.java +++ b/src/main/java/com/stripe/service/FxQuoteService.java @@ -22,29 +22,29 @@ public FxQuoteService(StripeResponseGetter responseGetter) { } /** - * Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, - * with the most recent FX quotes appearing first. + * Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most + * recent FX quotes appearing first. */ public StripeCollection list(FxQuoteListParams params) throws StripeException { return list(params, (RequestOptions) null); } /** - * Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, - * with the most recent FX quotes appearing first. + * Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most + * recent FX quotes appearing first. */ public StripeCollection list(RequestOptions options) throws StripeException { return list((FxQuoteListParams) null, options); } /** - * Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, - * with the most recent FX quotes appearing first. + * Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most + * recent FX quotes appearing first. */ public StripeCollection list() throws StripeException { return list((FxQuoteListParams) null, (RequestOptions) null); } /** - * Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, - * with the most recent FX quotes appearing first. + * Returns a list of active FX quotes. The FX quotes are returned in sorted order, with the most + * recent FX quotes appearing first. */ public StripeCollection list(FxQuoteListParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/PaymentRecordService.java b/src/main/java/com/stripe/service/PaymentRecordService.java index c0e717fd4612..682a4b00d5af 100644 --- a/src/main/java/com/stripe/service/PaymentRecordService.java +++ b/src/main/java/com/stripe/service/PaymentRecordService.java @@ -4,6 +4,7 @@ import com.google.gson.reflect.TypeToken; import com.stripe.exception.StripeException; import com.stripe.model.PaymentRecord; +import com.stripe.model.StripeCollection; import com.stripe.model.StripeSearchResult; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; @@ -13,6 +14,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.PaymentRecordCreateParams; +import com.stripe.param.PaymentRecordListParams; import com.stripe.param.PaymentRecordReportPaymentAttemptCanceledParams; import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams; import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams; @@ -28,6 +30,32 @@ public PaymentRecordService(StripeResponseGetter responseGetter) { super(responseGetter); } + /** List all the Payment Records for a given merchant. */ + public StripeCollection list(PaymentRecordListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** List all the Payment Records for a given merchant. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((PaymentRecordListParams) null, options); + } + /** List all the Payment Records for a given merchant. */ + public StripeCollection list() throws StripeException { + return list((PaymentRecordListParams) null, (RequestOptions) null); + } + /** List all the Payment Records for a given merchant. */ + public StripeCollection list( + PaymentRecordListParams params, RequestOptions options) throws StripeException { + String path = "/v1/payment_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 Record with the given ID. */ public PaymentRecord retrieve(String id, PaymentRecordRetrieveParams params) throws StripeException { diff --git a/src/main/java/com/stripe/service/V2Services.java b/src/main/java/com/stripe/service/V2Services.java index cdd3b6e12ab5..ccc658e68425 100644 --- a/src/main/java/com/stripe/service/V2Services.java +++ b/src/main/java/com/stripe/service/V2Services.java @@ -53,6 +53,10 @@ public com.stripe.service.v2.ReportingService reporting() { return new com.stripe.service.v2.ReportingService(this.getResponseGetter()); } + public com.stripe.service.v2.RiskService risk() { + return new com.stripe.service.v2.RiskService(this.getResponseGetter()); + } + public com.stripe.service.v2.SignalsService signals() { return new com.stripe.service.v2.SignalsService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/productcatalog/TrialOfferService.java b/src/main/java/com/stripe/service/productcatalog/TrialOfferService.java index 70ff2641bcf4..5c873990dd30 100644 --- a/src/main/java/com/stripe/service/productcatalog/TrialOfferService.java +++ b/src/main/java/com/stripe/service/productcatalog/TrialOfferService.java @@ -1,7 +1,9 @@ // File generated from our OpenAPI spec package com.stripe.service.productcatalog; +import com.google.gson.reflect.TypeToken; import com.stripe.exception.StripeException; +import com.stripe.model.StripeCollection; import com.stripe.model.productcatalog.TrialOffer; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; @@ -11,12 +13,39 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.productcatalog.TrialOfferCreateParams; +import com.stripe.param.productcatalog.TrialOfferListParams; +import com.stripe.param.productcatalog.TrialOfferRetrieveParams; public final class TrialOfferService extends ApiService { public TrialOfferService(StripeResponseGetter responseGetter) { super(responseGetter); } + /** Returns a list of trial offers. */ + public StripeCollection list(TrialOfferListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of trial offers. */ + public StripeCollection list(RequestOptions options) throws StripeException { + return list((TrialOfferListParams) null, options); + } + /** Returns a list of trial offers. */ + public StripeCollection list() throws StripeException { + return list((TrialOfferListParams) null, (RequestOptions) null); + } + /** Returns a list of trial offers. */ + public StripeCollection list(TrialOfferListParams params, RequestOptions options) + throws StripeException { + String path = "/v1/product_catalog/trial_offers"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } /** Creates a trial offer. */ public TrialOffer create(TrialOfferCreateParams params) throws StripeException { return create(params, (RequestOptions) null); @@ -34,4 +63,29 @@ public TrialOffer create(TrialOfferCreateParams params, RequestOptions options) options); return this.request(request, TrialOffer.class); } + /** Retrieves the trial offer with the given ID. */ + public TrialOffer retrieve(String id, TrialOfferRetrieveParams params) throws StripeException { + return retrieve(id, params, (RequestOptions) null); + } + /** Retrieves the trial offer with the given ID. */ + public TrialOffer retrieve(String id, RequestOptions options) throws StripeException { + return retrieve(id, (TrialOfferRetrieveParams) null, options); + } + /** Retrieves the trial offer with the given ID. */ + public TrialOffer retrieve(String id) throws StripeException { + return retrieve(id, (TrialOfferRetrieveParams) null, (RequestOptions) null); + } + /** Retrieves the trial offer with the given ID. */ + public TrialOffer retrieve(String id, TrialOfferRetrieveParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v1/product_catalog/trial_offers/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, TrialOffer.class); + } } diff --git a/src/main/java/com/stripe/service/v2/MoneyManagementService.java b/src/main/java/com/stripe/service/v2/MoneyManagementService.java index 299a37747fb7..13557aa78561 100644 --- a/src/main/java/com/stripe/service/v2/MoneyManagementService.java +++ b/src/main/java/com/stripe/service/v2/MoneyManagementService.java @@ -76,6 +76,11 @@ public com.stripe.service.v2.moneymanagement.ReceivedCreditService receivedCredi this.getResponseGetter()); } + public com.stripe.service.v2.moneymanagement.ReceivedDebitMandateService receivedDebitMandates() { + return new com.stripe.service.v2.moneymanagement.ReceivedDebitMandateService( + this.getResponseGetter()); + } + public com.stripe.service.v2.moneymanagement.ReceivedDebitService receivedDebits() { return new com.stripe.service.v2.moneymanagement.ReceivedDebitService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/v2/RiskService.java b/src/main/java/com/stripe/service/v2/RiskService.java new file mode 100644 index 000000000000..3d0e62a030bb --- /dev/null +++ b/src/main/java/com/stripe/service/v2/RiskService.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class RiskService extends ApiService { + public RiskService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.v2.risk.InquiryService inquiries() { + return new com.stripe.service.v2.risk.InquiryService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/v2/SignalsService.java b/src/main/java/com/stripe/service/v2/SignalsService.java index 611a49afc846..f85870859c97 100644 --- a/src/main/java/com/stripe/service/v2/SignalsService.java +++ b/src/main/java/com/stripe/service/v2/SignalsService.java @@ -9,6 +9,14 @@ public SignalsService(StripeResponseGetter responseGetter) { super(responseGetter); } + public com.stripe.service.v2.signals.AccountActivityService accountActivity() { + return new com.stripe.service.v2.signals.AccountActivityService(this.getResponseGetter()); + } + + public com.stripe.service.v2.signals.AccountEvaluationService accountEvaluations() { + return new com.stripe.service.v2.signals.AccountEvaluationService(this.getResponseGetter()); + } + public com.stripe.service.v2.signals.AccountSignalService accountSignals() { return new com.stripe.service.v2.signals.AccountSignalService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/ReceivedDebitMandateService.java b/src/main/java/com/stripe/service/v2/moneymanagement/ReceivedDebitMandateService.java new file mode 100644 index 000000000000..5b98cf4a40f4 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/ReceivedDebitMandateService.java @@ -0,0 +1,76 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.moneymanagement.ReceivedDebitMandate; +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.moneymanagement.ReceivedDebitMandateListParams; + +public final class ReceivedDebitMandateService extends ApiService { + public ReceivedDebitMandateService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Returns a list of ReceivedDebitMandates. */ + public StripeCollection list(ReceivedDebitMandateListParams params) + throws StripeException { + return list(params, (RequestOptions) null); + } + /** Returns a list of ReceivedDebitMandates. */ + public StripeCollection list(RequestOptions options) + throws StripeException { + return list((ReceivedDebitMandateListParams) null, options); + } + /** Returns a list of ReceivedDebitMandates. */ + public StripeCollection list() throws StripeException { + return list((ReceivedDebitMandateListParams) null, (RequestOptions) null); + } + /** Returns a list of ReceivedDebitMandates. */ + public StripeCollection list( + ReceivedDebitMandateListParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/received_debit_mandates"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request( + request, new TypeToken>() {}.getType()); + } + /** Retrieves the details of an existing ReceivedDebitMandate. */ + public ReceivedDebitMandate retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves the details of an existing ReceivedDebitMandate. */ + public ReceivedDebitMandate retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/money_management/received_debit_mandates/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, ReceivedDebitMandate.class); + } + /** Cancels an active ReceivedDebitMandate. */ + public ReceivedDebitMandate cancel(String id) throws StripeException { + return cancel(id, (RequestOptions) null); + } + /** Cancels an active ReceivedDebitMandate. */ + public ReceivedDebitMandate cancel(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/money_management/received_debit_mandates/%s/cancel", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, ReceivedDebitMandate.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/risk/InquiryService.java b/src/main/java/com/stripe/service/v2/risk/InquiryService.java new file mode 100644 index 000000000000..b3a7823bd18a --- /dev/null +++ b/src/main/java/com/stripe/service/v2/risk/InquiryService.java @@ -0,0 +1,76 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.risk; + +import com.google.gson.reflect.TypeToken; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.StripeCollection; +import com.stripe.model.v2.risk.Inquiry; +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.risk.InquiryListParams; +import com.stripe.param.v2.risk.InquiryUpdateParams; + +public final class InquiryService extends ApiService { + public InquiryService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Lists risk inquiries for a connected account. */ + public StripeCollection list(InquiryListParams params) throws StripeException { + return list(params, (RequestOptions) null); + } + /** Lists risk inquiries for a connected account. */ + public StripeCollection list(InquiryListParams params, RequestOptions options) + throws StripeException { + String path = "/v2/risk/inquiries"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, new TypeToken>() {}.getType()); + } + /** Retrieves a risk inquiry by ID. */ + public Inquiry retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves a risk inquiry by ID. */ + public Inquiry retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/risk/inquiries/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, Inquiry.class); + } + /** Submits a response to a risk inquiry. */ + public Inquiry update(String id, InquiryUpdateParams params) throws StripeException { + return update(id, params, (RequestOptions) null); + } + /** Submits a response to a risk inquiry. */ + public Inquiry update(String id, RequestOptions options) throws StripeException { + return update(id, (InquiryUpdateParams) null, options); + } + /** Submits a response to a risk inquiry. */ + public Inquiry update(String id) throws StripeException { + return update(id, (InquiryUpdateParams) null, (RequestOptions) null); + } + /** Submits a response to a risk inquiry. */ + public Inquiry update(String id, InquiryUpdateParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v2/risk/inquiries/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, Inquiry.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/signals/AccountActivityService.java b/src/main/java/com/stripe/service/v2/signals/AccountActivityService.java new file mode 100644 index 000000000000..452921b1d970 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/signals/AccountActivityService.java @@ -0,0 +1,66 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.signals; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.DeletedObject; +import com.stripe.model.v2.signals.AccountActivity; +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.signals.AccountActivityCreateParams; + +public final class AccountActivityService extends ApiService { + public AccountActivityService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Creates a new account activity to report account registration, login, or evaluation follow-up + * activity. + */ + public AccountActivity create(AccountActivityCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * Creates a new account activity to report account registration, login, or evaluation follow-up + * activity. + */ + public AccountActivity create(AccountActivityCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/signals/account_activity"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, AccountActivity.class); + } + /** Deletes an AccountActivity by its ID. */ + public DeletedObject delete(String id) throws StripeException { + return delete(id, (RequestOptions) null); + } + /** Deletes an AccountActivity by its ID. */ + public DeletedObject delete(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/signals/account_activity/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.DELETE, path, null, options); + return this.request(request, DeletedObject.class); + } + /** Retrieves an AccountActivity by its ID. */ + public AccountActivity retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves an AccountActivity by its ID. */ + public AccountActivity retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/signals/account_activity/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, AccountActivity.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/signals/AccountEvaluationService.java b/src/main/java/com/stripe/service/v2/signals/AccountEvaluationService.java new file mode 100644 index 000000000000..5be40be0b653 --- /dev/null +++ b/src/main/java/com/stripe/service/v2/signals/AccountEvaluationService.java @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.signals; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.signals.AccountEvaluation; +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.signals.AccountEvaluationCreateParams; + +public final class AccountEvaluationService extends ApiService { + public AccountEvaluationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Creates a new account evaluation to request signal evaluations on an account, customer, or + * inline account data. + */ + public AccountEvaluation create(AccountEvaluationCreateParams params) throws StripeException { + return create(params, (RequestOptions) null); + } + /** + * Creates a new account evaluation to request signal evaluations on an account, customer, or + * inline account data. + */ + public AccountEvaluation create(AccountEvaluationCreateParams params, RequestOptions options) + throws StripeException { + String path = "/v2/signals/account_evaluations"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, AccountEvaluation.class); + } + /** Retrieves an AccountEvaluation by its ID. */ + public AccountEvaluation retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** Retrieves an AccountEvaluation by its ID. */ + public AccountEvaluation retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/signals/account_evaluations/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, AccountEvaluation.class); + } +} diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index ae4409d1ede5..32bece3c12e8 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -25372,7 +25372,7 @@ public void testV2BillingIntentGetServices() throws StripeException { new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.billing.Intent>>() {}.getType(), - "{\"data\":[{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.billing.intent\",\"amount_details\":{\"amount_due\":\"amount_due\",\"currency\":\"usd\",\"customer_balance_applied\":\"customer_balance_applied\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.IntentListParams params = @@ -25398,7 +25398,7 @@ public void testV2BillingIntentPostServices() throws StripeException { null, null, com.stripe.model.v2.billing.Intent.class, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"amount_due\":\"amount_due\",\"currency\":\"usd\",\"customer_balance_applied\":\"customer_balance_applied\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.IntentCreateParams params = @@ -25772,7 +25772,7 @@ public void testV2BillingIntentGet2Services() throws StripeException { null, null, com.stripe.model.v2.billing.Intent.class, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"amount_due\":\"amount_due\",\"currency\":\"usd\",\"customer_balance_applied\":\"customer_balance_applied\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.billing.Intent intent = client.v2().billing().intents().retrieve("id_123"); @@ -25790,7 +25790,7 @@ public void testV2BillingIntentPost2Services() throws StripeException { null, null, com.stripe.model.v2.billing.Intent.class, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"amount_due\":\"amount_due\",\"currency\":\"usd\",\"customer_balance_applied\":\"customer_balance_applied\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.billing.Intent intent = client.v2().billing().intents().cancel("id_123"); @@ -25812,7 +25812,7 @@ public void testV2BillingIntentPost3Services() throws StripeException { null, null, com.stripe.model.v2.billing.Intent.class, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"amount_due\":\"amount_due\",\"currency\":\"usd\",\"customer_balance_applied\":\"customer_balance_applied\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.IntentCommitParams params = @@ -25838,7 +25838,7 @@ public void testV2BillingIntentPost4Services() throws StripeException { null, null, com.stripe.model.v2.billing.Intent.class, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"amount_due\":\"amount_due\",\"currency\":\"usd\",\"customer_balance_applied\":\"customer_balance_applied\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.billing.Intent intent = @@ -25861,7 +25861,7 @@ public void testV2BillingIntentPost5Services() throws StripeException { null, null, com.stripe.model.v2.billing.Intent.class, - "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"currency\":\"usd\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); + "{\"object\":\"v2.billing.intent\",\"amount_details\":{\"amount_due\":\"amount_due\",\"currency\":\"usd\",\"customer_balance_applied\":\"customer_balance_applied\",\"discount\":\"discount\",\"shipping\":\"shipping\",\"subtotal\":\"subtotal\",\"tax\":\"tax\",\"total\":\"total\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"status_transitions\":{\"expires_at\":\"1970-01-10T15:36:51.170Z\"}}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.billing.Intent intent = client.v2().billing().intents().reserve("id_123"); @@ -28090,7 +28090,7 @@ public void testV2CoreAccountEvaluationPostServices() throws StripeException { null, null, com.stripe.model.v2.core.AccountEvaluation.class, - "{\"object\":\"v2.core.account_evaluation\",\"created\":\"1970-01-12T21:42:34.472Z\",\"evaluations_triggered\":[\"fraudulent_website\"],\"id\":\"obj_123\",\"livemode\":true}"); + "{\"object\":\"v2.core.account_evaluation\",\"created\":\"1970-01-12T21:42:34.472Z\",\"evaluations_triggered\":[\"user_multi_accounting\"],\"id\":\"obj_123\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.AccountEvaluationCreateParams params = @@ -31229,6 +31229,80 @@ public void testV2MoneyManagementReceivedDebitGet2Services() throws StripeExcept null); } + @Test + public void testV2MoneyManagementReceivedDebitMandateGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/received_debit_mandates", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection< + com.stripe.model.v2.moneymanagement.ReceivedDebitMandate>>() {}.getType(), + "{\"data\":[{\"object\":\"v2.money_management.received_debit_mandate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"expired\",\"type\":\"bank_transfer\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.ReceivedDebitMandateListParams params = + com.stripe.param.v2.moneymanagement.ReceivedDebitMandateListParams.builder().build(); + + com.stripe.model.v2.StripeCollection + stripeCollection = client.v2().moneyManagement().receivedDebitMandates().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/received_debit_mandates", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementReceivedDebitMandateGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/received_debit_mandates/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.ReceivedDebitMandate.class, + "{\"object\":\"v2.money_management.received_debit_mandate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"expired\",\"type\":\"bank_transfer\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.ReceivedDebitMandate receivedDebitMandate = + client.v2().moneyManagement().receivedDebitMandates().retrieve("id_123"); + assertNotNull(receivedDebitMandate); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/received_debit_mandates/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementReceivedDebitMandatePostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/received_debit_mandates/id_123/cancel", + null, + null, + com.stripe.model.v2.moneymanagement.ReceivedDebitMandate.class, + "{\"object\":\"v2.money_management.received_debit_mandate\",\"created\":\"1970-01-12T21:42:34.472Z\",\"currency\":\"usd\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"expired\",\"type\":\"bank_transfer\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.ReceivedDebitMandate receivedDebitMandate = + client.v2().moneyManagement().receivedDebitMandates().cancel("id_123"); + assertNotNull(receivedDebitMandate); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/received_debit_mandates/id_123/cancel", + null, + null); + } + @Test public void testV2MoneyManagementRecipientVerificationPostServices() throws StripeException { stubRequest( @@ -32162,6 +32236,230 @@ public void testV2ReportingReportRunGetServices() throws StripeException { null); } + @Test + public void testV2RiskInquiryGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/risk/inquiries", + null, + null, + new TypeToken< + com.stripe.model.v2.StripeCollection>() {}.getType(), + "{\"data\":[{\"object\":\"v2.risk.inquiry\",\"closed_at\":\"1970-01-06T13:53:35.258Z\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"opened_at\":\"1970-01-18T22:56:33.737Z\",\"status\":\"closed\",\"type\":\"appeal\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.risk.InquiryListParams params = + com.stripe.param.v2.risk.InquiryListParams.builder().setAccount("account").build(); + + com.stripe.model.v2.StripeCollection stripeCollection = + client.v2().risk().inquiries().list(params); + assertNotNull(stripeCollection); + verifyRequest( + BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/risk/inquiries", params.toMap(), null); + } + + @Test + public void testV2RiskInquiryGet2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/risk/inquiries/id_123", + null, + null, + com.stripe.model.v2.risk.Inquiry.class, + "{\"object\":\"v2.risk.inquiry\",\"closed_at\":\"1970-01-06T13:53:35.258Z\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"opened_at\":\"1970-01-18T22:56:33.737Z\",\"status\":\"closed\",\"type\":\"appeal\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.risk.Inquiry inquiry = client.v2().risk().inquiries().retrieve("id_123"); + assertNotNull(inquiry); + verifyRequest( + BaseAddress.API, ApiResource.RequestMethod.GET, "/v2/risk/inquiries/id_123", null, null); + } + + @Test + public void testV2RiskInquiryPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/risk/inquiries/id_123", + null, + null, + com.stripe.model.v2.risk.Inquiry.class, + "{\"object\":\"v2.risk.inquiry\",\"closed_at\":\"1970-01-06T13:53:35.258Z\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"opened_at\":\"1970-01-18T22:56:33.737Z\",\"status\":\"closed\",\"type\":\"appeal\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.risk.InquiryUpdateParams params = + com.stripe.param.v2.risk.InquiryUpdateParams.builder().build(); + + com.stripe.model.v2.risk.Inquiry inquiry = + client.v2().risk().inquiries().update("id_123", params); + assertNotNull(inquiry); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/risk/inquiries/id_123", + params.toMap(), + null); + } + + @Test + public void testV2SignalsAccountActivityPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/signals/account_activity", + null, + null, + com.stripe.model.v2.signals.AccountActivity.class, + "{\"object\":\"v2.signals.account_activity\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"occurred_at\":\"1970-01-10T01:49:44.717Z\",\"type\":\"registration_attempt\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.signals.AccountActivityCreateParams params = + com.stripe.param.v2.signals.AccountActivityCreateParams.builder() + .setType( + com.stripe.param.v2.signals.AccountActivityCreateParams.Type.REGISTRATION_ATTEMPT) + .build(); + + com.stripe.model.v2.signals.AccountActivity accountActivity = + client.v2().signals().accountActivity().create(params); + assertNotNull(accountActivity); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/signals/account_activity", + params.toMap(), + null); + } + + @Test + public void testV2SignalsAccountActivityDeleteServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v2/signals/account_activity/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().signals().accountActivity().delete("id_123"); + assertNotNull(deletedObject); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.DELETE, + "/v2/signals/account_activity/id_123", + null, + null); + } + + @Test + public void testV2SignalsAccountActivityGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/signals/account_activity/id_123", + null, + null, + com.stripe.model.v2.signals.AccountActivity.class, + "{\"object\":\"v2.signals.account_activity\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"occurred_at\":\"1970-01-10T01:49:44.717Z\",\"type\":\"registration_attempt\"}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.signals.AccountActivity accountActivity = + client.v2().signals().accountActivity().retrieve("id_123"); + assertNotNull(accountActivity); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/signals/account_activity/id_123", + null, + null); + } + + @Test + public void testV2SignalsAccountEvaluationPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/signals/account_evaluations", + null, + null, + com.stripe.model.v2.signals.AccountEvaluation.class, + "{\"object\":\"v2.signals.account_evaluation\",\"account_details\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pending_signals\":[\"fraudulent_website\"],\"requested_signals\":[\"user_multi_accounting\"]}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.signals.AccountEvaluationCreateParams params = + com.stripe.param.v2.signals.AccountEvaluationCreateParams.builder() + .setAccountDetails( + com.stripe.param.v2.signals.AccountEvaluationCreateParams.AccountDetails.builder() + .setAccount("account") + .setCustomer("customer") + .setData( + com.stripe.param.v2.signals.AccountEvaluationCreateParams.AccountDetails + .Data.builder() + .setDefaults( + com.stripe.param.v2.signals.AccountEvaluationCreateParams + .AccountDetails.Data.Defaults.builder() + .setProfile( + com.stripe.param.v2.signals.AccountEvaluationCreateParams + .AccountDetails.Data.Defaults.Profile.builder() + .setBusinessUrl("business_url") + .setDoingBusinessAs("doing_business_as") + .setProductDescription("product_description") + .build()) + .build()) + .setIdentity( + com.stripe.param.v2.signals.AccountEvaluationCreateParams + .AccountDetails.Data.Identity.builder() + .setBusinessDetails( + com.stripe.param.v2.signals.AccountEvaluationCreateParams + .AccountDetails.Data.Identity.BusinessDetails.builder() + .setRegisteredName("registered_name") + .build()) + .build()) + .build()) + .build()) + .addRequestedSignal( + com.stripe.param.v2.signals.AccountEvaluationCreateParams.RequestedSignal + .USER_MULTI_ACCOUNTING) + .build(); + + com.stripe.model.v2.signals.AccountEvaluation accountEvaluation = + client.v2().signals().accountEvaluations().create(params); + assertNotNull(accountEvaluation); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/signals/account_evaluations", + params.toMap(), + null); + } + + @Test + public void testV2SignalsAccountEvaluationGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/signals/account_evaluations/id_123", + null, + null, + com.stripe.model.v2.signals.AccountEvaluation.class, + "{\"object\":\"v2.signals.account_evaluation\",\"account_details\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"pending_signals\":[\"fraudulent_website\"],\"requested_signals\":[\"user_multi_accounting\"]}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.signals.AccountEvaluation accountEvaluation = + client.v2().signals().accountEvaluations().retrieve("id_123"); + assertNotNull(accountEvaluation); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/signals/account_evaluations/id_123", + null, + null); + } + @Test public void testV2SignalsAccountSignalGetServices() throws StripeException { stubRequest(