diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 006d837793d..1e9b3ed08cd 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -2ceb45f50a72455c534a54d634b015602dc55f2d \ No newline at end of file +76a717125a6b6b3cfe380a5b64026f175aeb8d47 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 115c3a68008..ba1e062dba3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2345 \ No newline at end of file +v2346 \ 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 40a50d64461..927c6ed2138 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 f1f03ddd3fc..c146479b631 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; @@ -422,6 +429,7 @@ import com.stripe.events.V2ReportingReportRunUpdatedEventNotification; import com.stripe.events.V2SignalsAccountSignalFraudulentMerchantReadyEventNotification; 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 +2834,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 +2852,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 +2870,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); @@ -3065,6 +3116,12 @@ public StripeEventNotificationHandler onV2SignalsAccountSignalMerchantDelinquenc 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 00000000000..96061f8aba9 --- /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 00000000000..e94b47e35b5 --- /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 00000000000..7eb98911783 --- /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 00000000000..aa2e45fc556 --- /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 00000000000..9c1f4a090e3 --- /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 00000000000..e37a9da5571 --- /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 00000000000..c2d1f6359f0 --- /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 00000000000..7092e218368 --- /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 00000000000..4367862959d --- /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 00000000000..f63b7140e0a --- /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 00000000000..4ae4e106ea1 --- /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 00000000000..860408b811c --- /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 00000000000..20dddf1f3ae --- /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 00000000000..a927bd3e095 --- /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/V2SignalsAccountSignalFraudulentMerchantReadyEvent.java b/src/main/java/com/stripe/events/V2SignalsAccountSignalFraudulentMerchantReadyEvent.java index 341e0c58622..19fa5fa681a 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 2b6612ac981..67adc0ae2b6 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/V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent.java b/src/main/java/com/stripe/events/V2SignalsAccountSignalPaymentDelinquencyExposureReadyEvent.java new file mode 100644 index 00000000000..194ae5a6bc3 --- /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 00000000000..b3b94027351 --- /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 0ca54ae973d..753103e2acb 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -2405,8 +2405,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 3c81d402978..44a3dc0b256 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 4ff71a16381..431da4823a1 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 84a882c6151..ffb93030a97 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 b8bf388b39e..ff9a91b870d 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 a22681c39ae..fad150afe18 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/billing/CreditGrant.java b/src/main/java/com/stripe/model/billing/CreditGrant.java index 0cc4f44e5a5..57ed06b1350 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 046d8d0d54e..bf227f44ffd 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/OnrampSession.java b/src/main/java/com/stripe/model/crypto/OnrampSession.java index 2f8fd1ab1d4..5d835fe3c55 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/issuing/Authorization.java b/src/main/java/com/stripe/model/issuing/Authorization.java index 096d0d4f13b..4cf52f429b5 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 e3d9f529d4f..b64587603ea 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/radar/PaymentEvaluation.java b/src/main/java/com/stripe/model/radar/PaymentEvaluation.java index 0df58493277..de8d3dc1d9f 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 e0df3e8ca78..4dbb9ed0db4 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/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index ccfd05a09c0..d52f325f313 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,8 @@ 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_signal", com.stripe.model.v2.signals.AccountSignal.class); classLookup.put("v2.tax.manual_rule", com.stripe.model.v2.tax.ManualRule.class); @@ -1184,18 +1189,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); @@ -1303,5 +1329,8 @@ public final class EventDataClassLookup { 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 dc2764d48bf..6b4350623bb 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); @@ -1197,5 +1219,9 @@ public final class EventNotificationClassLookup { 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 f30c249e876..994cbc35bd5 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 f2ec178b2ab..53c9ff5c32b 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 fadbbbe57e1..14e2cdf12ec 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 948317f08d5..2e8cec2810d 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 5be73f57d57..97ed004ff6d 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 6be2162a401..469111cff88 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 02bb5746bf6..8a3630bf1ec 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 8fc60e1796a..ac12fc8803a 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 00000000000..f42f86f4f8f --- /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 3b738f503e5..cf19f9fa112 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 00000000000..759944ec2cd --- /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/AccountSignal.java b/src/main/java/com/stripe/model/v2/signals/AccountSignal.java index cbd9784274e..bc384612d24 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; @@ -58,6 +60,13 @@ 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. * @@ -211,4 +220,72 @@ 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; + } + } } diff --git a/src/main/java/com/stripe/param/GiftCardCreateParams.java b/src/main/java/com/stripe/param/GiftCardCreateParams.java index 100e483a290..dd576795fc8 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/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index 03fc936d249..2102c60c037 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/billing/CreditBalanceSummaryRetrieveParams.java b/src/main/java/com/stripe/param/billing/CreditBalanceSummaryRetrieveParams.java index 3a595097c6a..459b3e987f4 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 9064364873f..17bc2b4280a 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/crypto/OnrampSessionCreateParams.java b/src/main/java/com/stripe/param/crypto/OnrampSessionCreateParams.java index 2605269d84b..a2a3c92989d 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 b005e6e4b4b..a9b83d09dd8 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 f0042b3d941..8af8926c575 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/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java index a6855a4dcba..343aa624026 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; diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index 5ea56176d2a..691bb9afd5a 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; diff --git a/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java b/src/main/java/com/stripe/param/radar/PaymentEvaluationCreateParams.java index 7dd2a6ba151..6dc7c1ab314 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/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index c0b14665f4e..5864e9305bb 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; diff --git a/src/main/java/com/stripe/param/terminal/ReaderActivateGiftCardParams.java b/src/main/java/com/stripe/param/terminal/ReaderActivateGiftCardParams.java index 6e6586541a2..ce12a35c947 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 87d1f327df8..138415fe510 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 1cf743df287..80cf4c7eb11 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 54356a77b74..e87968dc95c 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 e1ff2e6accd..540077b14e5 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 db8d42eb2eb..c93ca0d390f 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 0581e04e985..be0426354ff 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 bcc01dae8ac..ff0acf8da6e 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/AccountTokenCreateParams.java b/src/main/java/com/stripe/param/v2/core/AccountTokenCreateParams.java index b440dcb18ea..74e27f9ca23 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 c96a1a9381f..5091cd4da59 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 5a5e2d6889a..1cc891856fb 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 e649837e789..c671b6cc918 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 00000000000..41fac855091 --- /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 102cb0033ec..31b9738683f 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 4017ba5941d..4005c6da1c2 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 00000000000..057dd992ca7 --- /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 00000000000..273c2370da8 --- /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/service/FxQuoteService.java b/src/main/java/com/stripe/service/FxQuoteService.java index e19a68c7719..02018cc1c3b 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/V2Services.java b/src/main/java/com/stripe/service/V2Services.java index cdd3b6e12ab..ccc658e6842 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/v2/MoneyManagementService.java b/src/main/java/com/stripe/service/v2/MoneyManagementService.java index 299a37747fb..13557aa7856 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 00000000000..3d0e62a030b --- /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/moneymanagement/ReceivedDebitMandateService.java b/src/main/java/com/stripe/service/v2/moneymanagement/ReceivedDebitMandateService.java new file mode 100644 index 00000000000..5b98cf4a40f --- /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 00000000000..b3a7823bd18 --- /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/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index ae4409d1ede..c7591b848c3 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"); @@ -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,73 @@ 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 testV2SignalsAccountSignalGetServices() throws StripeException { stubRequest(