diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f295f551191..10868909ef7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -768c16b55352ce5cc78d27c0bbd7448263942018 \ No newline at end of file +4776797593c966ebe1494340934edf45a6764bf2 \ 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 a02c831d002..89d335a0536 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 = "2025-08-27.preview"; + public static final String CURRENT = "2025-09-30.preview"; } diff --git a/src/main/java/com/stripe/events/V2BillingCadenceErroredEvent.java b/src/main/java/com/stripe/events/V1AccountUpdatedEvent.java similarity index 66% rename from src/main/java/com/stripe/events/V2BillingCadenceErroredEvent.java rename to src/main/java/com/stripe/events/V1AccountUpdatedEvent.java index 2cb05a6a162..e2bc6d3fbf4 100644 --- a/src/main/java/com/stripe/events/V2BillingCadenceErroredEvent.java +++ b/src/main/java/com/stripe/events/V1AccountUpdatedEvent.java @@ -3,19 +3,19 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; +import com.stripe.model.Account; import com.stripe.model.v2.Event; -import com.stripe.model.v2.billing.Cadence; import lombok.Getter; @Getter -public final class V2BillingCadenceErroredEvent extends Event { +public final class V1AccountUpdatedEvent 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 Cadence fetchRelatedObject() throws StripeException { - return (Cadence) super.fetchRelatedObject(this.relatedObject); + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); } } diff --git a/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEvent.java b/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEvent.java new file mode 100644 index 00000000000..c6ff682b97f --- /dev/null +++ b/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.ApplicationFee; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ApplicationFeeCreatedEvent 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 ApplicationFee fetchRelatedObject() throws StripeException { + return (ApplicationFee) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEvent.java b/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEvent.java new file mode 100644 index 00000000000..55d46fc4fde --- /dev/null +++ b/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEvent.java @@ -0,0 +1,21 @@ +// 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.ApplicationFee; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ApplicationFeeRefundedEvent 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 ApplicationFee fetchRelatedObject() throws StripeException { + return (ApplicationFee) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1BillingPortalConfigurationCreatedEvent.java b/src/main/java/com/stripe/events/V1BillingPortalConfigurationCreatedEvent.java new file mode 100644 index 00000000000..14ebb1692d6 --- /dev/null +++ b/src/main/java/com/stripe/events/V1BillingPortalConfigurationCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.billingportal.Configuration; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1BillingPortalConfigurationCreatedEvent 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 Configuration fetchRelatedObject() throws StripeException { + return (Configuration) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEvent.java b/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEvent.java new file mode 100644 index 00000000000..75934378a51 --- /dev/null +++ b/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.billingportal.Configuration; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1BillingPortalConfigurationUpdatedEvent 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 Configuration fetchRelatedObject() throws StripeException { + return (Configuration) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CapabilityUpdatedEvent.java b/src/main/java/com/stripe/events/V1CapabilityUpdatedEvent.java new file mode 100644 index 00000000000..1a82f26ed6e --- /dev/null +++ b/src/main/java/com/stripe/events/V1CapabilityUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Capability; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CapabilityUpdatedEvent 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 Capability fetchRelatedObject() throws StripeException { + return (Capability) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeCapturedEvent.java b/src/main/java/com/stripe/events/V1ChargeCapturedEvent.java new file mode 100644 index 00000000000..26dd4bd6acb --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeCapturedEvent.java @@ -0,0 +1,21 @@ +// 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.Charge; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeCapturedEvent 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeClosedEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeClosedEvent.java new file mode 100644 index 00000000000..7e86b41e67d --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeClosedEvent.java @@ -0,0 +1,21 @@ +// 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.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeClosedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEvent.java new file mode 100644 index 00000000000..bf43cb9006a --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeCreatedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEvent.java new file mode 100644 index 00000000000..64ad03dd9d6 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEvent.java @@ -0,0 +1,21 @@ +// 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.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeFundsReinstatedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEvent.java new file mode 100644 index 00000000000..84f893cce52 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEvent.java @@ -0,0 +1,21 @@ +// 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.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeFundsWithdrawnEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEvent.java new file mode 100644 index 00000000000..fcebe5b230f --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeUpdatedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeExpiredEvent.java b/src/main/java/com/stripe/events/V1ChargeExpiredEvent.java new file mode 100644 index 00000000000..3d46c4bb55a --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeExpiredEvent.java @@ -0,0 +1,21 @@ +// 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.Charge; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeExpiredEvent 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeFailedEvent.java b/src/main/java/com/stripe/events/V1ChargeFailedEvent.java new file mode 100644 index 00000000000..8a3135691dd --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeFailedEvent.java @@ -0,0 +1,21 @@ +// 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.Charge; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeFailedEvent 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargePendingEvent.java b/src/main/java/com/stripe/events/V1ChargePendingEvent.java new file mode 100644 index 00000000000..0b1fa6e0a23 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargePendingEvent.java @@ -0,0 +1,21 @@ +// 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.Charge; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargePendingEvent 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEvent.java b/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEvent.java new file mode 100644 index 00000000000..577b601817c --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Refund; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeRefundUpdatedEvent 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 Refund fetchRelatedObject() throws StripeException { + return (Refund) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeRefundedEvent.java b/src/main/java/com/stripe/events/V1ChargeRefundedEvent.java new file mode 100644 index 00000000000..f3232a3bc49 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeRefundedEvent.java @@ -0,0 +1,21 @@ +// 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.Charge; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeRefundedEvent 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeSucceededEvent.java b/src/main/java/com/stripe/events/V1ChargeSucceededEvent.java new file mode 100644 index 00000000000..aac3ba87eb3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeSucceededEvent.java @@ -0,0 +1,21 @@ +// 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.Charge; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeSucceededEvent 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeUpdatedEvent.java b/src/main/java/com/stripe/events/V1ChargeUpdatedEvent.java new file mode 100644 index 00000000000..bd5c79fd731 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Charge; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ChargeUpdatedEvent 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEvent.java b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEvent.java new file mode 100644 index 00000000000..d3a0519085e --- /dev/null +++ b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEvent.java @@ -0,0 +1,21 @@ +// 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.checkout.Session; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CheckoutSessionAsyncPaymentFailedEvent 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 Session fetchRelatedObject() throws StripeException { + return (Session) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEvent.java b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEvent.java new file mode 100644 index 00000000000..9502ee83924 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEvent.java @@ -0,0 +1,21 @@ +// 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.checkout.Session; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CheckoutSessionAsyncPaymentSucceededEvent 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 Session fetchRelatedObject() throws StripeException { + return (Session) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEvent.java b/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEvent.java new file mode 100644 index 00000000000..899e712a318 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEvent.java @@ -0,0 +1,21 @@ +// 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.checkout.Session; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CheckoutSessionCompletedEvent 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 Session fetchRelatedObject() throws StripeException { + return (Session) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEvent.java b/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEvent.java new file mode 100644 index 00000000000..7f71695cdc8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEvent.java @@ -0,0 +1,21 @@ +// 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.checkout.Session; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CheckoutSessionExpiredEvent 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 Session fetchRelatedObject() throws StripeException { + return (Session) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderCanceledEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderCanceledEvent.java new file mode 100644 index 00000000000..dca4460e91c --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderCanceledEvent.java @@ -0,0 +1,21 @@ +// 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.climate.Order; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderCanceledEvent 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderCreatedEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderCreatedEvent.java new file mode 100644 index 00000000000..541ced71acc --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.climate.Order; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderCreatedEvent 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderDelayedEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderDelayedEvent.java new file mode 100644 index 00000000000..eb9a91c5ef4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderDelayedEvent.java @@ -0,0 +1,21 @@ +// 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.climate.Order; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderDelayedEvent 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEvent.java new file mode 100644 index 00000000000..9e3bf4e6640 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEvent.java @@ -0,0 +1,21 @@ +// 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.climate.Order; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderDeliveredEvent 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEvent.java new file mode 100644 index 00000000000..a03781c469b --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEvent.java @@ -0,0 +1,21 @@ +// 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.climate.Order; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderProductSubstitutedEvent 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateProductCreatedEvent.java b/src/main/java/com/stripe/events/V1ClimateProductCreatedEvent.java new file mode 100644 index 00000000000..fb416c60161 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateProductCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.climate.Product; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ClimateProductCreatedEvent 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEvent.java b/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEvent.java new file mode 100644 index 00000000000..445018972ec --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.climate.Product; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ClimateProductPricingUpdatedEvent 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CouponCreatedEvent.java b/src/main/java/com/stripe/events/V1CouponCreatedEvent.java new file mode 100644 index 00000000000..f66cd5999a3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CouponCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Coupon; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CouponCreatedEvent 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 Coupon fetchRelatedObject() throws StripeException { + return (Coupon) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CouponDeletedEvent.java b/src/main/java/com/stripe/events/V1CouponDeletedEvent.java new file mode 100644 index 00000000000..eab84e2ac26 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CouponDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.Coupon; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CouponDeletedEvent 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 Coupon fetchRelatedObject() throws StripeException { + return (Coupon) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CouponUpdatedEvent.java b/src/main/java/com/stripe/events/V1CouponUpdatedEvent.java new file mode 100644 index 00000000000..8570d69d94c --- /dev/null +++ b/src/main/java/com/stripe/events/V1CouponUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Coupon; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CouponUpdatedEvent 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 Coupon fetchRelatedObject() throws StripeException { + return (Coupon) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CreditNoteCreatedEvent.java b/src/main/java/com/stripe/events/V1CreditNoteCreatedEvent.java new file mode 100644 index 00000000000..b608da7ffc8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CreditNoteCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.CreditNote; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CreditNoteCreatedEvent 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 CreditNote fetchRelatedObject() throws StripeException { + return (CreditNote) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CreditNoteUpdatedEvent.java b/src/main/java/com/stripe/events/V1CreditNoteUpdatedEvent.java new file mode 100644 index 00000000000..d60f03d39ec --- /dev/null +++ b/src/main/java/com/stripe/events/V1CreditNoteUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.CreditNote; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CreditNoteUpdatedEvent 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 CreditNote fetchRelatedObject() throws StripeException { + return (CreditNote) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CreditNoteVoidedEvent.java b/src/main/java/com/stripe/events/V1CreditNoteVoidedEvent.java new file mode 100644 index 00000000000..826339cee26 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CreditNoteVoidedEvent.java @@ -0,0 +1,21 @@ +// 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.CreditNote; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CreditNoteVoidedEvent 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 CreditNote fetchRelatedObject() throws StripeException { + return (CreditNote) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerCreatedEvent.java b/src/main/java/com/stripe/events/V1CustomerCreatedEvent.java new file mode 100644 index 00000000000..6c7ead47766 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Customer; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerCreatedEvent 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 Customer fetchRelatedObject() throws StripeException { + return (Customer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerDeletedEvent.java b/src/main/java/com/stripe/events/V1CustomerDeletedEvent.java new file mode 100644 index 00000000000..23f66650389 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.Customer; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerDeletedEvent 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 Customer fetchRelatedObject() throws StripeException { + return (Customer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEvent.java b/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEvent.java new file mode 100644 index 00000000000..e9a470608d4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Discount; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerDiscountCreatedEvent 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 Discount fetchRelatedObject() throws StripeException { + return (Discount) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEvent.java b/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEvent.java new file mode 100644 index 00000000000..8827566918f --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.Discount; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerDiscountDeletedEvent 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 Discount fetchRelatedObject() throws StripeException { + return (Discount) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEvent.java b/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEvent.java new file mode 100644 index 00000000000..49439f578fb --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Discount; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerDiscountUpdatedEvent 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 Discount fetchRelatedObject() throws StripeException { + return (Discount) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEvent.java new file mode 100644 index 00000000000..f8cb9e50e14 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Subscription; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionCreatedEvent 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEvent.java new file mode 100644 index 00000000000..f357e6d9e60 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.Subscription; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionDeletedEvent 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEvent.java new file mode 100644 index 00000000000..639dbc1941d --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEvent.java @@ -0,0 +1,21 @@ +// 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.Subscription; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionPausedEvent 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEvent.java new file mode 100644 index 00000000000..d6bf95c956d --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEvent.java @@ -0,0 +1,21 @@ +// 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.Subscription; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionPendingUpdateAppliedEvent 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEvent.java new file mode 100644 index 00000000000..7b40144efbf --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEvent.java @@ -0,0 +1,21 @@ +// 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.Subscription; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionPendingUpdateExpiredEvent 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEvent.java new file mode 100644 index 00000000000..002edfe504f --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEvent.java @@ -0,0 +1,21 @@ +// 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.Subscription; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionResumedEvent 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEvent.java new file mode 100644 index 00000000000..f8c659b2df5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEvent.java @@ -0,0 +1,21 @@ +// 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.Subscription; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionTrialWillEndEvent 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEvent.java new file mode 100644 index 00000000000..a299b9e11aa --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Subscription; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionUpdatedEvent 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEvent.java b/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEvent.java new file mode 100644 index 00000000000..34f8e87a057 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.TaxId; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerTaxIdCreatedEvent 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 TaxId fetchRelatedObject() throws StripeException { + return (TaxId) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEvent.java b/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEvent.java new file mode 100644 index 00000000000..7fed1e1b3b7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.TaxId; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerTaxIdDeletedEvent 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 TaxId fetchRelatedObject() throws StripeException { + return (TaxId) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEvent.java b/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEvent.java new file mode 100644 index 00000000000..5b3d529e374 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.TaxId; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerTaxIdUpdatedEvent 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 TaxId fetchRelatedObject() throws StripeException { + return (TaxId) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerUpdatedEvent.java b/src/main/java/com/stripe/events/V1CustomerUpdatedEvent.java new file mode 100644 index 00000000000..0fb86cc6d1c --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Customer; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1CustomerUpdatedEvent 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 Customer fetchRelatedObject() throws StripeException { + return (Customer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FileCreatedEvent.java b/src/main/java/com/stripe/events/V1FileCreatedEvent.java new file mode 100644 index 00000000000..2eb0255cddd --- /dev/null +++ b/src/main/java/com/stripe/events/V1FileCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.File; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1FileCreatedEvent 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 File fetchRelatedObject() throws StripeException { + return (File) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEvent.java new file mode 100644 index 00000000000..b718f533428 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.financialconnections.Account; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountCreatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEvent.java new file mode 100644 index 00000000000..d41b65650d9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEvent.java @@ -0,0 +1,21 @@ +// 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.financialconnections.Account; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountDeactivatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEvent.java new file mode 100644 index 00000000000..92808aaf546 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEvent.java @@ -0,0 +1,21 @@ +// 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.financialconnections.Account; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountDisconnectedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEvent.java new file mode 100644 index 00000000000..9ec4624da70 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEvent.java @@ -0,0 +1,21 @@ +// 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.financialconnections.Account; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountReactivatedEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEvent.java new file mode 100644 index 00000000000..be9370685fa --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEvent.java @@ -0,0 +1,21 @@ +// 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.financialconnections.Account; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRefreshedBalanceEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEvent.java new file mode 100644 index 00000000000..08ba0ada61b --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEvent.java @@ -0,0 +1,21 @@ +// 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.financialconnections.Account; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRefreshedOwnershipEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEvent.java new file mode 100644 index 00000000000..df337128eb6 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEvent.java @@ -0,0 +1,21 @@ +// 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.financialconnections.Account; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRefreshedTransactionsEvent extends Event { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEvent.java new file mode 100644 index 00000000000..5479d81c266 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEvent.java @@ -0,0 +1,21 @@ +// 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.identity.VerificationSession; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionCanceledEvent 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEvent.java new file mode 100644 index 00000000000..3c29cd7aab2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.identity.VerificationSession; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionCreatedEvent 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEvent.java new file mode 100644 index 00000000000..78e40bce284 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEvent.java @@ -0,0 +1,21 @@ +// 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.identity.VerificationSession; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionProcessingEvent 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEvent.java new file mode 100644 index 00000000000..56816477efc --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEvent.java @@ -0,0 +1,21 @@ +// 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.identity.VerificationSession; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionRedactedEvent 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEvent.java new file mode 100644 index 00000000000..ea7bd06c783 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEvent.java @@ -0,0 +1,21 @@ +// 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.identity.VerificationSession; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionRequiresInputEvent 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEvent.java new file mode 100644 index 00000000000..8b021123cef --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEvent.java @@ -0,0 +1,21 @@ +// 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.identity.VerificationSession; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionVerifiedEvent 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceCreatedEvent.java b/src/main/java/com/stripe/events/V1InvoiceCreatedEvent.java new file mode 100644 index 00000000000..5917971f379 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceCreatedEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceDeletedEvent.java b/src/main/java/com/stripe/events/V1InvoiceDeletedEvent.java new file mode 100644 index 00000000000..97154bb592f --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceDeletedEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEvent.java b/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEvent.java new file mode 100644 index 00000000000..ae3aac7f527 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceFinalizationFailedEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceFinalizedEvent.java b/src/main/java/com/stripe/events/V1InvoiceFinalizedEvent.java new file mode 100644 index 00000000000..4ed951a33ae --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceFinalizedEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceFinalizedEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEvent.java b/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEvent.java new file mode 100644 index 00000000000..3b3ed380ef9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceMarkedUncollectibleEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceOverdueEvent.java b/src/main/java/com/stripe/events/V1InvoiceOverdueEvent.java new file mode 100644 index 00000000000..93282bc99de --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceOverdueEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceOverdueEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceOverpaidEvent.java b/src/main/java/com/stripe/events/V1InvoiceOverpaidEvent.java new file mode 100644 index 00000000000..3a39a436249 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceOverpaidEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceOverpaidEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaidEvent.java b/src/main/java/com/stripe/events/V1InvoicePaidEvent.java new file mode 100644 index 00000000000..3ab4373d782 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaidEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoicePaidEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEvent.java new file mode 100644 index 00000000000..c8409d5b3ac --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentActionRequiredEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentFailedEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentFailedEvent.java new file mode 100644 index 00000000000..ab9800dbf9e --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentFailedEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentFailedEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentPaidEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentPaidEvent.java new file mode 100644 index 00000000000..1c62a094fc2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentPaidEvent.java @@ -0,0 +1,21 @@ +// 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.InvoicePayment; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentPaidEvent 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 InvoicePayment fetchRelatedObject() throws StripeException { + return (InvoicePayment) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEvent.java new file mode 100644 index 00000000000..1ccd807f735 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentSucceededEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceSentEvent.java b/src/main/java/com/stripe/events/V1InvoiceSentEvent.java new file mode 100644 index 00000000000..1a2586e4869 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceSentEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceSentEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java b/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java new file mode 100644 index 00000000000..ba73d3a0bb2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceUpcomingEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceUpdatedEvent.java b/src/main/java/com/stripe/events/V1InvoiceUpdatedEvent.java new file mode 100644 index 00000000000..d3ce6c8efe7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceUpdatedEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceVoidedEvent.java b/src/main/java/com/stripe/events/V1InvoiceVoidedEvent.java new file mode 100644 index 00000000000..5624db4938e --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceVoidedEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceVoidedEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceWillBeDueEvent.java b/src/main/java/com/stripe/events/V1InvoiceWillBeDueEvent.java new file mode 100644 index 00000000000..3a940d865ed --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceWillBeDueEvent.java @@ -0,0 +1,21 @@ +// 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.Invoice; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceWillBeDueEvent 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemCreatedEvent.java b/src/main/java/com/stripe/events/V1InvoiceitemCreatedEvent.java new file mode 100644 index 00000000000..91961b7130e --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.InvoiceItem; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemCreatedEvent 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 InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemDeletedEvent.java b/src/main/java/com/stripe/events/V1InvoiceitemDeletedEvent.java new file mode 100644 index 00000000000..a70be0a8a49 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.InvoiceItem; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemDeletedEvent 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 InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEvent.java new file mode 100644 index 00000000000..1aff019a6d4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Authorization; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingAuthorizationCreatedEvent 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 Authorization fetchRelatedObject() throws StripeException { + return (Authorization) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEvent.java b/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEvent.java new file mode 100644 index 00000000000..af2ebbeea8b --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Authorization; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingAuthorizationRequestEvent 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 Authorization fetchRelatedObject() throws StripeException { + return (Authorization) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEvent.java new file mode 100644 index 00000000000..c8c17a76541 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Authorization; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingAuthorizationUpdatedEvent 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 Authorization fetchRelatedObject() throws StripeException { + return (Authorization) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingCardCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingCardCreatedEvent.java new file mode 100644 index 00000000000..52c0baa5f87 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingCardCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Card; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingCardCreatedEvent 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 Card fetchRelatedObject() throws StripeException { + return (Card) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingCardUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingCardUpdatedEvent.java new file mode 100644 index 00000000000..a2d329cf1ac --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingCardUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Card; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingCardUpdatedEvent 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 Card fetchRelatedObject() throws StripeException { + return (Card) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEvent.java new file mode 100644 index 00000000000..e05d1114698 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Cardholder; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingCardholderCreatedEvent 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 Cardholder fetchRelatedObject() throws StripeException { + return (Cardholder) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEvent.java new file mode 100644 index 00000000000..92e6d87378c --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Cardholder; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingCardholderUpdatedEvent 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 Cardholder fetchRelatedObject() throws StripeException { + return (Cardholder) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeClosedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeClosedEvent.java new file mode 100644 index 00000000000..3161bcd9f3a --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeClosedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeClosedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEvent.java new file mode 100644 index 00000000000..59e5cd6ceb1 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeCreatedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEvent.java new file mode 100644 index 00000000000..4c2c12e08f0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeFundsReinstatedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEvent.java new file mode 100644 index 00000000000..4472b13c2f7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeFundsRescindedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEvent.java new file mode 100644 index 00000000000..9e3fc04dabb --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeSubmittedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEvent.java new file mode 100644 index 00000000000..c76e254a72d --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Dispute; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeUpdatedEvent 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEvent.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEvent.java new file mode 100644 index 00000000000..b256df4c107 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.PersonalizationDesign; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingPersonalizationDesignActivatedEvent 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 PersonalizationDesign fetchRelatedObject() throws StripeException { + return (PersonalizationDesign) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEvent.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEvent.java new file mode 100644 index 00000000000..f22e82d69d5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.PersonalizationDesign; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingPersonalizationDesignDeactivatedEvent 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 PersonalizationDesign fetchRelatedObject() throws StripeException { + return (PersonalizationDesign) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEvent.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEvent.java new file mode 100644 index 00000000000..1e92c929c52 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.PersonalizationDesign; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingPersonalizationDesignRejectedEvent 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 PersonalizationDesign fetchRelatedObject() throws StripeException { + return (PersonalizationDesign) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEvent.java new file mode 100644 index 00000000000..8fc0bd0898c --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.PersonalizationDesign; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingPersonalizationDesignUpdatedEvent 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 PersonalizationDesign fetchRelatedObject() throws StripeException { + return (PersonalizationDesign) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTokenCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTokenCreatedEvent.java new file mode 100644 index 00000000000..c071a15d2fa --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTokenCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Token; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingTokenCreatedEvent 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 Token fetchRelatedObject() throws StripeException { + return (Token) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEvent.java new file mode 100644 index 00000000000..59817d9b3a6 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Token; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingTokenUpdatedEvent 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 Token fetchRelatedObject() throws StripeException { + return (Token) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEvent.java new file mode 100644 index 00000000000..d952fd4505f --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Transaction; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingTransactionCreatedEvent 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 Transaction fetchRelatedObject() throws StripeException { + return (Transaction) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent.java new file mode 100644 index 00000000000..3693c2d2914 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Transaction; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent 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 Transaction fetchRelatedObject() throws StripeException { + return (Transaction) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEvent.java new file mode 100644 index 00000000000..4b7c62389b0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.issuing.Transaction; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1IssuingTransactionUpdatedEvent 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 Transaction fetchRelatedObject() throws StripeException { + return (Transaction) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1MandateUpdatedEvent.java b/src/main/java/com/stripe/events/V1MandateUpdatedEvent.java new file mode 100644 index 00000000000..2c8d2aa0a27 --- /dev/null +++ b/src/main/java/com/stripe/events/V1MandateUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Mandate; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1MandateUpdatedEvent 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 Mandate fetchRelatedObject() throws StripeException { + return (Mandate) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEvent.java new file mode 100644 index 00000000000..0a2f82162b8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentAmountCapturableUpdatedEvent 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentCanceledEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentCanceledEvent.java new file mode 100644 index 00000000000..510ecbf5d01 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentCanceledEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentCanceledEvent 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentCreatedEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentCreatedEvent.java new file mode 100644 index 00000000000..0e672a1402f --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentCreatedEvent 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEvent.java new file mode 100644 index 00000000000..dd14549db2b --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentPartiallyFundedEvent 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEvent.java new file mode 100644 index 00000000000..618e609b907 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentPaymentFailedEvent 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentProcessingEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentProcessingEvent.java new file mode 100644 index 00000000000..10ccb4938c7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentProcessingEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentProcessingEvent 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEvent.java new file mode 100644 index 00000000000..7f4bdaeb200 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentRequiresActionEvent 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentSucceededEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentSucceededEvent.java new file mode 100644 index 00000000000..9582e904826 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentSucceededEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentSucceededEvent 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentLinkCreatedEvent.java b/src/main/java/com/stripe/events/V1PaymentLinkCreatedEvent.java new file mode 100644 index 00000000000..a890e0217fc --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentLinkCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentLink; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentLinkCreatedEvent 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 PaymentLink fetchRelatedObject() throws StripeException { + return (PaymentLink) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEvent.java b/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEvent.java new file mode 100644 index 00000000000..2c631b60238 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentLink; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentLinkUpdatedEvent 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 PaymentLink fetchRelatedObject() throws StripeException { + return (PaymentLink) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentMethodAttachedEvent.java b/src/main/java/com/stripe/events/V1PaymentMethodAttachedEvent.java new file mode 100644 index 00000000000..5a2ff8a1d1f --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentMethodAttachedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentMethod; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentMethodAttachedEvent 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 PaymentMethod fetchRelatedObject() throws StripeException { + return (PaymentMethod) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEvent.java b/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEvent.java new file mode 100644 index 00000000000..ee67d2080e9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentMethod; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentMethodAutomaticallyUpdatedEvent 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 PaymentMethod fetchRelatedObject() throws StripeException { + return (PaymentMethod) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentMethodDetachedEvent.java b/src/main/java/com/stripe/events/V1PaymentMethodDetachedEvent.java new file mode 100644 index 00000000000..89e9d9d8b52 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentMethodDetachedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentMethod; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentMethodDetachedEvent 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 PaymentMethod fetchRelatedObject() throws StripeException { + return (PaymentMethod) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEvent.java b/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEvent.java new file mode 100644 index 00000000000..748de7cb281 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.PaymentMethod; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PaymentMethodUpdatedEvent 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 PaymentMethod fetchRelatedObject() throws StripeException { + return (PaymentMethod) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutCanceledEvent.java b/src/main/java/com/stripe/events/V1PayoutCanceledEvent.java new file mode 100644 index 00000000000..af40bd23d96 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutCanceledEvent.java @@ -0,0 +1,21 @@ +// 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.Payout; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PayoutCanceledEvent 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutCreatedEvent.java b/src/main/java/com/stripe/events/V1PayoutCreatedEvent.java new file mode 100644 index 00000000000..6640a65ff55 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Payout; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PayoutCreatedEvent 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutFailedEvent.java b/src/main/java/com/stripe/events/V1PayoutFailedEvent.java new file mode 100644 index 00000000000..215d787935d --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutFailedEvent.java @@ -0,0 +1,21 @@ +// 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.Payout; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PayoutFailedEvent 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutPaidEvent.java b/src/main/java/com/stripe/events/V1PayoutPaidEvent.java new file mode 100644 index 00000000000..d289f1617ce --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutPaidEvent.java @@ -0,0 +1,21 @@ +// 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.Payout; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PayoutPaidEvent 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEvent.java b/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEvent.java new file mode 100644 index 00000000000..a72b3e2196b --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEvent.java @@ -0,0 +1,21 @@ +// 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.Payout; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PayoutReconciliationCompletedEvent 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutUpdatedEvent.java b/src/main/java/com/stripe/events/V1PayoutUpdatedEvent.java new file mode 100644 index 00000000000..50084b78fb2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Payout; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PayoutUpdatedEvent 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PersonCreatedEvent.java b/src/main/java/com/stripe/events/V1PersonCreatedEvent.java new file mode 100644 index 00000000000..eb25520814a --- /dev/null +++ b/src/main/java/com/stripe/events/V1PersonCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Person; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PersonCreatedEvent 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 Person fetchRelatedObject() throws StripeException { + return (Person) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PersonDeletedEvent.java b/src/main/java/com/stripe/events/V1PersonDeletedEvent.java new file mode 100644 index 00000000000..007a159fe87 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PersonDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.Person; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PersonDeletedEvent 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 Person fetchRelatedObject() throws StripeException { + return (Person) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PersonUpdatedEvent.java b/src/main/java/com/stripe/events/V1PersonUpdatedEvent.java new file mode 100644 index 00000000000..b1dbefc088d --- /dev/null +++ b/src/main/java/com/stripe/events/V1PersonUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Person; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PersonUpdatedEvent 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 Person fetchRelatedObject() throws StripeException { + return (Person) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PlanCreatedEvent.java b/src/main/java/com/stripe/events/V1PlanCreatedEvent.java new file mode 100644 index 00000000000..fd4e04faf55 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PlanCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Plan; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PlanCreatedEvent 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 Plan fetchRelatedObject() throws StripeException { + return (Plan) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PlanDeletedEvent.java b/src/main/java/com/stripe/events/V1PlanDeletedEvent.java new file mode 100644 index 00000000000..f289fc74065 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PlanDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.Plan; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PlanDeletedEvent 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 Plan fetchRelatedObject() throws StripeException { + return (Plan) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PlanUpdatedEvent.java b/src/main/java/com/stripe/events/V1PlanUpdatedEvent.java new file mode 100644 index 00000000000..493fdde603a --- /dev/null +++ b/src/main/java/com/stripe/events/V1PlanUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Plan; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PlanUpdatedEvent 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 Plan fetchRelatedObject() throws StripeException { + return (Plan) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceCreatedEvent.java b/src/main/java/com/stripe/events/V1PriceCreatedEvent.java new file mode 100644 index 00000000000..75591d7be4c --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Price; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PriceCreatedEvent 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 Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceDeletedEvent.java b/src/main/java/com/stripe/events/V1PriceDeletedEvent.java new file mode 100644 index 00000000000..a9abad0384c --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.Price; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PriceDeletedEvent 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 Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceUpdatedEvent.java b/src/main/java/com/stripe/events/V1PriceUpdatedEvent.java new file mode 100644 index 00000000000..46e8debfa60 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Price; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PriceUpdatedEvent 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 Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductCreatedEvent.java b/src/main/java/com/stripe/events/V1ProductCreatedEvent.java new file mode 100644 index 00000000000..3da87191c6a --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Product; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ProductCreatedEvent 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductDeletedEvent.java b/src/main/java/com/stripe/events/V1ProductDeletedEvent.java new file mode 100644 index 00000000000..5f30bdaba26 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.Product; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ProductDeletedEvent 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductUpdatedEvent.java b/src/main/java/com/stripe/events/V1ProductUpdatedEvent.java new file mode 100644 index 00000000000..93880bc0e72 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Product; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ProductUpdatedEvent 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PromotionCodeCreatedEvent.java b/src/main/java/com/stripe/events/V1PromotionCodeCreatedEvent.java new file mode 100644 index 00000000000..855317a63d6 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PromotionCodeCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.PromotionCode; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PromotionCodeCreatedEvent 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 PromotionCode fetchRelatedObject() throws StripeException { + return (PromotionCode) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEvent.java b/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEvent.java new file mode 100644 index 00000000000..91620868840 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.PromotionCode; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1PromotionCodeUpdatedEvent 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 PromotionCode fetchRelatedObject() throws StripeException { + return (PromotionCode) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1QuoteAcceptedEvent.java b/src/main/java/com/stripe/events/V1QuoteAcceptedEvent.java new file mode 100644 index 00000000000..012d43fa216 --- /dev/null +++ b/src/main/java/com/stripe/events/V1QuoteAcceptedEvent.java @@ -0,0 +1,21 @@ +// 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.Quote; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1QuoteAcceptedEvent 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 Quote fetchRelatedObject() throws StripeException { + return (Quote) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1QuoteCanceledEvent.java b/src/main/java/com/stripe/events/V1QuoteCanceledEvent.java new file mode 100644 index 00000000000..d443303eed5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1QuoteCanceledEvent.java @@ -0,0 +1,21 @@ +// 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.Quote; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1QuoteCanceledEvent 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 Quote fetchRelatedObject() throws StripeException { + return (Quote) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1QuoteCreatedEvent.java b/src/main/java/com/stripe/events/V1QuoteCreatedEvent.java new file mode 100644 index 00000000000..a2e956d2042 --- /dev/null +++ b/src/main/java/com/stripe/events/V1QuoteCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Quote; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1QuoteCreatedEvent 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 Quote fetchRelatedObject() throws StripeException { + return (Quote) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1QuoteFinalizedEvent.java b/src/main/java/com/stripe/events/V1QuoteFinalizedEvent.java new file mode 100644 index 00000000000..599417cc636 --- /dev/null +++ b/src/main/java/com/stripe/events/V1QuoteFinalizedEvent.java @@ -0,0 +1,21 @@ +// 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.Quote; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1QuoteFinalizedEvent 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 Quote fetchRelatedObject() throws StripeException { + return (Quote) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEvent.java b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEvent.java new file mode 100644 index 00000000000..9f87b9889fc --- /dev/null +++ b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.radar.EarlyFraudWarning; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1RadarEarlyFraudWarningCreatedEvent 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 EarlyFraudWarning fetchRelatedObject() throws StripeException { + return (EarlyFraudWarning) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEvent.java b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEvent.java new file mode 100644 index 00000000000..71e189f7aaf --- /dev/null +++ b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.radar.EarlyFraudWarning; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1RadarEarlyFraudWarningUpdatedEvent 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 EarlyFraudWarning fetchRelatedObject() throws StripeException { + return (EarlyFraudWarning) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1RefundCreatedEvent.java b/src/main/java/com/stripe/events/V1RefundCreatedEvent.java new file mode 100644 index 00000000000..189c4f1cd89 --- /dev/null +++ b/src/main/java/com/stripe/events/V1RefundCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Refund; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1RefundCreatedEvent 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 Refund fetchRelatedObject() throws StripeException { + return (Refund) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1RefundFailedEvent.java b/src/main/java/com/stripe/events/V1RefundFailedEvent.java new file mode 100644 index 00000000000..dfb5e61567a --- /dev/null +++ b/src/main/java/com/stripe/events/V1RefundFailedEvent.java @@ -0,0 +1,21 @@ +// 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.Refund; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1RefundFailedEvent 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 Refund fetchRelatedObject() throws StripeException { + return (Refund) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1RefundUpdatedEvent.java b/src/main/java/com/stripe/events/V1RefundUpdatedEvent.java new file mode 100644 index 00000000000..8bfb15cd8d3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1RefundUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Refund; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1RefundUpdatedEvent 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 Refund fetchRelatedObject() throws StripeException { + return (Refund) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ReviewClosedEvent.java b/src/main/java/com/stripe/events/V1ReviewClosedEvent.java new file mode 100644 index 00000000000..f3a33010e18 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ReviewClosedEvent.java @@ -0,0 +1,21 @@ +// 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.Review; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ReviewClosedEvent 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 Review fetchRelatedObject() throws StripeException { + return (Review) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1ReviewOpenedEvent.java b/src/main/java/com/stripe/events/V1ReviewOpenedEvent.java new file mode 100644 index 00000000000..1934d216f79 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ReviewOpenedEvent.java @@ -0,0 +1,21 @@ +// 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.Review; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1ReviewOpenedEvent 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 Review fetchRelatedObject() throws StripeException { + return (Review) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentCanceledEvent.java b/src/main/java/com/stripe/events/V1SetupIntentCanceledEvent.java new file mode 100644 index 00000000000..4628aaae40d --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentCanceledEvent.java @@ -0,0 +1,21 @@ +// 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.SetupIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SetupIntentCanceledEvent 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentCreatedEvent.java b/src/main/java/com/stripe/events/V1SetupIntentCreatedEvent.java new file mode 100644 index 00000000000..bc2529191f0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.SetupIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SetupIntentCreatedEvent 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEvent.java b/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEvent.java new file mode 100644 index 00000000000..2d261e92c58 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEvent.java @@ -0,0 +1,21 @@ +// 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.SetupIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SetupIntentRequiresActionEvent 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEvent.java b/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEvent.java new file mode 100644 index 00000000000..0604cb664b4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEvent.java @@ -0,0 +1,21 @@ +// 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.SetupIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SetupIntentSetupFailedEvent 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentSucceededEvent.java b/src/main/java/com/stripe/events/V1SetupIntentSucceededEvent.java new file mode 100644 index 00000000000..76cdd53d9a1 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentSucceededEvent.java @@ -0,0 +1,21 @@ +// 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.SetupIntent; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SetupIntentSucceededEvent 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEvent.java b/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEvent.java new file mode 100644 index 00000000000..48e29aaf0f5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.sigma.ScheduledQueryRun; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SigmaScheduledQueryRunCreatedEvent 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 ScheduledQueryRun fetchRelatedObject() throws StripeException { + return (ScheduledQueryRun) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SourceCanceledEvent.java b/src/main/java/com/stripe/events/V1SourceCanceledEvent.java new file mode 100644 index 00000000000..724caf8f567 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SourceCanceledEvent.java @@ -0,0 +1,21 @@ +// 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.Source; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SourceCanceledEvent 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 Source fetchRelatedObject() throws StripeException { + return (Source) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SourceChargeableEvent.java b/src/main/java/com/stripe/events/V1SourceChargeableEvent.java new file mode 100644 index 00000000000..f420b72f305 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SourceChargeableEvent.java @@ -0,0 +1,21 @@ +// 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.Source; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SourceChargeableEvent 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 Source fetchRelatedObject() throws StripeException { + return (Source) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SourceFailedEvent.java b/src/main/java/com/stripe/events/V1SourceFailedEvent.java new file mode 100644 index 00000000000..1d4daef254b --- /dev/null +++ b/src/main/java/com/stripe/events/V1SourceFailedEvent.java @@ -0,0 +1,21 @@ +// 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.Source; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SourceFailedEvent 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 Source fetchRelatedObject() throws StripeException { + return (Source) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEvent.java b/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEvent.java new file mode 100644 index 00000000000..7439f6d093e --- /dev/null +++ b/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEvent.java @@ -0,0 +1,21 @@ +// 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.Source; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SourceRefundAttributesRequiredEvent 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 Source fetchRelatedObject() throws StripeException { + return (Source) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEvent.java new file mode 100644 index 00000000000..23674e71120 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEvent.java @@ -0,0 +1,21 @@ +// 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.SubscriptionSchedule; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleAbortedEvent 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEvent.java new file mode 100644 index 00000000000..38fde7b3dc3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEvent.java @@ -0,0 +1,21 @@ +// 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.SubscriptionSchedule; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleCanceledEvent 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEvent.java new file mode 100644 index 00000000000..5f523eec458 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEvent.java @@ -0,0 +1,21 @@ +// 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.SubscriptionSchedule; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleCompletedEvent 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEvent.java new file mode 100644 index 00000000000..0a2b9a8a602 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.SubscriptionSchedule; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleCreatedEvent 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEvent.java new file mode 100644 index 00000000000..c78bcc4e4bd --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEvent.java @@ -0,0 +1,21 @@ +// 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.SubscriptionSchedule; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleExpiringEvent 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEvent.java new file mode 100644 index 00000000000..e76a0fa7064 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEvent.java @@ -0,0 +1,21 @@ +// 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.SubscriptionSchedule; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleReleasedEvent 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEvent.java new file mode 100644 index 00000000000..ce426683dd0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.SubscriptionSchedule; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleUpdatedEvent 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TaxRateCreatedEvent.java b/src/main/java/com/stripe/events/V1TaxRateCreatedEvent.java new file mode 100644 index 00000000000..a92fd638e1e --- /dev/null +++ b/src/main/java/com/stripe/events/V1TaxRateCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.TaxRate; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TaxRateCreatedEvent 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 TaxRate fetchRelatedObject() throws StripeException { + return (TaxRate) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TaxRateUpdatedEvent.java b/src/main/java/com/stripe/events/V1TaxRateUpdatedEvent.java new file mode 100644 index 00000000000..d28bf3836c4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TaxRateUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.TaxRate; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TaxRateUpdatedEvent 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 TaxRate fetchRelatedObject() throws StripeException { + return (TaxRate) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEvent.java b/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEvent.java new file mode 100644 index 00000000000..29fc054b96f --- /dev/null +++ b/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEvent.java @@ -0,0 +1,21 @@ +// 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.terminal.Reader; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TerminalReaderActionFailedEvent 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 Reader fetchRelatedObject() throws StripeException { + return (Reader) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEvent.java b/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEvent.java new file mode 100644 index 00000000000..2fca525b8c9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEvent.java @@ -0,0 +1,21 @@ +// 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.terminal.Reader; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TerminalReaderActionSucceededEvent 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 Reader fetchRelatedObject() throws StripeException { + return (Reader) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEvent.java b/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEvent.java new file mode 100644 index 00000000000..cebe388db8d --- /dev/null +++ b/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.terminal.Reader; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TerminalReaderActionUpdatedEvent 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 Reader fetchRelatedObject() throws StripeException { + return (Reader) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEvent.java new file mode 100644 index 00000000000..ec9a83c68c9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEvent.java @@ -0,0 +1,21 @@ +// 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.testhelpers.TestClock; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockAdvancingEvent 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEvent.java new file mode 100644 index 00000000000..372f38f93cd --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.testhelpers.TestClock; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockCreatedEvent 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEvent.java new file mode 100644 index 00000000000..e874fd854d2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEvent.java @@ -0,0 +1,21 @@ +// 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.testhelpers.TestClock; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockDeletedEvent 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEvent.java new file mode 100644 index 00000000000..3e2bdf5f803 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEvent.java @@ -0,0 +1,21 @@ +// 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.testhelpers.TestClock; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockInternalFailureEvent 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEvent.java new file mode 100644 index 00000000000..081563e5a87 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEvent.java @@ -0,0 +1,21 @@ +// 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.testhelpers.TestClock; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockReadyEvent 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupCanceledEvent.java b/src/main/java/com/stripe/events/V1TopupCanceledEvent.java new file mode 100644 index 00000000000..ed2caff61ae --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupCanceledEvent.java @@ -0,0 +1,21 @@ +// 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.Topup; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TopupCanceledEvent 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupCreatedEvent.java b/src/main/java/com/stripe/events/V1TopupCreatedEvent.java new file mode 100644 index 00000000000..7a00cbc9d02 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Topup; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TopupCreatedEvent 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupFailedEvent.java b/src/main/java/com/stripe/events/V1TopupFailedEvent.java new file mode 100644 index 00000000000..caf85fc316e --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupFailedEvent.java @@ -0,0 +1,21 @@ +// 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.Topup; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TopupFailedEvent 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupReversedEvent.java b/src/main/java/com/stripe/events/V1TopupReversedEvent.java new file mode 100644 index 00000000000..833f94ba60e --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupReversedEvent.java @@ -0,0 +1,21 @@ +// 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.Topup; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TopupReversedEvent 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupSucceededEvent.java b/src/main/java/com/stripe/events/V1TopupSucceededEvent.java new file mode 100644 index 00000000000..bed45d60492 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupSucceededEvent.java @@ -0,0 +1,21 @@ +// 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.Topup; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TopupSucceededEvent 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TransferCreatedEvent.java b/src/main/java/com/stripe/events/V1TransferCreatedEvent.java new file mode 100644 index 00000000000..161bd7afd33 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TransferCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Transfer; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TransferCreatedEvent 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 Transfer fetchRelatedObject() throws StripeException { + return (Transfer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TransferReversedEvent.java b/src/main/java/com/stripe/events/V1TransferReversedEvent.java new file mode 100644 index 00000000000..4ab28e15e24 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TransferReversedEvent.java @@ -0,0 +1,21 @@ +// 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.Transfer; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TransferReversedEvent 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 Transfer fetchRelatedObject() throws StripeException { + return (Transfer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V1TransferUpdatedEvent.java b/src/main/java/com/stripe/events/V1TransferUpdatedEvent.java new file mode 100644 index 00000000000..a674cb0b8b9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TransferUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Transfer; +import com.stripe.model.v2.Event; +import lombok.Getter; + +@Getter +public final class V1TransferUpdatedEvent 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 Transfer fetchRelatedObject() throws StripeException { + return (Transfer) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java b/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java new file mode 100644 index 00000000000..21fa0a13c73 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event; +import com.stripe.model.v2.billing.BillSetting; +import java.time.Instant; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2BillingBillSettingUpdatedEvent extends Event { + /** Data for the v2.billing.bill_setting.updated event. */ + @SerializedName("data") + V2BillingBillSettingUpdatedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** Timestamp of when the object was updated. */ + @SerializedName("updated") + Instant updated; + } + + @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 BillSetting fetchRelatedObject() throws StripeException { + return (BillSetting) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingCadenceBilledEvent.java b/src/main/java/com/stripe/events/V2BillingCadenceBilledEvent.java index 247c699a259..a279e41b702 100644 --- a/src/main/java/com/stripe/events/V2BillingCadenceBilledEvent.java +++ b/src/main/java/com/stripe/events/V2BillingCadenceBilledEvent.java @@ -5,10 +5,24 @@ import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; import com.stripe.model.v2.billing.Cadence; +import java.util.List; import lombok.Getter; +import lombok.Setter; @Getter public final class V2BillingCadenceBilledEvent extends Event { + /** Data for the v2.billing.cadence.billed event. */ + @SerializedName("data") + V2BillingCadenceBilledEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The IDs of the invoices that were generated by the tick for this Cadence. */ + @SerializedName("invoices") + List invoices; + } + @SerializedName("related_object") /** Object containing the reference to API resource relevant to the event. */ diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java index 68ea8fcc6f6..dfc1dfc0e56 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java @@ -22,8 +22,8 @@ public static final class EventData { * Open Enum. The capability which had its status updated. * *

One of {@code bank_accounts.local}, {@code bank_accounts.wire}, {@code cards}, {@code - * stripe_balance.payouts}, {@code stripe_balance.stripe_transfers}, or {@code - * stripe.transfers}. + * crypto_wallets_v2}, {@code stripe_balance.payouts}, {@code stripe_balance.stripe_transfers}, + * or {@code stripe.transfers}. */ @SerializedName("updated_capability") String updatedCapability; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java index 52c041f9338..e18e72ec8e8 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java @@ -21,11 +21,13 @@ public static final class EventData { /** * Open Enum. The capability which had its status updated. * - *

One of {@code financial_addressses.bank_accounts}, {@code holds_currencies.eur}, {@code - * holds_currencies.gbp}, {@code holds_currencies.usd}, {@code inbound_transfers.bank_accounts}, - * {@code outbound_payments.bank_accounts}, {@code outbound_payments.cards}, {@code - * outbound_payments.financial_accounts}, {@code outbound_transfers.bank_accounts}, or {@code - * outbound_transfers.financial_accounts}. + *

One of {@code financial_addressses.bank_accounts}, {@code + * financial_addressses.crypto_wallets}, {@code holds_currencies.eur}, {@code + * holds_currencies.gbp}, {@code holds_currencies.usd}, {@code holds_currencies.usdc}, {@code + * inbound_transfers.bank_accounts}, {@code outbound_payments.bank_accounts}, {@code + * outbound_payments.cards}, {@code outbound_payments.crypto_wallets}, {@code + * outbound_payments.financial_accounts}, {@code outbound_transfers.bank_accounts}, {@code + * outbound_transfers.crypto_wallets}, or {@code outbound_transfers.financial_accounts}. */ @SerializedName("updated_capability") String updatedCapability; diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxClaimedEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxClaimedEvent.java new file mode 100644 index 00000000000..a5cb009f834 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxClaimedEvent.java @@ -0,0 +1,21 @@ +// 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.Event; +import com.stripe.model.v2.core.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxClaimedEvent 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEvent.java new file mode 100644 index 00000000000..bf263803f1d --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Event; +import com.stripe.model.v2.core.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxCreatedEvent 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEvent.java new file mode 100644 index 00000000000..77f27e489fd --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEvent.java @@ -0,0 +1,21 @@ +// 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.Event; +import com.stripe.model.v2.core.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxExpiredEvent 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEvent.java new file mode 100644 index 00000000000..b93573eacc2 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEvent.java @@ -0,0 +1,21 @@ +// 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.Event; +import com.stripe.model.v2.core.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxExpiringEvent 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.java new file mode 100644 index 00000000000..f0fb0a02fe9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Event; +import com.stripe.model.v2.core.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthApiErrorResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthApiErrorResolvedEvent.java index 040e8c6c833..8ecdbbf3ee0 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthApiErrorResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthApiErrorResolvedEvent.java @@ -16,9 +16,6 @@ public final class V2CoreHealthApiErrorResolvedEvent extends Event { @Getter @Setter public static final class EventData { - /** The alert ID. */ - @SerializedName("alert_id") - String alertId; /** The grouping key for the alert. */ @SerializedName("grouping_key") String groupingKey; diff --git a/src/main/java/com/stripe/events/V2CoreHealthApiLatencyResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthApiLatencyResolvedEvent.java index 2f70677d621..6ff8c295345 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthApiLatencyResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthApiLatencyResolvedEvent.java @@ -16,9 +16,6 @@ public final class V2CoreHealthApiLatencyResolvedEvent extends Event { @Getter @Setter public static final class EventData { - /** The alert ID. */ - @SerializedName("alert_id") - String alertId; /** The grouping key for the alert. */ @SerializedName("grouping_key") String groupingKey; diff --git a/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropFiringEvent.java b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropFiringEvent.java index a028ff6c883..073ba132b02 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropFiringEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropFiringEvent.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.Event; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import lombok.Getter; @@ -44,7 +43,7 @@ public static final class Impact { String chargeType; /** The current authorization rate percentage. */ @SerializedName("current_percentage") - BigDecimal currentPercentage; + String currentPercentage; /** Dimensions that describe what subset of payments are impacted. */ @SerializedName("dimensions") List dimensions; @@ -66,7 +65,7 @@ public static final class Impact { String paymentMethodType; /** The previous authorization rate percentage. */ @SerializedName("previous_percentage") - BigDecimal previousPercentage; + String previousPercentage; public static final class Dimension { /** The issuer dimension. */ diff --git a/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEvent.java index 2d519e65571..2642523b333 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEvent.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.v2.Event; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import lombok.Getter; @@ -18,9 +17,6 @@ public final class V2CoreHealthAuthorizationRateDropResolvedEvent extends Event @Getter @Setter public static final class EventData { - /** The alert ID. */ - @SerializedName("alert_id") - String alertId; /** The grouping key for the alert. */ @SerializedName("grouping_key") String groupingKey; @@ -47,7 +43,7 @@ public static final class Impact { String chargeType; /** The current authorization rate percentage. */ @SerializedName("current_percentage") - BigDecimal currentPercentage; + String currentPercentage; /** Dimensions that describe what subset of payments are impacted. */ @SerializedName("dimensions") List dimensions; @@ -69,7 +65,7 @@ public static final class Impact { String paymentMethodType; /** The previous authorization rate percentage. */ @SerializedName("previous_percentage") - BigDecimal previousPercentage; + String previousPercentage; public static final class Dimension { /** The issuer dimension. */ diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java new file mode 100644 index 00000000000..1d017c523d8 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.java @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.v2.Event; +import com.stripe.v2.Amount; +import java.time.Instant; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent extends Event { + /** Data for the v2.core.health.issuing_authorization_request_errors.firing event. */ + @SerializedName("data") + V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The grouping key for the alert. */ + @SerializedName("grouping_key") + String groupingKey; + /** The user impact. */ + @SerializedName("impact") + Impact impact; + /** The time when impact on the user experience was first detected. */ + @SerializedName("started_at") + Instant startedAt; + /** A short description of the alert. */ + @SerializedName("summary") + String summary; + + public static final class Impact { + /** Estimated aggregated amount for the approved requests. */ + @SerializedName("approved_amount") + Amount approvedAmount; + /** The number of approved requests which are impacted. */ + @SerializedName("approved_impacted_requests") + Long approvedImpactedRequests; + /** Estimated aggregated amount for the declined requests. */ + @SerializedName("declined_amount") + Amount declinedAmount; + /** The number of declined requests which are impacted. */ + @SerializedName("declined_impacted_requests") + Long declinedImpactedRequests; + } + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java new file mode 100644 index 00000000000..0cad8b0e37f --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.java @@ -0,0 +1,51 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.model.v2.Event; +import com.stripe.v2.Amount; +import java.time.Instant; +import lombok.Getter; +import lombok.Setter; + +@Getter +public final class V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent extends Event { + /** Data for the v2.core.health.issuing_authorization_request_errors.resolved event. */ + @SerializedName("data") + V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.EventData data; + + @Getter + @Setter + public static final class EventData { + /** The grouping key for the alert. */ + @SerializedName("grouping_key") + String groupingKey; + /** The user impact. */ + @SerializedName("impact") + Impact impact; + /** The time when the user experience has returned to expected levels. */ + @SerializedName("resolved_at") + Instant resolvedAt; + /** The time when impact on the user experience was first detected. */ + @SerializedName("started_at") + Instant startedAt; + /** A short description of the alert. */ + @SerializedName("summary") + String summary; + + public static final class Impact { + /** Estimated aggregated amount for the approved requests. */ + @SerializedName("approved_amount") + Amount approvedAmount; + /** The number of approved requests which are impacted. */ + @SerializedName("approved_impacted_requests") + Long approvedImpactedRequests; + /** Estimated aggregated amount for the declined requests. */ + @SerializedName("declined_amount") + Amount declinedAmount; + /** The number of declined requests which are impacted. */ + @SerializedName("declined_impacted_requests") + Long declinedImpactedRequests; + } + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java index 85c92ac8a36..12d780efe09 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent.java @@ -17,9 +17,6 @@ public final class V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent e @Getter @Setter public static final class EventData { - /** The alert ID. */ - @SerializedName("alert_id") - String alertId; /** The grouping key for the alert. */ @SerializedName("grouping_key") String groupingKey; diff --git a/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorResolvedEvent.java index 971ce2961e8..8da88ab1da3 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorResolvedEvent.java @@ -16,9 +16,6 @@ public final class V2CoreHealthPaymentMethodErrorResolvedEvent extends Event { @Getter @Setter public static final class EventData { - /** The alert ID. */ - @SerializedName("alert_id") - String alertId; /** The grouping key for the alert. */ @SerializedName("grouping_key") String groupingKey; diff --git a/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropResolvedEvent.java index 77034969c55..833a9a95566 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropResolvedEvent.java @@ -16,9 +16,6 @@ public final class V2CoreHealthTrafficVolumeDropResolvedEvent extends Event { @Getter @Setter public static final class EventData { - /** The alert ID. */ - @SerializedName("alert_id") - String alertId; /** The grouping key for the alert. */ @SerializedName("grouping_key") String groupingKey; diff --git a/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyResolvedEvent.java index d9c3ffc0cc3..7c04a8fb30d 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyResolvedEvent.java @@ -16,9 +16,6 @@ public final class V2CoreHealthWebhookLatencyResolvedEvent extends Event { @Getter @Setter public static final class EventData { - /** The alert ID. */ - @SerializedName("alert_id") - String alertId; /** The grouping key for the alert. */ @SerializedName("grouping_key") String groupingKey; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEvent.java new file mode 100644 index 00000000000..ecede5bd966 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEvent.java @@ -0,0 +1,21 @@ +// 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.Event; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementRecipientVerificationCreatedEvent 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 RecipientVerification fetchRelatedObject() throws StripeException { + return (RecipientVerification) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.java new file mode 100644 index 00000000000..ff0a3e08ab9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.java @@ -0,0 +1,21 @@ +// 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.Event; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementRecipientVerificationUpdatedEvent 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 RecipientVerification fetchRelatedObject() throws StripeException { + return (RecipientVerification) super.fetchRelatedObject(this.relatedObject); + } +} diff --git a/src/main/java/com/stripe/exception/StripeException.java b/src/main/java/com/stripe/exception/StripeException.java index d677c3cf252..ebd21d25afb 100644 --- a/src/main/java/com/stripe/exception/StripeException.java +++ b/src/main/java/com/stripe/exception/StripeException.java @@ -146,6 +146,9 @@ public static StripeException parseV2Exception( case "quota_exceeded": return com.stripe.exception.QuotaExceededException.parse( body, statusCode, requestId, responseGetter); + case "rate_limit": + return com.stripe.exception.RateLimitException.parse( + body, statusCode, requestId, responseGetter); case "recipient_not_notifiable": return com.stripe.exception.RecipientNotNotifiableException.parse( body, statusCode, requestId, responseGetter); diff --git a/src/main/java/com/stripe/model/Account.java b/src/main/java/com/stripe/model/Account.java index 72906330eff..15e129a6dcd 100644 --- a/src/main/java/com/stripe/model/Account.java +++ b/src/main/java/com/stripe/model/Account.java @@ -1289,6 +1289,15 @@ public static class Capabilities extends StripeObject { @SerializedName("paypal_payments") String paypalPayments; + /** + * The status of the Paypay capability of the account, or whether the account can directly + * process Paypay payments. + * + *

One of {@code active}, {@code inactive}, or {@code pending}. + */ + @SerializedName("paypay_payments") + String paypayPayments; + /** * The status of the PayTo capability of the account, or whether the account can directly * process PayTo charges. @@ -2172,14 +2181,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -2198,29 +2207,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -2374,14 +2384,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -2400,29 +2410,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Address.java b/src/main/java/com/stripe/model/Address.java index 042bcd4c261..f65f0d5f101 100644 --- a/src/main/java/com/stripe/model/Address.java +++ b/src/main/java/com/stripe/model/Address.java @@ -21,11 +21,11 @@ public class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; diff --git a/src/main/java/com/stripe/model/BalanceSettings.java b/src/main/java/com/stripe/model/BalanceSettings.java index dc9ea0e1587..70c1f411113 100644 --- a/src/main/java/com/stripe/model/BalanceSettings.java +++ b/src/main/java/com/stripe/model/BalanceSettings.java @@ -20,11 +20,6 @@ /** * Options for customizing account balances and payout settings for a Stripe platform’s connected * accounts. - * - *

This API is only available for users enrolled in the public preview for Accounts v2 on Stripe - * Connect. If you are not in this preview, please use the Accounts v1 API to - * manage your connected accounts’ balance settings instead. */ @Getter @Setter @@ -166,6 +161,15 @@ public static class Payments extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Payouts extends StripeObject { + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds that + * exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + @SerializedName("minimum_balance_by_currency") + Map minimumBalanceByCurrency; + /** * Details on when funds from charges are available, and when they are paid out to an external * account. See our One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -578,29 +578,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -680,14 +681,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -706,29 +707,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Capability.java b/src/main/java/com/stripe/model/Capability.java index f0c8d1b3e45..0b49c7c1f22 100644 --- a/src/main/java/com/stripe/model/Capability.java +++ b/src/main/java/com/stripe/model/Capability.java @@ -246,14 +246,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -272,29 +272,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -431,14 +432,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -457,29 +458,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/Card.java b/src/main/java/com/stripe/model/Card.java index 73d13c620cb..203a1cb3684 100644 --- a/src/main/java/com/stripe/model/Card.java +++ b/src/main/java/com/stripe/model/Card.java @@ -90,9 +90,9 @@ public class Card extends ApiResource List availablePayoutMethods; /** - * Card brand. Can be {@code American Express}, {@code Diners Club}, {@code Discover}, {@code - * Eftpos Australia}, {@code Girocard}, {@code JCB}, {@code MasterCard}, {@code UnionPay}, {@code - * Visa}, or {@code Unknown}. + * Card brand. Can be {@code American Express}, {@code Cartes Bancaires}, {@code Diners Club}, + * {@code Discover}, {@code Eftpos Australia}, {@code Girocard}, {@code JCB}, {@code MasterCard}, + * {@code UnionPay}, {@code Visa}, or {@code Unknown}. */ @SerializedName("brand") String brand; diff --git a/src/main/java/com/stripe/model/Charge.java b/src/main/java/com/stripe/model/Charge.java index 49298af8189..847f58d9b32 100644 --- a/src/main/java/com/stripe/model/Charge.java +++ b/src/main/java/com/stripe/model/Charge.java @@ -23,9 +23,9 @@ /** * The {@code Charge} object represents a single attempt to move money into your Stripe account. - * PaymentIntent confirmation is the most common way to create Charges, but transferring money to a - * different Stripe account through Connect also creates Charges. Some legacy payment flows create - * Charges directly, which is not recommended for new integrations. + * PaymentIntent confirmation is the most common way to create Charges, but Account Debits may also create Charges. + * Some legacy payment flows create Charges directly, which is not recommended for new integrations. */ @Getter @Setter @@ -1279,6 +1279,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("payto") Payto payto; @@ -3603,6 +3606,20 @@ public static class Payco extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Paynow extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + /** Reference number associated with this PayNow payment. */ @SerializedName("reference") String reference; @@ -3705,6 +3722,15 @@ public static class SellerProtection extends StripeObject { } } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Payto, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/ConfirmationToken.java b/src/main/java/com/stripe/model/ConfirmationToken.java index e40883ec775..8919c2168f8 100644 --- a/src/main/java/com/stripe/model/ConfirmationToken.java +++ b/src/main/java/com/stripe/model/ConfirmationToken.java @@ -416,6 +416,9 @@ public static class PaymentMethodPreview extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("payto") Payto payto; @@ -471,10 +474,10 @@ public static class PaymentMethodPreview extends StripeObject { * ideal}, {@code interac_present}, {@code kakao_pay}, {@code klarna}, {@code konbini}, {@code * kr_card}, {@code link}, {@code mb_way}, {@code mobilepay}, {@code multibanco}, {@code * naver_pay}, {@code nz_bank_account}, {@code oxxo}, {@code p24}, {@code pay_by_bank}, {@code - * payco}, {@code paynow}, {@code paypal}, {@code payto}, {@code pix}, {@code promptpay}, {@code - * qris}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code satispay}, {@code - * sepa_debit}, {@code shopeepay}, {@code sofort}, {@code stripe_balance}, {@code swish}, {@code - * twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}. + * payco}, {@code paynow}, {@code paypal}, {@code paypay}, {@code payto}, {@code pix}, {@code + * promptpay}, {@code qris}, {@code rechnung}, {@code revolut_pay}, {@code samsung_pay}, {@code + * satispay}, {@code sepa_debit}, {@code shopeepay}, {@code sofort}, {@code stripe_balance}, + * {@code swish}, {@code twint}, {@code us_bank_account}, {@code wechat_pay}, or {@code zip}. */ @SerializedName("type") String type; @@ -2149,6 +2152,15 @@ public static class Paypal extends StripeObject { String verifiedEmail; } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Payto, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/CreditNote.java b/src/main/java/com/stripe/model/CreditNote.java index de8eb46eb6b..3d4fb10eb12 100644 --- a/src/main/java/com/stripe/model/CreditNote.java +++ b/src/main/java/com/stripe/model/CreditNote.java @@ -743,12 +743,20 @@ public static class Refund extends StripeObject { @SerializedName("amount_refunded") Long amountRefunded; + /** The PaymentRecord refund details associated with this credit note refund. */ + @SerializedName("payment_record_refund") + PaymentRecordRefund paymentRecordRefund; + /** ID of the refund. */ @SerializedName("refund") @Getter(lombok.AccessLevel.NONE) @Setter(lombok.AccessLevel.NONE) ExpandableField refund; + /** Type of the refund, one of {@code refund} or {@code payment_record_refund}. */ + @SerializedName("type") + String type; + /** Get ID of expandable {@code refund} object. */ public String getRefund() { return (this.refund != null) ? this.refund.getId() : null; @@ -767,6 +775,23 @@ public void setRefundObject(com.stripe.model.Refund expandableObject) { this.refund = new ExpandableField(expandableObject.getId(), expandableObject); } + + /** + * For more details about PaymentRecordRefund, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentRecordRefund extends StripeObject { + /** ID of the payment record. */ + @SerializedName("payment_record") + String paymentRecord; + + /** ID of the refund group. */ + @SerializedName("refund_group") + String refundGroup; + } } /** diff --git a/src/main/java/com/stripe/model/Customer.java b/src/main/java/com/stripe/model/Customer.java index e3218dc5bc9..572ea0d2d9d 100644 --- a/src/main/java/com/stripe/model/Customer.java +++ b/src/main/java/com/stripe/model/Customer.java @@ -52,6 +52,10 @@ public class Customer extends ApiResource implements HasId, MetadataStoresubscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with - * conventional one-off charges or payment intents. - */ - @SerializedName("coupon") - Coupon coupon; - /** The ID of the customer associated with this discount. */ @SerializedName("customer") @Getter(lombok.AccessLevel.NONE) @@ -98,6 +85,9 @@ public class Discount extends StripeObject implements HasId { @Setter(lombok.AccessLevel.NONE) ExpandableField promotionCode; + @SerializedName("source") + Source source; + /** Date that the coupon was applied. */ @SerializedName("start") Long start; @@ -151,4 +141,45 @@ public void setPromotionCodeObject(PromotionCode expandableObject) { this.promotionCode = new ExpandableField(expandableObject.getId(), expandableObject); } + + /** + * For more details about Source, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Source extends StripeObject { + /** The coupon that was redeemed to create this discount. */ + @SerializedName("coupon") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField coupon; + + /** + * The source type of the discount. + * + *

Equal to {@code coupon}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code coupon} object. */ + public String getCoupon() { + return (this.coupon != null) ? this.coupon.getId() : null; + } + + public void setCoupon(String id) { + this.coupon = ApiResource.setExpandableFieldId(id, this.coupon); + } + + /** Get expanded {@code coupon}. */ + public Coupon getCouponObject() { + return (this.coupon != null) ? this.coupon.getExpanded() : null; + } + + public void setCouponObject(Coupon expandableObject) { + this.coupon = new ExpandableField(expandableObject.getId(), expandableObject); + } + } } diff --git a/src/main/java/com/stripe/model/Dispute.java b/src/main/java/com/stripe/model/Dispute.java index d7a4da8b3bb..a5dbd0f7613 100644 --- a/src/main/java/com/stripe/model/Dispute.java +++ b/src/main/java/com/stripe/model/Dispute.java @@ -77,6 +77,15 @@ public class Dispute extends ApiResource @SerializedName("id") String id; + /** + * Intended submission method for the dispute. + * + *

One of {@code manual}, {@code prefer_manual}, {@code prefer_smart_disputes}, or {@code + * smart_disputes}. + */ + @SerializedName("intended_submission_method") + String intendedSubmissionMethod; + /** * If true, it's still possible to refund the disputed payment. After the payment has been fully * refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. @@ -141,8 +150,8 @@ public class Dispute extends ApiResource * warning_under_review}, {@code warning_closed}, {@code needs_response}, {@code under_review}, * {@code won}, {@code lost}, or {@code prevented}. * - *

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

One of {@code lost}, {@code needs_response}, {@code prevented}, {@code under_review}, {@code + * warning_closed}, {@code warning_needs_response}, {@code warning_under_review}, or {@code won}. */ @SerializedName("status") String status; @@ -881,11 +890,11 @@ public static class ShippingAddress extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -969,11 +978,11 @@ public static class ShippingAddress extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1201,6 +1210,10 @@ public static class Card extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Klarna extends StripeObject { + /** Chargeback loss reason mapped by Stripe from Klarna's chargeback loss reason. */ + @SerializedName("chargeback_loss_reason_code") + String chargebackLossReasonCode; + /** The reason for the dispute as defined by Klarna. */ @SerializedName("reason_code") String reasonCode; @@ -1234,7 +1247,7 @@ public static class Paypal extends StripeObject { public static class SmartDisputes extends StripeObject { /** Evidence that could be provided to improve the SmartDisputes packet. */ @SerializedName("recommended_evidence") - List recommendedEvidence; + List> recommendedEvidence; /** * Smart Disputes auto representment packet availability status. diff --git a/src/main/java/com/stripe/model/EventDataClassLookup.java b/src/main/java/com/stripe/model/EventDataClassLookup.java index c82f3439877..b98ce6bd5db 100644 --- a/src/main/java/com/stripe/model/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/EventDataClassLookup.java @@ -14,92 +14,100 @@ public final class EventDataClassLookup { public static final Map> classLookup = new HashMap<>(); static { - classLookup.put("account", Account.class); - classLookup.put("account_link", AccountLink.class); - classLookup.put("account_notice", AccountNotice.class); - classLookup.put("account_session", AccountSession.class); - classLookup.put("apple_pay_domain", ApplePayDomain.class); - classLookup.put("application", Application.class); - classLookup.put("application_fee", ApplicationFee.class); - classLookup.put("balance", Balance.class); - classLookup.put("balance_settings", BalanceSettings.class); - classLookup.put("balance_transaction", BalanceTransaction.class); - classLookup.put("bank_account", BankAccount.class); - classLookup.put("capability", Capability.class); - classLookup.put("card", Card.class); - classLookup.put("cash_balance", CashBalance.class); - classLookup.put("charge", Charge.class); - classLookup.put("confirmation_token", ConfirmationToken.class); - classLookup.put("connect_collection_transfer", ConnectCollectionTransfer.class); - classLookup.put("country_spec", CountrySpec.class); - classLookup.put("coupon", Coupon.class); - classLookup.put("credit_note", CreditNote.class); - classLookup.put("credit_note_line_item", CreditNoteLineItem.class); - classLookup.put("customer", Customer.class); - classLookup.put("customer_balance_transaction", CustomerBalanceTransaction.class); - classLookup.put("customer_cash_balance_transaction", CustomerCashBalanceTransaction.class); - classLookup.put("customer_session", CustomerSession.class); - classLookup.put("discount", Discount.class); - classLookup.put("dispute", Dispute.class); - classLookup.put("ephemeral_key", EphemeralKey.class); - classLookup.put("event", Event.class); - classLookup.put("exchange_rate", ExchangeRate.class); - classLookup.put("fee_refund", FeeRefund.class); - classLookup.put("file", File.class); - classLookup.put("file_link", FileLink.class); - classLookup.put("funding_instructions", FundingInstructions.class); - classLookup.put("fx_quote", FxQuote.class); - classLookup.put("invoice", Invoice.class); - classLookup.put("invoice_payment", InvoicePayment.class); - classLookup.put("invoice_rendering_template", InvoiceRenderingTemplate.class); - classLookup.put("invoiceitem", InvoiceItem.class); - classLookup.put("item", LineItem.class); - classLookup.put("line_item", InvoiceLineItem.class); - classLookup.put("login_link", LoginLink.class); - classLookup.put("mandate", Mandate.class); - classLookup.put("margin", Margin.class); - classLookup.put("order", Order.class); - classLookup.put("payment_attempt_record", PaymentAttemptRecord.class); - classLookup.put("payment_intent", PaymentIntent.class); - classLookup.put( - "payment_intent_amount_details_line_item", PaymentIntentAmountDetailsLineItem.class); - classLookup.put("payment_link", PaymentLink.class); - classLookup.put("payment_method", PaymentMethod.class); - classLookup.put("payment_method_configuration", PaymentMethodConfiguration.class); - classLookup.put("payment_method_domain", PaymentMethodDomain.class); - classLookup.put("payment_record", PaymentRecord.class); - classLookup.put("payout", Payout.class); - classLookup.put("person", Person.class); - classLookup.put("plan", Plan.class); - classLookup.put("price", Price.class); - classLookup.put("product", Product.class); - classLookup.put("product_feature", ProductFeature.class); - classLookup.put("promotion_code", PromotionCode.class); - classLookup.put("quote", Quote.class); - classLookup.put("quote_line", QuoteLine.class); - classLookup.put("quote_preview_invoice", QuotePreviewInvoice.class); - classLookup.put("quote_preview_subscription_schedule", QuotePreviewSubscriptionSchedule.class); - classLookup.put("refund", Refund.class); - classLookup.put("reserve_transaction", ReserveTransaction.class); - classLookup.put("review", Review.class); - classLookup.put("setup_attempt", SetupAttempt.class); - classLookup.put("setup_intent", SetupIntent.class); - classLookup.put("shipping_rate", ShippingRate.class); - classLookup.put("source", Source.class); - classLookup.put("source_mandate_notification", SourceMandateNotification.class); - classLookup.put("source_transaction", SourceTransaction.class); - classLookup.put("subscription", Subscription.class); - classLookup.put("subscription_item", SubscriptionItem.class); - classLookup.put("subscription_schedule", SubscriptionSchedule.class); - classLookup.put("tax_code", TaxCode.class); - classLookup.put("tax_deducted_at_source", TaxDeductedAtSource.class); - classLookup.put("tax_id", TaxId.class); - classLookup.put("tax_rate", TaxRate.class); - classLookup.put("token", Token.class); - classLookup.put("topup", Topup.class); - classLookup.put("transfer", Transfer.class); - classLookup.put("transfer_reversal", TransferReversal.class); - classLookup.put("webhook_endpoint", WebhookEndpoint.class); + classLookup.put("account", com.stripe.model.Account.class); + classLookup.put("account_link", com.stripe.model.AccountLink.class); + classLookup.put("account_notice", com.stripe.model.AccountNotice.class); + classLookup.put("account_session", com.stripe.model.AccountSession.class); + classLookup.put("apple_pay_domain", com.stripe.model.ApplePayDomain.class); + classLookup.put("application", com.stripe.model.Application.class); + classLookup.put("application_fee", com.stripe.model.ApplicationFee.class); + classLookup.put("balance", com.stripe.model.Balance.class); + classLookup.put("balance_settings", com.stripe.model.BalanceSettings.class); + classLookup.put("balance_transaction", com.stripe.model.BalanceTransaction.class); + classLookup.put("bank_account", com.stripe.model.BankAccount.class); + classLookup.put("capability", com.stripe.model.Capability.class); + classLookup.put("card", com.stripe.model.Card.class); + classLookup.put("cash_balance", com.stripe.model.CashBalance.class); + classLookup.put("charge", com.stripe.model.Charge.class); + classLookup.put("confirmation_token", com.stripe.model.ConfirmationToken.class); + classLookup.put( + "connect_collection_transfer", com.stripe.model.ConnectCollectionTransfer.class); + classLookup.put("country_spec", com.stripe.model.CountrySpec.class); + classLookup.put("coupon", com.stripe.model.Coupon.class); + classLookup.put("credit_note", com.stripe.model.CreditNote.class); + classLookup.put("credit_note_line_item", com.stripe.model.CreditNoteLineItem.class); + classLookup.put("customer", com.stripe.model.Customer.class); + classLookup.put( + "customer_balance_transaction", com.stripe.model.CustomerBalanceTransaction.class); + classLookup.put( + "customer_cash_balance_transaction", com.stripe.model.CustomerCashBalanceTransaction.class); + classLookup.put("customer_session", com.stripe.model.CustomerSession.class); + classLookup.put("discount", com.stripe.model.Discount.class); + classLookup.put("dispute", com.stripe.model.Dispute.class); + classLookup.put("ephemeral_key", com.stripe.model.EphemeralKey.class); + classLookup.put("event", com.stripe.model.Event.class); + classLookup.put("exchange_rate", com.stripe.model.ExchangeRate.class); + classLookup.put("fee_refund", com.stripe.model.FeeRefund.class); + classLookup.put("file", com.stripe.model.File.class); + classLookup.put("file_link", com.stripe.model.FileLink.class); + classLookup.put("funding_instructions", com.stripe.model.FundingInstructions.class); + classLookup.put("fx_quote", com.stripe.model.FxQuote.class); + classLookup.put("invoice", com.stripe.model.Invoice.class); + classLookup.put("invoice_payment", com.stripe.model.InvoicePayment.class); + classLookup.put("invoice_rendering_template", com.stripe.model.InvoiceRenderingTemplate.class); + classLookup.put("invoiceitem", com.stripe.model.InvoiceItem.class); + classLookup.put("item", com.stripe.model.LineItem.class); + classLookup.put("line_item", com.stripe.model.InvoiceLineItem.class); + classLookup.put("login_link", com.stripe.model.LoginLink.class); + classLookup.put("mandate", com.stripe.model.Mandate.class); + classLookup.put("margin", com.stripe.model.Margin.class); + classLookup.put("order", com.stripe.model.Order.class); + classLookup.put("payment_attempt_record", com.stripe.model.PaymentAttemptRecord.class); + classLookup.put("payment_intent", com.stripe.model.PaymentIntent.class); + classLookup.put( + "payment_intent_amount_details_line_item", + com.stripe.model.PaymentIntentAmountDetailsLineItem.class); + classLookup.put("payment_link", com.stripe.model.PaymentLink.class); + classLookup.put("payment_method", com.stripe.model.PaymentMethod.class); + classLookup.put( + "payment_method_configuration", com.stripe.model.PaymentMethodConfiguration.class); + classLookup.put("payment_method_domain", com.stripe.model.PaymentMethodDomain.class); + classLookup.put("payment_record", com.stripe.model.PaymentRecord.class); + classLookup.put("payout", com.stripe.model.Payout.class); + classLookup.put("person", com.stripe.model.Person.class); + classLookup.put("plan", com.stripe.model.Plan.class); + classLookup.put("price", com.stripe.model.Price.class); + classLookup.put("product", com.stripe.model.Product.class); + classLookup.put("product_feature", com.stripe.model.ProductFeature.class); + classLookup.put("promotion_code", com.stripe.model.PromotionCode.class); + classLookup.put("quote", com.stripe.model.Quote.class); + classLookup.put("quote_line", com.stripe.model.QuoteLine.class); + classLookup.put("quote_preview_invoice", com.stripe.model.QuotePreviewInvoice.class); + classLookup.put( + "quote_preview_subscription_schedule", + com.stripe.model.QuotePreviewSubscriptionSchedule.class); + classLookup.put("refund", com.stripe.model.Refund.class); + classLookup.put("reserve_transaction", com.stripe.model.ReserveTransaction.class); + classLookup.put("review", com.stripe.model.Review.class); + classLookup.put("setup_attempt", com.stripe.model.SetupAttempt.class); + classLookup.put("setup_intent", com.stripe.model.SetupIntent.class); + classLookup.put("shipping_rate", com.stripe.model.ShippingRate.class); + classLookup.put("source", com.stripe.model.Source.class); + classLookup.put( + "source_mandate_notification", com.stripe.model.SourceMandateNotification.class); + classLookup.put("source_transaction", com.stripe.model.SourceTransaction.class); + classLookup.put("subscription", com.stripe.model.Subscription.class); + classLookup.put("subscription_item", com.stripe.model.SubscriptionItem.class); + classLookup.put("subscription_schedule", com.stripe.model.SubscriptionSchedule.class); + classLookup.put("tax_code", com.stripe.model.TaxCode.class); + classLookup.put("tax_deducted_at_source", com.stripe.model.TaxDeductedAtSource.class); + classLookup.put("tax_id", com.stripe.model.TaxId.class); + classLookup.put("tax_rate", com.stripe.model.TaxRate.class); + classLookup.put("token", com.stripe.model.Token.class); + classLookup.put("topup", com.stripe.model.Topup.class); + classLookup.put("transfer", com.stripe.model.Transfer.class); + classLookup.put("transfer_reversal", com.stripe.model.TransferReversal.class); + classLookup.put("webhook_endpoint", com.stripe.model.WebhookEndpoint.class); classLookup.put("apps.secret", com.stripe.model.apps.Secret.class); @@ -117,8 +125,12 @@ public final class EventDataClassLookup { "billing.meter_event_adjustment", com.stripe.model.billing.MeterEventAdjustment.class); classLookup.put( "billing.meter_event_summary", com.stripe.model.billing.MeterEventSummary.class); - classLookup.put("billing.meter_usage", com.stripe.model.billing.MeterUsage.class); - classLookup.put("billing.meter_usage_row", com.stripe.model.billing.MeterUsageRow.class); + + classLookup.put( + "billing.analytics.meter_usage", com.stripe.model.billing.analytics.MeterUsage.class); + classLookup.put( + "billing.analytics.meter_usage_row", + com.stripe.model.billing.analytics.MeterUsageRow.class); classLookup.put( "billing_portal.configuration", com.stripe.model.billingportal.Configuration.class); diff --git a/src/main/java/com/stripe/model/ExchangeRate.java b/src/main/java/com/stripe/model/ExchangeRate.java index 50f6240bc25..6c82ffc2ec4 100644 --- a/src/main/java/com/stripe/model/ExchangeRate.java +++ b/src/main/java/com/stripe/model/ExchangeRate.java @@ -17,10 +17,14 @@ import lombok.Setter; /** - * {@code ExchangeRate} objects allow you to determine the rates that Stripe is currently using to - * convert from one currency to another. Since this number is variable throughout the day, there are - * various reasons why you might want to know the current rate (for example, to dynamically price an - * item for a user with a default payment in a foreign currency). + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

{@code ExchangeRate} objects allow you to determine the rates that Stripe is currently using + * to convert from one currency to another. Since this number is variable throughout the day, there + * are various reasons why you might want to know the current rate (for example, to dynamically + * price an item for a user with a default payment in a foreign currency). * *

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

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

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

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

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

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

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

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

Retrieves the exchange rates from the given currency to every supported currency. + */ + @Deprecated public static ExchangeRate retrieve( String rateId, ExchangeRateRetrieveParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/model/Invoice.java b/src/main/java/com/stripe/model/Invoice.java index 1bf31153707..70efca9c777 100644 --- a/src/main/java/com/stripe/model/Invoice.java +++ b/src/main/java/com/stripe/model/Invoice.java @@ -2525,6 +2525,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("konbini") Konbini konbini; + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("pix") + Pix pix; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -2718,6 +2725,23 @@ public static class IdBankTransfer extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Konbini extends StripeObject {} + /** + * For more details about Pix, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** + * Determines if the amount includes the IOF tax. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("amount_includes_iof") + String amountIncludesIof; + } + /** * For more details about SepaDebit, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/InvoiceItem.java b/src/main/java/com/stripe/model/InvoiceItem.java index 004a3d2e892..5e7cf8426e8 100644 --- a/src/main/java/com/stripe/model/InvoiceItem.java +++ b/src/main/java/com/stripe/model/InvoiceItem.java @@ -126,6 +126,13 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStore metadata; + /** + * The amount after discounts, but before credits and taxes. This field is {@code null} for {@code + * discountable=true} items. + */ + @SerializedName("net_amount") + Long netAmount; + /** * String representing the object's type. Objects of the same type share the same value. * @@ -152,6 +159,9 @@ public class InvoiceItem extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ProrationDetails extends StripeObject { + /** Discount amounts applied when the proration was created. */ + @SerializedName("discount_amounts") + List discountAmounts; + + /** + * For more details about DiscountAmount, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DiscountAmount extends StripeObject { + /** The amount, in cents (or local equivalent), of the discount. */ + @SerializedName("amount") + Long amount; + + /** The discount that was applied to get this discount amount. */ + @SerializedName("discount") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField discount; + + /** Get ID of expandable {@code discount} object. */ + public String getDiscount() { + return (this.discount != null) ? this.discount.getId() : null; + } + + public void setDiscount(String id) { + this.discount = ApiResource.setExpandableFieldId(id, this.discount); + } + + /** Get expanded {@code discount}. */ + public Discount getDiscountObject() { + return (this.discount != null) ? this.discount.getExpanded() : null; + } + + public void setDiscountObject(Discount expandableObject) { + this.discount = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); @@ -739,6 +799,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(parent, responseGetter); trySetResponseGetter(period, responseGetter); trySetResponseGetter(pricing, responseGetter); + trySetResponseGetter(prorationDetails, responseGetter); trySetResponseGetter(testClock, responseGetter); } } diff --git a/src/main/java/com/stripe/model/PaymentAttemptRecord.java b/src/main/java/com/stripe/model/PaymentAttemptRecord.java index 9c69889333c..fe50e661329 100644 --- a/src/main/java/com/stripe/model/PaymentAttemptRecord.java +++ b/src/main/java/com/stripe/model/PaymentAttemptRecord.java @@ -530,6 +530,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("payto") Payto payto; @@ -1090,11 +1093,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1232,6 +1235,10 @@ public static class Card extends StripeObject { @SerializedName("three_d_secure") ThreeDSecure threeDSecure; + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + @SerializedName("wallet") + Wallet wallet; + /** * For more details about Checks, please refer to the API Reference. @@ -1258,6 +1265,10 @@ public static class Checks extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class NetworkToken extends StripeObject { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when + * processing the transaction. + */ @SerializedName("used") Boolean used; } @@ -1282,6 +1293,57 @@ public static class ThreeDSecure extends StripeObject { @SerializedName("version") String version; } + + /** + * For more details about Wallet, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wallet extends StripeObject { + @SerializedName("apple_pay") + ApplePay applePay; + + /** (For tokenized numbers only.) The last four digits of the device account number. */ + @SerializedName("dynamic_last4") + String dynamicLast4; + + @SerializedName("google_pay") + GooglePay googlePay; + + /** + * The type of the card wallet, one of {@code apple_pay} or {@code google_pay}. An + * additional hash is included on the Wallet subhash with a name matching this value. It + * contains additional information specific to the card wallet type. + */ + @SerializedName("type") + String type; + + /** + * For more details about ApplePay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ApplePay extends StripeObject { + /** + * Type of the apple_pay transaction, one of {@code apple_pay} or {@code apple_pay_later}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about GooglePay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GooglePay extends StripeObject {} + } } /** @@ -2463,6 +2525,20 @@ public static class Payco extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Paynow extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + /** Reference number associated with this PayNow payment. */ @SerializedName("reference") String reference; @@ -2565,6 +2641,15 @@ public static class SellerProtection extends StripeObject { } } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Payto, please refer to the API * Reference. @@ -3172,11 +3257,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; diff --git a/src/main/java/com/stripe/model/PaymentIntent.java b/src/main/java/com/stripe/model/PaymentIntent.java index 42e03bde2a4..d0a468c7257 100644 --- a/src/main/java/com/stripe/model/PaymentIntent.java +++ b/src/main/java/com/stripe/model/PaymentIntent.java @@ -1709,7 +1709,7 @@ public PaymentIntent verifyMicrodeposits( @Setter @EqualsAndHashCode(callSuper = false) public static class AmountDetails extends StripeObject { - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ @SerializedName("discount_amount") Long discountAmount; @@ -3318,6 +3318,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("payto") Payto payto; @@ -4219,11 +4222,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -5414,6 +5417,15 @@ public static class Tax extends StripeObject { } } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Payto, please refer to the API * Reference. diff --git a/src/main/java/com/stripe/model/PaymentMethod.java b/src/main/java/com/stripe/model/PaymentMethod.java index 077932dabe2..19bdb4a6418 100644 --- a/src/main/java/com/stripe/model/PaymentMethod.java +++ b/src/main/java/com/stripe/model/PaymentMethod.java @@ -221,6 +221,9 @@ public class PaymentMethod extends ApiResource implements HasId, MetadataStore

API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Payto, please refer to the API * Reference. @@ -2850,6 +2862,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(payco, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); + trySetResponseGetter(paypay, responseGetter); trySetResponseGetter(payto, responseGetter); trySetResponseGetter(pix, responseGetter); trySetResponseGetter(promptpay, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java index 16088e60d3c..e95ad0a208b 100644 --- a/src/main/java/com/stripe/model/PaymentMethodConfiguration.java +++ b/src/main/java/com/stripe/model/PaymentMethodConfiguration.java @@ -215,6 +215,9 @@ public class PaymentMethodConfiguration extends ApiResource implements HasId { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("payto") Payto payto; @@ -2505,6 +2508,57 @@ public static class DisplayPreference extends StripeObject { } } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject { + /** + * Whether this payment method may be offered at checkout. True if {@code display_preference} is + * {@code on} and the payment method's capability is active. + */ + @SerializedName("available") + Boolean available; + + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * For more details about DisplayPreference, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference extends StripeObject { + /** + * For child configs, whether or not the account's preference will be observed. If {@code + * false}, the parent configuration's default is used. + */ + @SerializedName("overridable") + Boolean overridable; + + /** + * The account's display preference. + * + *

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

One of {@code off}, or {@code on}. + */ + @SerializedName("value") + String value; + } + } + /** * For more details about Payto, please refer to the API * Reference. @@ -3314,6 +3368,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(payco, responseGetter); trySetResponseGetter(paynow, responseGetter); trySetResponseGetter(paypal, responseGetter); + trySetResponseGetter(paypay, responseGetter); trySetResponseGetter(payto, responseGetter); trySetResponseGetter(pix, responseGetter); trySetResponseGetter(promptpay, responseGetter); diff --git a/src/main/java/com/stripe/model/PaymentRecord.java b/src/main/java/com/stripe/model/PaymentRecord.java index a09fa5e8f20..4a59357d016 100644 --- a/src/main/java/com/stripe/model/PaymentRecord.java +++ b/src/main/java/com/stripe/model/PaymentRecord.java @@ -12,6 +12,7 @@ import com.stripe.param.PaymentRecordReportPaymentAttemptCanceledParams; import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams; import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptInformationalParams; import com.stripe.param.PaymentRecordReportPaymentAttemptParams; import com.stripe.param.PaymentRecordReportPaymentParams; import com.stripe.param.PaymentRecordRetrieveParams; @@ -368,6 +369,60 @@ public PaymentRecord reportPaymentAttemptGuaranteed( return getResponseGetter().request(request, PaymentRecord.class); } + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational() throws StripeException { + return reportPaymentAttemptInformational((Map) null, (RequestOptions) null); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational(RequestOptions options) + throws StripeException { + return reportPaymentAttemptInformational((Map) null, options); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational(Map params) + throws StripeException { + return reportPaymentAttemptInformational(params, (RequestOptions) null); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + Map params, RequestOptions options) throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_informational", + ApiResource.urlEncodeId(this.getId())); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, params, options); + return getResponseGetter().request(request, PaymentRecord.class); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + PaymentRecordReportPaymentAttemptInformationalParams params) throws StripeException { + return reportPaymentAttemptInformational(params, (RequestOptions) null); + } + + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + PaymentRecordReportPaymentAttemptInformationalParams params, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_informational", + ApiResource.urlEncodeId(this.getId())); + ApiResource.checkNullTypedParams(path, params); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return getResponseGetter().request(request, PaymentRecord.class); + } + /** Retrieves a Payment Record with the given ID. */ public static PaymentRecord retrieve(String id) throws StripeException { return retrieve(id, (Map) null, (RequestOptions) null); @@ -730,6 +785,9 @@ public static class PaymentMethodDetails extends StripeObject { @SerializedName("paypal") Paypal paypal; + @SerializedName("paypay") + Paypay paypay; + @SerializedName("payto") Payto payto; @@ -1290,11 +1348,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1432,6 +1490,10 @@ public static class Card extends StripeObject { @SerializedName("three_d_secure") ThreeDSecure threeDSecure; + /** If this Card is part of a card wallet, this contains the details of the card wallet. */ + @SerializedName("wallet") + Wallet wallet; + /** * For more details about Checks, please refer to the API Reference. @@ -1458,6 +1520,10 @@ public static class Checks extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class NetworkToken extends StripeObject { + /** + * Indicates if Stripe used a network token, either user provided or Stripe managed when + * processing the transaction. + */ @SerializedName("used") Boolean used; } @@ -1482,6 +1548,57 @@ public static class ThreeDSecure extends StripeObject { @SerializedName("version") String version; } + + /** + * For more details about Wallet, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Wallet extends StripeObject { + @SerializedName("apple_pay") + ApplePay applePay; + + /** (For tokenized numbers only.) The last four digits of the device account number. */ + @SerializedName("dynamic_last4") + String dynamicLast4; + + @SerializedName("google_pay") + GooglePay googlePay; + + /** + * The type of the card wallet, one of {@code apple_pay} or {@code google_pay}. An + * additional hash is included on the Wallet subhash with a name matching this value. It + * contains additional information specific to the card wallet type. + */ + @SerializedName("type") + String type; + + /** + * For more details about ApplePay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ApplePay extends StripeObject { + /** + * Type of the apple_pay transaction, one of {@code apple_pay} or {@code apple_pay_later}. + */ + @SerializedName("type") + String type; + } + + /** + * For more details about GooglePay, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class GooglePay extends StripeObject {} + } } /** @@ -2662,6 +2779,20 @@ public static class Payco extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Paynow extends StripeObject { + /** + * ID of the location that this + * transaction's reader is assigned to. + */ + @SerializedName("location") + String location; + + /** + * ID of the reader this + * transaction was made on. + */ + @SerializedName("reader") + String reader; + /** Reference number associated with this PayNow payment. */ @SerializedName("reference") String reference; @@ -2764,6 +2895,15 @@ public static class SellerProtection extends StripeObject { } } + /** + * For more details about Paypay, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Paypay extends StripeObject {} + /** * For more details about Payto, please refer to the API * Reference. @@ -3371,11 +3511,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; diff --git a/src/main/java/com/stripe/model/Person.java b/src/main/java/com/stripe/model/Person.java index e5ec6fbc793..3ddbfc54c9e 100644 --- a/src/main/java/com/stripe/model/Person.java +++ b/src/main/java/com/stripe/model/Person.java @@ -541,14 +541,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -567,29 +567,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, @@ -757,14 +758,14 @@ public static class Errors extends StripeObject { /** * The code for the type of error. * - *

One of {@code information_missing}, {@code invalid_address_city_state_postal_code}, - * {@code invalid_address_highway_contract_box}, {@code invalid_address_private_mailbox}, - * {@code invalid_business_profile_name}, {@code invalid_business_profile_name_denylisted}, - * {@code invalid_company_name_denylisted}, {@code invalid_dob_age_over_maximum}, {@code - * invalid_dob_age_under_18}, {@code invalid_dob_age_under_minimum}, {@code - * invalid_product_description_length}, {@code invalid_product_description_url_match}, {@code - * invalid_representative_country}, {@code invalid_signator}, {@code - * invalid_statement_descriptor_business_mismatch}, {@code + *

One of {@code external_request}, {@code information_missing}, {@code + * invalid_address_city_state_postal_code}, {@code invalid_address_highway_contract_box}, + * {@code invalid_address_private_mailbox}, {@code invalid_business_profile_name}, {@code + * invalid_business_profile_name_denylisted}, {@code invalid_company_name_denylisted}, {@code + * invalid_dob_age_over_maximum}, {@code invalid_dob_age_under_18}, {@code + * invalid_dob_age_under_minimum}, {@code invalid_product_description_length}, {@code + * invalid_product_description_url_match}, {@code invalid_representative_country}, {@code + * invalid_signator}, {@code invalid_statement_descriptor_business_mismatch}, {@code * invalid_statement_descriptor_denylisted}, {@code invalid_statement_descriptor_length}, * {@code invalid_statement_descriptor_prefix_denylisted}, {@code * invalid_statement_descriptor_prefix_mismatch}, {@code invalid_street_address}, {@code @@ -783,29 +784,30 @@ public static class Errors extends StripeObject { * invalid_url_website_incomplete_return_policy}, {@code * invalid_url_website_incomplete_terms_and_conditions}, {@code * invalid_url_website_incomplete_under_construction}, {@code invalid_url_website_other}, - * {@code invalid_value_other}, {@code verification_directors_mismatch}, {@code - * verification_document_address_mismatch}, {@code verification_document_address_missing}, - * {@code verification_document_corrupt}, {@code verification_document_country_not_supported}, - * {@code verification_document_directors_mismatch}, {@code - * verification_document_dob_mismatch}, {@code verification_document_duplicate_type}, {@code - * verification_document_expired}, {@code verification_document_failed_copy}, {@code - * verification_document_failed_greyscale}, {@code verification_document_failed_other}, {@code - * verification_document_failed_test_mode}, {@code verification_document_fraudulent}, {@code - * verification_document_id_number_mismatch}, {@code verification_document_id_number_missing}, - * {@code verification_document_incomplete}, {@code verification_document_invalid}, {@code - * verification_document_issue_or_expiry_date_missing}, {@code - * verification_document_manipulated}, {@code verification_document_missing_back}, {@code - * verification_document_missing_front}, {@code verification_document_name_mismatch}, {@code - * verification_document_name_missing}, {@code verification_document_nationality_mismatch}, - * {@code verification_document_not_readable}, {@code verification_document_not_signed}, - * {@code verification_document_not_uploaded}, {@code verification_document_photo_mismatch}, - * {@code verification_document_too_large}, {@code verification_document_type_not_supported}, - * {@code verification_extraneous_directors}, {@code verification_failed_address_match}, - * {@code verification_failed_authorizer_authority}, {@code - * verification_failed_business_iec_number}, {@code verification_failed_document_match}, - * {@code verification_failed_id_number_match}, {@code verification_failed_keyed_identity}, - * {@code verification_failed_keyed_match}, {@code verification_failed_name_match}, {@code - * verification_failed_other}, {@code verification_failed_representative_authority}, {@code + * {@code invalid_value_other}, {@code unsupported_business_type}, {@code + * verification_directors_mismatch}, {@code verification_document_address_mismatch}, {@code + * verification_document_address_missing}, {@code verification_document_corrupt}, {@code + * verification_document_country_not_supported}, {@code + * verification_document_directors_mismatch}, {@code verification_document_dob_mismatch}, + * {@code verification_document_duplicate_type}, {@code verification_document_expired}, {@code + * verification_document_failed_copy}, {@code verification_document_failed_greyscale}, {@code + * verification_document_failed_other}, {@code verification_document_failed_test_mode}, {@code + * verification_document_fraudulent}, {@code verification_document_id_number_mismatch}, {@code + * verification_document_id_number_missing}, {@code verification_document_incomplete}, {@code + * verification_document_invalid}, {@code verification_document_issue_or_expiry_date_missing}, + * {@code verification_document_manipulated}, {@code verification_document_missing_back}, + * {@code verification_document_missing_front}, {@code verification_document_name_mismatch}, + * {@code verification_document_name_missing}, {@code + * verification_document_nationality_mismatch}, {@code verification_document_not_readable}, + * {@code verification_document_not_signed}, {@code verification_document_not_uploaded}, + * {@code verification_document_photo_mismatch}, {@code verification_document_too_large}, + * {@code verification_document_type_not_supported}, {@code + * verification_extraneous_directors}, {@code verification_failed_address_match}, {@code + * verification_failed_authorizer_authority}, {@code verification_failed_business_iec_number}, + * {@code verification_failed_document_match}, {@code verification_failed_id_number_match}, + * {@code verification_failed_keyed_identity}, {@code verification_failed_keyed_match}, {@code + * verification_failed_name_match}, {@code verification_failed_other}, {@code + * verification_failed_representative_authority}, {@code * verification_failed_residential_address}, {@code verification_failed_tax_id_match}, {@code * verification_failed_tax_id_not_issued}, {@code * verification_legal_entity_structure_mismatch}, {@code verification_missing_directors}, diff --git a/src/main/java/com/stripe/model/PromotionCode.java b/src/main/java/com/stripe/model/PromotionCode.java index 087f305b2b6..51ec9aefd2e 100644 --- a/src/main/java/com/stripe/model/PromotionCode.java +++ b/src/main/java/com/stripe/model/PromotionCode.java @@ -19,9 +19,8 @@ import lombok.Setter; /** - * A Promotion Code represents a customer-redeemable code for a coupon. You can create multiple codes for a single - * coupon. + * A Promotion Code represents a customer-redeemable code for an underlying promotion. You can + * create multiple codes for a single promotion. * *

If you enable promotion codes in your customer portal @@ -48,19 +47,6 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore

subscriptions, invoices, checkout sessions, quotes, and more. Coupons do not work with - * conventional one-off charges or payment intents. - */ - @SerializedName("coupon") - Coupon coupon; - /** Time at which the object was created. Measured in seconds since the Unix epoch. */ @SerializedName("created") Long created; @@ -112,6 +98,9 @@ public class PromotionCode extends ApiResource implements HasId, MetadataStore

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

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

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } } /** diff --git a/src/main/java/com/stripe/model/QuotePreviewInvoice.java b/src/main/java/com/stripe/model/QuotePreviewInvoice.java index 3ff4311b548..1f0058d6137 100644 --- a/src/main/java/com/stripe/model/QuotePreviewInvoice.java +++ b/src/main/java/com/stripe/model/QuotePreviewInvoice.java @@ -1393,6 +1393,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("konbini") Konbini konbini; + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("pix") + Pix pix; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -1586,6 +1593,23 @@ public static class IdBankTransfer extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Konbini extends StripeObject {} + /** + * For more details about Pix, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + /** + * Determines if the amount includes the IOF tax. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("amount_includes_iof") + String amountIncludesIof; + } + /** * For more details about SepaDebit, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java b/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java index d3cc29da076..7c31549af0f 100644 --- a/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/QuotePreviewSubscriptionSchedule.java @@ -320,6 +320,10 @@ public static class AppliesTo extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BillingMode extends StripeObject { + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Controls how prorations and invoices for subscriptions are calculated and orchestrated. * @@ -331,6 +335,23 @@ public static class BillingMode extends StripeObject { /** Details on when the current billing_mode was adopted. */ @SerializedName("updated_at") Long updatedAt; + + /** + * For more details about Flexible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flexible extends StripeObject { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + * + *

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } } /** diff --git a/src/main/java/com/stripe/model/Source.java b/src/main/java/com/stripe/model/Source.java index feb3f98574c..ac8dd992a5c 100644 --- a/src/main/java/com/stripe/model/Source.java +++ b/src/main/java/com/stripe/model/Source.java @@ -1191,8 +1191,8 @@ public static class Redirect extends StripeObject { /** * The status of the redirect, either {@code pending} (ready to be used by your customer to - * authenticate the transaction), {@code succeeded} (succesful authentication, cannot be reused) - * or {@code not_required} (redirect should not be used) or {@code failed} (failed + * authenticate the transaction), {@code succeeded} (successful authentication, cannot be + * reused) or {@code not_required} (redirect should not be used) or {@code failed} (failed * authentication, cannot be reused). */ @SerializedName("status") diff --git a/src/main/java/com/stripe/model/StripeError.java b/src/main/java/com/stripe/model/StripeError.java index a688f42b669..b15a46f540f 100644 --- a/src/main/java/com/stripe/model/StripeError.java +++ b/src/main/java/com/stripe/model/StripeError.java @@ -46,7 +46,9 @@ public class StripeError extends StripeObject { * customer_max_payment_methods}, {@code customer_max_subscriptions}, {@code * customer_session_expired}, {@code customer_tax_location_invalid}, {@code debit_not_authorized}, * {@code email_invalid}, {@code expired_card}, {@code financial_connections_account_inactive}, - * {@code financial_connections_institution_unavailable}, {@code + * {@code financial_connections_account_pending_account_numbers}, {@code + * financial_connections_account_unavailable_account_numbers}, {@code + * financial_connections_institution_unavailable}, {@code * financial_connections_no_successful_transaction_refresh}, {@code forwarding_api_inactive}, * {@code forwarding_api_invalid_parameter}, {@code forwarding_api_retryable_upstream_error}, * {@code forwarding_api_upstream_connection_error}, {@code diff --git a/src/main/java/com/stripe/model/Subscription.java b/src/main/java/com/stripe/model/Subscription.java index 8f75ab9d41a..2dd79e05df7 100644 --- a/src/main/java/com/stripe/model/Subscription.java +++ b/src/main/java/com/stripe/model/Subscription.java @@ -80,6 +80,10 @@ public class Subscription extends ApiResource implements HasId, MetadataStore billingSchedules; + /** * Define thresholds at which an invoice will be sent, and the subscription advanced to a new * billing period. @@ -1475,6 +1479,10 @@ public static class BillingCycleAnchorConfig extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class BillingMode extends StripeObject { + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Controls how prorations and invoices for subscriptions are calculated and orchestrated. * @@ -1486,6 +1494,128 @@ public static class BillingMode extends StripeObject { /** Details on when the current billing_mode was adopted. */ @SerializedName("updated_at") Long updatedAt; + + /** + * For more details about Flexible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flexible extends StripeObject { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + * + *

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } + } + + /** Sets the billing schedule for the subscription. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillingSchedule extends StripeObject { + /** Specifies which subscription items the billing schedule applies to. */ + @SerializedName("applies_to") + List appliesTo; + + /** Specifies the billing period. */ + @SerializedName("bill_until") + BillUntil billUntil; + + /** Unique identifier for the billing schedule. */ + @SerializedName("key") + String key; + + /** Represents the entities that the billing schedule applies to. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AppliesTo extends StripeObject { + /** The billing schedule will apply to the subscription item with the given price ID. */ + @SerializedName("price") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField price; + + /** + * Controls which subscription items the billing schedule applies to. + * + *

Equal to {@code price}. + */ + @SerializedName("type") + String type; + + /** Get ID of expandable {@code price} object. */ + public String getPrice() { + return (this.price != null) ? this.price.getId() : null; + } + + public void setPrice(String id) { + this.price = ApiResource.setExpandableFieldId(id, this.price); + } + + /** Get expanded {@code price}. */ + public Price getPriceObject() { + return (this.price != null) ? this.price.getExpanded() : null; + } + + public void setPriceObject(Price expandableObject) { + this.price = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + + /** Specifies the billing period. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BillUntil extends StripeObject { + /** The timestamp the billing schedule will apply until. */ + @SerializedName("computed_timestamp") + Long computedTimestamp; + + /** Specifies the billing period. */ + @SerializedName("duration") + Duration duration; + + /** If specified, the billing schedule will apply until the specified timestamp. */ + @SerializedName("timestamp") + Long timestamp; + + /** + * Describes how the billing schedule will determine the end date. Either {@code duration} or + * {@code timestamp}. + * + *

One of {@code duration}, or {@code timestamp}. + */ + @SerializedName("type") + String type; + + /** + * Configures the {@code bill_until} date based on the provided {@code interval} and {@code + * interval_count}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Duration extends StripeObject { + /** + * Specifies billing duration. Either {@code day}, {@code week}, {@code month} or {@code + * year}. + * + *

One of {@code day}, {@code month}, {@code week}, or {@code year}. + */ + @SerializedName("interval") + String interval; + + /** The multiplier applied to the interval. */ + @SerializedName("interval_count") + Long intervalCount; + } + } } /** @@ -1793,6 +1923,13 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("konbini") Konbini konbini; + /** + * This sub-hash contains details about the Pix payment method options to pass to invoices + * created by the subscription. + */ + @SerializedName("pix") + Pix pix; + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to invoices created by the subscription. @@ -2008,6 +2145,55 @@ public static class IdBankTransfer extends StripeObject {} @EqualsAndHashCode(callSuper = false) public static class Konbini extends StripeObject {} + /** + * For more details about Pix, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Pix extends StripeObject { + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * For more details about MandateOptions, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** + * Determines if the amount includes the IOF tax. + * + *

One of {@code always}, or {@code never}. + */ + @SerializedName("amount_includes_iof") + String amountIncludesIof; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. + */ + @SerializedName("end_date") + String endDate; + + /** + * Schedule at which the future payments will be charged. + * + *

One of {@code halfyearly}, {@code monthly}, {@code quarterly}, {@code weekly}, or + * {@code yearly}. + */ + @SerializedName("payment_schedule") + String paymentSchedule; + } + } + /** * For more details about SepaDebit, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/SubscriptionItem.java b/src/main/java/com/stripe/model/SubscriptionItem.java index 310604f8e36..e525396e6d4 100644 --- a/src/main/java/com/stripe/model/SubscriptionItem.java +++ b/src/main/java/com/stripe/model/SubscriptionItem.java @@ -30,6 +30,10 @@ @EqualsAndHashCode(callSuper = false) public class SubscriptionItem extends ApiResource implements HasId, MetadataStore { + /** The time period the subscription item has been billed for. */ + @SerializedName("billed_until") + Long billedUntil; + /** * Define thresholds at which an invoice will be sent, and the related subscription advanced to a * new billing period. diff --git a/src/main/java/com/stripe/model/SubscriptionSchedule.java b/src/main/java/com/stripe/model/SubscriptionSchedule.java index 3e22af3b9ea..090e4a87ffd 100644 --- a/src/main/java/com/stripe/model/SubscriptionSchedule.java +++ b/src/main/java/com/stripe/model/SubscriptionSchedule.java @@ -635,6 +635,10 @@ public SubscriptionSchedule update( @Setter @EqualsAndHashCode(callSuper = false) public static class BillingMode extends StripeObject { + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Controls how prorations and invoices for subscriptions are calculated and orchestrated. * @@ -646,6 +650,23 @@ public static class BillingMode extends StripeObject { /** Details on when the current billing_mode was adopted. */ @SerializedName("updated_at") Long updatedAt; + + /** + * For more details about Flexible, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Flexible extends StripeObject { + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + * + *

One of {@code included}, or {@code itemized}. + */ + @SerializedName("proration_discounts") + String prorationDiscounts; + } } /** diff --git a/src/main/java/com/stripe/model/billing/MeterUsage.java b/src/main/java/com/stripe/model/billing/analytics/MeterUsage.java similarity index 83% rename from src/main/java/com/stripe/model/billing/MeterUsage.java rename to src/main/java/com/stripe/model/billing/analytics/MeterUsage.java index 12bc8a41975..444402d2bc7 100644 --- a/src/main/java/com/stripe/model/billing/MeterUsage.java +++ b/src/main/java/com/stripe/model/billing/analytics/MeterUsage.java @@ -1,5 +1,5 @@ // File generated from our OpenAPI spec -package com.stripe.model.billing; +package com.stripe.model.billing.analytics; import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; @@ -8,8 +8,8 @@ import com.stripe.net.ApiResource; import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; -import com.stripe.param.billing.MeterUsageRetrieveParams; -import java.util.List; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.billing.analytics.MeterUsageRetrieveParams; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -23,14 +23,6 @@ @Setter @EqualsAndHashCode(callSuper = false) public class MeterUsage extends ApiResource { - /** The aggregated meter usage data for the specified customer and time range. */ - @SerializedName("data") - List data; - - /** Timestamp indicating how fresh the data is. Measured in seconds since the Unix epoch. */ - @SerializedName("data_refreshed_at") - Long dataRefreshedAt; - /** * Has the value {@code true} if the object exists in live mode or the value {@code false} if the * object exists in test mode. @@ -41,11 +33,18 @@ public class MeterUsage extends ApiResource { /** * String representing the object's type. Objects of the same type share the same value. * - *

Equal to {@code billing.meter_usage}. + *

Equal to {@code billing.analytics.meter_usage}. */ @SerializedName("object") String object; + /** The timestamp to indicate data freshness, measured in seconds since the Unix epoch. */ + @SerializedName("refreshed_at") + Long refreshedAt; + + @SerializedName("rows") + MeterUsageRowCollection rows; + /** * Returns aggregated meter usage data for a customer within a specified time interval. The data * can be grouped by various dimensions and can include multiple meters if specified. @@ -91,4 +90,10 @@ public static MeterUsage retrieve(MeterUsageRetrieveParams params, RequestOption options); return getGlobalResponseGetter().request(request, MeterUsage.class); } + + @Override + public void setResponseGetter(StripeResponseGetter responseGetter) { + super.setResponseGetter(responseGetter); + trySetResponseGetter(rows, responseGetter); + } } diff --git a/src/main/java/com/stripe/model/billing/MeterUsageRow.java b/src/main/java/com/stripe/model/billing/analytics/MeterUsageRow.java similarity index 79% rename from src/main/java/com/stripe/model/billing/MeterUsageRow.java rename to src/main/java/com/stripe/model/billing/analytics/MeterUsageRow.java index 547e3b68e94..20629016ffa 100644 --- a/src/main/java/com/stripe/model/billing/MeterUsageRow.java +++ b/src/main/java/com/stripe/model/billing/analytics/MeterUsageRow.java @@ -1,5 +1,5 @@ // File generated from our OpenAPI spec -package com.stripe.model.billing; +package com.stripe.model.billing.analytics; import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; @@ -14,22 +14,14 @@ @Setter @EqualsAndHashCode(callSuper = false) public class MeterUsageRow extends StripeObject implements HasId { - /** Timestamp indicating the end of the bucket. Measured in seconds since the Unix epoch. */ - @SerializedName("bucket_end_time") - Long bucketEndTime; - - /** Timestamp indicating the start of the bucket. Measured in seconds since the Unix epoch. */ - @SerializedName("bucket_start_time") - Long bucketStartTime; - - /** The aggregated meter usage value for the specified bucket. */ - @SerializedName("bucket_value") - BigDecimal bucketValue; - /** A set of key-value pairs representing the dimensions of the meter usage. */ @SerializedName("dimensions") Map dimensions; + /** Timestamp indicating the end of the bucket. Measured in seconds since the Unix epoch. */ + @SerializedName("ends_at") + Long endsAt; + /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -39,14 +31,22 @@ public class MeterUsageRow extends StripeObject implements HasId { * The unique identifier for the meter. Null if no meters were provided and usage was aggregated * across all meters. */ - @SerializedName("meter_id") - String meterId; + @SerializedName("meter") + String meter; /** * String representing the object's type. Objects of the same type share the same value. * - *

Equal to {@code billing.meter_usage_row}. + *

Equal to {@code billing.analytics.meter_usage_row}. */ @SerializedName("object") String object; + + /** Timestamp indicating the start of the bucket. Measured in seconds since the Unix epoch. */ + @SerializedName("starts_at") + Long startsAt; + + /** The aggregated meter usage value for the specified bucket. */ + @SerializedName("value") + BigDecimal value; } diff --git a/src/main/java/com/stripe/model/billing/analytics/MeterUsageRowCollection.java b/src/main/java/com/stripe/model/billing/analytics/MeterUsageRowCollection.java new file mode 100644 index 00000000000..40d0877c886 --- /dev/null +++ b/src/main/java/com/stripe/model/billing/analytics/MeterUsageRowCollection.java @@ -0,0 +1,6 @@ +// File generated from our OpenAPI spec +package com.stripe.model.billing.analytics; + +import com.stripe.model.StripeCollection; + +public class MeterUsageRowCollection extends StripeCollection {} diff --git a/src/main/java/com/stripe/model/billingportal/Configuration.java b/src/main/java/com/stripe/model/billingportal/Configuration.java index 29ef889e4f0..3a3b455e6d8 100644 --- a/src/main/java/com/stripe/model/billingportal/Configuration.java +++ b/src/main/java/com/stripe/model/billingportal/Configuration.java @@ -449,6 +449,16 @@ public static class SubscriptionUpdate extends StripeObject { @SerializedName("schedule_at_period_end") ScheduleAtPeriodEnd scheduleAtPeriodEnd; + /** + * Determines how handle updates to trialing subscriptions. Valid values are {@code end_trial} + * and {@code continue_trial}. Defaults to a value of {@code end_trial} if you don't set it + * during creation. + * + *

One of {@code continue_trial}, or {@code end_trial}. + */ + @SerializedName("trial_update_behavior") + String trialUpdateBehavior; + /** * For more details about Product, please refer to the API Reference. diff --git a/src/main/java/com/stripe/model/checkout/Session.java b/src/main/java/com/stripe/model/checkout/Session.java index a6519770562..2111bb98b5d 100644 --- a/src/main/java/com/stripe/model/checkout/Session.java +++ b/src/main/java/com/stripe/model/checkout/Session.java @@ -94,6 +94,9 @@ public class Session extends ApiResource implements HasId, MetadataStore discounts; + /** + * A list of the types of payment methods (e.g., {@code card}) that should be excluded from this + * Checkout Session. This should only be used when payment methods for this Checkout Session are + * managed through the Stripe + * Dashboard. + */ + @SerializedName("excluded_payment_method_types") + List excludedPaymentMethodTypes; + /** The timestamp at which the Checkout Session will expire. */ @SerializedName("expires_at") Long expiresAt; @@ -269,6 +281,9 @@ public class Session extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BrandingSettings extends StripeObject { + /** + * A hex color value starting with {@code #} representing the background color for the Checkout + * Session. + */ + @SerializedName("background_color") + String backgroundColor; + + /** + * The border style for the Checkout Session. Must be one of {@code rounded}, {@code + * rectangular}, or {@code pill}. + */ + @SerializedName("border_style") + String borderStyle; + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + @SerializedName("button_color") + String buttonColor; + + /** The display name shown on the Checkout Session. */ + @SerializedName("display_name") + String displayName; + + /** + * The font family for the Checkout Session. Must be one of the supported + * font families. + */ + @SerializedName("font_family") + String fontFamily; + + /** The icon for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("icon") + Icon icon; + + /** The logo for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("logo") + Logo logo; + + /** + * For more details about Icon, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Icon extends StripeObject { + /** + * The ID of a File upload representing the + * icon. Purpose must be {@code business_icon}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** The type of image for the icon. Must be one of {@code file} or {@code url}. */ + @SerializedName("type") + String type; + + /** The URL of the image. Present when {@code type} is {@code url}. */ + @SerializedName("url") + String url; + } + + /** + * For more details about Logo, please refer to the API + * Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Logo extends StripeObject { + /** + * The ID of a File upload representing the + * logo. Purpose must be {@code business_logo}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** The type of image for the logo. Must be one of {@code file} or {@code url}. */ + @SerializedName("type") + String type; + + /** The URL of the image. Present when {@code type} is {@code url}. */ + @SerializedName("url") + String url; + } + } + /** * For more details about CheckoutItem, please refer to the API Reference. @@ -1127,6 +1242,10 @@ public static class CollectedInformation extends StripeObject { @SerializedName("email") String email; + /** Customer’s individual name for this Checkout Session. */ + @SerializedName("individual_name") + String individualName; + /** Customer’s phone number for this Checkout Session. */ @SerializedName("phone") String phone; @@ -1553,6 +1672,10 @@ public static class CustomerDetails extends StripeObject { @SerializedName("address") Address address; + /** The customer's business name after a completed Checkout Session. */ + @SerializedName("business_name") + String businessName; + /** * The email associated with the Customer, if one exists, on the Checkout Session after a * completed Checkout Session or at time of session expiry. Otherwise, if the customer has @@ -1562,6 +1685,10 @@ public static class CustomerDetails extends StripeObject { @SerializedName("email") String email; + /** The customer's individual name after a completed Checkout Session. */ + @SerializedName("individual_name") + String individualName; + /** * The customer's name after a completed Checkout Session. Note: This property is populated only * for sessions on or after March 30, 2022. @@ -1864,6 +1991,61 @@ public static class RenderingOptions extends StripeObject { } } + /** + * For more details about NameCollection, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection extends StripeObject { + @SerializedName("business") + Business business; + + @SerializedName("individual") + Individual individual; + + /** + * For more details about Business, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Business extends StripeObject { + /** Indicates whether business name collection is enabled for the session. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + + /** + * For more details about Individual, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Individual extends StripeObject { + /** Indicates whether individual name collection is enabled for the session. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Whether the customer is required to complete the field before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + } + } + /** * For more details about OptionalItem, please refer to the API Reference. @@ -1949,6 +2131,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("alipay") Alipay alipay; + @SerializedName("alma") + Alma alma; + @SerializedName("amazon_pay") AmazonPay amazonPay; @@ -1961,6 +2146,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("bancontact") Bancontact bancontact; + @SerializedName("billie") + Billie billie; + @SerializedName("boleto") Boleto boleto; @@ -2039,6 +2227,9 @@ public static class PaymentMethodOptions extends StripeObject { @SerializedName("samsung_pay") SamsungPay samsungPay; + @SerializedName("satispay") + Satispay satispay; + @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -2162,6 +2353,14 @@ public static class MandateOptions extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class Affirm extends StripeObject { + /** + * Controls when the funds will be captured from the customer's account. + * + *

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

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

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

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

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

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

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

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

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

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

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

Equal to {@code manual}. + */ + @SerializedName("capture_method") + String captureMethod; + } + /** * For more details about SepaDebit, please refer to the API Reference. @@ -4345,6 +4659,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(adaptivePricing, responseGetter); trySetResponseGetter(afterExpiration, responseGetter); trySetResponseGetter(automaticTax, responseGetter); + trySetResponseGetter(brandingSettings, responseGetter); trySetResponseGetter(collectedInformation, responseGetter); trySetResponseGetter(consent, responseGetter); trySetResponseGetter(consentCollection, responseGetter); @@ -4355,6 +4670,7 @@ public void setResponseGetter(StripeResponseGetter responseGetter) { trySetResponseGetter(invoice, responseGetter); trySetResponseGetter(invoiceCreation, responseGetter); trySetResponseGetter(lineItems, responseGetter); + trySetResponseGetter(nameCollection, responseGetter); trySetResponseGetter(paymentIntent, responseGetter); trySetResponseGetter(paymentLink, responseGetter); trySetResponseGetter(paymentMethodConfigurationDetails, responseGetter); diff --git a/src/main/java/com/stripe/model/issuing/Card.java b/src/main/java/com/stripe/model/issuing/Card.java index 979aff4b95e..c2279b0a4a6 100644 --- a/src/main/java/com/stripe/model/issuing/Card.java +++ b/src/main/java/com/stripe/model/issuing/Card.java @@ -165,6 +165,10 @@ public class Card extends ApiResource implements HasId, MetadataStore { @SerializedName("replacement_reason") String replacementReason; + /** Text separate from cardholder name, printed on the card. */ + @SerializedName("second_line") + String secondLine; + /** Where and how the card will be shipped. */ @SerializedName("shipping") Shipping shipping; diff --git a/src/main/java/com/stripe/model/tax/Calculation.java b/src/main/java/com/stripe/model/tax/Calculation.java index 97a756ab956..239ee21ba6d 100644 --- a/src/main/java/com/stripe/model/tax/Calculation.java +++ b/src/main/java/com/stripe/model/tax/Calculation.java @@ -290,11 +290,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -304,7 +304,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -380,11 +380,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -394,7 +394,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; diff --git a/src/main/java/com/stripe/model/tax/Settings.java b/src/main/java/com/stripe/model/tax/Settings.java index b5090fc8d20..d26e2cb6c60 100644 --- a/src/main/java/com/stripe/model/tax/Settings.java +++ b/src/main/java/com/stripe/model/tax/Settings.java @@ -149,6 +149,15 @@ public static Settings update(SettingsUpdateParams params, RequestOptions option @Setter @EqualsAndHashCode(callSuper = false) public static class Defaults extends StripeObject { + /** + * The tax calculation provider this account uses. Defaults to {@code stripe} when not using a + * third-party provider. + * + *

One of {@code anrok}, {@code avalara}, {@code sphere}, or {@code stripe}. + */ + @SerializedName("provider") + String provider; + /** * Default tax diff --git a/src/main/java/com/stripe/model/tax/Transaction.java b/src/main/java/com/stripe/model/tax/Transaction.java index fd628992398..f67b062766f 100644 --- a/src/main/java/com/stripe/model/tax/Transaction.java +++ b/src/main/java/com/stripe/model/tax/Transaction.java @@ -335,11 +335,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -349,7 +349,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -438,11 +438,11 @@ public static class Address extends StripeObject { @SerializedName("country") String country; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -452,7 +452,7 @@ public static class Address extends StripeObject { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; diff --git a/src/main/java/com/stripe/model/terminal/Configuration.java b/src/main/java/com/stripe/model/terminal/Configuration.java index e6b4a193f7c..ea48c740df3 100644 --- a/src/main/java/com/stripe/model/terminal/Configuration.java +++ b/src/main/java/com/stripe/model/terminal/Configuration.java @@ -33,6 +33,9 @@ @Setter @EqualsAndHashCode(callSuper = false) public class Configuration extends ApiResource implements HasId { + @SerializedName("bbpos_wisepad3") + BbposWisepad3 bbposWisepad3; + @SerializedName("bbpos_wisepos_e") BbposWiseposE bbposWiseposE; @@ -258,6 +261,39 @@ public Configuration update(ConfigurationUpdateParams params, RequestOptions opt return getResponseGetter().request(request, Configuration.class); } + /** + * For more details about BbposWisepad3, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BbposWisepad3 extends StripeObject { + /** A File ID representing an image to display on the reader. */ + @SerializedName("splashscreen") + @Getter(lombok.AccessLevel.NONE) + @Setter(lombok.AccessLevel.NONE) + ExpandableField splashscreen; + + /** Get ID of expandable {@code splashscreen} object. */ + public String getSplashscreen() { + return (this.splashscreen != null) ? this.splashscreen.getId() : null; + } + + public void setSplashscreen(String id) { + this.splashscreen = ApiResource.setExpandableFieldId(id, this.splashscreen); + } + + /** Get expanded {@code splashscreen}. */ + public File getSplashscreenObject() { + return (this.splashscreen != null) ? this.splashscreen.getExpanded() : null; + } + + public void setSplashscreenObject(File expandableObject) { + this.splashscreen = new ExpandableField(expandableObject.getId(), expandableObject); + } + } + /** * For more details about BbposWiseposE, please refer to the API Reference. @@ -1083,6 +1119,7 @@ public static class PersonalPsk extends StripeObject { @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); + trySetResponseGetter(bbposWisepad3, responseGetter); trySetResponseGetter(bbposWiseposE, responseGetter); trySetResponseGetter(offline, responseGetter); trySetResponseGetter(readerSecurity, responseGetter); diff --git a/src/main/java/com/stripe/model/terminal/Location.java b/src/main/java/com/stripe/model/terminal/Location.java index 93969929030..95871681b0e 100644 --- a/src/main/java/com/stripe/model/terminal/Location.java +++ b/src/main/java/com/stripe/model/terminal/Location.java @@ -6,6 +6,7 @@ import com.stripe.model.Address; import com.stripe.model.HasId; import com.stripe.model.MetadataStore; +import com.stripe.model.StripeObject; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -33,6 +34,12 @@ public class Location extends ApiResource implements HasId, MetadataStoreAPI Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AddressKana extends StripeObject { + /** City/Ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Block/Building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town/cho-me. */ + @SerializedName("town") + String town; + } + + /** + * For more details about AddressKanji, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AddressKanji extends StripeObject { + /** City/Ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** Block/Building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town/cho-me. */ + @SerializedName("town") + String town; + } + @Override public void setResponseGetter(StripeResponseGetter responseGetter) { super.setResponseGetter(responseGetter); trySetResponseGetter(address, responseGetter); + trySetResponseGetter(addressKana, responseGetter); + trySetResponseGetter(addressKanji, responseGetter); } } diff --git a/src/main/java/com/stripe/model/v2/Event.java b/src/main/java/com/stripe/model/v2/Event.java index e3ace3e939c..0e50fbea25c 100644 --- a/src/main/java/com/stripe/model/v2/Event.java +++ b/src/main/java/com/stripe/model/v2/Event.java @@ -75,6 +75,10 @@ public class Event extends StripeObject implements HasId, StripeActiveObject { @SerializedName("type") String type; + /** For interop events, this is the snapshot event ID. */ + @SerializedName("v1_event_id") + String v1EventId; + StripeResponseGetter responseGetter; @Override diff --git a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java index dba3bfcb547..5a39f8e77d7 100644 --- a/src/main/java/com/stripe/model/v2/EventDataClassLookup.java +++ b/src/main/java/com/stripe/model/v2/EventDataClassLookup.java @@ -16,8 +16,51 @@ public final class EventDataClassLookup { public static final Map> eventClassLookup = new HashMap<>(); static { + classLookup.put("account", com.stripe.model.Account.class); + classLookup.put("application_fee", com.stripe.model.ApplicationFee.class); + classLookup.put("capability", com.stripe.model.Capability.class); + classLookup.put("charge", com.stripe.model.Charge.class); + classLookup.put("coupon", com.stripe.model.Coupon.class); + classLookup.put("credit_note", com.stripe.model.CreditNote.class); + classLookup.put("customer", com.stripe.model.Customer.class); + classLookup.put("discount", com.stripe.model.Discount.class); + classLookup.put("dispute", com.stripe.model.Dispute.class); + classLookup.put("file", com.stripe.model.File.class); + classLookup.put("invoice", com.stripe.model.Invoice.class); + classLookup.put("invoice_payment", com.stripe.model.InvoicePayment.class); + classLookup.put("invoiceitem", com.stripe.model.InvoiceItem.class); + classLookup.put("mandate", com.stripe.model.Mandate.class); + classLookup.put("payment_intent", com.stripe.model.PaymentIntent.class); + classLookup.put("payment_link", com.stripe.model.PaymentLink.class); + classLookup.put("payment_method", com.stripe.model.PaymentMethod.class); + classLookup.put("payout", com.stripe.model.Payout.class); + classLookup.put("person", com.stripe.model.Person.class); + classLookup.put("plan", com.stripe.model.Plan.class); + classLookup.put("price", com.stripe.model.Price.class); + classLookup.put("product", com.stripe.model.Product.class); + classLookup.put("promotion_code", com.stripe.model.PromotionCode.class); + classLookup.put("quote", com.stripe.model.Quote.class); + classLookup.put("refund", com.stripe.model.Refund.class); + classLookup.put("review", com.stripe.model.Review.class); + classLookup.put("setup_intent", com.stripe.model.SetupIntent.class); + classLookup.put("source", com.stripe.model.Source.class); + classLookup.put("subscription", com.stripe.model.Subscription.class); + classLookup.put("subscription_schedule", com.stripe.model.SubscriptionSchedule.class); + classLookup.put("tax_id", com.stripe.model.TaxId.class); + classLookup.put("tax_rate", com.stripe.model.TaxRate.class); + classLookup.put("topup", com.stripe.model.Topup.class); + classLookup.put("transfer", com.stripe.model.Transfer.class); + classLookup.put("billing.meter", com.stripe.model.billing.Meter.class); + classLookup.put( + "billing_portal.configuration", com.stripe.model.billingportal.Configuration.class); + + classLookup.put("checkout.session", com.stripe.model.checkout.Session.class); + + classLookup.put("climate.order", com.stripe.model.climate.Order.class); + classLookup.put("climate.product", com.stripe.model.climate.Product.class); + classLookup.put( "financial_address_credit_simulation", com.stripe.model.v2.FinancialAddressCreditSimulation.class); @@ -27,6 +70,29 @@ public final class EventDataClassLookup { classLookup.put("v2.core.event", com.stripe.model.v2.Event.class); classLookup.put("v2.core.event_destination", com.stripe.model.v2.EventDestination.class); + classLookup.put( + "financial_connections.account", com.stripe.model.financialconnections.Account.class); + + classLookup.put( + "identity.verification_session", com.stripe.model.identity.VerificationSession.class); + + classLookup.put("issuing.authorization", com.stripe.model.issuing.Authorization.class); + classLookup.put("issuing.card", com.stripe.model.issuing.Card.class); + classLookup.put("issuing.cardholder", com.stripe.model.issuing.Cardholder.class); + classLookup.put("issuing.dispute", com.stripe.model.issuing.Dispute.class); + classLookup.put( + "issuing.personalization_design", com.stripe.model.issuing.PersonalizationDesign.class); + classLookup.put("issuing.token", com.stripe.model.issuing.Token.class); + classLookup.put("issuing.transaction", com.stripe.model.issuing.Transaction.class); + + classLookup.put("radar.early_fraud_warning", com.stripe.model.radar.EarlyFraudWarning.class); + + classLookup.put("scheduled_query_run", com.stripe.model.sigma.ScheduledQueryRun.class); + + classLookup.put("terminal.reader", com.stripe.model.terminal.Reader.class); + + classLookup.put("test_helpers.test_clock", com.stripe.model.testhelpers.TestClock.class); + classLookup.put("v2.billing.bill_setting", com.stripe.model.v2.billing.BillSetting.class); classLookup.put( "v2.billing.bill_setting_version", com.stripe.model.v2.billing.BillSettingVersion.class); @@ -118,6 +184,9 @@ public final class EventDataClassLookup { classLookup.put( "v2.money_management.received_debit", com.stripe.model.v2.moneymanagement.ReceivedDebit.class); + classLookup.put( + "v2.money_management.recipient_verification", + com.stripe.model.v2.moneymanagement.RecipientVerification.class); classLookup.put( "v2.money_management.transaction", com.stripe.model.v2.moneymanagement.Transaction.class); classLookup.put( @@ -129,19 +198,397 @@ public final class EventDataClassLookup { classLookup.put("v2.tax.automatic_rule", com.stripe.model.v2.tax.AutomaticRule.class); + eventClassLookup.put("v1.account.updated", com.stripe.events.V1AccountUpdatedEvent.class); + eventClassLookup.put( + "v1.application_fee.created", com.stripe.events.V1ApplicationFeeCreatedEvent.class); + eventClassLookup.put( + "v1.application_fee.refunded", com.stripe.events.V1ApplicationFeeRefundedEvent.class); eventClassLookup.put( "v1.billing.meter.error_report_triggered", com.stripe.events.V1BillingMeterErrorReportTriggeredEvent.class); eventClassLookup.put( "v1.billing.meter.no_meter_found", com.stripe.events.V1BillingMeterNoMeterFoundEvent.class); + eventClassLookup.put( + "v1.billing_portal.configuration.created", + com.stripe.events.V1BillingPortalConfigurationCreatedEvent.class); + eventClassLookup.put( + "v1.billing_portal.configuration.updated", + com.stripe.events.V1BillingPortalConfigurationUpdatedEvent.class); + eventClassLookup.put("v1.capability.updated", com.stripe.events.V1CapabilityUpdatedEvent.class); + eventClassLookup.put("v1.charge.captured", com.stripe.events.V1ChargeCapturedEvent.class); + eventClassLookup.put( + "v1.charge.dispute.closed", com.stripe.events.V1ChargeDisputeClosedEvent.class); + eventClassLookup.put( + "v1.charge.dispute.created", com.stripe.events.V1ChargeDisputeCreatedEvent.class); + eventClassLookup.put( + "v1.charge.dispute.funds_reinstated", + com.stripe.events.V1ChargeDisputeFundsReinstatedEvent.class); + eventClassLookup.put( + "v1.charge.dispute.funds_withdrawn", + com.stripe.events.V1ChargeDisputeFundsWithdrawnEvent.class); + eventClassLookup.put( + "v1.charge.dispute.updated", com.stripe.events.V1ChargeDisputeUpdatedEvent.class); + eventClassLookup.put("v1.charge.expired", com.stripe.events.V1ChargeExpiredEvent.class); + eventClassLookup.put("v1.charge.failed", com.stripe.events.V1ChargeFailedEvent.class); + eventClassLookup.put("v1.charge.pending", com.stripe.events.V1ChargePendingEvent.class); + eventClassLookup.put( + "v1.charge.refund.updated", com.stripe.events.V1ChargeRefundUpdatedEvent.class); + eventClassLookup.put("v1.charge.refunded", com.stripe.events.V1ChargeRefundedEvent.class); + eventClassLookup.put("v1.charge.succeeded", com.stripe.events.V1ChargeSucceededEvent.class); + eventClassLookup.put("v1.charge.updated", com.stripe.events.V1ChargeUpdatedEvent.class); + eventClassLookup.put( + "v1.checkout.session.async_payment_failed", + com.stripe.events.V1CheckoutSessionAsyncPaymentFailedEvent.class); + eventClassLookup.put( + "v1.checkout.session.async_payment_succeeded", + com.stripe.events.V1CheckoutSessionAsyncPaymentSucceededEvent.class); + eventClassLookup.put( + "v1.checkout.session.completed", com.stripe.events.V1CheckoutSessionCompletedEvent.class); + eventClassLookup.put( + "v1.checkout.session.expired", com.stripe.events.V1CheckoutSessionExpiredEvent.class); + eventClassLookup.put( + "v1.climate.order.canceled", com.stripe.events.V1ClimateOrderCanceledEvent.class); + eventClassLookup.put( + "v1.climate.order.created", com.stripe.events.V1ClimateOrderCreatedEvent.class); + eventClassLookup.put( + "v1.climate.order.delayed", com.stripe.events.V1ClimateOrderDelayedEvent.class); + eventClassLookup.put( + "v1.climate.order.delivered", com.stripe.events.V1ClimateOrderDeliveredEvent.class); + eventClassLookup.put( + "v1.climate.order.product_substituted", + com.stripe.events.V1ClimateOrderProductSubstitutedEvent.class); + eventClassLookup.put( + "v1.climate.product.created", com.stripe.events.V1ClimateProductCreatedEvent.class); + eventClassLookup.put( + "v1.climate.product.pricing_updated", + com.stripe.events.V1ClimateProductPricingUpdatedEvent.class); + eventClassLookup.put("v1.coupon.created", com.stripe.events.V1CouponCreatedEvent.class); + eventClassLookup.put("v1.coupon.deleted", com.stripe.events.V1CouponDeletedEvent.class); + eventClassLookup.put("v1.coupon.updated", com.stripe.events.V1CouponUpdatedEvent.class); + eventClassLookup.put( + "v1.credit_note.created", com.stripe.events.V1CreditNoteCreatedEvent.class); + eventClassLookup.put( + "v1.credit_note.updated", com.stripe.events.V1CreditNoteUpdatedEvent.class); + eventClassLookup.put("v1.credit_note.voided", com.stripe.events.V1CreditNoteVoidedEvent.class); + eventClassLookup.put("v1.customer.created", com.stripe.events.V1CustomerCreatedEvent.class); + eventClassLookup.put("v1.customer.deleted", com.stripe.events.V1CustomerDeletedEvent.class); + eventClassLookup.put( + "v1.customer.discount.created", com.stripe.events.V1CustomerDiscountCreatedEvent.class); + eventClassLookup.put( + "v1.customer.discount.deleted", com.stripe.events.V1CustomerDiscountDeletedEvent.class); + eventClassLookup.put( + "v1.customer.discount.updated", com.stripe.events.V1CustomerDiscountUpdatedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.created", + com.stripe.events.V1CustomerSubscriptionCreatedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.deleted", + com.stripe.events.V1CustomerSubscriptionDeletedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.paused", + com.stripe.events.V1CustomerSubscriptionPausedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.pending_update_applied", + com.stripe.events.V1CustomerSubscriptionPendingUpdateAppliedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.pending_update_expired", + com.stripe.events.V1CustomerSubscriptionPendingUpdateExpiredEvent.class); + eventClassLookup.put( + "v1.customer.subscription.resumed", + com.stripe.events.V1CustomerSubscriptionResumedEvent.class); + eventClassLookup.put( + "v1.customer.subscription.trial_will_end", + com.stripe.events.V1CustomerSubscriptionTrialWillEndEvent.class); + eventClassLookup.put( + "v1.customer.subscription.updated", + com.stripe.events.V1CustomerSubscriptionUpdatedEvent.class); + eventClassLookup.put( + "v1.customer.tax_id.created", com.stripe.events.V1CustomerTaxIdCreatedEvent.class); + eventClassLookup.put( + "v1.customer.tax_id.deleted", com.stripe.events.V1CustomerTaxIdDeletedEvent.class); + eventClassLookup.put( + "v1.customer.tax_id.updated", com.stripe.events.V1CustomerTaxIdUpdatedEvent.class); + eventClassLookup.put("v1.customer.updated", com.stripe.events.V1CustomerUpdatedEvent.class); + eventClassLookup.put("v1.file.created", com.stripe.events.V1FileCreatedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.created", + com.stripe.events.V1FinancialConnectionsAccountCreatedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.deactivated", + com.stripe.events.V1FinancialConnectionsAccountDeactivatedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.disconnected", + com.stripe.events.V1FinancialConnectionsAccountDisconnectedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.reactivated", + com.stripe.events.V1FinancialConnectionsAccountReactivatedEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.refreshed_balance", + com.stripe.events.V1FinancialConnectionsAccountRefreshedBalanceEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.refreshed_ownership", + com.stripe.events.V1FinancialConnectionsAccountRefreshedOwnershipEvent.class); + eventClassLookup.put( + "v1.financial_connections.account.refreshed_transactions", + com.stripe.events.V1FinancialConnectionsAccountRefreshedTransactionsEvent.class); + eventClassLookup.put( + "v1.identity.verification_session.canceled", + com.stripe.events.V1IdentityVerificationSessionCanceledEvent.class); + eventClassLookup.put( + "v1.identity.verification_session.created", + com.stripe.events.V1IdentityVerificationSessionCreatedEvent.class); + eventClassLookup.put( + "v1.identity.verification_session.processing", + com.stripe.events.V1IdentityVerificationSessionProcessingEvent.class); + eventClassLookup.put( + "v1.identity.verification_session.redacted", + com.stripe.events.V1IdentityVerificationSessionRedactedEvent.class); + eventClassLookup.put( + "v1.identity.verification_session.requires_input", + com.stripe.events.V1IdentityVerificationSessionRequiresInputEvent.class); + eventClassLookup.put( + "v1.identity.verification_session.verified", + com.stripe.events.V1IdentityVerificationSessionVerifiedEvent.class); + eventClassLookup.put("v1.invoice.created", com.stripe.events.V1InvoiceCreatedEvent.class); + eventClassLookup.put("v1.invoice.deleted", com.stripe.events.V1InvoiceDeletedEvent.class); + eventClassLookup.put( + "v1.invoice.finalization_failed", com.stripe.events.V1InvoiceFinalizationFailedEvent.class); + eventClassLookup.put("v1.invoice.finalized", com.stripe.events.V1InvoiceFinalizedEvent.class); + eventClassLookup.put( + "v1.invoice.marked_uncollectible", + com.stripe.events.V1InvoiceMarkedUncollectibleEvent.class); + eventClassLookup.put("v1.invoice.overdue", com.stripe.events.V1InvoiceOverdueEvent.class); + eventClassLookup.put("v1.invoice.overpaid", com.stripe.events.V1InvoiceOverpaidEvent.class); + eventClassLookup.put("v1.invoice.paid", com.stripe.events.V1InvoicePaidEvent.class); + eventClassLookup.put( + "v1.invoice.payment_action_required", + com.stripe.events.V1InvoicePaymentActionRequiredEvent.class); + eventClassLookup.put( + "v1.invoice.payment_failed", com.stripe.events.V1InvoicePaymentFailedEvent.class); + eventClassLookup.put( + "v1.invoice.payment_succeeded", com.stripe.events.V1InvoicePaymentSucceededEvent.class); + eventClassLookup.put("v1.invoice.sent", com.stripe.events.V1InvoiceSentEvent.class); + eventClassLookup.put("v1.invoice.upcoming", com.stripe.events.V1InvoiceUpcomingEvent.class); + eventClassLookup.put("v1.invoice.updated", com.stripe.events.V1InvoiceUpdatedEvent.class); + eventClassLookup.put("v1.invoice.voided", com.stripe.events.V1InvoiceVoidedEvent.class); + eventClassLookup.put("v1.invoice.will_be_due", com.stripe.events.V1InvoiceWillBeDueEvent.class); + eventClassLookup.put( + "v1.invoice_payment.paid", com.stripe.events.V1InvoicePaymentPaidEvent.class); + eventClassLookup.put( + "v1.invoiceitem.created", com.stripe.events.V1InvoiceitemCreatedEvent.class); + eventClassLookup.put( + "v1.invoiceitem.deleted", com.stripe.events.V1InvoiceitemDeletedEvent.class); + eventClassLookup.put( + "v1.issuing_authorization.created", + com.stripe.events.V1IssuingAuthorizationCreatedEvent.class); + eventClassLookup.put( + "v1.issuing_authorization.request", + com.stripe.events.V1IssuingAuthorizationRequestEvent.class); + eventClassLookup.put( + "v1.issuing_authorization.updated", + com.stripe.events.V1IssuingAuthorizationUpdatedEvent.class); + eventClassLookup.put( + "v1.issuing_card.created", com.stripe.events.V1IssuingCardCreatedEvent.class); + eventClassLookup.put( + "v1.issuing_card.updated", com.stripe.events.V1IssuingCardUpdatedEvent.class); + eventClassLookup.put( + "v1.issuing_cardholder.created", com.stripe.events.V1IssuingCardholderCreatedEvent.class); + eventClassLookup.put( + "v1.issuing_cardholder.updated", com.stripe.events.V1IssuingCardholderUpdatedEvent.class); + eventClassLookup.put( + "v1.issuing_dispute.closed", com.stripe.events.V1IssuingDisputeClosedEvent.class); + eventClassLookup.put( + "v1.issuing_dispute.created", com.stripe.events.V1IssuingDisputeCreatedEvent.class); + eventClassLookup.put( + "v1.issuing_dispute.funds_reinstated", + com.stripe.events.V1IssuingDisputeFundsReinstatedEvent.class); + eventClassLookup.put( + "v1.issuing_dispute.funds_rescinded", + com.stripe.events.V1IssuingDisputeFundsRescindedEvent.class); + eventClassLookup.put( + "v1.issuing_dispute.submitted", com.stripe.events.V1IssuingDisputeSubmittedEvent.class); + eventClassLookup.put( + "v1.issuing_dispute.updated", com.stripe.events.V1IssuingDisputeUpdatedEvent.class); + eventClassLookup.put( + "v1.issuing_personalization_design.activated", + com.stripe.events.V1IssuingPersonalizationDesignActivatedEvent.class); + eventClassLookup.put( + "v1.issuing_personalization_design.deactivated", + com.stripe.events.V1IssuingPersonalizationDesignDeactivatedEvent.class); + eventClassLookup.put( + "v1.issuing_personalization_design.rejected", + com.stripe.events.V1IssuingPersonalizationDesignRejectedEvent.class); + eventClassLookup.put( + "v1.issuing_personalization_design.updated", + com.stripe.events.V1IssuingPersonalizationDesignUpdatedEvent.class); + eventClassLookup.put( + "v1.issuing_token.created", com.stripe.events.V1IssuingTokenCreatedEvent.class); + eventClassLookup.put( + "v1.issuing_token.updated", com.stripe.events.V1IssuingTokenUpdatedEvent.class); + eventClassLookup.put( + "v1.issuing_transaction.created", com.stripe.events.V1IssuingTransactionCreatedEvent.class); + eventClassLookup.put( + "v1.issuing_transaction.purchase_details_receipt_updated", + com.stripe.events.V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent.class); + eventClassLookup.put( + "v1.issuing_transaction.updated", com.stripe.events.V1IssuingTransactionUpdatedEvent.class); + eventClassLookup.put("v1.mandate.updated", com.stripe.events.V1MandateUpdatedEvent.class); + eventClassLookup.put( + "v1.payment_intent.amount_capturable_updated", + com.stripe.events.V1PaymentIntentAmountCapturableUpdatedEvent.class); + eventClassLookup.put( + "v1.payment_intent.canceled", com.stripe.events.V1PaymentIntentCanceledEvent.class); + eventClassLookup.put( + "v1.payment_intent.created", com.stripe.events.V1PaymentIntentCreatedEvent.class); + eventClassLookup.put( + "v1.payment_intent.partially_funded", + com.stripe.events.V1PaymentIntentPartiallyFundedEvent.class); + eventClassLookup.put( + "v1.payment_intent.payment_failed", + com.stripe.events.V1PaymentIntentPaymentFailedEvent.class); + eventClassLookup.put( + "v1.payment_intent.processing", com.stripe.events.V1PaymentIntentProcessingEvent.class); + eventClassLookup.put( + "v1.payment_intent.requires_action", + com.stripe.events.V1PaymentIntentRequiresActionEvent.class); + eventClassLookup.put( + "v1.payment_intent.succeeded", com.stripe.events.V1PaymentIntentSucceededEvent.class); + eventClassLookup.put( + "v1.payment_link.created", com.stripe.events.V1PaymentLinkCreatedEvent.class); + eventClassLookup.put( + "v1.payment_link.updated", com.stripe.events.V1PaymentLinkUpdatedEvent.class); + eventClassLookup.put( + "v1.payment_method.attached", com.stripe.events.V1PaymentMethodAttachedEvent.class); + eventClassLookup.put( + "v1.payment_method.automatically_updated", + com.stripe.events.V1PaymentMethodAutomaticallyUpdatedEvent.class); + eventClassLookup.put( + "v1.payment_method.detached", com.stripe.events.V1PaymentMethodDetachedEvent.class); + eventClassLookup.put( + "v1.payment_method.updated", com.stripe.events.V1PaymentMethodUpdatedEvent.class); + eventClassLookup.put("v1.payout.canceled", com.stripe.events.V1PayoutCanceledEvent.class); + eventClassLookup.put("v1.payout.created", com.stripe.events.V1PayoutCreatedEvent.class); + eventClassLookup.put("v1.payout.failed", com.stripe.events.V1PayoutFailedEvent.class); + eventClassLookup.put("v1.payout.paid", com.stripe.events.V1PayoutPaidEvent.class); + eventClassLookup.put( + "v1.payout.reconciliation_completed", + com.stripe.events.V1PayoutReconciliationCompletedEvent.class); + eventClassLookup.put("v1.payout.updated", com.stripe.events.V1PayoutUpdatedEvent.class); + eventClassLookup.put("v1.person.created", com.stripe.events.V1PersonCreatedEvent.class); + eventClassLookup.put("v1.person.deleted", com.stripe.events.V1PersonDeletedEvent.class); + eventClassLookup.put("v1.person.updated", com.stripe.events.V1PersonUpdatedEvent.class); + eventClassLookup.put("v1.plan.created", com.stripe.events.V1PlanCreatedEvent.class); + eventClassLookup.put("v1.plan.deleted", com.stripe.events.V1PlanDeletedEvent.class); + eventClassLookup.put("v1.plan.updated", com.stripe.events.V1PlanUpdatedEvent.class); + eventClassLookup.put("v1.price.created", com.stripe.events.V1PriceCreatedEvent.class); + eventClassLookup.put("v1.price.deleted", com.stripe.events.V1PriceDeletedEvent.class); + eventClassLookup.put("v1.price.updated", com.stripe.events.V1PriceUpdatedEvent.class); + eventClassLookup.put("v1.product.created", com.stripe.events.V1ProductCreatedEvent.class); + eventClassLookup.put("v1.product.deleted", com.stripe.events.V1ProductDeletedEvent.class); + eventClassLookup.put("v1.product.updated", com.stripe.events.V1ProductUpdatedEvent.class); + eventClassLookup.put( + "v1.promotion_code.created", com.stripe.events.V1PromotionCodeCreatedEvent.class); + eventClassLookup.put( + "v1.promotion_code.updated", com.stripe.events.V1PromotionCodeUpdatedEvent.class); + eventClassLookup.put("v1.quote.accepted", com.stripe.events.V1QuoteAcceptedEvent.class); + eventClassLookup.put("v1.quote.canceled", com.stripe.events.V1QuoteCanceledEvent.class); + eventClassLookup.put("v1.quote.created", com.stripe.events.V1QuoteCreatedEvent.class); + eventClassLookup.put("v1.quote.finalized", com.stripe.events.V1QuoteFinalizedEvent.class); + eventClassLookup.put( + "v1.radar.early_fraud_warning.created", + com.stripe.events.V1RadarEarlyFraudWarningCreatedEvent.class); + eventClassLookup.put( + "v1.radar.early_fraud_warning.updated", + com.stripe.events.V1RadarEarlyFraudWarningUpdatedEvent.class); + eventClassLookup.put("v1.refund.created", com.stripe.events.V1RefundCreatedEvent.class); + eventClassLookup.put("v1.refund.failed", com.stripe.events.V1RefundFailedEvent.class); + eventClassLookup.put("v1.refund.updated", com.stripe.events.V1RefundUpdatedEvent.class); + eventClassLookup.put("v1.review.closed", com.stripe.events.V1ReviewClosedEvent.class); + eventClassLookup.put("v1.review.opened", com.stripe.events.V1ReviewOpenedEvent.class); + eventClassLookup.put( + "v1.setup_intent.canceled", com.stripe.events.V1SetupIntentCanceledEvent.class); + eventClassLookup.put( + "v1.setup_intent.created", com.stripe.events.V1SetupIntentCreatedEvent.class); + eventClassLookup.put( + "v1.setup_intent.requires_action", + com.stripe.events.V1SetupIntentRequiresActionEvent.class); + eventClassLookup.put( + "v1.setup_intent.setup_failed", com.stripe.events.V1SetupIntentSetupFailedEvent.class); + eventClassLookup.put( + "v1.setup_intent.succeeded", com.stripe.events.V1SetupIntentSucceededEvent.class); + eventClassLookup.put( + "v1.sigma.scheduled_query_run.created", + com.stripe.events.V1SigmaScheduledQueryRunCreatedEvent.class); + eventClassLookup.put("v1.source.canceled", com.stripe.events.V1SourceCanceledEvent.class); + eventClassLookup.put("v1.source.chargeable", com.stripe.events.V1SourceChargeableEvent.class); + eventClassLookup.put("v1.source.failed", com.stripe.events.V1SourceFailedEvent.class); + eventClassLookup.put( + "v1.source.refund_attributes_required", + com.stripe.events.V1SourceRefundAttributesRequiredEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.aborted", + com.stripe.events.V1SubscriptionScheduleAbortedEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.canceled", + com.stripe.events.V1SubscriptionScheduleCanceledEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.completed", + com.stripe.events.V1SubscriptionScheduleCompletedEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.created", + com.stripe.events.V1SubscriptionScheduleCreatedEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.expiring", + com.stripe.events.V1SubscriptionScheduleExpiringEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.released", + com.stripe.events.V1SubscriptionScheduleReleasedEvent.class); + eventClassLookup.put( + "v1.subscription_schedule.updated", + com.stripe.events.V1SubscriptionScheduleUpdatedEvent.class); + eventClassLookup.put("v1.tax_rate.created", com.stripe.events.V1TaxRateCreatedEvent.class); + eventClassLookup.put("v1.tax_rate.updated", com.stripe.events.V1TaxRateUpdatedEvent.class); + eventClassLookup.put( + "v1.terminal.reader.action_failed", + com.stripe.events.V1TerminalReaderActionFailedEvent.class); + eventClassLookup.put( + "v1.terminal.reader.action_succeeded", + com.stripe.events.V1TerminalReaderActionSucceededEvent.class); + eventClassLookup.put( + "v1.terminal.reader.action_updated", + com.stripe.events.V1TerminalReaderActionUpdatedEvent.class); + eventClassLookup.put( + "v1.test_helpers.test_clock.advancing", + com.stripe.events.V1TestHelpersTestClockAdvancingEvent.class); + eventClassLookup.put( + "v1.test_helpers.test_clock.created", + com.stripe.events.V1TestHelpersTestClockCreatedEvent.class); + eventClassLookup.put( + "v1.test_helpers.test_clock.deleted", + com.stripe.events.V1TestHelpersTestClockDeletedEvent.class); + eventClassLookup.put( + "v1.test_helpers.test_clock.internal_failure", + com.stripe.events.V1TestHelpersTestClockInternalFailureEvent.class); + eventClassLookup.put( + "v1.test_helpers.test_clock.ready", + com.stripe.events.V1TestHelpersTestClockReadyEvent.class); + eventClassLookup.put("v1.topup.canceled", com.stripe.events.V1TopupCanceledEvent.class); + eventClassLookup.put("v1.topup.created", com.stripe.events.V1TopupCreatedEvent.class); + eventClassLookup.put("v1.topup.failed", com.stripe.events.V1TopupFailedEvent.class); + eventClassLookup.put("v1.topup.reversed", com.stripe.events.V1TopupReversedEvent.class); + eventClassLookup.put("v1.topup.succeeded", com.stripe.events.V1TopupSucceededEvent.class); + eventClassLookup.put("v1.transfer.created", com.stripe.events.V1TransferCreatedEvent.class); + eventClassLookup.put("v1.transfer.reversed", com.stripe.events.V1TransferReversedEvent.class); + eventClassLookup.put("v1.transfer.updated", com.stripe.events.V1TransferUpdatedEvent.class); + eventClassLookup.put( + "v2.billing.bill_setting.updated", + com.stripe.events.V2BillingBillSettingUpdatedEvent.class); eventClassLookup.put( "v2.billing.cadence.billed", com.stripe.events.V2BillingCadenceBilledEvent.class); eventClassLookup.put( "v2.billing.cadence.canceled", com.stripe.events.V2BillingCadenceCanceledEvent.class); eventClassLookup.put( "v2.billing.cadence.created", com.stripe.events.V2BillingCadenceCreatedEvent.class); - eventClassLookup.put( - "v2.billing.cadence.errored", com.stripe.events.V2BillingCadenceErroredEvent.class); eventClassLookup.put( "v2.billing.license_fee.created", com.stripe.events.V2BillingLicenseFeeCreatedEvent.class); eventClassLookup.put( @@ -292,6 +739,21 @@ public final class EventDataClassLookup { "v2.core.account_person.deleted", com.stripe.events.V2CoreAccountPersonDeletedEvent.class); eventClassLookup.put( "v2.core.account_person.updated", com.stripe.events.V2CoreAccountPersonUpdatedEvent.class); + eventClassLookup.put( + "v2.core.claimable_sandbox.claimed", + com.stripe.events.V2CoreClaimableSandboxClaimedEvent.class); + eventClassLookup.put( + "v2.core.claimable_sandbox.created", + com.stripe.events.V2CoreClaimableSandboxCreatedEvent.class); + eventClassLookup.put( + "v2.core.claimable_sandbox.expired", + com.stripe.events.V2CoreClaimableSandboxExpiredEvent.class); + eventClassLookup.put( + "v2.core.claimable_sandbox.expiring", + com.stripe.events.V2CoreClaimableSandboxExpiringEvent.class); + eventClassLookup.put( + "v2.core.claimable_sandbox.sandbox_details_owner_account_updated", + com.stripe.events.V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.class); eventClassLookup.put( "v2.core.event_destination.ping", com.stripe.events.V2CoreEventDestinationPingEvent.class); eventClassLookup.put( @@ -317,6 +779,12 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.core.health.fraud_rate.increased", com.stripe.events.V2CoreHealthFraudRateIncreasedEvent.class); + eventClassLookup.put( + "v2.core.health.issuing_authorization_request_errors.firing", + com.stripe.events.V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent.class); + eventClassLookup.put( + "v2.core.health.issuing_authorization_request_errors.resolved", + com.stripe.events.V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent.class); eventClassLookup.put( "v2.core.health.issuing_authorization_request_timeout.firing", com.stripe.events.V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent.class); @@ -440,6 +908,12 @@ public final class EventDataClassLookup { eventClassLookup.put( "v2.money_management.received_debit.updated", com.stripe.events.V2MoneyManagementReceivedDebitUpdatedEvent.class); + eventClassLookup.put( + "v2.money_management.recipient_verification.created", + com.stripe.events.V2MoneyManagementRecipientVerificationCreatedEvent.class); + eventClassLookup.put( + "v2.money_management.recipient_verification.updated", + com.stripe.events.V2MoneyManagementRecipientVerificationUpdatedEvent.class); eventClassLookup.put( "v2.money_management.transaction.created", com.stripe.events.V2MoneyManagementTransactionCreatedEvent.class); diff --git a/src/main/java/com/stripe/model/v2/billing/Cadence.java b/src/main/java/com/stripe/model/v2/billing/Cadence.java index 231d03a7383..86c630ee680 100644 --- a/src/main/java/com/stripe/model/v2/billing/Cadence.java +++ b/src/main/java/com/stripe/model/v2/billing/Cadence.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import java.util.Map; @@ -40,6 +39,13 @@ public class Cadence extends StripeObject implements HasId { @SerializedName("livemode") Boolean livemode; + /** + * A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 + * characters. + */ + @SerializedName("lookup_key") + String lookupKey; + /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -69,6 +75,10 @@ public class Cadence extends StripeObject implements HasId { @SerializedName("settings") Settings settings; + /** Settings data that contains expanded billing settings configuration with actual values. */ + @SerializedName("settings_data") + SettingsData settingsData; + /** * The current status of the cadence. * @@ -167,6 +177,13 @@ public static class Month extends StripeObject { @SerializedName("day_of_month") Long dayOfMonth; + /** + * The month to anchor the billing on for a type="month" billing cycle from 1-12. + * Occurrences are calculated from the month anchor. + */ + @SerializedName("month_of_year") + Long monthOfYear; + /** The time at which the billing cycle ends. */ @SerializedName("time") Time time; @@ -335,7 +352,7 @@ public static class PercentOff extends StripeObject { * $100 amount $50 instead. */ @SerializedName("percent_off") - BigDecimal percentOff; + String percentOff; /** The maximum applications configuration for this discount. */ @Getter @@ -425,4 +442,414 @@ public static class Collection extends StripeObject implements HasId { String version; } } + + /** Settings data that contains expanded billing settings configuration with actual values. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SettingsData extends StripeObject { + /** Expanded bill settings data with actual configuration values. */ + @SerializedName("bill") + Bill bill; + + /** Expanded collection settings data with actual configuration values. */ + @SerializedName("collection") + Collection collection; + + /** Expanded bill settings data with actual configuration values. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Bill extends StripeObject { + /** Settings related to calculating a bill. */ + @SerializedName("calculation") + Calculation calculation; + + /** Settings related to invoice behavior. */ + @SerializedName("invoice") + Invoice invoice; + + /** The ID of the invoice rendering template to be used when generating invoices. */ + @SerializedName("invoice_rendering_template") + String invoiceRenderingTemplate; + + /** Settings related to calculating a bill. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Calculation extends StripeObject { + /** Settings for calculating tax. */ + @SerializedName("tax") + Tax tax; + + /** Settings for calculating tax. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** + * Determines if tax will be calculated automatically based on a PTC or manually based on + * rules defined by the merchant. Defaults to "manual". + * + *

One of {@code automatic}, or {@code manual}. + */ + @SerializedName("type") + String type; + } + } + + /** Settings related to invoice behavior. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Invoice extends StripeObject { + /** The amount of time until the invoice will be overdue for payment. */ + @SerializedName("time_until_due") + TimeUntilDue timeUntilDue; + + /** The amount of time until the invoice will be overdue for payment. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class TimeUntilDue extends StripeObject { + /** + * The interval unit for the time until due. + * + *

One of {@code day}, {@code month}, {@code week}, or {@code year}. + */ + @SerializedName("interval") + String interval; + + /** + * The number of interval units. For example, if interval=day and interval_count=30, the + * invoice will be due in 30 days. + */ + @SerializedName("interval_count") + Long intervalCount; + } + } + } + + /** Expanded collection settings data with actual configuration values. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Collection extends StripeObject { + /** + * Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay + * this bill at the end of the period using the payment method attached to the payer profile. + * When sending an invoice, Stripe will email your payer profile an invoice with payment + * instructions. Defaults to automatic. + * + *

One of {@code automatic}, or {@code send_invoice}. + */ + @SerializedName("collection_method") + String collectionMethod; + + /** Email delivery settings. */ + @SerializedName("email_delivery") + EmailDelivery emailDelivery; + + /** + * The ID of the PaymentMethodConfiguration object, which controls which payment methods are + * displayed to your customers. + */ + @SerializedName("payment_method_configuration") + String paymentMethodConfiguration; + + /** Payment Method specific configuration stored on the object. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + + /** Email delivery settings. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EmailDelivery extends StripeObject { + /** + * Controls emails for when the payment is due. For example after the invoice is finilized + * and transition to Open state. + */ + @SerializedName("payment_due") + PaymentDue paymentDue; + + /** + * Controls emails for when the payment is due. For example after the invoice is finilized + * and transition to Open state. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentDue extends StripeObject { + /** If true an email for the invoice would be generated and sent out. */ + @SerializedName("enabled") + Boolean enabled; + + /** + * If true the payment link to hosted invocie page would be included in email and PDF of + * the invoice. + */ + @SerializedName("include_payment_link") + Boolean includePaymentLink; + } + } + + /** Payment Method specific configuration stored on the object. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions extends StripeObject { + /** + * This sub-hash contains details about the Canadian pre-authorized debit payment method + * options. + */ + @SerializedName("acss_debit") + AcssDebit acssDebit; + + /** This sub-hash contains details about the Bancontact payment method. */ + @SerializedName("bancontact") + Bancontact bancontact; + + /** This sub-hash contains details about the Card payment method options. */ + @SerializedName("card") + Card card; + + /** This sub-hash contains details about the Bank transfer payment method options. */ + @SerializedName("customer_balance") + CustomerBalance customerBalance; + + /** This sub-hash contains details about the Konbini payment method options. */ + @SerializedName("konbini") + Map konbini; + + /** This sub-hash contains details about the SEPA Direct Debit payment method options. */ + @SerializedName("sepa_debit") + Map sepaDebit; + + /** This sub-hash contains details about the ACH direct debit payment method options. */ + @SerializedName("us_bank_account") + UsBankAccount usBankAccount; + + /** + * This sub-hash contains details about the Canadian pre-authorized debit payment method + * options. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AcssDebit extends StripeObject { + /** Additional fields for Mandate creation. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Verification method. + * + *

One of {@code automatic}, {@code instant}, or {@code microdeposits}. + */ + @SerializedName("verification_method") + String verificationMethod; + + /** Additional fields for Mandate creation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** + * Transaction type of the mandate. + * + *

One of {@code business}, or {@code personal}. + */ + @SerializedName("transaction_type") + String transactionType; + } + } + + /** This sub-hash contains details about the Bancontact payment method. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Bancontact extends StripeObject { + /** + * Preferred language of the Bancontact authorization page that the customer is redirected + * to. + * + *

One of {@code de}, {@code en}, {@code fr}, or {@code nl}. + */ + @SerializedName("preferred_language") + String preferredLanguage; + } + + /** This sub-hash contains details about the Card payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Card extends StripeObject { + /** Configuration options for setting up an eMandate for cards issued in India. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + /** + * Selected network to process the payment on. Depends on the available networks of the + * card. + */ + @SerializedName("network") + String network; + + /** + * An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to + * automatically prompt your customers for authentication based on risk level and other + * requirements. However, if you wish to request 3D Secure based on logic from your + * own fraud engine, provide this option. Read our guide on manually + * requesting 3D Secure for more information on how this configuration interacts with + * Radar and our SCA Engine. + * + *

One of {@code any}, {@code automatic}, or {@code challenge}. + */ + @SerializedName("request_three_d_secure") + String requestThreeDSecure; + + /** Configuration options for setting up an eMandate for cards issued in India. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions extends StripeObject { + /** Amount to be charged for future payments. */ + @SerializedName("amount") + Long amount; + + /** The AmountType for the mandate. One of {@code fixed} or {@code maximum}. */ + @SerializedName("amount_type") + String amountType; + + /** A description of the mandate that is meant to be displayed to the customer. */ + @SerializedName("description") + String description; + } + } + + /** This sub-hash contains details about the Bank transfer payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CustomerBalance extends StripeObject { + /** + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. + */ + @SerializedName("bank_transfer") + BankTransfer bankTransfer; + + /** + * The funding method type to be used when there are not enough funds in the customer + * balance. Currently the only supported value is {@code bank_transfer}. + * + *

Equal to {@code bank_transfer}. + */ + @SerializedName("funding_type") + String fundingType; + + /** + * Configuration for the bank transfer funding type, if the {@code funding_type} is set to + * {@code bank_transfer}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class BankTransfer extends StripeObject { + /** + * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is + * {@code eu_bank_transfer}. + */ + @SerializedName("eu_bank_transfer") + EuBankTransfer euBankTransfer; + + /** + * The bank transfer type that can be used for funding. + * + *

One of {@code eu_bank_transfer}, {@code gb_bank_transfer}, {@code + * jp_bank_transfer}, {@code mx_bank_transfer}, or {@code us_bank_transfer}. + */ + @SerializedName("type") + String type; + + /** + * Configuration for {@code eu_bank_transfer} funding type. Required if {@code type} is + * {@code eu_bank_transfer}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class EuBankTransfer extends StripeObject { + /** + * The desired country code of the bank account information. + * + *

One of {@code BE}, {@code DE}, {@code ES}, {@code FR}, {@code IE}, or {@code + * NL}. + */ + @SerializedName("country") + String country; + } + } + } + + /** This sub-hash contains details about the ACH direct debit payment method options. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class UsBankAccount extends StripeObject { + /** Additional fields for Financial Connections Session creation. */ + @SerializedName("financial_connections") + FinancialConnections financialConnections; + + /** + * Verification method. + * + *

One of {@code automatic}, {@code instant}, or {@code microdeposits}. + */ + @SerializedName("verification_method") + String verificationMethod; + + /** Additional fields for Financial Connections Session creation. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class FinancialConnections extends StripeObject { + /** + * Provide filters for the linked accounts that the customer can select for the payment + * method. + */ + @SerializedName("filters") + Filters filters; + + /** + * The list of permissions to request. If this parameter is passed, the {@code + * payment_method} permission must be included. + */ + @SerializedName("permissions") + List permissions; + + /** List of data features that you would like to retrieve upon account creation. */ + @SerializedName("prefetch") + List prefetch; + + /** + * Provide filters for the linked accounts that the customer can select for the payment + * method. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Filters extends StripeObject { + /** The account subcategories to use to filter for selectable accounts. */ + @SerializedName("account_subcategories") + List accountSubcategories; + } + } + } + } + } + } } diff --git a/src/main/java/com/stripe/model/v2/billing/IntentAction.java b/src/main/java/com/stripe/model/v2/billing/IntentAction.java index 688d5f2d83a..4b5eb752815 100644 --- a/src/main/java/com/stripe/model/v2/billing/IntentAction.java +++ b/src/main/java/com/stripe/model/v2/billing/IntentAction.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import java.util.Map; @@ -133,7 +132,7 @@ public static class PercentOff extends StripeObject { * $100 amount $50 instead. */ @SerializedName("percent_off") - BigDecimal percentOff; + String percentOff; /** The maximum number of times this discount can be applied for this Billing Cadence. */ @Getter @@ -212,7 +211,8 @@ public static class EffectiveAt extends StripeObject { /** * When the deactivate action will take effect. * - *

One of {@code current_billing_period_start}, {@code on_reserve}, or {@code timestamp}. + *

One of {@code current_billing_period_end}, {@code current_billing_period_start}, {@code + * on_reserve}, or {@code timestamp}. */ @SerializedName("type") String type; diff --git a/src/main/java/com/stripe/model/v2/billing/LicenseFee.java b/src/main/java/com/stripe/model/v2/billing/LicenseFee.java index f32a61e6d09..b2189235fba 100644 --- a/src/main/java/com/stripe/model/v2/billing/LicenseFee.java +++ b/src/main/java/com/stripe/model/v2/billing/LicenseFee.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import java.util.Map; @@ -171,7 +170,7 @@ public static class Tier extends StripeObject { * up_to_decimal} and {@code up_to_inf} may be set. */ @SerializedName("up_to_decimal") - BigDecimal upToDecimal; + String upToDecimal; /** * No upper bound to this tier. Only one of {@code up_to_decimal} and {@code up_to_inf} may be diff --git a/src/main/java/com/stripe/model/v2/billing/LicenseFeeVersion.java b/src/main/java/com/stripe/model/v2/billing/LicenseFeeVersion.java index e5b0e4937c1..a1378cd8617 100644 --- a/src/main/java/com/stripe/model/v2/billing/LicenseFeeVersion.java +++ b/src/main/java/com/stripe/model/v2/billing/LicenseFeeVersion.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import lombok.EqualsAndHashCode; @@ -99,7 +98,7 @@ public static class Tier extends StripeObject { * up_to_decimal} and {@code up_to_inf} may be set. */ @SerializedName("up_to_decimal") - BigDecimal upToDecimal; + String upToDecimal; /** * No upper bound to this tier. Only one of {@code up_to_decimal} and {@code up_to_inf} may be diff --git a/src/main/java/com/stripe/model/v2/billing/PricingPlanSubscription.java b/src/main/java/com/stripe/model/v2/billing/PricingPlanSubscription.java index 2ee9603ef24..bd6b22978c4 100644 --- a/src/main/java/com/stripe/model/v2/billing/PricingPlanSubscription.java +++ b/src/main/java/com/stripe/model/v2/billing/PricingPlanSubscription.java @@ -130,5 +130,13 @@ public static class ServicingStatusTransitions extends StripeObject { /** When the servicing status transitioned to paused. */ @SerializedName("paused_at") String pausedAt; + + /** When the servicing is scheduled to transition to activate. */ + @SerializedName("will_activate_at") + String willActivateAt; + + /** When the servicing is scheduled to cancel. */ + @SerializedName("will_cancel_at") + String willCancelAt; } } diff --git a/src/main/java/com/stripe/model/v2/billing/RateCardRate.java b/src/main/java/com/stripe/model/v2/billing/RateCardRate.java index 6389ff7b7ff..4188708252e 100644 --- a/src/main/java/com/stripe/model/v2/billing/RateCardRate.java +++ b/src/main/java/com/stripe/model/v2/billing/RateCardRate.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import java.util.Map; @@ -101,6 +100,10 @@ public class RateCardRate extends StripeObject implements HasId { @Setter @EqualsAndHashCode(callSuper = false) public static class CustomPricingUnitAmount extends StripeObject implements HasId { + /** The Custom Pricing Unit object. */ + @SerializedName("custom_pricing_unit_details") + CustomPricingUnit customPricingUnitDetails; + /** The id of the custom pricing unit. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -138,7 +141,7 @@ public static class Tier extends StripeObject { * up_to_decimal} and {@code up_to_inf} may be set. */ @SerializedName("up_to_decimal") - BigDecimal upToDecimal; + String upToDecimal; /** * No upper bound to this tier. Only one of {@code up_to_decimal} and {@code up_to_inf} may be diff --git a/src/main/java/com/stripe/model/v2/billing/RateCardSubscription.java b/src/main/java/com/stripe/model/v2/billing/RateCardSubscription.java index da41969eee1..b33413ad1e4 100644 --- a/src/main/java/com/stripe/model/v2/billing/RateCardSubscription.java +++ b/src/main/java/com/stripe/model/v2/billing/RateCardSubscription.java @@ -130,5 +130,13 @@ public static class ServicingStatusTransitions extends StripeObject { /** When the servicing status transitioned to paused. */ @SerializedName("paused_at") String pausedAt; + + /** When the servicing is scheduled to transition to activate. */ + @SerializedName("will_activate_at") + String willActivateAt; + + /** When the servicing is scheduled to cancel. */ + @SerializedName("will_cancel_at") + String willCancelAt; } } diff --git a/src/main/java/com/stripe/model/v2/billing/ServiceAction.java b/src/main/java/com/stripe/model/v2/billing/ServiceAction.java index 1ecef347623..214c6a0b82c 100644 --- a/src/main/java/com/stripe/model/v2/billing/ServiceAction.java +++ b/src/main/java/com/stripe/model/v2/billing/ServiceAction.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import lombok.EqualsAndHashCode; @@ -88,6 +87,14 @@ public static class CreditGrant extends StripeObject { @SerializedName("applicability_config") ApplicabilityConfig applicabilityConfig; + /** + * The category of the credit grant. + * + *

One of {@code paid}, or {@code promotional}. + */ + @SerializedName("category") + String category; + /** The expiry configuration for the credit grant. */ @SerializedName("expiry_config") ExpiryConfig expiryConfig; @@ -96,6 +103,13 @@ public static class CreditGrant extends StripeObject { @SerializedName("name") String name; + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the + * default value of 50. The highest priority is 0 and the lowest is 100. + */ + @SerializedName("priority") + Long priority; + /** The amount of the credit grant. */ @Getter @Setter @@ -106,7 +120,8 @@ public static class Amount extends StripeObject { * custom_pricing_unit}. */ @SerializedName("custom_pricing_unit") - CustomPricingUnit customPricingUnit; + com.stripe.model.v2.billing.ServiceAction.CreditGrant.Amount.CustomPricingUnit + customPricingUnit; /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") @@ -129,6 +144,10 @@ public static class Amount extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class CustomPricingUnit extends StripeObject implements HasId { + /** The Custom Pricing Unit object. */ + @SerializedName("custom_pricing_unit_details") + com.stripe.model.v2.billing.CustomPricingUnit customPricingUnitDetails; + /** The id of the custom pricing unit. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -136,7 +155,7 @@ public static class CustomPricingUnit extends StripeObject implements HasId { /** The value of the credit grant, decimal value represented as a string. */ @SerializedName("value") - BigDecimal value; + String value; } } @@ -201,6 +220,14 @@ public static class CreditGrantPerTenant extends StripeObject { @SerializedName("applicability_config") ApplicabilityConfig applicabilityConfig; + /** + * The category of the credit grant. + * + *

One of {@code paid}, or {@code promotional}. + */ + @SerializedName("category") + String category; + /** The expiry configuration for the credit grant. */ @SerializedName("expiry_config") ExpiryConfig expiryConfig; @@ -209,6 +236,13 @@ public static class CreditGrantPerTenant extends StripeObject { @SerializedName("name") String name; + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the + * default value of 50. The highest priority is 0 and the lowest is 100. + */ + @SerializedName("priority") + Long priority; + /** The amount of the credit grant. */ @Getter @Setter @@ -219,7 +253,8 @@ public static class Amount extends StripeObject { * custom_pricing_unit}. */ @SerializedName("custom_pricing_unit") - CustomPricingUnit customPricingUnit; + com.stripe.model.v2.billing.ServiceAction.CreditGrantPerTenant.Amount.CustomPricingUnit + customPricingUnit; /** The monetary amount of the credit grant. Required if {@code type} is {@code monetary}. */ @SerializedName("monetary") @@ -242,6 +277,10 @@ public static class Amount extends StripeObject { @Setter @EqualsAndHashCode(callSuper = false) public static class CustomPricingUnit extends StripeObject implements HasId { + /** The Custom Pricing Unit object. */ + @SerializedName("custom_pricing_unit_details") + com.stripe.model.v2.billing.CustomPricingUnit customPricingUnitDetails; + /** The id of the custom pricing unit. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -249,7 +288,7 @@ public static class CustomPricingUnit extends StripeObject implements HasId { /** The value of the credit grant, decimal value represented as a string. */ @SerializedName("value") - BigDecimal value; + String value; } } 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 073e0293c5d..cd504810ed8 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -5,7 +5,6 @@ import com.stripe.model.HasId; import com.stripe.model.StripeObject; import com.stripe.v2.Amount; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import java.util.Map; @@ -3376,7 +3375,7 @@ public static class Recipient extends StripeObject { /** * The payout method to be used as a default outbound destination. This will allow the - * PayoutMethod to be omitted on OutboundPayments made through the dashboard. + * PayoutMethod to be omitted on OutboundPayments made through the dashboard or APIs. */ @SerializedName("default_outbound_destination") DefaultOutboundDestination defaultOutboundDestination; @@ -3394,6 +3393,10 @@ public static class Capabilities extends StripeObject { @SerializedName("cards") Cards cards; + /** Capability that enable OutboundPayments to a crypto wallet linked to this Account. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). */ @SerializedName("stripe_balance") StripeBalance stripeBalance; @@ -3584,6 +3587,61 @@ public static class StatusDetail extends StripeObject { } } + /** Capability that enable OutboundPayments to a crypto wallet linked to this Account. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets extends StripeObject { + /** Whether the Capability has been requested. */ + @SerializedName("requested") + Boolean requested; + + /** + * The status of the Capability. + * + *

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

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

One of {@code contact_stripe}, {@code no_resolution}, or {@code provide_info}. + */ + @SerializedName("resolution") + String resolution; + } + } + /** Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). */ @Getter @Setter @@ -3719,7 +3777,7 @@ public static class StatusDetail extends StripeObject { /** * The payout method to be used as a default outbound destination. This will allow the - * PayoutMethod to be omitted on OutboundPayments made through the dashboard. + * PayoutMethod to be omitted on OutboundPayments made through the dashboard or APIs. */ @Getter @Setter @@ -3736,23 +3794,23 @@ public static class DefaultOutboundDestination extends StripeObject implements H *

One of {@code at_bank_account}, {@code au_bank_account}, {@code ba_bank_account}, * {@code be_bank_account}, {@code bg_bank_account}, {@code bj_bank_account}, {@code * bs_bank_account}, {@code card}, {@code ca_bank_account}, {@code ch_bank_account}, {@code - * ci_bank_account}, {@code cy_bank_account}, {@code cz_bank_account}, {@code - * de_bank_account}, {@code dk_bank_account}, {@code ec_bank_account}, {@code - * ee_bank_account}, {@code es_bank_account}, {@code et_bank_account}, {@code - * fi_bank_account}, {@code fr_bank_account}, {@code gb_bank_account}, {@code - * gr_bank_account}, {@code hr_bank_account}, {@code hu_bank_account}, {@code - * id_bank_account}, {@code ie_bank_account}, {@code il_bank_account}, {@code - * in_bank_account}, {@code is_bank_account}, {@code it_bank_account}, {@code - * ke_bank_account}, {@code li_bank_account}, {@code lt_bank_account}, {@code - * lu_bank_account}, {@code lv_bank_account}, {@code mn_bank_account}, {@code - * mt_bank_account}, {@code mu_bank_account}, {@code mx_bank_account}, {@code - * na_bank_account}, {@code nl_bank_account}, {@code no_bank_account}, {@code - * nz_bank_account}, {@code pa_bank_account}, {@code ph_bank_account}, {@code - * pl_bank_account}, {@code pt_bank_account}, {@code ro_bank_account}, {@code - * rs_bank_account}, {@code se_bank_account}, {@code sg_bank_account}, {@code - * si_bank_account}, {@code sk_bank_account}, {@code sn_bank_account}, {@code - * sv_bank_account}, {@code tn_bank_account}, {@code tr_bank_account}, {@code - * us_bank_account}, or {@code za_bank_account}. + * ci_bank_account}, {@code crypto_wallet}, {@code cy_bank_account}, {@code + * cz_bank_account}, {@code de_bank_account}, {@code dk_bank_account}, {@code + * ec_bank_account}, {@code ee_bank_account}, {@code es_bank_account}, {@code + * et_bank_account}, {@code fi_bank_account}, {@code fr_bank_account}, {@code + * gb_bank_account}, {@code gr_bank_account}, {@code hr_bank_account}, {@code + * hu_bank_account}, {@code id_bank_account}, {@code ie_bank_account}, {@code + * il_bank_account}, {@code in_bank_account}, {@code is_bank_account}, {@code + * it_bank_account}, {@code ke_bank_account}, {@code li_bank_account}, {@code + * lt_bank_account}, {@code lu_bank_account}, {@code lv_bank_account}, {@code + * mn_bank_account}, {@code mt_bank_account}, {@code mu_bank_account}, {@code + * mx_bank_account}, {@code na_bank_account}, {@code nl_bank_account}, {@code + * no_bank_account}, {@code nz_bank_account}, {@code pa_bank_account}, {@code + * ph_bank_account}, {@code pl_bank_account}, {@code pt_bank_account}, {@code + * ro_bank_account}, {@code rs_bank_account}, {@code se_bank_account}, {@code + * sg_bank_account}, {@code si_bank_account}, {@code sk_bank_account}, {@code + * sn_bank_account}, {@code sv_bank_account}, {@code tn_bank_account}, {@code + * tr_bank_account}, {@code us_bank_account}, or {@code za_bank_account}. */ @SerializedName("type") String type; @@ -4365,10 +4423,35 @@ public static class Defaults extends StripeObject { @SerializedName("locales") List locales; + /** Account profile information. */ + @SerializedName("profile") + Profile profile; + /** Default responsibilities held by either Stripe or the platform. */ @SerializedName("responsibilities") Responsibilities responsibilities; + /** Account profile information. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Profile extends StripeObject { + /** The business's publicly-available website. */ + @SerializedName("business_url") + String businessUrl; + + /** The company’s legal name. */ + @SerializedName("doing_business_as") + String doingBusinessAs; + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + @SerializedName("product_description") + String productDescription; + } + /** Default responsibilities held by either Stripe or the platform. */ @Getter @Setter @@ -4640,10 +4723,6 @@ public static class BusinessDetails extends StripeObject { @SerializedName("documents") Documents documents; - /** The company’s legal name. */ - @SerializedName("doing_business_as") - String doingBusinessAs; - /** * An estimated upper bound of employees, contractors, vendors, etc. currently working for the * business. @@ -4663,13 +4742,6 @@ public static class BusinessDetails extends StripeObject { @SerializedName("phone") String phone; - /** - * Internal-only description of the product sold or service provided by the business. It’s - * used by Stripe for risk and underwriting purposes. - */ - @SerializedName("product_description") - String productDescription; - /** The business legal name. */ @SerializedName("registered_name") String registeredName; @@ -4699,10 +4771,6 @@ public static class BusinessDetails extends StripeObject { @SerializedName("structure") String structure; - /** The business's publicly available website. */ - @SerializedName("url") - String url; - /** The company’s primary address. */ @Getter @Setter @@ -5809,7 +5877,7 @@ public static class Relationship extends StripeObject { /** The percent owned by the individual of the Account’s legal entity. */ @SerializedName("percent_ownership") - BigDecimal percentOwnership; + String percentOwnership; /** * Whether the individual is authorized as the primary representative of the Account. This @@ -6140,19 +6208,19 @@ public static class RestrictsCapability extends StripeObject { * {@code bacs_debit_payments}, {@code bancontact_payments}, {@code bank_accounts.local}, * {@code bank_accounts.wire}, {@code blik_payments}, {@code boleto_payments}, {@code * cards}, {@code card_payments}, {@code cartes_bancaires_payments}, {@code - * cashapp_payments}, {@code eps_payments}, {@code financial_addresses.bank_accounts}, - * {@code fpx_payments}, {@code gb_bank_transfer_payments}, {@code grabpay_payments}, - * {@code holds_currencies.gbp}, {@code ideal_payments}, {@code - * inbound_transfers.financial_accounts}, {@code jcb_payments}, {@code - * jp_bank_transfer_payments}, {@code kakao_pay_payments}, {@code klarna_payments}, {@code - * konbini_payments}, {@code kr_card_payments}, {@code link_payments}, {@code - * mobilepay_payments}, {@code multibanco_payments}, {@code mx_bank_transfer_payments}, - * {@code naver_pay_payments}, {@code outbound_payments.bank_accounts}, {@code - * outbound_payments.cards}, {@code outbound_payments.financial_accounts}, {@code - * outbound_transfers.bank_accounts}, {@code outbound_transfers.financial_accounts}, - * {@code oxxo_payments}, {@code p24_payments}, {@code payco_payments}, {@code - * paynow_payments}, {@code pay_by_bank_payments}, {@code promptpay_payments}, {@code - * revolut_pay_payments}, {@code samsung_pay_payments}, {@code + * cashapp_payments}, {@code crypto}, {@code eps_payments}, {@code + * financial_addresses.bank_accounts}, {@code fpx_payments}, {@code + * gb_bank_transfer_payments}, {@code grabpay_payments}, {@code holds_currencies.gbp}, + * {@code ideal_payments}, {@code inbound_transfers.financial_accounts}, {@code + * jcb_payments}, {@code jp_bank_transfer_payments}, {@code kakao_pay_payments}, {@code + * klarna_payments}, {@code konbini_payments}, {@code kr_card_payments}, {@code + * link_payments}, {@code mobilepay_payments}, {@code multibanco_payments}, {@code + * mx_bank_transfer_payments}, {@code naver_pay_payments}, {@code + * outbound_payments.bank_accounts}, {@code outbound_payments.cards}, {@code + * outbound_payments.financial_accounts}, {@code outbound_transfers.bank_accounts}, {@code + * outbound_transfers.financial_accounts}, {@code oxxo_payments}, {@code p24_payments}, + * {@code payco_payments}, {@code paynow_payments}, {@code pay_by_bank_payments}, {@code + * promptpay_payments}, {@code revolut_pay_payments}, {@code samsung_pay_payments}, {@code * sepa_bank_transfer_payments}, {@code sepa_debit_payments}, {@code * stripe_balance.payouts}, {@code stripe_balance.stripe_transfers}, {@code * swish_payments}, {@code twint_payments}, {@code us_bank_transfer_payments}, or {@code diff --git a/src/main/java/com/stripe/model/v2/core/AccountPerson.java b/src/main/java/com/stripe/model/v2/core/AccountPerson.java index b12b4e33a60..90183d36dc4 100644 --- a/src/main/java/com/stripe/model/v2/core/AccountPerson.java +++ b/src/main/java/com/stripe/model/v2/core/AccountPerson.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.model.HasId; import com.stripe.model.StripeObject; -import java.math.BigDecimal; import java.time.Instant; import java.util.List; import java.util.Map; @@ -572,7 +571,7 @@ public static class Relationship extends StripeObject { /** The percent owned by the individual of the Account’s legal entity. */ @SerializedName("percent_ownership") - BigDecimal percentOwnership; + String percentOwnership; /** * Whether the individual is authorized as the primary representative of the Account. This is diff --git a/src/main/java/com/stripe/model/v2/core/ClaimableSandbox.java b/src/main/java/com/stripe/model/v2/core/ClaimableSandbox.java index 57c39197097..0847c3986da 100644 --- a/src/main/java/com/stripe/model/v2/core/ClaimableSandbox.java +++ b/src/main/java/com/stripe/model/v2/core/ClaimableSandbox.java @@ -21,18 +21,31 @@ @Setter @EqualsAndHashCode(callSuper = false) public class ClaimableSandbox extends StripeObject implements HasId { - /** Keys that can be used to set up an integration for this sandbox and operate on the account. */ - @SerializedName("api_keys") - ApiKeys apiKeys; - - /** URL for user to claim sandbox into their existing Stripe account. */ + /** + * URL for user to claim sandbox into their existing Stripe account. The value will be null if the + * sandbox status is {@code claimed} or {@code expired}. + */ @SerializedName("claim_url") String claimUrl; + /** + * The timestamp the sandbox was claimed. The value will be null if the sandbox status is not + * {@code claimed}. + */ + @SerializedName("claimed_at") + Instant claimedAt; + /** When the sandbox is created. */ @SerializedName("created") Instant created; + /** + * The timestamp the sandbox will expire. The value will be null if the sandbox is {@code + * claimed}. + */ + @SerializedName("expires_at") + Instant expiresAt; + /** Unique identifier for the Claimable sandbox. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -54,32 +67,25 @@ public class ClaimableSandbox extends StripeObject implements HasId { @SerializedName("object") String object; - /** Values prefilled during the creation of the sandbox. */ + /** + * Values prefilled during the creation of the sandbox. When a user claims the sandbox, they will + * be able to update these values. + */ @SerializedName("prefill") Prefill prefill; - /** Keys that can be used to set up an integration for this sandbox and operate on the account. */ - @Getter - @Setter - @EqualsAndHashCode(callSuper = false) - public static class ApiKeys extends StripeObject { - /** - * Used to communicate with Stripe's MCP server. This - * allows LLM agents to securely operate on a Stripe account. - */ - @SerializedName("mcp") - String mcp; + /** Data about the Stripe sandbox object. */ + @SerializedName("sandbox_details") + SandboxDetails sandboxDetails; - /** Publicly accessible in a web or mobile app client-side code. */ - @SerializedName("publishable") - String publishable; - - /** Should be stored securely in server-side code (such as an environment variable). */ - @SerializedName("secret") - String secret; - } + /** Status of the sandbox. One of {@code unclaimed}, {@code expired}, {@code claimed}. */ + @SerializedName("status") + String status; - /** Values prefilled during the creation of the sandbox. */ + /** + * Values prefilled during the creation of the sandbox. When a user claims the sandbox, they will + * be able to update these values. + */ @Getter @Setter @EqualsAndHashCode(callSuper = false) @@ -103,4 +109,54 @@ public static class Prefill extends StripeObject { @SerializedName("name") String name; } + + /** Data about the Stripe sandbox object. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SandboxDetails extends StripeObject { + /** The sandbox's Stripe account ID. */ + @SerializedName("account") + String account; + + /** + * Keys that can be used to set up an integration for this sandbox and operate on the account. + * This will be present only in the create response, and will be null in subsequent retrieve + * responses. + */ + @SerializedName("api_keys") + ApiKeys apiKeys; + + /** + * The livemode sandbox Stripe account ID. This field is only set if the user activates their + * sandbox and chooses to install your platform's Stripe App in their live account. + */ + @SerializedName("owner_account") + String ownerAccount; + + /** + * Keys that can be used to set up an integration for this sandbox and operate on the account. + * This will be present only in the create response, and will be null in subsequent retrieve + * responses. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class ApiKeys extends StripeObject { + /** + * Used to communicate with Stripe's MCP server. + * This allows LLM agents to securely operate on a Stripe account. + */ + @SerializedName("mcp") + String mcp; + + /** Publicly accessible in a web or mobile app client-side code. */ + @SerializedName("publishable") + String publishable; + + /** Should be stored securely in server-side code (such as an environment variable). */ + @SerializedName("secret") + String secret; + } + } } diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java index 84d42e783d5..a7b8fc6a1fc 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/FinancialAddress.java @@ -59,6 +59,10 @@ public class FinancialAddress extends StripeObject implements HasId { @SerializedName("object") String object; + /** Open Enum. The currency the FinancialAddress settles into the FinancialAccount. */ + @SerializedName("settlement_currency") + String settlementCurrency; + /** * Closed Enum. An enum representing the status of the FinancialAddress. This indicates whether or * not the FinancialAddress can be used for any money movement flows. @@ -85,10 +89,17 @@ public static class Credentials extends StripeObject { @SerializedName("gb_bank_account") GbBankAccount gbBankAccount; + /** + * The credentials of the SEPA Bank Account for the FinancialAddress. This contains unique + * banking details such as the IBAN, BIC, etc. of a SEPA bank account. + */ + @SerializedName("sepa_bank_account") + SepaBankAccount sepaBankAccount; + /** * Open Enum. The type of Credentials that are provisioned for the FinancialAddress. * - *

One of {@code gb_bank_account}, or {@code us_bank_account}. + *

One of {@code gb_bank_account}, {@code sepa_bank_account}, or {@code us_bank_account}. */ @SerializedName("type") String type; @@ -129,6 +140,43 @@ public static class GbBankAccount extends StripeObject { String sortCode; } + /** + * The credentials of the SEPA Bank Account for the FinancialAddress. This contains unique + * banking details such as the IBAN, BIC, etc. of a SEPA bank account. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaBankAccount extends StripeObject { + /** The account holder name to be used during bank transfers. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The name of the Bank. */ + @SerializedName("bank_name") + String bankName; + + /** The BIC of the SEPA Bank Account. */ + @SerializedName("bic") + String bic; + + /** The originating country of the SEPA Bank account. */ + @SerializedName("country") + String country; + + /** The IBAN of the SEPA Bank Account. */ + @SerializedName("iban") + String iban; + + /** + * The last four digits of the SEPA Bank Account number. This will always be returned. To view + * the full account number when retrieving or listing FinancialAddresses, use the {@code + * include} request parameter. + */ + @SerializedName("last4") + String last4; + } + /** * The credentials of the US Bank Account for the FinancialAddress. This contains unique banking * details such as the routing number, account number, etc. of a US bank account. 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 7cf929f9692..0ac3d10e5a3 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPayment.java @@ -102,6 +102,13 @@ public class OutboundPayment extends StripeObject implements HasId { @SerializedName("recipient_notification") RecipientNotification recipientNotification; + /** + * The recipient verification id for this OutboundPayment. Only required for countries with + * regulatory mandates to verify recipient names before OutboundPayment creation. + */ + @SerializedName("recipient_verification") + String recipientVerification; + /** * The description that appears on the receiving end for an OutboundPayment (for example, bank * statement for external bank transfer). It will default to {@code STRIPE} if not set on the diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java index 07e925b9171..aedc34af7ed 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundPaymentQuote.java @@ -129,22 +129,25 @@ public static class From extends StripeObject { public static class FxQuote extends StripeObject { /** * The duration the exchange rate lock remains valid from creation time. Allowed value is - * five_minutes. + * five_minutes or none. * - *

Equal to {@code five_minutes}. + *

One of {@code five_minutes}, or {@code none}. */ @SerializedName("lock_duration") String lockDuration; - /** Time at which the rate lock will expire, measured in seconds since the Unix epoch. */ + /** + * Time at which the rate lock will expire, measured in seconds since the Unix epoch. Null when + * rate locking is not supported. + */ @SerializedName("lock_expires_at") Instant lockExpiresAt; /** * Lock status of the quote. Transitions from active to expired once past the lock_expires_at - * timestamp. Value can be active or expired. + * timestamp. Value can be active, expired or none. * - *

One of {@code active}, or {@code expired}. + *

One of {@code active}, {@code expired}, or {@code none}. */ @SerializedName("lock_status") String lockStatus; diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java index f6c67995654..addbaf4aea1 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/OutboundTransfer.java @@ -91,6 +91,13 @@ public class OutboundTransfer extends StripeObject implements HasId { @SerializedName("receipt_url") String receiptUrl; + /** + * The recipient verification id for this OutboundTransfer. Only required for countries with + * regulatory mandates to verify recipient names before OutboundTransfer creation. + */ + @SerializedName("recipient_verification") + String recipientVerification; + /** * The description that appears on the receiving end for an OutboundTransfer (for example, bank * statement for external bank transfer). It will default to {@code STRIPE} if not set on the diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java index 4d2af2abd08..8bc955949ee 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/PayoutMethod.java @@ -31,6 +31,10 @@ public class PayoutMethod extends StripeObject implements HasId { @SerializedName("created") Instant created; + /** The PayoutMethodCryptoWallet object details. */ + @SerializedName("crypto_wallet") + CryptoWallet cryptoWallet; + /** ID of the PayoutMethod object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") @@ -59,7 +63,7 @@ public class PayoutMethod extends StripeObject implements HasId { /** * Closed Enum. The type of payout method. * - *

One of {@code bank_account}, or {@code card}. + *

One of {@code bank_account}, {@code card}, or {@code crypto_wallet}. */ @SerializedName("type") String type; @@ -148,6 +152,37 @@ public static class Card extends StripeObject { String last4; } + /** The PayoutMethodCryptoWallet object details. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallet extends StripeObject { + /** Destination wallet address. */ + @SerializedName("address") + String address; + + /** + * Whether the crypto wallet was archived. Crypto wallets can be archived through the /archive + * API, and they will not be automatically archived by Stripe. Archived crypto wallets cannot be + * used as payout method and will not appear in the payout method list. + */ + @SerializedName("archived") + Boolean archived; + + /** Optional field, required if network supports memos (only "stellar" currently). */ + @SerializedName("memo") + String memo; + + /** + * Which rail is being used to make an outbound money movement to this wallet. + * + *

One of {@code arbitrum}, {@code avalanche_c_chain}, {@code base}, {@code ethereum}, {@code + * optimism}, {@code polygon}, {@code solana}, or {@code stellar}. + */ + @SerializedName("network") + String network; + } + /** * Indicates whether the payout method has met the necessary requirements for outbound money * movement. 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 a1f7fbb28fd..06ad381d4bd 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedCredit.java @@ -31,7 +31,7 @@ public class ReceivedCredit extends StripeObject implements HasId { /** * This object stores details about the originating banking transaction that resulted in the - * ReceivedCredit. Present if {@code type} field value is {@code external_credit}. + * ReceivedCredit. Present if {@code type} field value is {@code bank_transfer}. */ @SerializedName("bank_transfer") BankTransfer bankTransfer; @@ -141,7 +141,7 @@ public static class BalanceTransfer extends StripeObject { /** * This object stores details about the originating banking transaction that resulted in the - * ReceivedCredit. Present if {@code type} field value is {@code external_credit}. + * ReceivedCredit. Present if {@code type} field value is {@code bank_transfer}. */ @Getter @Setter @@ -152,34 +152,41 @@ public static class BankTransfer extends StripeObject { String financialAddress; /** - * Hash containing the transaction bank details. Present if {@code payment_method_type} field - * value is {@code gb_bank_account}. + * Hash containing the transaction bank details. Present if {@code origin_type} field value is + * {@code gb_bank_account}. */ @SerializedName("gb_bank_account") GbBankAccount gbBankAccount; /** - * Open Enum. Indicates the type of source via from which external funds originated. + * Open Enum. Indicates the origin of source from which external funds originated from. * - *

One of {@code gb_bank_account}, or {@code us_bank_account}. + *

One of {@code gb_bank_account}, {@code sepa_bank_account}, or {@code us_bank_account}. */ - @SerializedName("payment_method_type") - String paymentMethodType; + @SerializedName("origin_type") + String originType; + + /** + * Hash containing the transaction bank details. Present if {@code origin_type} field value is + * {@code sepa_bank_account}. + */ + @SerializedName("sepa_bank_account") + SepaBankAccount sepaBankAccount; /** Freeform string set by originator of the external ReceivedCredit. */ @SerializedName("statement_descriptor") String statementDescriptor; /** - * Hash containing the transaction bank details. Present if {@code payment_method_type} field - * value is {@code us_bank_account}. + * Hash containing the transaction bank details. Present if {@code origin_type} field value is + * {@code us_bank_account}. */ @SerializedName("us_bank_account") UsBankAccount usBankAccount; /** - * Hash containing the transaction bank details. Present if {@code payment_method_type} field - * value is {@code gb_bank_account}. + * Hash containing the transaction bank details. Present if {@code origin_type} field value is + * {@code gb_bank_account}. */ @Getter @Setter @@ -211,8 +218,45 @@ public static class GbBankAccount extends StripeObject { } /** - * Hash containing the transaction bank details. Present if {@code payment_method_type} field - * value is {@code us_bank_account}. + * Hash containing the transaction bank details. Present if {@code origin_type} field value is + * {@code sepa_bank_account}. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class SepaBankAccount extends StripeObject { + /** The account holder name of the bank account the transfer was received from. */ + @SerializedName("account_holder_name") + String accountHolderName; + + /** The bank name the transfer was received from. */ + @SerializedName("bank_name") + String bankName; + + /** The BIC of the SEPA account. */ + @SerializedName("bic") + String bic; + + /** The origination country of the bank transfer. */ + @SerializedName("country") + String country; + + /** The IBAN that originated the transfer. */ + @SerializedName("iban") + String iban; + + /** + * The money transmission network used to send funds for this ReceivedCredit. + * + *

Equal to {@code sepa_credit_transfer}. + */ + @SerializedName("network") + String network; + } + + /** + * Hash containing the transaction bank details. Present if {@code origin_type} field value is + * {@code us_bank_account}. */ @Getter @Setter 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 35e84bcd2d7..11a6218f3d3 100644 --- a/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java +++ b/src/main/java/com/stripe/model/v2/moneymanagement/ReceivedDebit.java @@ -103,6 +103,14 @@ public static class BankTransfer extends StripeObject { @SerializedName("financial_address") String financialAddress; + /** + * Open Enum. Indicates the origin type through which this debit was initiated. + * + *

Equal to {@code us_bank_account}. + */ + @SerializedName("origin_type") + String originType; + /** * Open Enum. The type of the payment method used to originate the debit. * diff --git a/src/main/java/com/stripe/model/v2/moneymanagement/RecipientVerification.java b/src/main/java/com/stripe/model/v2/moneymanagement/RecipientVerification.java new file mode 100644 index 00000000000..386ecfe2041 --- /dev/null +++ b/src/main/java/com/stripe/model/v2/moneymanagement/RecipientVerification.java @@ -0,0 +1,126 @@ +// 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; + +/** RecipientVerification represents a verification of recipient you intend to send funds to. */ +@Getter +@Setter +@EqualsAndHashCode(callSuper = false) +public class RecipientVerification extends StripeObject implements HasId { + /** The OBP/OBT ID that consumed this verification, present if one is successfully created. */ + @SerializedName("consumed_by") + String consumedBy; + + /** + * Time at which the RecipientVerification was created. Represented as a RFC 3339 date & time + * UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + */ + @SerializedName("created") + Instant created; + + /** + * Time at which the RecipientVerification expires, 5 minutes after the creation. Represented as a + * RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("expires_at") + Instant expiresAt; + + /** The ID of the RecipientVerification. */ + @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; + + /** + * Closed Enum. Match level of the RecipientVerification: {@code match}, {@code close_match}, + * {@code no_match}, {@code unavailable}. + * + *

One of {@code close_match}, {@code match}, {@code no_match}, or {@code unavailable}. + */ + @SerializedName("match_result") + String matchResult; + + /** Details for the match result. */ + @SerializedName("match_result_details") + MatchResultDetails matchResultDetails; + + /** + * 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.recipient_verification}. + */ + @SerializedName("object") + String object; + + /** + * Closed Enum. Current status of the RecipientVerification: {@code verified}, {@code consumed}, + * {@code expired}, {@code awaiting_acknowledgement}, {@code acknowledged}. + * + *

One of {@code acknowledged}, {@code awaiting_acknowledgement}, {@code consumed}, {@code + * expired}, or {@code verified}. + */ + @SerializedName("status") + String status; + + /** Hash containing timestamps of when the object transitioned to a particular status. */ + @SerializedName("status_transitions") + StatusTransitions statusTransitions; + + /** Details for the match result. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class MatchResultDetails extends StripeObject { + /** + * The account name associated with the bank account as provided by the VoP provider, only + * present if there is a match or close match. + */ + @SerializedName("matched_name") + String matchedName; + + /** A message describing the match result. */ + @SerializedName("message") + String message; + + /** The name associated with the provided recipient. */ + @SerializedName("provided_name") + String providedName; + } + + /** Hash containing timestamps of when the object transitioned to a particular status. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class StatusTransitions extends StripeObject { + /** + * Timestamp describing when a RecipientVerification changed status to {@code acknowledged}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("acknowledged_at") + Instant acknowledgedAt; + + /** + * Timestamp describing when a RecipientVerification changed status to {@code consumed}. + * Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: + * 2022-09-18T13:22:18.123Z. + */ + @SerializedName("consumed_at") + Instant consumedAt; + } +} 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 0d26e1c7c28..594c0caa161 100644 --- a/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java +++ b/src/main/java/com/stripe/model/v2/payments/OffSessionPayment.java @@ -6,6 +6,7 @@ import com.stripe.model.StripeObject; import com.stripe.v2.Amount; import java.time.Instant; +import java.util.List; import java.util.Map; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -16,6 +17,10 @@ @Setter @EqualsAndHashCode(callSuper = false) public class OffSessionPayment extends StripeObject implements HasId { + /** Provides industry-specific information about the amount. */ + @SerializedName("amount_details") + AmountDetails amountDetails; + /** The “presentment amount” to be collected from the customer. */ @SerializedName("amount_requested") Amount amountRequested; @@ -46,12 +51,13 @@ public class OffSessionPayment extends StripeObject implements HasId { /** * The reason why the OffSessionPayment failed. * - *

One of {@code rejected_by_partner}, or {@code retries_exhausted}. + *

One of {@code authorization_expired}, {@code rejected_by_partner}, or {@code + * retries_exhausted}. */ @SerializedName("failure_reason") String failureReason; - /** Unique identifier for the object.. */ + /** Unique identifier for the object. */ @Getter(onMethod_ = {@Override}) @SerializedName("id") String id; @@ -102,6 +108,10 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("payment_record") String paymentRecord; + /** Details about the payments orchestration configuration. */ + @SerializedName("payments_orchestration") + PaymentsOrchestration paymentsOrchestration; + /** Details about the OffSessionPayment retries. */ @SerializedName("retry_details") RetryDetails retryDetails; @@ -144,6 +154,115 @@ public class OffSessionPayment extends StripeObject implements HasId { @SerializedName("transfer_data") TransferData transferData; + /** Provides industry-specific information about the amount. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class AmountDetails extends StripeObject { + /** The amount the total transaction was discounted for. */ + @SerializedName("discount_amount") + Long discountAmount; + + /** + * A list of line items, each containing information about a product in the PaymentIntent. There + * is a maximum of 100 line items. + */ + @SerializedName("line_items") + List lineItems; + + /** Contains information about the shipping portion of the amount. */ + @SerializedName("shipping") + Shipping shipping; + + /** Contains information about the tax portion of the amount. */ + @SerializedName("tax") + Tax tax; + + /** + * For more details about LineItem, please refer to the API Reference. + */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class LineItem extends StripeObject { + /** The amount an item was discounted for. Positive integer. */ + @SerializedName("discount_amount") + Long discountAmount; + + /** Unique identifier of the product. At most 12 characters long. */ + @SerializedName("product_code") + String productCode; + + /** Name of the product. At most 100 characters long. */ + @SerializedName("product_name") + String productName; + + /** Number of items of the product. Positive integer. */ + @SerializedName("quantity") + Long quantity; + + /** Contains information about the tax on the item. */ + @SerializedName("tax") + Tax tax; + + /** Cost of the product. Non-negative integer. */ + @SerializedName("unit_cost") + Long unitCost; + + /** Contains information about the tax on the item. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** Total portion of the amount that is for tax. */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + } + } + + /** Contains information about the shipping portion of the amount. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Shipping extends StripeObject { + /** Portion of the amount that is for shipping. */ + @SerializedName("amount") + Long amount; + + /** The postal code that represents the shipping source. */ + @SerializedName("from_postal_code") + String fromPostalCode; + + /** The postal code that represents the shipping destination. */ + @SerializedName("to_postal_code") + String toPostalCode; + } + + /** Contains information about the tax portion of the amount. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class Tax extends StripeObject { + /** Total portion of the amount that is for tax. */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + } + } + + /** Details about the payments orchestration configuration. */ + @Getter + @Setter + @EqualsAndHashCode(callSuper = false) + public static class PaymentsOrchestration extends StripeObject { + /** + * True when you want to enable payments orchestration for this off-session payment. False + * otherwise. + */ + @SerializedName("enabled") + Boolean enabled; + } + /** Details about the OffSessionPayment retries. */ @Getter @Setter @@ -153,10 +272,14 @@ public static class RetryDetails extends StripeObject { @SerializedName("attempts") Long attempts; + /** The pre-configured retry policy to use for the payment. */ + @SerializedName("retry_policy") + String retryPolicy; + /** * Indicates the strategy for how you want Stripe to retry the payment. * - *

One of {@code none}, or {@code smart}. + *

One of {@code heuristic}, {@code none}, {@code scheduled}, or {@code smart}. */ @SerializedName("retry_strategy") String retryStrategy; diff --git a/src/main/java/com/stripe/param/AccountCreateParams.java b/src/main/java/com/stripe/param/AccountCreateParams.java index b1cc90f795c..5fd61455fb6 100644 --- a/src/main/java/com/stripe/param/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/AccountCreateParams.java @@ -1137,11 +1137,11 @@ public static class SupportAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1244,13 +1244,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1499,6 +1499,10 @@ public static class Capabilities { @SerializedName("paypal_payments") PaypalPayments paypalPayments; + /** The paypay_payments capability. */ + @SerializedName("paypay_payments") + PaypayPayments paypayPayments; + /** The payto_payments capability. */ @SerializedName("payto_payments") PaytoPayments paytoPayments; @@ -1649,6 +1653,7 @@ private Capabilities( PaycoPayments paycoPayments, PaynowPayments paynowPayments, PaypalPayments paypalPayments, + PaypayPayments paypayPayments, PaytoPayments paytoPayments, PixPayments pixPayments, PromptpayPayments promptpayPayments, @@ -1723,6 +1728,7 @@ private Capabilities( this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; this.paypalPayments = paypalPayments; + this.paypayPayments = paypayPayments; this.paytoPayments = paytoPayments; this.pixPayments = pixPayments; this.promptpayPayments = promptpayPayments; @@ -1853,6 +1859,8 @@ public static class Builder { private PaypalPayments paypalPayments; + private PaypayPayments paypayPayments; + private PaytoPayments paytoPayments; private PixPayments pixPayments; @@ -1955,6 +1963,7 @@ public AccountCreateParams.Capabilities build() { this.paycoPayments, this.paynowPayments, this.paypalPayments, + this.paypayPayments, this.paytoPayments, this.pixPayments, this.promptpayPayments, @@ -2335,6 +2344,13 @@ public Builder setPaypalPayments( return this; } + /** The paypay_payments capability. */ + public Builder setPaypayPayments( + AccountCreateParams.Capabilities.PaypayPayments paypayPayments) { + this.paypayPayments = paypayPayments; + return this; + } + /** The payto_payments capability. */ public Builder setPaytoPayments( AccountCreateParams.Capabilities.PaytoPayments paytoPayments) { @@ -6343,6 +6359,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaypayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private PaypayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Capabilities.PaypayPayments build() { + return new AccountCreateParams.Capabilities.PaypayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.PaypayPayments#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Capabilities.PaypayPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PaytoPayments { @@ -8873,11 +8969,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -8980,13 +9076,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -12346,11 +12442,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -12453,13 +12549,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -12942,11 +13038,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -13049,13 +13145,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -15392,16 +15488,15 @@ public static class Schedule { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code weekly}. */ @SerializedName("weekly_anchor") WeeklyAnchor weeklyAnchor; /** * The days of the week when available funds are paid out, specified as an array, e.g., - * [{@code monday}, {@code tuesday}]. (required and applicable only if {@code interval} is - * {@code weekly} and {@code weekly_anchor} is not set.) + * [{@code monday}, {@code tuesday}]. Required and applicable only if {@code interval} is + * {@code weekly}. */ @SerializedName("weekly_payout_days") List weeklyPayoutDays; @@ -15561,8 +15656,8 @@ public Builder addAllMonthlyPayoutDay(List elements) { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code + * weekly}. */ public Builder setWeeklyAnchor( AccountCreateParams.Settings.Payouts.Schedule.WeeklyAnchor weeklyAnchor) { @@ -15671,12 +15766,6 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @SerializedName("monday") MONDAY("monday"), - @SerializedName("saturday") - SATURDAY("saturday"), - - @SerializedName("sunday") - SUNDAY("sunday"), - @SerializedName("thursday") THURSDAY("thursday"), diff --git a/src/main/java/com/stripe/param/AccountPersonCreateParams.java b/src/main/java/com/stripe/param/AccountPersonCreateParams.java index 419ba8b52c3..a9982ede685 100644 --- a/src/main/java/com/stripe/param/AccountPersonCreateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonCreateParams.java @@ -884,11 +884,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -989,13 +989,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1872,11 +1872,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1978,13 +1978,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java index 45fad2e0a32..ab515d80358 100644 --- a/src/main/java/com/stripe/param/AccountPersonUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountPersonUpdateParams.java @@ -1001,11 +1001,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1121,25 +1121,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -2118,11 +2118,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2239,25 +2239,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/AccountUpdateParams.java b/src/main/java/com/stripe/param/AccountUpdateParams.java index 583808036e4..c24be6d00bf 100644 --- a/src/main/java/com/stripe/param/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/AccountUpdateParams.java @@ -1196,11 +1196,11 @@ public static class SupportAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1318,25 +1318,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1597,6 +1597,10 @@ public static class Capabilities { @SerializedName("paypal_payments") PaypalPayments paypalPayments; + /** The paypay_payments capability. */ + @SerializedName("paypay_payments") + PaypayPayments paypayPayments; + /** The payto_payments capability. */ @SerializedName("payto_payments") PaytoPayments paytoPayments; @@ -1747,6 +1751,7 @@ private Capabilities( PaycoPayments paycoPayments, PaynowPayments paynowPayments, PaypalPayments paypalPayments, + PaypayPayments paypayPayments, PaytoPayments paytoPayments, PixPayments pixPayments, PromptpayPayments promptpayPayments, @@ -1821,6 +1826,7 @@ private Capabilities( this.paycoPayments = paycoPayments; this.paynowPayments = paynowPayments; this.paypalPayments = paypalPayments; + this.paypayPayments = paypayPayments; this.paytoPayments = paytoPayments; this.pixPayments = pixPayments; this.promptpayPayments = promptpayPayments; @@ -1951,6 +1957,8 @@ public static class Builder { private PaypalPayments paypalPayments; + private PaypayPayments paypayPayments; + private PaytoPayments paytoPayments; private PixPayments pixPayments; @@ -2053,6 +2061,7 @@ public AccountUpdateParams.Capabilities build() { this.paycoPayments, this.paynowPayments, this.paypalPayments, + this.paypayPayments, this.paytoPayments, this.pixPayments, this.promptpayPayments, @@ -2433,6 +2442,13 @@ public Builder setPaypalPayments( return this; } + /** The paypay_payments capability. */ + public Builder setPaypayPayments( + AccountUpdateParams.Capabilities.PaypayPayments paypayPayments) { + this.paypayPayments = paypayPayments; + return this; + } + /** The payto_payments capability. */ public Builder setPaytoPayments( AccountUpdateParams.Capabilities.PaytoPayments paytoPayments) { @@ -6441,6 +6457,86 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaypayPayments { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + @SerializedName("requested") + Boolean requested; + + private PaypayPayments(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Capabilities.PaypayPayments build() { + return new AccountUpdateParams.Capabilities.PaypayPayments( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.PaypayPayments#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Capabilities.PaypayPayments#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Passing true requests the capability for the account, if it is not already requested. A + * requested capability may not immediately become active. Any requirements to activate the + * capability are returned in the {@code requirements} arrays. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class PaytoPayments { @@ -9042,11 +9138,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -9164,25 +9260,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -12116,11 +12212,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -12238,25 +12334,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -12841,11 +12937,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -12963,25 +13059,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -15564,16 +15660,15 @@ public static class Schedule { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code weekly}. */ @SerializedName("weekly_anchor") WeeklyAnchor weeklyAnchor; /** * The days of the week when available funds are paid out, specified as an array, e.g., - * [{@code monday}, {@code tuesday}]. (required and applicable only if {@code interval} is - * {@code weekly} and {@code weekly_anchor} is not set.) + * [{@code monday}, {@code tuesday}]. Required and applicable only if {@code interval} is + * {@code weekly}. */ @SerializedName("weekly_payout_days") List weeklyPayoutDays; @@ -15733,8 +15828,8 @@ public Builder addAllMonthlyPayoutDay(List elements) { /** * The day of the week when available funds are paid out, specified as {@code monday}, - * {@code tuesday}, etc. (required and applicable only if {@code interval} is {@code - * weekly}.) + * {@code tuesday}, etc. Required and applicable only if {@code interval} is {@code + * weekly}. */ public Builder setWeeklyAnchor( AccountUpdateParams.Settings.Payouts.Schedule.WeeklyAnchor weeklyAnchor) { @@ -15843,12 +15938,6 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @SerializedName("monday") MONDAY("monday"), - @SerializedName("saturday") - SATURDAY("saturday"), - - @SerializedName("sunday") - SUNDAY("sunday"), - @SerializedName("thursday") THURSDAY("thursday"), diff --git a/src/main/java/com/stripe/param/BalanceSettingsUpdateParams.java b/src/main/java/com/stripe/param/BalanceSettingsUpdateParams.java index d2c1f4c0c6d..ac0ee91cad5 100644 --- a/src/main/java/com/stripe/param/BalanceSettingsUpdateParams.java +++ b/src/main/java/com/stripe/param/BalanceSettingsUpdateParams.java @@ -28,8 +28,7 @@ public class BalanceSettingsUpdateParams extends ApiRequestParams { Map extraParams; /** - * Required. Settings that apply to the Payments Balance. + * Settings that apply to the Payments Balance. */ @SerializedName("payments") Payments payments; @@ -110,8 +109,8 @@ public Builder putAllExtraParam(Map map) { } /** - * Required. Settings that apply to the Payments Balance. + * Settings that apply to the Payments + * Balance. */ public Builder setPayments(BalanceSettingsUpdateParams.Payments payments) { this.payments = payments; @@ -241,6 +240,15 @@ public static class Payouts { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds that + * exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + @SerializedName("minimum_balance_by_currency") + Object minimumBalanceByCurrency; + /** * Details on when funds from charges are available, and when they are paid out to an external * account. For details, see our extraParams, Schedule schedule, Object statementDescriptor) { + Map extraParams, + Object minimumBalanceByCurrency, + Schedule schedule, + Object statementDescriptor) { this.extraParams = extraParams; + this.minimumBalanceByCurrency = minimumBalanceByCurrency; this.schedule = schedule; this.statementDescriptor = statementDescriptor; } @@ -271,6 +283,8 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Object minimumBalanceByCurrency; + private Schedule schedule; private Object statementDescriptor; @@ -278,7 +292,10 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public BalanceSettingsUpdateParams.Payments.Payouts build() { return new BalanceSettingsUpdateParams.Payments.Payouts( - this.extraParams, this.schedule, this.statementDescriptor); + this.extraParams, + this.minimumBalanceByCurrency, + this.schedule, + this.statementDescriptor); } /** @@ -309,6 +326,83 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * Add a key/value pair to `minimumBalanceByCurrency` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * BalanceSettingsUpdateParams.Payments.Payouts#minimumBalanceByCurrency} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMinimumBalanceByCurrency(String key, Long value) { + if (this.minimumBalanceByCurrency == null + || this.minimumBalanceByCurrency instanceof EmptyParam) { + this.minimumBalanceByCurrency = new HashMap(); + } + ((Map) this.minimumBalanceByCurrency).put(key, value); + return this; + } + + /** + * Add a key/value pair to `minimumBalanceByCurrency` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * BalanceSettingsUpdateParams.Payments.Payouts#minimumBalanceByCurrency} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMinimumBalanceByCurrency(String key, EmptyParam value) { + if (this.minimumBalanceByCurrency == null + || this.minimumBalanceByCurrency instanceof EmptyParam) { + this.minimumBalanceByCurrency = new HashMap(); + } + ((Map) this.minimumBalanceByCurrency).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `minimumBalanceByCurrency` map. A map is initialized for + * the first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. Map values can only be one of the following types: `Long`, `EmptyParam`. + * See {@link BalanceSettingsUpdateParams.Payments.Payouts#minimumBalanceByCurrency} for the + * field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMinimumBalanceByCurrency(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof Long || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: Long, EmptyParam"); + } + if (this.minimumBalanceByCurrency == null + || this.minimumBalanceByCurrency instanceof EmptyParam) { + this.minimumBalanceByCurrency = new HashMap(); + } + ((Map) this.minimumBalanceByCurrency).putAll(map); + return this; + } + + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds + * that exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + public Builder setMinimumBalanceByCurrency(EmptyParam minimumBalanceByCurrency) { + this.minimumBalanceByCurrency = minimumBalanceByCurrency; + return this; + } + + /** + * The minimum balance amount to retain per currency after automatic payouts. Only funds + * that exceed these amounts are paid out. Learn more about the minimum balances + * for automatic payouts. + */ + public Builder setMinimumBalanceByCurrency(Map minimumBalanceByCurrency) { + this.minimumBalanceByCurrency = minimumBalanceByCurrency; + return this; + } + /** * Details on when funds from charges are available, and when they are paid out to an * external account. For details, see our @@ -535,12 +629,6 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @SerializedName("monday") MONDAY("monday"), - @SerializedName("saturday") - SATURDAY("saturday"), - - @SerializedName("sunday") - SUNDAY("sunday"), - @SerializedName("thursday") THURSDAY("thursday"), @@ -564,15 +652,15 @@ public enum WeeklyPayoutDay implements ApiRequestParams.EnumParam { @EqualsAndHashCode(callSuper = false) public static class SettlementTiming { /** - * The number of days charge funds are held before becoming available. May also be set to - * {@code minimum}, representing the lowest available value for the account country. Default - * is {@code minimum}. The {@code delay_days} parameter remains at the last configured value - * if {@code payouts.schedule.interval} is {@code manual}. Learn more about controlling - * payout delay days. + * Change {@code delay_days} for this account, which determines the number of days charge + * funds are held before becoming available. The maximum value is 31. Passing an empty string + * to {@code delay_days_override} will return {@code delay_days} to the default, which is the + * lowest available value for the account. Learn more about controlling delay + * days. */ @SerializedName("delay_days_override") - Long delayDaysOverride; + Object delayDaysOverride; /** * Map of extra parameters for custom features not available in this client library. The @@ -583,7 +671,7 @@ public static class SettlementTiming { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private SettlementTiming(Long delayDaysOverride, Map extraParams) { + private SettlementTiming(Object delayDaysOverride, Map extraParams) { this.delayDaysOverride = delayDaysOverride; this.extraParams = extraParams; } @@ -593,7 +681,7 @@ public static Builder builder() { } public static class Builder { - private Long delayDaysOverride; + private Object delayDaysOverride; private Map extraParams; @@ -604,18 +692,31 @@ public BalanceSettingsUpdateParams.Payments.SettlementTiming build() { } /** - * The number of days charge funds are held before becoming available. May also be set to - * {@code minimum}, representing the lowest available value for the account country. Default - * is {@code minimum}. The {@code delay_days} parameter remains at the last configured value - * if {@code payouts.schedule.interval} is {@code manual}. Learn more about controlling - * payout delay days. + * delay days. */ public Builder setDelayDaysOverride(Long delayDaysOverride) { this.delayDaysOverride = delayDaysOverride; return this; } + /** + * Change {@code delay_days} for this account, which determines the number of days charge + * funds are held before becoming available. The maximum value is 31. Passing an empty + * string to {@code delay_days_override} will return {@code delay_days} to the default, + * which is the lowest available value for the account. Learn more about controlling + * delay days. + */ + public Builder setDelayDaysOverride(EmptyParam delayDaysOverride) { + this.delayDaysOverride = delayDaysOverride; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original diff --git a/src/main/java/com/stripe/param/ChargeCaptureParams.java b/src/main/java/com/stripe/param/ChargeCaptureParams.java index 36ff3229d06..c5d99225a04 100644 --- a/src/main/java/com/stripe/param/ChargeCaptureParams.java +++ b/src/main/java/com/stripe/param/ChargeCaptureParams.java @@ -1475,11 +1475,11 @@ public static class PickupAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1582,13 +1582,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1632,11 +1632,11 @@ public static class ReturnAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1739,13 +1739,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -2028,11 +2028,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2135,13 +2135,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3725,11 +3725,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3832,13 +3832,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/ChargeCreateParams.java b/src/main/java/com/stripe/param/ChargeCreateParams.java index c824304cd10..bc73185fe0e 100644 --- a/src/main/java/com/stripe/param/ChargeCreateParams.java +++ b/src/main/java/com/stripe/param/ChargeCreateParams.java @@ -907,11 +907,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1014,13 +1014,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/ChargeUpdateParams.java b/src/main/java/com/stripe/param/ChargeUpdateParams.java index 909cfe4df06..7bdfd5e5849 100644 --- a/src/main/java/com/stripe/param/ChargeUpdateParams.java +++ b/src/main/java/com/stripe/param/ChargeUpdateParams.java @@ -1726,11 +1726,11 @@ public static class PickupAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1848,25 +1848,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1922,11 +1922,11 @@ public static class ReturnAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2044,25 +2044,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -2375,11 +2375,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2497,25 +2497,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -4259,11 +4259,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -4381,25 +4381,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -5425,11 +5425,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -5547,25 +5547,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java index cb870c26943..97940730121 100644 --- a/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java +++ b/src/main/java/com/stripe/param/ConfirmationTokenCreateParams.java @@ -519,6 +519,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -693,6 +700,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -755,6 +763,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -867,6 +876,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -951,6 +962,7 @@ public ConfirmationTokenCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -1413,6 +1425,15 @@ public Builder setPaypal(ConfirmationTokenCreateParams.PaymentMethodData.Paypal return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(ConfirmationTokenCreateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo * payment method. @@ -2461,11 +2482,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2570,13 +2591,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5000,6 +5021,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfirmationTokenCreateParams.PaymentMethodData.Paypay build() { + return new ConfirmationTokenCreateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Paypay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link ConfirmationTokenCreateParams.PaymentMethodData.Paypay#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 Payto { @@ -6586,6 +6665,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), @@ -7152,11 +7234,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -7259,13 +7341,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/CreditNoteCreateParams.java b/src/main/java/com/stripe/param/CreditNoteCreateParams.java index 6c4828056bf..53c7738c60f 100644 --- a/src/main/java/com/stripe/param/CreditNoteCreateParams.java +++ b/src/main/java/com/stripe/param/CreditNoteCreateParams.java @@ -883,6 +883,13 @@ public static class Refund { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + @SerializedName("payment_record_refund") + PaymentRecordRefund paymentRecordRefund; + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -890,10 +897,24 @@ public static class Refund { @SerializedName("refund") String refund; - private Refund(Long amountRefunded, Map extraParams, String refund) { + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + @SerializedName("type") + Type type; + + private Refund( + Long amountRefunded, + Map extraParams, + PaymentRecordRefund paymentRecordRefund, + String refund, + Type type) { this.amountRefunded = amountRefunded; this.extraParams = extraParams; + this.paymentRecordRefund = paymentRecordRefund; this.refund = refund; + this.type = type; } public static Builder builder() { @@ -905,12 +926,20 @@ public static class Builder { private Map extraParams; + private PaymentRecordRefund paymentRecordRefund; + private String refund; + private Type type; + /** Finalize and obtain parameter instance from this builder. */ public CreditNoteCreateParams.Refund build() { return new CreditNoteCreateParams.Refund( - this.amountRefunded, this.extraParams, this.refund); + this.amountRefunded, + this.extraParams, + this.paymentRecordRefund, + this.refund, + this.type); } /** @@ -948,6 +977,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + public Builder setPaymentRecordRefund( + CreditNoteCreateParams.Refund.PaymentRecordRefund paymentRecordRefund) { + this.paymentRecordRefund = paymentRecordRefund; + return this; + } + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -956,6 +995,132 @@ public Builder setRefund(String refund) { this.refund = refund; return this; } + + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + public Builder setType(CreditNoteCreateParams.Refund.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentRecordRefund { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The ID of the PaymentRecord with the refund to link to this + * credit note. + */ + @SerializedName("payment_record") + String paymentRecord; + + /** + * Required. The PaymentRecord refund group to link to this credit note. For + * refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on the + * PaymentRecord. + */ + @SerializedName("refund_group") + String refundGroup; + + private PaymentRecordRefund( + Map extraParams, String paymentRecord, String refundGroup) { + this.extraParams = extraParams; + this.paymentRecord = paymentRecord; + this.refundGroup = refundGroup; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String paymentRecord; + + private String refundGroup; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditNoteCreateParams.Refund.PaymentRecordRefund build() { + return new CreditNoteCreateParams.Refund.PaymentRecordRefund( + this.extraParams, this.paymentRecord, this.refundGroup); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNoteCreateParams.Refund.PaymentRecordRefund#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNoteCreateParams.Refund.PaymentRecordRefund#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The ID of the PaymentRecord with the refund to link to this + * credit note. + */ + public Builder setPaymentRecord(String paymentRecord) { + this.paymentRecord = paymentRecord; + return this; + } + + /** + * Required. The PaymentRecord refund group to link to this credit note. + * For refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on + * the PaymentRecord. + */ + public Builder setRefundGroup(String refundGroup) { + this.refundGroup = refundGroup; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("payment_record_refund") + PAYMENT_RECORD_REFUND("payment_record_refund"), + + @SerializedName("refund") + REFUND("refund"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } diff --git a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java index dd6aeabb1ac..4445a387a6b 100644 --- a/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java +++ b/src/main/java/com/stripe/param/CreditNotePreviewLinesListParams.java @@ -956,6 +956,13 @@ public static class Refund { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + @SerializedName("payment_record_refund") + PaymentRecordRefund paymentRecordRefund; + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -963,10 +970,24 @@ public static class Refund { @SerializedName("refund") String refund; - private Refund(Long amountRefunded, Map extraParams, String refund) { + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + @SerializedName("type") + Type type; + + private Refund( + Long amountRefunded, + Map extraParams, + PaymentRecordRefund paymentRecordRefund, + String refund, + Type type) { this.amountRefunded = amountRefunded; this.extraParams = extraParams; + this.paymentRecordRefund = paymentRecordRefund; this.refund = refund; + this.type = type; } public static Builder builder() { @@ -978,12 +999,20 @@ public static class Builder { private Map extraParams; + private PaymentRecordRefund paymentRecordRefund; + private String refund; + private Type type; + /** Finalize and obtain parameter instance from this builder. */ public CreditNotePreviewLinesListParams.Refund build() { return new CreditNotePreviewLinesListParams.Refund( - this.amountRefunded, this.extraParams, this.refund); + this.amountRefunded, + this.extraParams, + this.paymentRecordRefund, + this.refund, + this.type); } /** @@ -1022,6 +1051,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + public Builder setPaymentRecordRefund( + CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund paymentRecordRefund) { + this.paymentRecordRefund = paymentRecordRefund; + return this; + } + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -1030,6 +1069,132 @@ public Builder setRefund(String refund) { this.refund = refund; return this; } + + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + public Builder setType(CreditNotePreviewLinesListParams.Refund.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentRecordRefund { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The ID of the PaymentRecord with the refund to link to this + * credit note. + */ + @SerializedName("payment_record") + String paymentRecord; + + /** + * Required. The PaymentRecord refund group to link to this credit note. For + * refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on the + * PaymentRecord. + */ + @SerializedName("refund_group") + String refundGroup; + + private PaymentRecordRefund( + Map extraParams, String paymentRecord, String refundGroup) { + this.extraParams = extraParams; + this.paymentRecord = paymentRecord; + this.refundGroup = refundGroup; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String paymentRecord; + + private String refundGroup; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund build() { + return new CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund( + this.extraParams, this.paymentRecord, this.refundGroup); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNotePreviewLinesListParams.Refund.PaymentRecordRefund#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The ID of the PaymentRecord with the refund to link to this + * credit note. + */ + public Builder setPaymentRecord(String paymentRecord) { + this.paymentRecord = paymentRecord; + return this; + } + + /** + * Required. The PaymentRecord refund group to link to this credit note. + * For refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on + * the PaymentRecord. + */ + public Builder setRefundGroup(String refundGroup) { + this.refundGroup = refundGroup; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("payment_record_refund") + PAYMENT_RECORD_REFUND("payment_record_refund"), + + @SerializedName("refund") + REFUND("refund"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } diff --git a/src/main/java/com/stripe/param/CreditNotePreviewParams.java b/src/main/java/com/stripe/param/CreditNotePreviewParams.java index 65db4a6c8cf..1ca061957bc 100644 --- a/src/main/java/com/stripe/param/CreditNotePreviewParams.java +++ b/src/main/java/com/stripe/param/CreditNotePreviewParams.java @@ -883,6 +883,13 @@ public static class Refund { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + @SerializedName("payment_record_refund") + PaymentRecordRefund paymentRecordRefund; + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -890,10 +897,24 @@ public static class Refund { @SerializedName("refund") String refund; - private Refund(Long amountRefunded, Map extraParams, String refund) { + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + @SerializedName("type") + Type type; + + private Refund( + Long amountRefunded, + Map extraParams, + PaymentRecordRefund paymentRecordRefund, + String refund, + Type type) { this.amountRefunded = amountRefunded; this.extraParams = extraParams; + this.paymentRecordRefund = paymentRecordRefund; this.refund = refund; + this.type = type; } public static Builder builder() { @@ -905,12 +926,20 @@ public static class Builder { private Map extraParams; + private PaymentRecordRefund paymentRecordRefund; + private String refund; + private Type type; + /** Finalize and obtain parameter instance from this builder. */ public CreditNotePreviewParams.Refund build() { return new CreditNotePreviewParams.Refund( - this.amountRefunded, this.extraParams, this.refund); + this.amountRefunded, + this.extraParams, + this.paymentRecordRefund, + this.refund, + this.type); } /** @@ -948,6 +977,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The PaymentRecord refund details to link to this credit note. Required when {@code type} is + * {@code payment_record_refund}. + */ + public Builder setPaymentRecordRefund( + CreditNotePreviewParams.Refund.PaymentRecordRefund paymentRecordRefund) { + this.paymentRecordRefund = paymentRecordRefund; + return this; + } + /** * ID of an existing refund to link this credit note to. Required when {@code type} is {@code * refund}. @@ -956,6 +995,132 @@ public Builder setRefund(String refund) { this.refund = refund; return this; } + + /** + * Type of the refund, one of {@code refund} or {@code payment_record_refund}. Defaults to + * {@code refund}. + */ + public Builder setType(CreditNotePreviewParams.Refund.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentRecordRefund { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The ID of the PaymentRecord with the refund to link to this + * credit note. + */ + @SerializedName("payment_record") + String paymentRecord; + + /** + * Required. The PaymentRecord refund group to link to this credit note. For + * refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on the + * PaymentRecord. + */ + @SerializedName("refund_group") + String refundGroup; + + private PaymentRecordRefund( + Map extraParams, String paymentRecord, String refundGroup) { + this.extraParams = extraParams; + this.paymentRecord = paymentRecord; + this.refundGroup = refundGroup; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String paymentRecord; + + private String refundGroup; + + /** Finalize and obtain parameter instance from this builder. */ + public CreditNotePreviewParams.Refund.PaymentRecordRefund build() { + return new CreditNotePreviewParams.Refund.PaymentRecordRefund( + this.extraParams, this.paymentRecord, this.refundGroup); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNotePreviewParams.Refund.PaymentRecordRefund#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link CreditNotePreviewParams.Refund.PaymentRecordRefund#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The ID of the PaymentRecord with the refund to link to this + * credit note. + */ + public Builder setPaymentRecord(String paymentRecord) { + this.paymentRecord = paymentRecord; + return this; + } + + /** + * Required. The PaymentRecord refund group to link to this credit note. + * For refunds processed off-Stripe, this will correspond to the {@code + * processor_details.custom.refund_reference} field provided when reporting the refund on + * the PaymentRecord. + */ + public Builder setRefundGroup(String refundGroup) { + this.refundGroup = refundGroup; + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("payment_record_refund") + PAYMENT_RECORD_REFUND("payment_record_refund"), + + @SerializedName("refund") + REFUND("refund"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } diff --git a/src/main/java/com/stripe/param/CustomerCreateParams.java b/src/main/java/com/stripe/param/CustomerCreateParams.java index c64735c67a4..18b6d44d0ad 100644 --- a/src/main/java/com/stripe/param/CustomerCreateParams.java +++ b/src/main/java/com/stripe/param/CustomerCreateParams.java @@ -27,6 +27,10 @@ public class CustomerCreateParams extends ApiRequestParams { @SerializedName("balance") Long balance; + /** The customer's business name. This may be up to 150 characters. */ + @SerializedName("business_name") + Object businessName; + /** Balance information and default balance settings for this customer. */ @SerializedName("cash_balance") CashBalance cashBalance; @@ -58,6 +62,10 @@ public class CustomerCreateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** The customer's full name. This may be up to 150 characters. */ + @SerializedName("individual_name") + Object individualName; + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -126,11 +134,13 @@ public class CustomerCreateParams extends ApiRequestParams { private CustomerCreateParams( Object address, Long balance, + Object businessName, CashBalance cashBalance, String description, String email, List expand, Map extraParams, + Object individualName, String invoicePrefix, InvoiceSettings invoiceSettings, Object metadata, @@ -148,11 +158,13 @@ private CustomerCreateParams( Boolean validate) { this.address = address; this.balance = balance; + this.businessName = businessName; this.cashBalance = cashBalance; this.description = description; this.email = email; this.expand = expand; this.extraParams = extraParams; + this.individualName = individualName; this.invoicePrefix = invoicePrefix; this.invoiceSettings = invoiceSettings; this.metadata = metadata; @@ -179,6 +191,8 @@ public static class Builder { private Long balance; + private Object businessName; + private CashBalance cashBalance; private String description; @@ -189,6 +203,8 @@ public static class Builder { private Map extraParams; + private Object individualName; + private String invoicePrefix; private InvoiceSettings invoiceSettings; @@ -224,11 +240,13 @@ public CustomerCreateParams build() { return new CustomerCreateParams( this.address, this.balance, + this.businessName, this.cashBalance, this.description, this.email, this.expand, this.extraParams, + this.individualName, this.invoicePrefix, this.invoiceSettings, this.metadata, @@ -269,6 +287,18 @@ public Builder setBalance(Long balance) { return this; } + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(EmptyParam businessName) { + this.businessName = businessName; + return this; + } + /** Balance information and default balance settings for this customer. */ public Builder setCashBalance(CustomerCreateParams.CashBalance cashBalance) { this.cashBalance = cashBalance; @@ -345,6 +375,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(String individualName) { + this.individualName = individualName; + return this; + } + + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(EmptyParam individualName) { + this.individualName = individualName; + return this; + } + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -556,11 +598,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -662,13 +704,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1382,11 +1424,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1490,13 +1532,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java index 0f3a43861bf..e16d8e81610 100644 --- a/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java +++ b/src/main/java/com/stripe/param/CustomerListPaymentMethodsParams.java @@ -357,6 +357,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java index 5cb4ae87970..6423cc1287b 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentMethodListParams.java @@ -357,6 +357,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java b/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java index 40a075540cf..cfb835b3cf1 100644 --- a/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerPaymentSourceUpdateParams.java @@ -563,11 +563,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -685,25 +685,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/CustomerUpdateParams.java b/src/main/java/com/stripe/param/CustomerUpdateParams.java index ad19ad87e2a..c7bc87791f2 100644 --- a/src/main/java/com/stripe/param/CustomerUpdateParams.java +++ b/src/main/java/com/stripe/param/CustomerUpdateParams.java @@ -27,6 +27,10 @@ public class CustomerUpdateParams extends ApiRequestParams { @SerializedName("balance") Long balance; + /** The customer's business name. This may be up to 150 characters. */ + @SerializedName("business_name") + Object businessName; + /** Balance information and default balance settings for this customer. */ @SerializedName("cash_balance") CashBalance cashBalance; @@ -72,6 +76,10 @@ public class CustomerUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** The customer's full name. This may be up to 150 characters. */ + @SerializedName("individual_name") + Object individualName; + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -129,12 +137,14 @@ public class CustomerUpdateParams extends ApiRequestParams { private CustomerUpdateParams( Object address, Long balance, + Object businessName, CashBalance cashBalance, Object defaultSource, Object description, Object email, List expand, Map extraParams, + Object individualName, Object invoicePrefix, InvoiceSettings invoiceSettings, Object metadata, @@ -149,12 +159,14 @@ private CustomerUpdateParams( Boolean validate) { this.address = address; this.balance = balance; + this.businessName = businessName; this.cashBalance = cashBalance; this.defaultSource = defaultSource; this.description = description; this.email = email; this.expand = expand; this.extraParams = extraParams; + this.individualName = individualName; this.invoicePrefix = invoicePrefix; this.invoiceSettings = invoiceSettings; this.metadata = metadata; @@ -178,6 +190,8 @@ public static class Builder { private Long balance; + private Object businessName; + private CashBalance cashBalance; private Object defaultSource; @@ -190,6 +204,8 @@ public static class Builder { private Map extraParams; + private Object individualName; + private Object invoicePrefix; private InvoiceSettings invoiceSettings; @@ -219,12 +235,14 @@ public CustomerUpdateParams build() { return new CustomerUpdateParams( this.address, this.balance, + this.businessName, this.cashBalance, this.defaultSource, this.description, this.email, this.expand, this.extraParams, + this.individualName, this.invoicePrefix, this.invoiceSettings, this.metadata, @@ -262,6 +280,18 @@ public Builder setBalance(Long balance) { return this; } + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(String businessName) { + this.businessName = businessName; + return this; + } + + /** The customer's business name. This may be up to 150 characters. */ + public Builder setBusinessName(EmptyParam businessName) { + this.businessName = businessName; + return this; + } + /** Balance information and default balance settings for this customer. */ public Builder setCashBalance(CustomerUpdateParams.CashBalance cashBalance) { this.cashBalance = cashBalance; @@ -390,6 +420,18 @@ public Builder putAllExtraParam(Map map) { return this; } + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(String individualName) { + this.individualName = individualName; + return this; + } + + /** The customer's full name. This may be up to 150 characters. */ + public Builder setIndividualName(EmptyParam individualName) { + this.individualName = individualName; + return this; + } + /** * The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase * letters or numbers. @@ -590,11 +632,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -712,25 +754,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1506,11 +1548,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1630,25 +1672,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/DisputeUpdateParams.java b/src/main/java/com/stripe/param/DisputeUpdateParams.java index 1cd05ee3485..929ea6f494e 100644 --- a/src/main/java/com/stripe/param/DisputeUpdateParams.java +++ b/src/main/java/com/stripe/param/DisputeUpdateParams.java @@ -35,6 +35,10 @@ public class DisputeUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Intended submission method for the dispute. */ + @SerializedName("intended_submission_method") + IntendedSubmissionMethod intendedSubmissionMethod; + /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -56,11 +60,13 @@ private DisputeUpdateParams( Evidence evidence, List expand, Map extraParams, + IntendedSubmissionMethod intendedSubmissionMethod, Object metadata, Boolean submit) { this.evidence = evidence; this.expand = expand; this.extraParams = extraParams; + this.intendedSubmissionMethod = intendedSubmissionMethod; this.metadata = metadata; this.submit = submit; } @@ -76,6 +82,8 @@ public static class Builder { private Map extraParams; + private IntendedSubmissionMethod intendedSubmissionMethod; + private Object metadata; private Boolean submit; @@ -83,7 +91,12 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public DisputeUpdateParams build() { return new DisputeUpdateParams( - this.evidence, this.expand, this.extraParams, this.metadata, this.submit); + this.evidence, + this.expand, + this.extraParams, + this.intendedSubmissionMethod, + this.metadata, + this.submit); } /** @@ -148,6 +161,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Intended submission method for the dispute. */ + public Builder setIntendedSubmissionMethod( + DisputeUpdateParams.IntendedSubmissionMethod intendedSubmissionMethod) { + this.intendedSubmissionMethod = intendedSubmissionMethod; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1581,11 +1601,11 @@ public static class ShippingAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1708,25 +1728,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -2067,11 +2087,11 @@ public static class ShippingAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2194,25 +2214,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -2334,4 +2354,25 @@ public Builder setFeeAcknowledged(Boolean feeAcknowledged) { } } } + + public enum IntendedSubmissionMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"), + + @SerializedName("prefer_manual") + PREFER_MANUAL("prefer_manual"), + + @SerializedName("prefer_smart_disputes") + PREFER_SMART_DISPUTES("prefer_smart_disputes"), + + @SerializedName("smart_disputes") + SMART_DISPUTES("smart_disputes"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + IntendedSubmissionMethod(String value) { + this.value = value; + } + } } diff --git a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java index 65902188723..e69cadbcb43 100644 --- a/src/main/java/com/stripe/param/InvoiceAddLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceAddLinesParams.java @@ -1441,19 +1441,28 @@ public static class ProductData { @SerializedName("tax_code") String taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -1473,6 +1482,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceAddLinesParams.Line.PriceData.ProductData build() { return new InvoiceAddLinesParams.Line.PriceData.ProductData( @@ -1481,7 +1492,8 @@ public InvoiceAddLinesParams.Line.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1589,6 +1601,15 @@ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } diff --git a/src/main/java/com/stripe/param/InvoiceCreateParams.java b/src/main/java/com/stripe/param/InvoiceCreateParams.java index c596878c5dd..c7db5b18f95 100644 --- a/src/main/java/com/stripe/param/InvoiceCreateParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreateParams.java @@ -2023,7 +2023,6 @@ public static class PaymentSettings { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ @SerializedName("payment_method_types") Object paymentMethodTypes; @@ -2154,7 +2153,6 @@ public Builder addAllPaymentMethodType( * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { this.paymentMethodTypes = paymentMethodTypes; @@ -2167,7 +2165,6 @@ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes( List paymentMethodTypes) { @@ -2230,6 +2227,13 @@ public static class PaymentMethodOptions { @SerializedName("konbini") Object konbini; + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("pix") + Object pix; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -2259,6 +2263,7 @@ private PaymentMethodOptions( Map extraParams, Object idBankTransfer, Object konbini, + Object pix, Object sepaDebit, Object upi, Object usBankAccount) { @@ -2269,6 +2274,7 @@ private PaymentMethodOptions( this.extraParams = extraParams; this.idBankTransfer = idBankTransfer; this.konbini = konbini; + this.pix = pix; this.sepaDebit = sepaDebit; this.upi = upi; this.usBankAccount = usBankAccount; @@ -2293,6 +2299,8 @@ public static class Builder { private Object konbini; + private Object pix; + private Object sepaDebit; private Object upi; @@ -2309,6 +2317,7 @@ public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions build() { this.extraParams, this.idBankTransfer, this.konbini, + this.pix, this.sepaDebit, this.upi, this.usBankAccount); @@ -2457,6 +2466,24 @@ public Builder setKonbini(EmptyParam konbini) { return this; } + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPix(InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct * Debit payment method options to pass to the invoice’s PaymentIntent. @@ -3643,6 +3670,98 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Pix(AmountIncludesIof amountIncludesIof, Map extraParams) { + this.amountIncludesIof = amountIncludesIof; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmountIncludesIof amountIncludesIof; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix build() { + return new InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix( + this.amountIncludesIof, this.extraParams); + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -4550,6 +4669,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -5918,11 +6040,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -6025,13 +6147,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java index 00ea25c9145..381206f1139 100644 --- a/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java +++ b/src/main/java/com/stripe/param/InvoiceCreatePreviewParams.java @@ -890,11 +890,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -997,13 +997,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1147,11 +1147,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1257,13 +1257,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -7872,15 +7872,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -7891,12 +7896,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public InvoiceCreatePreviewParams.ScheduleDetails.BillingMode build() { return new InvoiceCreatePreviewParams.ScheduleDetails.BillingMode( - this.extraParams, this.type); + this.extraParams, this.flexible, this.type); } /** @@ -7927,9 +7934,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Type type) { this.type = type; @@ -7937,6 +7951,102 @@ public Builder setType(InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Ty } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible build() { + return new InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + InvoiceCreatePreviewParams.ScheduleDetails.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -8080,16 +8190,6 @@ public static class Phase { @SerializedName("items") List items; - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. Use - * {@code duration} instead. - */ - @SerializedName("iterations") - Long iterations; - /** * Set of key-value pairs that you can * attach to a phase. Metadata on a schedule's phase will update the underlying subscription's @@ -8183,7 +8283,6 @@ private Phase( Map extraParams, InvoiceSettings invoiceSettings, List items, - Long iterations, Map metadata, String onBehalfOf, PauseCollection pauseCollection, @@ -8210,7 +8309,6 @@ private Phase( this.extraParams = extraParams; this.invoiceSettings = invoiceSettings; this.items = items; - this.iterations = iterations; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.pauseCollection = pauseCollection; @@ -8261,8 +8359,6 @@ public static class Builder { private List items; - private Long iterations; - private Map metadata; private String onBehalfOf; @@ -8302,7 +8398,6 @@ public InvoiceCreatePreviewParams.ScheduleDetails.Phase build() { this.extraParams, this.invoiceSettings, this.items, - this.iterations, this.metadata, this.onBehalfOf, this.pauseCollection, @@ -8651,18 +8746,6 @@ public Builder addAllItem( return this; } - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. - * Use {@code duration} instead. - */ - public Builder setIterations(Long iterations) { - this.iterations = iterations; - return this; - } - /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -8825,8 +8908,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -8999,8 +9083,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to + * {@code min_item_period_end}. */ public Builder setPeriod( InvoiceCreatePreviewParams.ScheduleDetails.Phase.AddInvoiceItem.Period period) { @@ -13369,6 +13454,10 @@ public static class SubscriptionDetails { @SerializedName("billing_mode") BillingMode billingMode; + /** Sets the billing schedules for the subscription. */ + @SerializedName("billing_schedules") + Object billingSchedules; + /** * A timestamp at which the subscription should cancel. If set to a date before the current * period ends, this will cause a proration if prorations have been enabled using {@code @@ -13458,6 +13547,7 @@ public static class SubscriptionDetails { private SubscriptionDetails( Object billingCycleAnchor, BillingMode billingMode, + Object billingSchedules, Object cancelAt, Boolean cancelAtPeriodEnd, Boolean cancelNow, @@ -13472,6 +13562,7 @@ private SubscriptionDetails( Object trialEnd) { this.billingCycleAnchor = billingCycleAnchor; this.billingMode = billingMode; + this.billingSchedules = billingSchedules; this.cancelAt = cancelAt; this.cancelAtPeriodEnd = cancelAtPeriodEnd; this.cancelNow = cancelNow; @@ -13495,6 +13586,8 @@ public static class Builder { private BillingMode billingMode; + private Object billingSchedules; + private Object cancelAt; private Boolean cancelAtPeriodEnd; @@ -13524,6 +13617,7 @@ public InvoiceCreatePreviewParams.SubscriptionDetails build() { return new InvoiceCreatePreviewParams.SubscriptionDetails( this.billingCycleAnchor, this.billingMode, + this.billingSchedules, this.cancelAt, this.cancelAtPeriodEnd, this.cancelNow, @@ -13570,6 +13664,57 @@ public Builder setBillingMode( return this; } + /** + * Add an element to `billingSchedules` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails#billingSchedules} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addBillingSchedule( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule element) { + if (this.billingSchedules == null || this.billingSchedules instanceof EmptyParam) { + this.billingSchedules = + new ArrayList(); + } + ((List) + this.billingSchedules) + .add(element); + return this; + } + + /** + * Add all elements to `billingSchedules` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link InvoiceCreatePreviewParams.SubscriptionDetails#billingSchedules} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllBillingSchedule( + List elements) { + if (this.billingSchedules == null || this.billingSchedules instanceof EmptyParam) { + this.billingSchedules = + new ArrayList(); + } + ((List) + this.billingSchedules) + .addAll(elements); + return this; + } + + /** Sets the billing schedules for the subscription. */ + public Builder setBillingSchedules(EmptyParam billingSchedules) { + this.billingSchedules = billingSchedules; + return this; + } + + /** Sets the billing schedules for the subscription. */ + public Builder setBillingSchedules( + List billingSchedules) { + this.billingSchedules = billingSchedules; + return this; + } + /** * A timestamp at which the subscription should cancel. If set to a date before the current * period ends, this will cause a proration if prorations have been enabled using {@code @@ -13804,15 +13949,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -13823,12 +13973,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode build() { return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode( - this.extraParams, this.type); + this.extraParams, this.flexible, this.type); } /** @@ -13859,9 +14011,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType( InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Type type) { @@ -13870,6 +14029,102 @@ public Builder setType( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible build() { + return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -13886,6 +14141,495 @@ public enum Type implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingSchedule { + /** Configure billing schedule differently for individual subscription items. */ + @SerializedName("applies_to") + List appliesTo; + + /** The end date for the billing schedule. */ + @SerializedName("bill_until") + BillUntil billUntil; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up + * to 200 characters. If not provided, a unique key will be generated. + */ + @SerializedName("key") + String key; + + private BillingSchedule( + List appliesTo, + BillUntil billUntil, + Map extraParams, + String key) { + this.appliesTo = appliesTo; + this.billUntil = billUntil; + this.extraParams = extraParams; + this.key = key; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List + appliesTo; + + private BillUntil billUntil; + + private Map extraParams; + + private String key; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule build() { + return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule( + this.appliesTo, this.billUntil, this.extraParams, this.key); + } + + /** + * Add an element to `appliesTo` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule#appliesTo} for the field + * documentation. + */ + public Builder addAppliesTo( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.AppliesTo element) { + if (this.appliesTo == null) { + this.appliesTo = new ArrayList<>(); + } + this.appliesTo.add(element); + return this; + } + + /** + * Add all elements to `appliesTo` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule#appliesTo} for the field + * documentation. + */ + public Builder addAllAppliesTo( + List + elements) { + if (this.appliesTo == null) { + this.appliesTo = new ArrayList<>(); + } + this.appliesTo.addAll(elements); + return this; + } + + /** The end date for the billing schedule. */ + public Builder setBillUntil( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil billUntil) { + this.billUntil = billUntil; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and + * up to 200 characters. If not provided, a unique key will be generated. + */ + public Builder setKey(String key) { + this.key = key; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AppliesTo { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 price object. */ + @SerializedName("price") + String price; + + /** + * Required. Controls which subscription items the billing schedule applies + * to. + */ + @SerializedName("type") + Type type; + + private AppliesTo(Map extraParams, String price, Type type) { + this.extraParams = extraParams; + this.price = price; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String price; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.AppliesTo build() { + return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.AppliesTo( + this.extraParams, this.price, 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 + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.AppliesTo#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.AppliesTo#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 price object. */ + public Builder setPrice(String price) { + this.price = price; + return this; + } + + /** + * Required. Controls which subscription items the billing schedule + * applies to. + */ + public Builder setType( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.AppliesTo.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("price") + PRICE("price"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillUntil { + /** Specifies the billing period. */ + @SerializedName("duration") + Duration duration; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 end date of the billing schedule. */ + @SerializedName("timestamp") + Long timestamp; + + /** + * Required. Describes how the billing schedule will determine the end + * date. Either {@code duration} or {@code timestamp}. + */ + @SerializedName("type") + Type type; + + private BillUntil( + Duration duration, Map extraParams, Long timestamp, Type type) { + this.duration = duration; + this.extraParams = extraParams; + this.timestamp = timestamp; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Duration duration; + + private Map extraParams; + + private Long timestamp; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil build() { + return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil( + this.duration, this.extraParams, this.timestamp, this.type); + } + + /** Specifies the billing period. */ + public Builder setDuration( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil.Duration + duration) { + this.duration = duration; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil#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 end date of the billing schedule. */ + public Builder setTimestamp(Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Required. Describes how the billing schedule will determine the end + * date. Either {@code duration} or {@code timestamp}. + */ + public Builder setType( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Duration { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Specifies billing duration. Either {@code day}, {@code + * week}, {@code month} or {@code year}. + */ + @SerializedName("interval") + Interval interval; + + /** The multiplier applied to the interval. */ + @SerializedName("interval_count") + Long intervalCount; + + private Duration(Map extraParams, Interval interval, Long intervalCount) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil.Duration + build() { + return new InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil + .Duration(this.extraParams, this.interval, this.intervalCount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil.Duration#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil.Duration#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Specifies billing duration. Either {@code day}, {@code + * week}, {@code month} or {@code year}. + */ + public Builder setInterval( + InvoiceCreatePreviewParams.SubscriptionDetails.BillingSchedule.BillUntil.Duration + .Interval + interval) { + this.interval = interval; + return this; + } + + /** The multiplier applied to the interval. */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + } + + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("duration") + DURATION("duration"), + + @SerializedName("timestamp") + TIMESTAMP("timestamp"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Item { diff --git a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java index 95d88391ad5..1d748e81049 100644 --- a/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceLineItemUpdateParams.java @@ -1322,19 +1322,28 @@ public static class ProductData { @SerializedName("tax_code") Object taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + Object unitLabel; + private ProductData( Object description, Map extraParams, List images, Map metadata, Object name, - Object taxCode) { + Object taxCode, + Object unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -1354,6 +1363,8 @@ public static class Builder { private Object taxCode; + private Object unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceLineItemUpdateParams.PriceData.ProductData build() { return new InvoiceLineItemUpdateParams.PriceData.ProductData( @@ -1362,7 +1373,8 @@ public InvoiceLineItemUpdateParams.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1493,6 +1505,24 @@ public Builder setTaxCode(EmptyParam taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(EmptyParam unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } diff --git a/src/main/java/com/stripe/param/InvoiceListParams.java b/src/main/java/com/stripe/param/InvoiceListParams.java index af99104f71d..f3618f6d48e 100644 --- a/src/main/java/com/stripe/param/InvoiceListParams.java +++ b/src/main/java/com/stripe/param/InvoiceListParams.java @@ -13,6 +13,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class InvoiceListParams extends ApiRequestParams { + /** Only return invoices for the cadence specified by this billing cadence ID. */ + @SerializedName("billing_cadence") + String billingCadence; + /** * The collection method of the invoice to retrieve. Either {@code charge_automatically} or {@code * send_invoice}. @@ -86,6 +90,7 @@ public class InvoiceListParams extends ApiRequestParams { String subscription; private InvoiceListParams( + String billingCadence, CollectionMethod collectionMethod, Object created, String customer, @@ -98,6 +103,7 @@ private InvoiceListParams( String startingAfter, Status status, String subscription) { + this.billingCadence = billingCadence; this.collectionMethod = collectionMethod; this.created = created; this.customer = customer; @@ -117,6 +123,8 @@ public static Builder builder() { } public static class Builder { + private String billingCadence; + private CollectionMethod collectionMethod; private Object created; @@ -144,6 +152,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public InvoiceListParams build() { return new InvoiceListParams( + this.billingCadence, this.collectionMethod, this.created, this.customer, @@ -158,6 +167,12 @@ public InvoiceListParams build() { this.subscription); } + /** Only return invoices for the cadence specified by this billing cadence ID. */ + public Builder setBillingCadence(String billingCadence) { + this.billingCadence = billingCadence; + return this; + } + /** * The collection method of the invoice to retrieve. Either {@code charge_automatically} or * {@code send_invoice}. diff --git a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java index ffc4897e799..f109dff513f 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateLinesParams.java @@ -1466,19 +1466,28 @@ public static class ProductData { @SerializedName("tax_code") String taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -1498,6 +1507,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public InvoiceUpdateLinesParams.Line.PriceData.ProductData build() { return new InvoiceUpdateLinesParams.Line.PriceData.ProductData( @@ -1506,7 +1517,8 @@ public InvoiceUpdateLinesParams.Line.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1616,6 +1628,15 @@ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } diff --git a/src/main/java/com/stripe/param/InvoiceUpdateParams.java b/src/main/java/com/stripe/param/InvoiceUpdateParams.java index 576c6c20c3f..a3e39d75d0a 100644 --- a/src/main/java/com/stripe/param/InvoiceUpdateParams.java +++ b/src/main/java/com/stripe/param/InvoiceUpdateParams.java @@ -2017,7 +2017,6 @@ public static class PaymentSettings { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ @SerializedName("payment_method_types") Object paymentMethodTypes; @@ -2148,7 +2147,6 @@ public Builder addAllPaymentMethodType( * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { this.paymentMethodTypes = paymentMethodTypes; @@ -2161,7 +2159,6 @@ public Builder setPaymentMethodTypes(EmptyParam paymentMethodTypes) { * invoice’s default payment method, the subscription’s default payment method, the customer’s * default payment method, and your invoice template settings. - * Should not be specified with payment_method_configuration */ public Builder setPaymentMethodTypes( List paymentMethodTypes) { @@ -2224,6 +2221,13 @@ public static class PaymentMethodOptions { @SerializedName("konbini") Object konbini; + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + @SerializedName("pix") + Object pix; + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct Debit * payment method options to pass to the invoice’s PaymentIntent. @@ -2253,6 +2257,7 @@ private PaymentMethodOptions( Map extraParams, Object idBankTransfer, Object konbini, + Object pix, Object sepaDebit, Object upi, Object usBankAccount) { @@ -2263,6 +2268,7 @@ private PaymentMethodOptions( this.extraParams = extraParams; this.idBankTransfer = idBankTransfer; this.konbini = konbini; + this.pix = pix; this.sepaDebit = sepaDebit; this.upi = upi; this.usBankAccount = usBankAccount; @@ -2287,6 +2293,8 @@ public static class Builder { private Object konbini; + private Object pix; + private Object sepaDebit; private Object upi; @@ -2303,6 +2311,7 @@ public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.extraParams, this.idBankTransfer, this.konbini, + this.pix, this.sepaDebit, this.upi, this.usBankAccount); @@ -2451,6 +2460,24 @@ public Builder setKonbini(EmptyParam konbini) { return this; } + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPix(InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * If paying by {@code pix}, this sub-hash contains details about the Pix payment method + * options to pass to the invoice’s PaymentIntent. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * If paying by {@code sepa_debit}, this sub-hash contains details about the SEPA Direct * Debit payment method options to pass to the invoice’s PaymentIntent. @@ -3666,6 +3693,98 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Pix(AmountIncludesIof amountIncludesIof, Map extraParams) { + this.amountIncludesIof = amountIncludesIof; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private AmountIncludesIof amountIncludesIof; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix build() { + return new InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix( + this.amountIncludesIof, this.extraParams); + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * InvoiceUpdateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -4588,6 +4707,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), @@ -6003,11 +6125,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -6125,25 +6247,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/OrderCreateParams.java b/src/main/java/com/stripe/param/OrderCreateParams.java index b1992b366be..74187534b6f 100644 --- a/src/main/java/com/stripe/param/OrderCreateParams.java +++ b/src/main/java/com/stripe/param/OrderCreateParams.java @@ -623,11 +623,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -637,7 +637,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -733,13 +733,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -753,7 +753,7 @@ public Builder setPostalCode(String postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; @@ -8699,11 +8699,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -8713,7 +8713,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") String state; @@ -8809,13 +8809,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -8829,7 +8829,7 @@ public Builder setPostalCode(String postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; diff --git a/src/main/java/com/stripe/param/OrderUpdateParams.java b/src/main/java/com/stripe/param/OrderUpdateParams.java index 8c027218dd3..79813e0a58e 100644 --- a/src/main/java/com/stripe/param/OrderUpdateParams.java +++ b/src/main/java/com/stripe/param/OrderUpdateParams.java @@ -701,11 +701,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -715,7 +715,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") Object state; @@ -826,25 +826,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -864,7 +864,7 @@ public Builder setPostalCode(EmptyParam postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; @@ -873,7 +873,7 @@ public Builder setState(String state) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(EmptyParam state) { this.state = state; @@ -9321,11 +9321,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -9335,7 +9335,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") Object state; @@ -9446,25 +9446,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -9484,7 +9484,7 @@ public Builder setPostalCode(EmptyParam postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; @@ -9493,7 +9493,7 @@ public Builder setState(String state) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(EmptyParam state) { this.state = state; diff --git a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java index fe6fd0af3d4..42477c19f00 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCaptureParams.java @@ -380,7 +380,7 @@ public Builder setTransferData(PaymentIntentCaptureParams.TransferData transferD @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ @SerializedName("discount_amount") Object discountAmount; @@ -442,13 +442,13 @@ public PaymentIntentCaptureParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; @@ -2971,11 +2971,11 @@ public static class PickupAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3080,13 +3080,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3130,11 +3130,11 @@ public static class ReturnAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3239,13 +3239,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3529,11 +3529,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3638,13 +3638,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5246,11 +5246,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -5353,13 +5353,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java index aee1f368715..4e328804c8b 100644 --- a/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentConfirmParams.java @@ -51,6 +51,10 @@ public class PaymentIntentConfirmParams extends ApiRequestParams { @SerializedName("error_on_requires_action") Boolean errorOnRequiresAction; + /** The list of payment method types to exclude from use with this payment. */ + @SerializedName("excluded_payment_method_types") + Object excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -195,6 +199,7 @@ private PaymentIntentConfirmParams( CaptureMethod captureMethod, String confirmationToken, Boolean errorOnRequiresAction, + Object excludedPaymentMethodTypes, List expand, Map extraParams, String fxQuote, @@ -218,6 +223,7 @@ private PaymentIntentConfirmParams( this.captureMethod = captureMethod; this.confirmationToken = confirmationToken; this.errorOnRequiresAction = errorOnRequiresAction; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; this.fxQuote = fxQuote; @@ -253,6 +259,8 @@ public static class Builder { private Boolean errorOnRequiresAction; + private Object excludedPaymentMethodTypes; + private List expand; private Map extraParams; @@ -297,6 +305,7 @@ public PaymentIntentConfirmParams build() { this.captureMethod, this.confirmationToken, this.errorOnRequiresAction, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, this.fxQuote, @@ -383,6 +392,55 @@ public Builder setErrorOnRequiresAction(Boolean errorOnRequiresAction) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentConfirmParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addExcludedPaymentMethodType( + PaymentIntentConfirmParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentConfirmParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes(EmptyParam excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes( + List excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -680,7 +738,7 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) { @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ @SerializedName("discount_amount") Object discountAmount; @@ -742,13 +800,13 @@ public PaymentIntentConfirmParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; @@ -3644,11 +3702,11 @@ public static class PickupAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3753,13 +3811,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3803,11 +3861,11 @@ public static class ReturnAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3912,13 +3970,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -4202,11 +4260,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -4311,13 +4369,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5919,11 +5977,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -6026,13 +6084,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -7127,6 +7185,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -7301,6 +7366,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -7363,6 +7429,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -7475,6 +7542,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -7559,6 +7628,7 @@ public PaymentIntentConfirmParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -8019,6 +8089,15 @@ public Builder setPaypal(PaymentIntentConfirmParams.PaymentMethodData.Paypal pay return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentIntentConfirmParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo * payment method. @@ -9063,11 +9142,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -9172,13 +9251,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -11589,6 +11668,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodData.Paypay build() { + return new PaymentIntentConfirmParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodData.Paypay#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 Payto { @@ -13169,6 +13306,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), @@ -13525,6 +13665,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Object paypal; + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + @SerializedName("paypay") + Object paypay; + /** * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo * payment method options. @@ -13687,6 +13834,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object paypay, Object payto, Object pix, Object promptpay, @@ -13746,6 +13894,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -13854,6 +14003,8 @@ public static class Builder { private Object paypal; + private Object paypay; + private Object payto; private Object pix; @@ -13933,6 +14084,7 @@ public PaymentIntentConfirmParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -14727,6 +14879,24 @@ public Builder setPaypal(EmptyParam paypal) { return this; } + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(PaymentIntentConfirmParams.PaymentMethodOptions.Paypay paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(EmptyParam paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo * payment method options. @@ -18932,11 +19102,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -19043,13 +19213,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -26004,6 +26174,124 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Controls when the funds are captured from the customer's account. + * + *

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

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentConfirmParams.PaymentMethodOptions.Paypay build() { + return new PaymentIntentConfirmParams.PaymentMethodOptions.Paypay( + this.captureMethod, this.extraParams); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

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

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

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

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentConfirmParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Payto { @@ -30460,11 +30748,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -30567,13 +30855,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -30612,6 +30900,183 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum OffSession implements ApiRequestParams.EnumParam { @SerializedName("one_off") ONE_OFF("one_off"), diff --git a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java index 694d277a256..a5bc099012d 100644 --- a/src/main/java/com/stripe/param/PaymentIntentCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentCreateParams.java @@ -1123,7 +1123,7 @@ public Builder setUseStripeSdk(Boolean useStripeSdk) { @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ @SerializedName("discount_amount") Object discountAmount; @@ -1185,13 +1185,13 @@ public PaymentIntentCreateParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; @@ -4217,11 +4217,11 @@ public static class PickupAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -4326,13 +4326,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -4376,11 +4376,11 @@ public static class ReturnAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -4485,13 +4485,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -4775,11 +4775,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -4884,13 +4884,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -6489,11 +6489,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -6596,13 +6596,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -7692,6 +7692,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -7866,6 +7873,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -7928,6 +7936,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -8040,6 +8049,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -8124,6 +8135,7 @@ public PaymentIntentCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -8579,6 +8591,15 @@ public Builder setPaypal(PaymentIntentCreateParams.PaymentMethodData.Paypal payp return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentIntentCreateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo * payment method. @@ -9616,11 +9637,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -9725,13 +9746,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -12140,6 +12161,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodData.Paypay build() { + return new PaymentIntentCreateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodData.Paypay#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 Payto { @@ -13720,6 +13799,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), @@ -14076,6 +14158,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Object paypal; + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + @SerializedName("paypay") + Object paypay; + /** * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo * payment method options. @@ -14238,6 +14327,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object paypay, Object payto, Object pix, Object promptpay, @@ -14297,6 +14387,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -14405,6 +14496,8 @@ public static class Builder { private Object paypal; + private Object paypay; + private Object payto; private Object pix; @@ -14484,6 +14577,7 @@ public PaymentIntentCreateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -15276,6 +15370,24 @@ public Builder setPaypal(EmptyParam paypal) { return this; } + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(PaymentIntentCreateParams.PaymentMethodOptions.Paypay paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(EmptyParam paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo * payment method options. @@ -19474,11 +19586,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -19585,13 +19697,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -26538,6 +26650,124 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Controls when the funds are captured from the customer's account. + * + *

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

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentCreateParams.PaymentMethodOptions.Paypay build() { + return new PaymentIntentCreateParams.PaymentMethodOptions.Paypay( + this.captureMethod, this.extraParams); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

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

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

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

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentCreateParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Payto { @@ -30985,11 +31215,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -31092,13 +31322,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -31376,6 +31606,9 @@ public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java index 8fd7e5d03e3..7b5b7a5886a 100644 --- a/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentIncrementAuthorizationParams.java @@ -324,7 +324,7 @@ public Builder setTransferData( @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ @SerializedName("discount_amount") Object discountAmount; @@ -386,13 +386,13 @@ public PaymentIntentIncrementAuthorizationParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; diff --git a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java index e0aa8af7518..98d98ae635f 100644 --- a/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentIntentUpdateParams.java @@ -89,6 +89,10 @@ public class PaymentIntentUpdateParams extends ApiRequestParams { @SerializedName("description") Object description; + /** The list of payment method types to exclude from use with this payment. */ + @SerializedName("excluded_payment_method_types") + Object excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -248,6 +252,7 @@ private PaymentIntentUpdateParams( Object customer, Object customerAccount, Object description, + Object excludedPaymentMethodTypes, List expand, Map extraParams, Object fxQuote, @@ -275,6 +280,7 @@ private PaymentIntentUpdateParams( this.customer = customer; this.customerAccount = customerAccount; this.description = description; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.extraParams = extraParams; this.fxQuote = fxQuote; @@ -317,6 +323,8 @@ public static class Builder { private Object description; + private Object excludedPaymentMethodTypes; + private List expand; private Map extraParams; @@ -366,6 +374,7 @@ public PaymentIntentUpdateParams build() { this.customer, this.customerAccount, this.description, + this.excludedPaymentMethodTypes, this.expand, this.extraParams, this.fxQuote, @@ -551,6 +560,55 @@ public Builder setDescription(EmptyParam description) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addExcludedPaymentMethodType( + PaymentIntentUpdateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link PaymentIntentUpdateParams#excludedPaymentMethodTypes} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null + || this.excludedPaymentMethodTypes instanceof EmptyParam) { + this.excludedPaymentMethodTypes = + new ArrayList(); + } + ((List) this.excludedPaymentMethodTypes) + .addAll(elements); + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes(EmptyParam excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + + /** The list of payment method types to exclude from use with this payment. */ + public Builder setExcludedPaymentMethodTypes( + List excludedPaymentMethodTypes) { + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -947,7 +1005,7 @@ public Builder setTransferGroup(EmptyParam transferGroup) { @Getter @EqualsAndHashCode(callSuper = false) public static class AmountDetails { - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ @SerializedName("discount_amount") Object discountAmount; @@ -1009,13 +1067,13 @@ public PaymentIntentUpdateParams.AmountDetails build() { this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(Long discountAmount) { this.discountAmount = discountAmount; return this; } - /** The amount an item was discounted for. */ + /** The total discount applied on the transaction. */ public Builder setDiscountAmount(EmptyParam discountAmount) { this.discountAmount = discountAmount; return this; @@ -3991,11 +4049,11 @@ public static class PickupAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -4115,25 +4173,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -4189,11 +4247,11 @@ public static class ReturnAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -4313,25 +4371,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -4645,11 +4703,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -4769,25 +4827,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -6547,11 +6605,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -6669,25 +6727,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -7837,6 +7895,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -8011,6 +8076,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -8073,6 +8139,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -8185,6 +8252,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -8269,6 +8338,7 @@ public PaymentIntentUpdateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -8724,6 +8794,15 @@ public Builder setPaypal(PaymentIntentUpdateParams.PaymentMethodData.Paypal payp return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentIntentUpdateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo * payment method. @@ -9812,11 +9891,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -9936,25 +10015,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -12422,6 +12501,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodData.Paypay build() { + return new PaymentIntentUpdateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodData.Paypay#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 Payto { @@ -14060,6 +14197,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), @@ -14416,6 +14556,13 @@ public static class PaymentMethodOptions { @SerializedName("paypal") Object paypal; + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + @SerializedName("paypay") + Object paypay; + /** * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo * payment method options. @@ -14578,6 +14725,7 @@ private PaymentMethodOptions( Object payco, Object paynow, Object paypal, + Object paypay, Object payto, Object pix, Object promptpay, @@ -14637,6 +14785,7 @@ private PaymentMethodOptions( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -14745,6 +14894,8 @@ public static class Builder { private Object paypal; + private Object paypay; + private Object payto; private Object pix; @@ -14824,6 +14975,7 @@ public PaymentIntentUpdateParams.PaymentMethodOptions build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -15616,6 +15768,24 @@ public Builder setPaypal(EmptyParam paypal) { return this; } + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(PaymentIntentUpdateParams.PaymentMethodOptions.Paypay paypay) { + this.paypay = paypay; + return this; + } + + /** + * If this is a {@code paypay} PaymentMethod, this sub-hash contains details about the PayPay + * payment method options. + */ + public Builder setPaypay(EmptyParam paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this sub-hash contains details about the PayTo * payment method options. @@ -19911,11 +20081,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -20037,25 +20207,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -27156,6 +27326,124 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Controls when the funds are captured from the customer's account. + * + *

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

If {@code capture_method} is already set on the PaymentIntent, providing an empty value + * for this parameter unsets the stored value for this payment method type. + */ + @SerializedName("capture_method") + ApiRequestParams.EnumParam captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(ApiRequestParams.EnumParam captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApiRequestParams.EnumParam captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentIntentUpdateParams.PaymentMethodOptions.Paypay build() { + return new PaymentIntentUpdateParams.PaymentMethodOptions.Paypay( + this.captureMethod, this.extraParams); + } + + /** + * Controls when the funds are captured from the customer's account. + * + *

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

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

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

If {@code capture_method} is already set on the PaymentIntent, providing an empty + * value for this parameter unsets the stored value for this payment method type. + */ + public Builder setCaptureMethod(EmptyParam captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link PaymentIntentUpdateParams.PaymentMethodOptions.Paypay#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Payto { @@ -31640,11 +31928,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -31762,25 +32050,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -31900,6 +32188,183 @@ public enum CaptureMethod implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("id_bank_transfer") + ID_BANK_TRANSFER("id_bank_transfer"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("stripe_balance") + STRIPE_BALANCE("stripe_balance"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("off_session") OFF_SESSION("off_session"), diff --git a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java index 46706322e48..5e4b9b3a407 100644 --- a/src/main/java/com/stripe/param/PaymentLinkCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkCreateParams.java @@ -3922,19 +3922,28 @@ public static class ProductData { @SerializedName("tax_code") String taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -3954,6 +3963,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public PaymentLinkCreateParams.LineItem.PriceData.ProductData build() { return new PaymentLinkCreateParams.LineItem.PriceData.ProductData( @@ -3962,7 +3973,8 @@ public PaymentLinkCreateParams.LineItem.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -4072,6 +4084,15 @@ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } @@ -6748,6 +6769,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java index 19fe648506c..39b3df23c26 100644 --- a/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentLinkUpdateParams.java @@ -5508,6 +5508,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java index f2c6b35c6d5..f2cc29dee10 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationCreateParams.java @@ -200,6 +200,15 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("fpx") Fpx fpx; + /** + * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered + * by employers for their employees to purchase prepared food and beverages on working days. Check + * this page for more + * details. + */ + @SerializedName("fr_meal_voucher_conecs") + FrMealVoucherConecs frMealVoucherConecs; + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * customers to complete transactions online using their online banking environment, with funds @@ -391,6 +400,10 @@ public class PaymentMethodConfigurationCreateParams extends ApiRequestParams { @SerializedName("paypal") Paypal paypal; + /** Customers can pay with PayPay online or using the PayPay app. */ + @SerializedName("paypay") + Paypay paypay; + /** * PayTo is a real-time payment method * that enables customers in Australia to pay by providing their bank account details. Customers @@ -547,6 +560,7 @@ private PaymentMethodConfigurationCreateParams( List expand, Map extraParams, Fpx fpx, + FrMealVoucherConecs frMealVoucherConecs, Giropay giropay, GooglePay googlePay, Gopay gopay, @@ -571,6 +585,7 @@ private PaymentMethodConfigurationCreateParams( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -608,6 +623,7 @@ private PaymentMethodConfigurationCreateParams( this.expand = expand; this.extraParams = extraParams; this.fpx = fpx; + this.frMealVoucherConecs = frMealVoucherConecs; this.giropay = giropay; this.googlePay = googlePay; this.gopay = gopay; @@ -632,6 +648,7 @@ private PaymentMethodConfigurationCreateParams( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -698,6 +715,8 @@ public static class Builder { private Fpx fpx; + private FrMealVoucherConecs frMealVoucherConecs; + private Giropay giropay; private GooglePay googlePay; @@ -746,6 +765,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -801,6 +822,7 @@ public PaymentMethodConfigurationCreateParams build() { this.expand, this.extraParams, this.fpx, + this.frMealVoucherConecs, this.giropay, this.googlePay, this.gopay, @@ -825,6 +847,7 @@ public PaymentMethodConfigurationCreateParams build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -1112,6 +1135,18 @@ public Builder setFpx(PaymentMethodConfigurationCreateParams.Fpx fpx) { return this; } + /** + * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered + * by employers for their employees to purchase prepared food and beverages on working days. + * Check this page for + * more details. + */ + public Builder setFrMealVoucherConecs( + PaymentMethodConfigurationCreateParams.FrMealVoucherConecs frMealVoucherConecs) { + this.frMealVoucherConecs = frMealVoucherConecs; + return this; + } + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * customers to complete transactions online using their online banking environment, with funds @@ -1355,6 +1390,12 @@ public Builder setPaypal(PaymentMethodConfigurationCreateParams.Paypal paypal) { return this; } + /** Customers can pay with PayPay online or using the PayPay app. */ + public Builder setPaypay(PaymentMethodConfigurationCreateParams.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * PayTo is a real-time payment method * that enables customers in Australia to pay by providing their bank account details. Customers @@ -4838,6 +4879,176 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrMealVoucherConecs { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private FrMealVoucherConecs( + DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.FrMealVoucherConecs build() { + return new PaymentMethodConfigurationCreateParams.FrMealVoucherConecs( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference + displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationCreateParams.FrMealVoucherConecs#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationCreateParams.FrMealVoucherConecs#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference + build() { + return new PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationCreateParams.FrMealVoucherConecs.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Giropay { @@ -8479,6 +8690,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Paypay build() { + return new PaymentMethodConfigurationCreateParams.Paypay( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationCreateParams.Paypay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationCreateParams.Paypay#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference build() { + return new PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationCreateParams.Paypay.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Payto { diff --git a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java index 05042f7db44..1928a9e1e73 100644 --- a/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodConfigurationUpdateParams.java @@ -205,6 +205,15 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("fpx") Fpx fpx; + /** + * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered + * by employers for their employees to purchase prepared food and beverages on working days. Check + * this page for more + * details. + */ + @SerializedName("fr_meal_voucher_conecs") + FrMealVoucherConecs frMealVoucherConecs; + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * customers to complete transactions online using their online banking environment, with funds @@ -392,6 +401,10 @@ public class PaymentMethodConfigurationUpdateParams extends ApiRequestParams { @SerializedName("paypal") Paypal paypal; + /** Customers can pay with PayPay online or using the PayPay app. */ + @SerializedName("paypay") + Paypay paypay; + /** * PayTo is a real-time payment method * that enables customers in Australia to pay by providing their bank account details. Customers @@ -549,6 +562,7 @@ private PaymentMethodConfigurationUpdateParams( List expand, Map extraParams, Fpx fpx, + FrMealVoucherConecs frMealVoucherConecs, Giropay giropay, GooglePay googlePay, Gopay gopay, @@ -572,6 +586,7 @@ private PaymentMethodConfigurationUpdateParams( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -610,6 +625,7 @@ private PaymentMethodConfigurationUpdateParams( this.expand = expand; this.extraParams = extraParams; this.fpx = fpx; + this.frMealVoucherConecs = frMealVoucherConecs; this.giropay = giropay; this.googlePay = googlePay; this.gopay = gopay; @@ -633,6 +649,7 @@ private PaymentMethodConfigurationUpdateParams( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -701,6 +718,8 @@ public static class Builder { private Fpx fpx; + private FrMealVoucherConecs frMealVoucherConecs; + private Giropay giropay; private GooglePay googlePay; @@ -747,6 +766,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -803,6 +824,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.expand, this.extraParams, this.fpx, + this.frMealVoucherConecs, this.giropay, this.googlePay, this.gopay, @@ -826,6 +848,7 @@ public PaymentMethodConfigurationUpdateParams build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -1119,6 +1142,18 @@ public Builder setFpx(PaymentMethodConfigurationUpdateParams.Fpx fpx) { return this; } + /** + * Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered + * by employers for their employees to purchase prepared food and beverages on working days. + * Check this page for + * more details. + */ + public Builder setFrMealVoucherConecs( + PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs frMealVoucherConecs) { + this.frMealVoucherConecs = frMealVoucherConecs; + return this; + } + /** * giropay is a German payment method based on online banking, introduced in 2006. It allows * customers to complete transactions online using their online banking environment, with funds @@ -1362,6 +1397,12 @@ public Builder setPaypal(PaymentMethodConfigurationUpdateParams.Paypal paypal) { return this; } + /** Customers can pay with PayPay online or using the PayPay app. */ + public Builder setPaypay(PaymentMethodConfigurationUpdateParams.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * PayTo is a real-time payment method * that enables customers in Australia to pay by providing their bank account details. Customers @@ -4845,6 +4886,176 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class FrMealVoucherConecs { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private FrMealVoucherConecs( + DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs build() { + return new PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference + displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference + build() { + return new PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationUpdateParams.FrMealVoucherConecs.DisplayPreference.Preference + preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Giropay { @@ -8486,6 +8697,171 @@ public enum Preference implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** Whether or not the payment method should be displayed. */ + @SerializedName("display_preference") + DisplayPreference displayPreference; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Paypay(DisplayPreference displayPreference, Map extraParams) { + this.displayPreference = displayPreference; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private DisplayPreference displayPreference; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Paypay build() { + return new PaymentMethodConfigurationUpdateParams.Paypay( + this.displayPreference, this.extraParams); + } + + /** Whether or not the payment method should be displayed. */ + public Builder setDisplayPreference( + PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference displayPreference) { + this.displayPreference = displayPreference; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodConfigurationUpdateParams.Paypay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodConfigurationUpdateParams.Paypay#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DisplayPreference { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The account's preference for whether or not to display this payment method. */ + @SerializedName("preference") + Preference preference; + + private DisplayPreference(Map extraParams, Preference preference) { + this.extraParams = extraParams; + this.preference = preference; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Preference preference; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference build() { + return new PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference( + this.extraParams, this.preference); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The account's preference for whether or not to display this payment method. */ + public Builder setPreference( + PaymentMethodConfigurationUpdateParams.Paypay.DisplayPreference.Preference preference) { + this.preference = preference; + return this; + } + } + + public enum Preference implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"), + + @SerializedName("off") + OFF("off"), + + @SerializedName("on") + ON("on"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Preference(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Payto { diff --git a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java index a496774aac2..352519ee9ce 100644 --- a/src/main/java/com/stripe/param/PaymentMethodCreateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodCreateParams.java @@ -338,6 +338,13 @@ public class PaymentMethodCreateParams extends ApiRequestParams { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay payment + * method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -515,6 +522,7 @@ private PaymentMethodCreateParams( String paymentMethod, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -581,6 +589,7 @@ private PaymentMethodCreateParams( this.paymentMethod = paymentMethod; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -701,6 +710,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -789,6 +800,7 @@ public PaymentMethodCreateParams build() { this.paymentMethod, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -1296,6 +1308,15 @@ public Builder setPaypal(PaymentMethodCreateParams.Paypal paypal) { return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(PaymentMethodCreateParams.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -2305,11 +2326,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2412,13 +2433,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -4994,6 +5015,62 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-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 Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentMethodCreateParams.Paypay build() { + return new PaymentMethodCreateParams.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentMethodCreateParams.Paypay#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentMethodCreateParams.Paypay#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 Payto { @@ -6611,6 +6688,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/PaymentMethodListParams.java b/src/main/java/com/stripe/param/PaymentMethodListParams.java index b74c269ad92..9993da80ca3 100644 --- a/src/main/java/com/stripe/param/PaymentMethodListParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodListParams.java @@ -330,6 +330,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java index 7c65ea56e76..4c887f09849 100644 --- a/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java +++ b/src/main/java/com/stripe/param/PaymentMethodUpdateParams.java @@ -47,13 +47,6 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - @SerializedName("link") - Link link; - /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -63,13 +56,6 @@ public class PaymentMethodUpdateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the PayByBank - * payment method. - */ - @SerializedName("pay_by_bank") - PayByBank payByBank; - /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -90,9 +76,7 @@ private PaymentMethodUpdateParams( Card card, List expand, Map extraParams, - Link link, Object metadata, - PayByBank payByBank, Payto payto, UsBankAccount usBankAccount) { this.allowRedisplay = allowRedisplay; @@ -100,9 +84,7 @@ private PaymentMethodUpdateParams( this.card = card; this.expand = expand; this.extraParams = extraParams; - this.link = link; this.metadata = metadata; - this.payByBank = payByBank; this.payto = payto; this.usBankAccount = usBankAccount; } @@ -122,12 +104,8 @@ public static class Builder { private Map extraParams; - private Link link; - private Object metadata; - private PayByBank payByBank; - private Payto payto; private UsBankAccount usBankAccount; @@ -140,9 +118,7 @@ public PaymentMethodUpdateParams build() { this.card, this.expand, this.extraParams, - this.link, this.metadata, - this.payByBank, this.payto, this.usBankAccount); } @@ -225,15 +201,6 @@ public Builder putAllExtraParam(Map map) { return this; } - /** - * If this is an {@code Link} PaymentMethod, this hash contains details about the Link payment - * method. - */ - public Builder setLink(PaymentMethodUpdateParams.Link link) { - this.link = link; - return this; - } - /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -284,15 +251,6 @@ public Builder setMetadata(Map metadata) { return this; } - /** - * If this is a {@code pay_by_bank} PaymentMethod, this hash contains details about the - * PayByBank payment method. - */ - public Builder setPayByBank(PaymentMethodUpdateParams.PayByBank payByBank) { - this.payByBank = payByBank; - return this; - } - /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -502,11 +460,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -624,25 +582,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -878,118 +836,6 @@ public enum Preferred implements ApiRequestParams.EnumParam { } } - @Getter - @EqualsAndHashCode(callSuper = false) - public static class Link { - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-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 Link(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodUpdateParams.Link build() { - return new PaymentMethodUpdateParams.Link(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentMethodUpdateParams.Link#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentMethodUpdateParams.Link#extraParams} for the field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.putAll(map); - return this; - } - } - } - - @Getter - @EqualsAndHashCode(callSuper = false) - public static class PayByBank { - /** - * Map of extra parameters for custom features not available in this client library. The content - * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each - * key/value pair is serialized as if the key is a root-level field (serialized) name in this - * param object. Effectively, this map is flattened to its parent instance. - */ - @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) - Map extraParams; - - private PayByBank(Map extraParams) { - this.extraParams = extraParams; - } - - public static Builder builder() { - return new Builder(); - } - - public static class Builder { - private Map extraParams; - - /** Finalize and obtain parameter instance from this builder. */ - public PaymentMethodUpdateParams.PayByBank build() { - return new PaymentMethodUpdateParams.PayByBank(this.extraParams); - } - - /** - * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` - * call, and subsequent calls add additional key/value pairs to the original map. See {@link - * PaymentMethodUpdateParams.PayByBank#extraParams} for the field documentation. - */ - public Builder putExtraParam(String key, Object value) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); - } - this.extraParams.put(key, value); - return this; - } - - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. - * See {@link PaymentMethodUpdateParams.PayByBank#extraParams} for the field documentation. - */ - 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 Payto { diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java new file mode 100644 index 00000000000..1aaf61e2087 --- /dev/null +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptInformationalParams.java @@ -0,0 +1,604 @@ +// File generated from our OpenAPI spec +package com.stripe.param; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PaymentRecordReportPaymentAttemptInformationalParams extends ApiRequestParams { + /** Customer information for this payment. */ + @SerializedName("customer_details") + CustomerDetails customerDetails; + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + @SerializedName("description") + Object description; + + /** Specifies which fields in the response should be expanded. */ + @SerializedName("expand") + List expand; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys can + * be unset by posting an empty value to {@code metadata}. + */ + @SerializedName("metadata") + Object metadata; + + /** Shipping information for this payment. */ + @SerializedName("shipping_details") + Object shippingDetails; + + private PaymentRecordReportPaymentAttemptInformationalParams( + CustomerDetails customerDetails, + Object description, + List expand, + Map extraParams, + Object metadata, + Object shippingDetails) { + this.customerDetails = customerDetails; + this.description = description; + this.expand = expand; + this.extraParams = extraParams; + this.metadata = metadata; + this.shippingDetails = shippingDetails; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CustomerDetails customerDetails; + + private Object description; + + private List expand; + + private Map extraParams; + + private Object metadata; + + private Object shippingDetails; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptInformationalParams build() { + return new PaymentRecordReportPaymentAttemptInformationalParams( + this.customerDetails, + this.description, + this.expand, + this.extraParams, + this.metadata, + this.shippingDetails); + } + + /** Customer information for this payment. */ + public Builder setCustomerDetails( + PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails customerDetails) { + this.customerDetails = customerDetails; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(String description) { + this.description = description; + return this; + } + + /** An arbitrary string attached to the object. Often useful for displaying to users. */ + public Builder setDescription(EmptyParam description) { + this.description = description; + return this; + } + + /** + * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentRecordReportPaymentAttemptInformationalParams#expand} for the field documentation. + */ + public Builder addExpand(String element) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.add(element); + return this; + } + + /** + * Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and + * subsequent calls adds additional elements to the original list. See {@link + * PaymentRecordReportPaymentAttemptInformationalParams#expand} for the field documentation. + */ + public Builder addAllExpand(List elements) { + if (this.expand == null) { + this.expand = new ArrayList<>(); + } + this.expand.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportPaymentAttemptInformationalParams#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptInformationalParams#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportPaymentAttemptInformationalParams#metadata} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder putMetadata(String key, String value) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PaymentRecordReportPaymentAttemptInformationalParams#metadata} for the field + * documentation. + */ + @SuppressWarnings("unchecked") + public Builder putAllMetadata(Map map) { + if (this.metadata == null || this.metadata instanceof EmptyParam) { + this.metadata = new HashMap(); + } + ((Map) this.metadata).putAll(map); + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(EmptyParam metadata) { + this.metadata = metadata; + return this; + } + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. Individual keys can be unset by posting an empty value to them. All keys + * can be unset by posting an empty value to {@code metadata}. + */ + public Builder setMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** Shipping information for this payment. */ + public Builder setShippingDetails( + PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + + /** Shipping information for this payment. */ + public Builder setShippingDetails(EmptyParam shippingDetails) { + this.shippingDetails = shippingDetails; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerDetails { + /** The customer who made the payment. */ + @SerializedName("customer") + String customer; + + /** The customer's phone number. */ + @SerializedName("email") + String email; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The customer's name. */ + @SerializedName("name") + String name; + + /** The customer's phone number. */ + @SerializedName("phone") + String phone; + + private CustomerDetails( + String customer, String email, Map extraParams, String name, String phone) { + this.customer = customer; + this.email = email; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String customer; + + private String email; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails build() { + return new PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails( + this.customer, this.email, this.extraParams, this.name, this.phone); + } + + /** The customer who made the payment. */ + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + /** The customer's phone number. */ + public Builder setEmail(String email) { + this.email = email; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link + * PaymentRecordReportPaymentAttemptInformationalParams.CustomerDetails#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The customer's name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The customer's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class ShippingDetails { + /** The physical shipping address. */ + @SerializedName("address") + Address address; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The shipping recipient's name. */ + @SerializedName("name") + String name; + + /** The shipping recipient's phone number. */ + @SerializedName("phone") + String phone; + + private ShippingDetails( + Address address, Map extraParams, String name, String phone) { + this.address = address; + this.extraParams = extraParams; + this.name = name; + this.phone = phone; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Address address; + + private Map extraParams; + + private String name; + + private String phone; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails build() { + return new PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails( + this.address, this.extraParams, this.name, this.phone); + } + + /** The physical shipping address. */ + public Builder setAddress( + PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.Address address) { + this.address = address; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link + * PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The shipping recipient's name. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** The shipping recipient's phone number. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Address { + /** City, district, suburb, town, or village. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Address line 1, such as the street, PO Box, or company name. */ + @SerializedName("line1") + String line1; + + /** Address line 2, such as the apartment, suite, unit, or building. */ + @SerializedName("line2") + String line2; + + /** ZIP or postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** State, county, province, or region. */ + @SerializedName("state") + String state; + + private Address( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + /** Finalize and obtain parameter instance from this builder. */ + public PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.Address + build() { + return new PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.Address( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state); + } + + /** City, district, suburb, town, or village. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.Address#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * PaymentRecordReportPaymentAttemptInformationalParams.ShippingDetails.Address#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Address line 1, such as the street, PO Box, or company name. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Address line 2, such as the apartment, suite, unit, or building. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** ZIP or postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** State, county, province, or region. */ + public Builder setState(String state) { + this.state = state; + return this; + } + } + } + } +} diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java index 3a4061d3c95..aedcfec9878 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentAttemptParams.java @@ -704,11 +704,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -815,13 +815,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1068,11 +1068,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1177,13 +1177,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java index 70624d0bc9b..9ec23aaca3d 100644 --- a/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java +++ b/src/main/java/com/stripe/param/PaymentRecordReportPaymentParams.java @@ -974,11 +974,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1084,13 +1084,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1515,11 +1515,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1622,13 +1622,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java index c8177d6b621..0f874ddb3dd 100644 --- a/src/main/java/com/stripe/param/PersonCollectionCreateParams.java +++ b/src/main/java/com/stripe/param/PersonCollectionCreateParams.java @@ -886,11 +886,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -991,13 +991,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1877,11 +1877,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1983,13 +1983,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/PersonUpdateParams.java b/src/main/java/com/stripe/param/PersonUpdateParams.java index 4b9b6011e56..72ac9d708e6 100644 --- a/src/main/java/com/stripe/param/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/PersonUpdateParams.java @@ -996,11 +996,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1116,25 +1116,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -2111,11 +2111,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2231,25 +2231,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/PromotionCodeCreateParams.java b/src/main/java/com/stripe/param/PromotionCodeCreateParams.java index f400937f347..ae40efcba17 100644 --- a/src/main/java/com/stripe/param/PromotionCodeCreateParams.java +++ b/src/main/java/com/stripe/param/PromotionCodeCreateParams.java @@ -27,10 +27,6 @@ public class PromotionCodeCreateParams extends ApiRequestParams { @SerializedName("code") String code; - /** Required. The coupon for this promotion code. */ - @SerializedName("coupon") - String coupon; - /** * The customer that this promotion code can be used by. If not set, the promotion code can be * used by all customers. @@ -82,6 +78,10 @@ public class PromotionCodeCreateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** Required. The promotion referenced by this promotion code. */ + @SerializedName("promotion") + Promotion promotion; + /** Settings that restrict the redemption of the promotion code. */ @SerializedName("restrictions") Restrictions restrictions; @@ -89,7 +89,6 @@ public class PromotionCodeCreateParams extends ApiRequestParams { private PromotionCodeCreateParams( Boolean active, String code, - String coupon, String customer, String customerAccount, List expand, @@ -97,10 +96,10 @@ private PromotionCodeCreateParams( Map extraParams, Long maxRedemptions, Map metadata, + Promotion promotion, Restrictions restrictions) { this.active = active; this.code = code; - this.coupon = coupon; this.customer = customer; this.customerAccount = customerAccount; this.expand = expand; @@ -108,6 +107,7 @@ private PromotionCodeCreateParams( this.extraParams = extraParams; this.maxRedemptions = maxRedemptions; this.metadata = metadata; + this.promotion = promotion; this.restrictions = restrictions; } @@ -120,8 +120,6 @@ public static class Builder { private String code; - private String coupon; - private String customer; private String customerAccount; @@ -136,6 +134,8 @@ public static class Builder { private Map metadata; + private Promotion promotion; + private Restrictions restrictions; /** Finalize and obtain parameter instance from this builder. */ @@ -143,7 +143,6 @@ public PromotionCodeCreateParams build() { return new PromotionCodeCreateParams( this.active, this.code, - this.coupon, this.customer, this.customerAccount, this.expand, @@ -151,6 +150,7 @@ public PromotionCodeCreateParams build() { this.extraParams, this.maxRedemptions, this.metadata, + this.promotion, this.restrictions); } @@ -172,12 +172,6 @@ public Builder setCode(String code) { return this; } - /** Required. The coupon for this promotion code. */ - public Builder setCoupon(String coupon) { - this.coupon = coupon; - return this; - } - /** * The customer that this promotion code can be used by. If not set, the promotion code can be * used by all customers. @@ -293,6 +287,12 @@ public Builder putAllMetadata(Map map) { return this; } + /** Required. The promotion referenced by this promotion code. */ + public Builder setPromotion(PromotionCodeCreateParams.Promotion promotion) { + this.promotion = promotion; + return this; + } + /** Settings that restrict the redemption of the promotion code. */ public Builder setRestrictions(PromotionCodeCreateParams.Restrictions restrictions) { this.restrictions = restrictions; @@ -300,6 +300,100 @@ public Builder setRestrictions(PromotionCodeCreateParams.Restrictions restrictio } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Promotion { + /** If promotion {@code type} is {@code coupon}, the coupon for this promotion code. */ + @SerializedName("coupon") + String coupon; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Specifies the type of promotion. */ + @SerializedName("type") + Type type; + + private Promotion(String coupon, Map extraParams, Type type) { + this.coupon = coupon; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String coupon; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public PromotionCodeCreateParams.Promotion build() { + return new PromotionCodeCreateParams.Promotion(this.coupon, this.extraParams, this.type); + } + + /** If promotion {@code type} is {@code coupon}, the coupon for this promotion code. */ + public Builder setCoupon(String coupon) { + this.coupon = coupon; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PromotionCodeCreateParams.Promotion#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PromotionCodeCreateParams.Promotion#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Specifies the type of promotion. */ + public Builder setType(PromotionCodeCreateParams.Promotion.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("coupon") + COUPON("coupon"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Restrictions { diff --git a/src/main/java/com/stripe/param/QuoteCreateParams.java b/src/main/java/com/stripe/param/QuoteCreateParams.java index c1c3b023175..a4732031f50 100644 --- a/src/main/java/com/stripe/param/QuoteCreateParams.java +++ b/src/main/java/com/stripe/param/QuoteCreateParams.java @@ -7561,15 +7561,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -7580,11 +7585,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public QuoteCreateParams.SubscriptionData.BillingMode build() { - return new QuoteCreateParams.SubscriptionData.BillingMode(this.extraParams, this.type); + return new QuoteCreateParams.SubscriptionData.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -7615,9 +7623,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + QuoteCreateParams.SubscriptionData.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(QuoteCreateParams.SubscriptionData.BillingMode.Type type) { this.type = type; @@ -7625,6 +7640,100 @@ public Builder setType(QuoteCreateParams.SubscriptionData.BillingMode.Type type) } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public QuoteCreateParams.SubscriptionData.BillingMode.Flexible build() { + return new QuoteCreateParams.SubscriptionData.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link QuoteCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link QuoteCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + QuoteCreateParams.SubscriptionData.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), diff --git a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java index f1698e587e2..fb7e37c33ca 100644 --- a/src/main/java/com/stripe/param/SetupIntentConfirmParams.java +++ b/src/main/java/com/stripe/param/SetupIntentConfirmParams.java @@ -933,6 +933,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -1107,6 +1114,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -1169,6 +1177,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -1281,6 +1290,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -1365,6 +1376,7 @@ public SetupIntentConfirmParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -1820,6 +1832,15 @@ public Builder setPaypal(SetupIntentConfirmParams.PaymentMethodData.Paypal paypa return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(SetupIntentConfirmParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo * payment method. @@ -2857,11 +2878,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2966,13 +2987,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5381,6 +5402,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentConfirmParams.PaymentMethodData.Paypay build() { + return new SetupIntentConfirmParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentConfirmParams.PaymentMethodData.Paypay#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 Payto { @@ -6961,6 +7040,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/SetupIntentCreateParams.java b/src/main/java/com/stripe/param/SetupIntentCreateParams.java index 226bf81722d..80ddcb778a9 100644 --- a/src/main/java/com/stripe/param/SetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentCreateParams.java @@ -1434,6 +1434,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -1608,6 +1615,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -1670,6 +1678,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -1782,6 +1791,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -1866,6 +1877,7 @@ public SetupIntentCreateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -2320,6 +2332,15 @@ public Builder setPaypal(SetupIntentCreateParams.PaymentMethodData.Paypal paypal return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(SetupIntentCreateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo * payment method. @@ -3357,11 +3378,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3466,13 +3487,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5879,6 +5900,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentCreateParams.PaymentMethodData.Paypay build() { + return new SetupIntentCreateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentCreateParams.PaymentMethodData.Paypay#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 Payto { @@ -7458,6 +7537,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java index ad042cd993f..d4f25238692 100644 --- a/src/main/java/com/stripe/param/SetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/SetupIntentUpdateParams.java @@ -782,6 +782,13 @@ public static class PaymentMethodData { @SerializedName("paypal") Paypal paypal; + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + @SerializedName("paypay") + Paypay paypay; + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo payment * method. @@ -956,6 +963,7 @@ private PaymentMethodData( Payco payco, Paynow paynow, Paypal paypal, + Paypay paypay, Payto payto, Pix pix, Promptpay promptpay, @@ -1018,6 +1026,7 @@ private PaymentMethodData( this.payco = payco; this.paynow = paynow; this.paypal = paypal; + this.paypay = paypay; this.payto = payto; this.pix = pix; this.promptpay = promptpay; @@ -1130,6 +1139,8 @@ public static class Builder { private Paypal paypal; + private Paypay paypay; + private Payto payto; private Pix pix; @@ -1214,6 +1225,7 @@ public SetupIntentUpdateParams.PaymentMethodData build() { this.payco, this.paynow, this.paypal, + this.paypay, this.payto, this.pix, this.promptpay, @@ -1668,6 +1680,15 @@ public Builder setPaypal(SetupIntentUpdateParams.PaymentMethodData.Paypal paypal return this; } + /** + * If this is a {@code paypay} PaymentMethod, this hash contains details about the PayPay + * payment method. + */ + public Builder setPaypay(SetupIntentUpdateParams.PaymentMethodData.Paypay paypay) { + this.paypay = paypay; + return this; + } + /** * If this is a {@code payto} PaymentMethod, this hash contains details about the PayTo * payment method. @@ -2756,11 +2777,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -2880,25 +2901,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -5364,6 +5385,64 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Paypay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 Paypay(Map extraParams) { + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SetupIntentUpdateParams.PaymentMethodData.Paypay build() { + return new SetupIntentUpdateParams.PaymentMethodData.Paypay(this.extraParams); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.Paypay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SetupIntentUpdateParams.PaymentMethodData.Paypay#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 Payto { @@ -7001,6 +7080,9 @@ public enum Type implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/SourceCreateParams.java b/src/main/java/com/stripe/param/SourceCreateParams.java index fde41519cae..6e8f469e17e 100644 --- a/src/main/java/com/stripe/param/SourceCreateParams.java +++ b/src/main/java/com/stripe/param/SourceCreateParams.java @@ -1196,11 +1196,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1303,13 +1303,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -1951,11 +1951,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2058,13 +2060,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/SourceUpdateParams.java b/src/main/java/com/stripe/param/SourceUpdateParams.java index 0688c705693..f8544e86199 100644 --- a/src/main/java/com/stripe/param/SourceUpdateParams.java +++ b/src/main/java/com/stripe/param/SourceUpdateParams.java @@ -1073,11 +1073,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1195,25 +1195,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1734,11 +1734,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1856,25 +1858,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/SubscriptionCreateParams.java b/src/main/java/com/stripe/param/SubscriptionCreateParams.java index 09544122943..7853fd2996a 100644 --- a/src/main/java/com/stripe/param/SubscriptionCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionCreateParams.java @@ -66,7 +66,7 @@ public class SubscriptionCreateParams extends ApiRequestParams { /** * Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price - * intervals. When provided, the billing_cycle_anchor is set to the next occurence of the + * intervals. When provided, the billing_cycle_anchor is set to the next occurrence of the * day_of_month at the hour, minute, and second UTC. */ @SerializedName("billing_cycle_anchor_config") @@ -76,6 +76,10 @@ public class SubscriptionCreateParams extends ApiRequestParams { @SerializedName("billing_mode") BillingMode billingMode; + /** Sets the billing schedules for the subscription. */ + @SerializedName("billing_schedules") + List billingSchedules; + /** * Define thresholds at which an invoice will be sent, and the subscription advanced to a new * billing period. When updating, pass an empty string to remove previously-defined thresholds. @@ -329,6 +333,7 @@ private SubscriptionCreateParams( Long billingCycleAnchor, BillingCycleAnchorConfig billingCycleAnchorConfig, BillingMode billingMode, + List billingSchedules, Object billingThresholds, Object cancelAt, Boolean cancelAtPeriodEnd, @@ -367,6 +372,7 @@ private SubscriptionCreateParams( this.billingCycleAnchor = billingCycleAnchor; this.billingCycleAnchorConfig = billingCycleAnchorConfig; this.billingMode = billingMode; + this.billingSchedules = billingSchedules; this.billingThresholds = billingThresholds; this.cancelAt = cancelAt; this.cancelAtPeriodEnd = cancelAtPeriodEnd; @@ -420,6 +426,8 @@ public static class Builder { private BillingMode billingMode; + private List billingSchedules; + private Object billingThresholds; private Object cancelAt; @@ -491,6 +499,7 @@ public SubscriptionCreateParams build() { this.billingCycleAnchor, this.billingCycleAnchorConfig, this.billingMode, + this.billingSchedules, this.billingThresholds, this.cancelAt, this.cancelAtPeriodEnd, @@ -616,7 +625,7 @@ public Builder setBillingCycleAnchor(Long billingCycleAnchor) { /** * Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price - * intervals. When provided, the billing_cycle_anchor is set to the next occurence of the + * intervals. When provided, the billing_cycle_anchor is set to the next occurrence of the * day_of_month at the hour, minute, and second UTC. */ public Builder setBillingCycleAnchorConfig( @@ -631,6 +640,32 @@ public Builder setBillingMode(SubscriptionCreateParams.BillingMode billingMode) return this; } + /** + * Add an element to `billingSchedules` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionCreateParams#billingSchedules} for the field documentation. + */ + public Builder addBillingSchedule(SubscriptionCreateParams.BillingSchedule element) { + if (this.billingSchedules == null) { + this.billingSchedules = new ArrayList<>(); + } + this.billingSchedules.add(element); + return this; + } + + /** + * Add all elements to `billingSchedules` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionCreateParams#billingSchedules} for the field documentation. + */ + public Builder addAllBillingSchedule(List elements) { + if (this.billingSchedules == null) { + this.billingSchedules = new ArrayList<>(); + } + this.billingSchedules.addAll(elements); + return this; + } + /** * Define thresholds at which an invoice will be sent, and the subscription advanced to a new * billing period. When updating, pass an empty string to remove previously-defined thresholds. @@ -1186,8 +1221,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} defaults + * to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -1348,8 +1384,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod(SubscriptionCreateParams.AddInvoiceItem.Period period) { this.period = period; @@ -2642,15 +2679,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -2661,11 +2703,13 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionCreateParams.BillingMode build() { - return new SubscriptionCreateParams.BillingMode(this.extraParams, this.type); + return new SubscriptionCreateParams.BillingMode(this.extraParams, this.flexible, this.type); } /** @@ -2690,32 +2734,596 @@ public Builder putAllExtraParam(Map map) { if (this.extraParams == null) { this.extraParams = new HashMap<>(); } - this.extraParams.putAll(map); - return this; - } + this.extraParams.putAll(map); + return this; + } + + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible(SubscriptionCreateParams.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + + /** + * Required. Controls the calculation and orchestration of prorations and + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. + */ + public Builder setType(SubscriptionCreateParams.BillingMode.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls how invoices and invoice items display proration amounts and discount amounts. */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.BillingMode.Flexible build() { + return new SubscriptionCreateParams.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionCreateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionCreateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SubscriptionCreateParams.BillingMode.Flexible.ProrationDiscounts prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("classic") + CLASSIC("classic"), + + @SerializedName("flexible") + FLEXIBLE("flexible"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingSchedule { + /** Configure billing schedule differently for individual subscription items. */ + @SerializedName("applies_to") + List appliesTo; + + /** Required. The end date for the billing schedule. */ + @SerializedName("bill_until") + BillUntil billUntil; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to + * 200 characters. If not provided, a unique key will be generated. + */ + @SerializedName("key") + String key; + + private BillingSchedule( + List appliesTo, + BillUntil billUntil, + Map extraParams, + String key) { + this.appliesTo = appliesTo; + this.billUntil = billUntil; + this.extraParams = extraParams; + this.key = key; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List appliesTo; + + private BillUntil billUntil; + + private Map extraParams; + + private String key; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.BillingSchedule build() { + return new SubscriptionCreateParams.BillingSchedule( + this.appliesTo, this.billUntil, this.extraParams, this.key); + } + + /** + * Add an element to `appliesTo` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionCreateParams.BillingSchedule#appliesTo} for the field documentation. + */ + public Builder addAppliesTo(SubscriptionCreateParams.BillingSchedule.AppliesTo element) { + if (this.appliesTo == null) { + this.appliesTo = new ArrayList<>(); + } + this.appliesTo.add(element); + return this; + } + + /** + * Add all elements to `appliesTo` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionCreateParams.BillingSchedule#appliesTo} for the field documentation. + */ + public Builder addAllAppliesTo( + List elements) { + if (this.appliesTo == null) { + this.appliesTo = new ArrayList<>(); + } + this.appliesTo.addAll(elements); + return this; + } + + /** Required. The end date for the billing schedule. */ + public Builder setBillUntil(SubscriptionCreateParams.BillingSchedule.BillUntil billUntil) { + this.billUntil = billUntil; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SubscriptionCreateParams.BillingSchedule#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SubscriptionCreateParams.BillingSchedule#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up + * to 200 characters. If not provided, a unique key will be generated. + */ + public Builder setKey(String key) { + this.key = key; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AppliesTo { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 price object. */ + @SerializedName("price") + String price; + + /** + * Required. Controls which subscription items the billing schedule applies + * to. + */ + @SerializedName("type") + Type type; + + private AppliesTo(Map extraParams, String price, Type type) { + this.extraParams = extraParams; + this.price = price; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String price; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.BillingSchedule.AppliesTo build() { + return new SubscriptionCreateParams.BillingSchedule.AppliesTo( + this.extraParams, this.price, 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 SubscriptionCreateParams.BillingSchedule.AppliesTo#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionCreateParams.BillingSchedule.AppliesTo#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 price object. */ + public Builder setPrice(String price) { + this.price = price; + return this; + } + + /** + * Required. Controls which subscription items the billing schedule applies + * to. + */ + public Builder setType(SubscriptionCreateParams.BillingSchedule.AppliesTo.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("price") + PRICE("price"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillUntil { + /** Specifies the billing period. */ + @SerializedName("duration") + Duration duration; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 end date of the billing schedule. */ + @SerializedName("timestamp") + Long timestamp; + + /** + * Required. Describes how the billing schedule will determine the end date. + * Either {@code duration} or {@code timestamp}. + */ + @SerializedName("type") + Type type; + + private BillUntil( + Duration duration, Map extraParams, Long timestamp, Type type) { + this.duration = duration; + this.extraParams = extraParams; + this.timestamp = timestamp; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Duration duration; + + private Map extraParams; + + private Long timestamp; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.BillingSchedule.BillUntil build() { + return new SubscriptionCreateParams.BillingSchedule.BillUntil( + this.duration, this.extraParams, this.timestamp, this.type); + } + + /** Specifies the billing period. */ + public Builder setDuration( + SubscriptionCreateParams.BillingSchedule.BillUntil.Duration duration) { + this.duration = duration; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionCreateParams.BillingSchedule.BillUntil#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionCreateParams.BillingSchedule.BillUntil#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 end date of the billing schedule. */ + public Builder setTimestamp(Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Required. Describes how the billing schedule will determine the end + * date. Either {@code duration} or {@code timestamp}. + */ + public Builder setType(SubscriptionCreateParams.BillingSchedule.BillUntil.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Duration { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Specifies billing duration. Either {@code day}, {@code week}, + * {@code month} or {@code year}. + */ + @SerializedName("interval") + Interval interval; + + /** The multiplier applied to the interval. */ + @SerializedName("interval_count") + Long intervalCount; + + private Duration(Map extraParams, Interval interval, Long intervalCount) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.BillingSchedule.BillUntil.Duration build() { + return new SubscriptionCreateParams.BillingSchedule.BillUntil.Duration( + this.extraParams, this.interval, this.intervalCount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionCreateParams.BillingSchedule.BillUntil.Duration#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionCreateParams.BillingSchedule.BillUntil.Duration#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Specifies billing duration. Either {@code day}, {@code + * week}, {@code month} or {@code year}. + */ + public Builder setInterval( + SubscriptionCreateParams.BillingSchedule.BillUntil.Duration.Interval interval) { + this.interval = interval; + return this; + } + + /** The multiplier applied to the interval. */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; + } + } - /** - * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. - */ - public Builder setType(SubscriptionCreateParams.BillingMode.Type type) { - this.type = type; - return this; + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } } - } - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("classic") - CLASSIC("classic"), + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("duration") + DURATION("duration"), - @SerializedName("flexible") - FLEXIBLE("flexible"); + @SerializedName("timestamp") + TIMESTAMP("timestamp"); - @Getter(onMethod_ = {@Override}) - private final String value; + @Getter(onMethod_ = {@Override}) + private final String value; - Type(String value) { - this.value = value; + Type(String value) { + this.value = value; + } } } } @@ -4866,6 +5474,13 @@ public static class PaymentMethodOptions { @SerializedName("konbini") Object konbini; + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + @SerializedName("pix") + Object pix; + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -4895,6 +5510,7 @@ private PaymentMethodOptions( Map extraParams, Object idBankTransfer, Object konbini, + Object pix, Object sepaDebit, Object upi, Object usBankAccount) { @@ -4905,6 +5521,7 @@ private PaymentMethodOptions( this.extraParams = extraParams; this.idBankTransfer = idBankTransfer; this.konbini = konbini; + this.pix = pix; this.sepaDebit = sepaDebit; this.upi = upi; this.usBankAccount = usBankAccount; @@ -4929,6 +5546,8 @@ public static class Builder { private Object konbini; + private Object pix; + private Object sepaDebit; private Object upi; @@ -4945,6 +5564,7 @@ public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions build() { this.extraParams, this.idBankTransfer, this.konbini, + this.pix, this.sepaDebit, this.upi, this.usBankAccount); @@ -5096,6 +5716,25 @@ public Builder setKonbini(EmptyParam konbini) { return this; } + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPix( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -6224,6 +6863,261 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Configuration options for setting up a mandate. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Pix(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix build() { + return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix( + this.extraParams, this.mandateOptions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Configuration options for setting up a mandate. */ + public Builder setMandateOptions( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Amount to be charged for future payments. If not provided, defaults to 40000. */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + @SerializedName("end_date") + String endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Schedule at which the future payments will be charged. Defaults to {@code weekly}. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + String endDate, + Map extraParams, + PaymentSchedule paymentSchedule) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private String endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + build() { + return new SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix + .MandateOptions( + this.amount, + this.amountIncludesIof, + this.endDate, + this.extraParams, + this.paymentSchedule); + } + + /** Amount to be charged for future payments. If not provided, defaults to 40000. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + .AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Schedule at which the future payments will be charged. Defaults to {@code weekly}. + */ + public Builder setPaymentSchedule( + SubscriptionCreateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -7132,6 +8026,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/SubscriptionMigrateParams.java b/src/main/java/com/stripe/param/SubscriptionMigrateParams.java index 18da721a8c8..8d11769fe12 100644 --- a/src/main/java/com/stripe/param/SubscriptionMigrateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionMigrateParams.java @@ -130,12 +130,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. */ + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + + /** + * Required. Controls the calculation and orchestration of prorations and + * invoices for subscriptions. + */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -146,11 +154,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionMigrateParams.BillingMode build() { - return new SubscriptionMigrateParams.BillingMode(this.extraParams, this.type); + return new SubscriptionMigrateParams.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -179,13 +190,112 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. */ + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible(SubscriptionMigrateParams.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + + /** + * Required. Controls the calculation and orchestration of prorations and + * invoices for subscriptions. + */ public Builder setType(SubscriptionMigrateParams.BillingMode.Type type) { this.type = type; return this; } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls how invoices and invoice items display proration amounts and discount amounts. */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionMigrateParams.BillingMode.Flexible build() { + return new SubscriptionMigrateParams.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionMigrateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionMigrateParams.BillingMode.Flexible#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SubscriptionMigrateParams.BillingMode.Flexible.ProrationDiscounts prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("flexible") FLEXIBLE("flexible"); diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java index fcf2d1819ef..41efb7c5983 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleCreateParams.java @@ -408,15 +408,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -427,11 +432,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SubscriptionScheduleCreateParams.BillingMode build() { - return new SubscriptionScheduleCreateParams.BillingMode(this.extraParams, this.type); + return new SubscriptionScheduleCreateParams.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -461,9 +469,15 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible(SubscriptionScheduleCreateParams.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(SubscriptionScheduleCreateParams.BillingMode.Type type) { this.type = type; @@ -471,6 +485,97 @@ public Builder setType(SubscriptionScheduleCreateParams.BillingMode.Type type) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls how invoices and invoice items display proration amounts and discount amounts. */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionScheduleCreateParams.BillingMode.Flexible build() { + return new SubscriptionScheduleCreateParams.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionScheduleCreateParams.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionScheduleCreateParams.BillingMode.Flexible#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SubscriptionScheduleCreateParams.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -1627,16 +1732,6 @@ public static class Phase { @SerializedName("items") List items; - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} must - * not be set. This parameter is deprecated and will be removed in a future version. Use {@code - * duration} instead. - */ - @SerializedName("iterations") - Long iterations; - /** * Set of key-value pairs that you can attach * to a phase. Metadata on a schedule's phase will update the underlying subscription's {@code @@ -1722,7 +1817,6 @@ private Phase( Map extraParams, InvoiceSettings invoiceSettings, List items, - Long iterations, Map metadata, String onBehalfOf, PauseCollection pauseCollection, @@ -1748,7 +1842,6 @@ private Phase( this.extraParams = extraParams; this.invoiceSettings = invoiceSettings; this.items = items; - this.iterations = iterations; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.pauseCollection = pauseCollection; @@ -1797,8 +1890,6 @@ public static class Builder { private List items; - private Long iterations; - private Map metadata; private String onBehalfOf; @@ -1836,7 +1927,6 @@ public SubscriptionScheduleCreateParams.Phase build() { this.extraParams, this.invoiceSettings, this.items, - this.iterations, this.metadata, this.onBehalfOf, this.pauseCollection, @@ -2159,18 +2249,6 @@ public Builder addAllItem(List elem return this; } - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. Use - * {@code duration} instead. - */ - public Builder setIterations(Long iterations) { - this.iterations = iterations; - return this; - } - /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -2302,8 +2380,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -2470,8 +2549,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod( SubscriptionScheduleCreateParams.Phase.AddInvoiceItem.Period period) { diff --git a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java index 0038143f97e..08871c2c8c7 100644 --- a/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionScheduleUpdateParams.java @@ -1484,16 +1484,6 @@ public static class Phase { @SerializedName("items") List items; - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} must - * not be set. This parameter is deprecated and will be removed in a future version. Use {@code - * duration} instead. - */ - @SerializedName("iterations") - Long iterations; - /** * Set of key-value pairs that you can attach * to a phase. Metadata on a schedule's phase will update the underlying subscription's {@code @@ -1586,7 +1576,6 @@ private Phase( Map extraParams, InvoiceSettings invoiceSettings, List items, - Long iterations, Map metadata, Object onBehalfOf, PauseCollection pauseCollection, @@ -1613,7 +1602,6 @@ private Phase( this.extraParams = extraParams; this.invoiceSettings = invoiceSettings; this.items = items; - this.iterations = iterations; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.pauseCollection = pauseCollection; @@ -1663,8 +1651,6 @@ public static class Builder { private List items; - private Long iterations; - private Map metadata; private Object onBehalfOf; @@ -1704,7 +1690,6 @@ public SubscriptionScheduleUpdateParams.Phase build() { this.extraParams, this.invoiceSettings, this.items, - this.iterations, this.metadata, this.onBehalfOf, this.pauseCollection, @@ -2057,18 +2042,6 @@ public Builder addAllItem(List elem return this; } - /** - * Integer representing the multiplier applied to the price interval. For example, {@code - * iterations=2} applied to a price with {@code interval=month} and {@code interval_count=3} - * results in a phase of duration {@code 2 * 3 months = 6 months}. If set, {@code end_date} - * must not be set. This parameter is deprecated and will be removed in a future version. Use - * {@code duration} instead. - */ - public Builder setIterations(Long iterations) { - this.iterations = iterations; - return this; - } - /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -2236,8 +2209,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -2404,8 +2378,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the period of the underlying - * subscription that surrounds the start of the phase. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod( SubscriptionScheduleUpdateParams.Phase.AddInvoiceItem.Period period) { diff --git a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java index 129d4b7f0a5..30e37634f0a 100644 --- a/src/main/java/com/stripe/param/SubscriptionUpdateParams.java +++ b/src/main/java/com/stripe/param/SubscriptionUpdateParams.java @@ -40,6 +40,15 @@ public class SubscriptionUpdateParams extends ApiRequestParams { @SerializedName("automatic_tax") AutomaticTax automaticTax; + /** + * The Billing Cadence which controls the timing of recurring invoice generation for this + * subscription. If unset, the subscription will bill according to its own configured schedule and + * create its own invoices. If set, this subscription will be billed by the cadence instead, + * potentially sharing invoices with the other subscriptions linked to that Cadence. + */ + @SerializedName("billing_cadence") + Object billingCadence; + /** * Either {@code now} or {@code unchanged}. Setting the value to {@code now} resets the * subscription's billing cycle anchor to the current time (in UTC). For more information, see the @@ -49,6 +58,10 @@ public class SubscriptionUpdateParams extends ApiRequestParams { @SerializedName("billing_cycle_anchor") BillingCycleAnchor billingCycleAnchor; + /** Sets the billing schedules for the subscription. */ + @SerializedName("billing_schedules") + Object billingSchedules; + /** * Define thresholds at which an invoice will be sent, and the subscription advanced to a new * billing period. When updating, pass an empty string to remove previously-defined thresholds. @@ -293,7 +306,9 @@ private SubscriptionUpdateParams( List addInvoiceItems, Object applicationFeePercent, AutomaticTax automaticTax, + Object billingCadence, BillingCycleAnchor billingCycleAnchor, + Object billingSchedules, Object billingThresholds, Object cancelAt, Boolean cancelAtPeriodEnd, @@ -326,7 +341,9 @@ private SubscriptionUpdateParams( this.addInvoiceItems = addInvoiceItems; this.applicationFeePercent = applicationFeePercent; this.automaticTax = automaticTax; + this.billingCadence = billingCadence; this.billingCycleAnchor = billingCycleAnchor; + this.billingSchedules = billingSchedules; this.billingThresholds = billingThresholds; this.cancelAt = cancelAt; this.cancelAtPeriodEnd = cancelAtPeriodEnd; @@ -369,8 +386,12 @@ public static class Builder { private AutomaticTax automaticTax; + private Object billingCadence; + private BillingCycleAnchor billingCycleAnchor; + private Object billingSchedules; + private Object billingThresholds; private Object cancelAt; @@ -435,7 +456,9 @@ public SubscriptionUpdateParams build() { this.addInvoiceItems, this.applicationFeePercent, this.automaticTax, + this.billingCadence, this.billingCycleAnchor, + this.billingSchedules, this.billingThresholds, this.cancelAt, this.cancelAtPeriodEnd, @@ -528,6 +551,28 @@ public Builder setAutomaticTax(SubscriptionUpdateParams.AutomaticTax automaticTa return this; } + /** + * The Billing Cadence which controls the timing of recurring invoice generation for this + * subscription. If unset, the subscription will bill according to its own configured schedule + * and create its own invoices. If set, this subscription will be billed by the cadence instead, + * potentially sharing invoices with the other subscriptions linked to that Cadence. + */ + public Builder setBillingCadence(String billingCadence) { + this.billingCadence = billingCadence; + return this; + } + + /** + * The Billing Cadence which controls the timing of recurring invoice generation for this + * subscription. If unset, the subscription will bill according to its own configured schedule + * and create its own invoices. If set, this subscription will be billed by the cadence instead, + * potentially sharing invoices with the other subscriptions linked to that Cadence. + */ + public Builder setBillingCadence(EmptyParam billingCadence) { + this.billingCadence = billingCadence; + return this; + } + /** * Either {@code now} or {@code unchanged}. Setting the value to {@code now} resets the * subscription's billing cycle anchor to the current time (in UTC). For more information, see @@ -540,6 +585,47 @@ public Builder setBillingCycleAnchor( return this; } + /** + * Add an element to `billingSchedules` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionUpdateParams#billingSchedules} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addBillingSchedule(SubscriptionUpdateParams.BillingSchedule element) { + if (this.billingSchedules == null || this.billingSchedules instanceof EmptyParam) { + this.billingSchedules = new ArrayList(); + } + ((List) this.billingSchedules).add(element); + return this; + } + + /** + * Add all elements to `billingSchedules` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionUpdateParams#billingSchedules} for the field documentation. + */ + @SuppressWarnings("unchecked") + public Builder addAllBillingSchedule(List elements) { + if (this.billingSchedules == null || this.billingSchedules instanceof EmptyParam) { + this.billingSchedules = new ArrayList(); + } + ((List) this.billingSchedules).addAll(elements); + return this; + } + + /** Sets the billing schedules for the subscription. */ + public Builder setBillingSchedules(EmptyParam billingSchedules) { + this.billingSchedules = billingSchedules; + return this; + } + + /** Sets the billing schedules for the subscription. */ + public Builder setBillingSchedules( + List billingSchedules) { + this.billingSchedules = billingSchedules; + return this; + } + /** * Define thresholds at which an invoice will be sent, and the subscription advanced to a new * billing period. When updating, pass an empty string to remove previously-defined thresholds. @@ -1157,8 +1243,9 @@ public static class AddInvoiceItem { Map metadata; /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} defaults + * to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ @SerializedName("period") Period period; @@ -1319,8 +1406,9 @@ public Builder putAllMetadata(Map map) { } /** - * The period associated with this invoice item. Defaults to the current period of the - * subscription. + * The period associated with this invoice item. If not set, {@code period.start.type} + * defaults to {@code max_item_period_start} and {@code period.end.type} defaults to {@code + * min_item_period_end}. */ public Builder setPeriod(SubscriptionUpdateParams.AddInvoiceItem.Period period) { this.period = period; @@ -2490,33 +2578,516 @@ public Builder putExtraParam(String key, Object value) { return this; } - /** - * Add all map key/value pairs to `extraParams` map. A map is initialized for the first - * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link SubscriptionUpdateParams.AutomaticTax.Liability#extraParams} for the - * field documentation. - */ - public Builder putAllExtraParam(Map map) { - if (this.extraParams == null) { - this.extraParams = new HashMap<>(); + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionUpdateParams.AutomaticTax.Liability#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Type of the account referenced in the request. */ + public Builder setType(SubscriptionUpdateParams.AutomaticTax.Liability.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("account") + ACCOUNT("account"), + + @SerializedName("self") + SELF("self"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillingSchedule { + /** Configure billing schedule differently for individual subscription items. */ + @SerializedName("applies_to") + List appliesTo; + + /** The end date for the billing schedule. */ + @SerializedName("bill_until") + BillUntil billUntil; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to + * 200 characters. If not provided, a unique key will be generated. + */ + @SerializedName("key") + Object key; + + private BillingSchedule( + List appliesTo, + BillUntil billUntil, + Map extraParams, + Object key) { + this.appliesTo = appliesTo; + this.billUntil = billUntil; + this.extraParams = extraParams; + this.key = key; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List appliesTo; + + private BillUntil billUntil; + + private Map extraParams; + + private Object key; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.BillingSchedule build() { + return new SubscriptionUpdateParams.BillingSchedule( + this.appliesTo, this.billUntil, this.extraParams, this.key); + } + + /** + * Add an element to `appliesTo` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionUpdateParams.BillingSchedule#appliesTo} for the field documentation. + */ + public Builder addAppliesTo(SubscriptionUpdateParams.BillingSchedule.AppliesTo element) { + if (this.appliesTo == null) { + this.appliesTo = new ArrayList<>(); + } + this.appliesTo.add(element); + return this; + } + + /** + * Add all elements to `appliesTo` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * SubscriptionUpdateParams.BillingSchedule#appliesTo} for the field documentation. + */ + public Builder addAllAppliesTo( + List elements) { + if (this.appliesTo == null) { + this.appliesTo = new ArrayList<>(); + } + this.appliesTo.addAll(elements); + return this; + } + + /** The end date for the billing schedule. */ + public Builder setBillUntil(SubscriptionUpdateParams.BillingSchedule.BillUntil billUntil) { + this.billUntil = billUntil; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SubscriptionUpdateParams.BillingSchedule#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SubscriptionUpdateParams.BillingSchedule#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up + * to 200 characters. If not provided, a unique key will be generated. + */ + public Builder setKey(String key) { + this.key = key; + return this; + } + + /** + * Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up + * to 200 characters. If not provided, a unique key will be generated. + */ + public Builder setKey(EmptyParam key) { + this.key = key; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AppliesTo { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 price object. */ + @SerializedName("price") + Object price; + + /** + * Required. Controls which subscription items the billing schedule applies + * to. + */ + @SerializedName("type") + Type type; + + private AppliesTo(Map extraParams, Object price, Type type) { + this.extraParams = extraParams; + this.price = price; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object price; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.BillingSchedule.AppliesTo build() { + return new SubscriptionUpdateParams.BillingSchedule.AppliesTo( + this.extraParams, this.price, 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 SubscriptionUpdateParams.BillingSchedule.AppliesTo#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionUpdateParams.BillingSchedule.AppliesTo#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 price object. */ + public Builder setPrice(String price) { + this.price = price; + return this; + } + + /** The ID of the price object. */ + public Builder setPrice(EmptyParam price) { + this.price = price; + return this; + } + + /** + * Required. Controls which subscription items the billing schedule applies + * to. + */ + public Builder setType(SubscriptionUpdateParams.BillingSchedule.AppliesTo.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("price") + PRICE("price"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillUntil { + /** Specifies the billing period. */ + @SerializedName("duration") + Duration duration; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 end date of the billing schedule. */ + @SerializedName("timestamp") + Long timestamp; + + /** + * Required. Describes how the billing schedule will determine the end date. + * Either {@code duration} or {@code timestamp}. + */ + @SerializedName("type") + Type type; + + private BillUntil( + Duration duration, Map extraParams, Long timestamp, Type type) { + this.duration = duration; + this.extraParams = extraParams; + this.timestamp = timestamp; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Duration duration; + + private Map extraParams; + + private Long timestamp; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.BillingSchedule.BillUntil build() { + return new SubscriptionUpdateParams.BillingSchedule.BillUntil( + this.duration, this.extraParams, this.timestamp, this.type); + } + + /** Specifies the billing period. */ + public Builder setDuration( + SubscriptionUpdateParams.BillingSchedule.BillUntil.Duration duration) { + this.duration = duration; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionUpdateParams.BillingSchedule.BillUntil#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SubscriptionUpdateParams.BillingSchedule.BillUntil#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 end date of the billing schedule. */ + public Builder setTimestamp(Long timestamp) { + this.timestamp = timestamp; + return this; + } + + /** + * Required. Describes how the billing schedule will determine the end + * date. Either {@code duration} or {@code timestamp}. + */ + public Builder setType(SubscriptionUpdateParams.BillingSchedule.BillUntil.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Duration { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. Specifies billing duration. Either {@code day}, {@code week}, + * {@code month} or {@code year}. + */ + @SerializedName("interval") + Interval interval; + + /** The multiplier applied to the interval. */ + @SerializedName("interval_count") + Long intervalCount; + + private Duration(Map extraParams, Interval interval, Long intervalCount) { + this.extraParams = extraParams; + this.interval = interval; + this.intervalCount = intervalCount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Interval interval; + + private Long intervalCount; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.BillingSchedule.BillUntil.Duration build() { + return new SubscriptionUpdateParams.BillingSchedule.BillUntil.Duration( + this.extraParams, this.interval, this.intervalCount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionUpdateParams.BillingSchedule.BillUntil.Duration#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionUpdateParams.BillingSchedule.BillUntil.Duration#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. Specifies billing duration. Either {@code day}, {@code + * week}, {@code month} or {@code year}. + */ + public Builder setInterval( + SubscriptionUpdateParams.BillingSchedule.BillUntil.Duration.Interval interval) { + this.interval = interval; + return this; + } + + /** The multiplier applied to the interval. */ + public Builder setIntervalCount(Long intervalCount) { + this.intervalCount = intervalCount; + return this; } - this.extraParams.putAll(map); - return this; } - /** Required. Type of the account referenced in the request. */ - public Builder setType(SubscriptionUpdateParams.AutomaticTax.Liability.Type type) { - this.type = type; - return this; + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } } } public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("account") - ACCOUNT("account"), + @SerializedName("duration") + DURATION("duration"), - @SerializedName("self") - SELF("self"); + @SerializedName("timestamp") + TIMESTAMP("timestamp"); @Getter(onMethod_ = {@Override}) private final String value; @@ -4971,6 +5542,13 @@ public static class PaymentMethodOptions { @SerializedName("konbini") Object konbini; + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + @SerializedName("pix") + Object pix; + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -5000,6 +5578,7 @@ private PaymentMethodOptions( Map extraParams, Object idBankTransfer, Object konbini, + Object pix, Object sepaDebit, Object upi, Object usBankAccount) { @@ -5010,6 +5589,7 @@ private PaymentMethodOptions( this.extraParams = extraParams; this.idBankTransfer = idBankTransfer; this.konbini = konbini; + this.pix = pix; this.sepaDebit = sepaDebit; this.upi = upi; this.usBankAccount = usBankAccount; @@ -5034,6 +5614,8 @@ public static class Builder { private Object konbini; + private Object pix; + private Object sepaDebit; private Object upi; @@ -5050,6 +5632,7 @@ public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions build() { this.extraParams, this.idBankTransfer, this.konbini, + this.pix, this.sepaDebit, this.upi, this.usBankAccount); @@ -5201,6 +5784,25 @@ public Builder setKonbini(EmptyParam konbini) { return this; } + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPix( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix pix) { + this.pix = pix; + return this; + } + + /** + * This sub-hash contains details about the Pix payment method options to pass to the + * invoice’s PaymentIntent. + */ + public Builder setPix(EmptyParam pix) { + this.pix = pix; + return this; + } + /** * This sub-hash contains details about the SEPA Direct Debit payment method options to pass * to the invoice’s PaymentIntent. @@ -6367,6 +6969,270 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Pix { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Configuration options for setting up a mandate. */ + @SerializedName("mandate_options") + MandateOptions mandateOptions; + + private Pix(Map extraParams, MandateOptions mandateOptions) { + this.extraParams = extraParams; + this.mandateOptions = mandateOptions; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MandateOptions mandateOptions; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix build() { + return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix( + this.extraParams, this.mandateOptions); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Configuration options for setting up a mandate. */ + public Builder setMandateOptions( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + mandateOptions) { + this.mandateOptions = mandateOptions; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateOptions { + /** Amount to be charged for future payments. If not provided, defaults to 40000. */ + @SerializedName("amount") + Long amount; + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + @SerializedName("amount_includes_iof") + AmountIncludesIof amountIncludesIof; + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + @SerializedName("end_date") + Object endDate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Schedule at which the future payments will be charged. Defaults to {@code weekly}. */ + @SerializedName("payment_schedule") + PaymentSchedule paymentSchedule; + + private MandateOptions( + Long amount, + AmountIncludesIof amountIncludesIof, + Object endDate, + Map extraParams, + PaymentSchedule paymentSchedule) { + this.amount = amount; + this.amountIncludesIof = amountIncludesIof; + this.endDate = endDate; + this.extraParams = extraParams; + this.paymentSchedule = paymentSchedule; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private AmountIncludesIof amountIncludesIof; + + private Object endDate; + + private Map extraParams; + + private PaymentSchedule paymentSchedule; + + /** Finalize and obtain parameter instance from this builder. */ + public SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + build() { + return new SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix + .MandateOptions( + this.amount, + this.amountIncludesIof, + this.endDate, + this.extraParams, + this.paymentSchedule); + } + + /** Amount to be charged for future payments. If not provided, defaults to 40000. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** Determines if the amount includes the IOF tax. Defaults to {@code never}. */ + public Builder setAmountIncludesIof( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + .AmountIncludesIof + amountIncludesIof) { + this.amountIncludesIof = amountIncludesIof; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + public Builder setEndDate(String endDate) { + this.endDate = endDate; + return this; + } + + /** + * Date when the mandate expires and no further payments will be charged, in {@code + * YYYY-MM-DD}. If not provided, the mandate will be active until canceled. + */ + public Builder setEndDate(EmptyParam endDate) { + this.endDate = endDate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Schedule at which the future payments will be charged. Defaults to {@code weekly}. + */ + public Builder setPaymentSchedule( + SubscriptionUpdateParams.PaymentSettings.PaymentMethodOptions.Pix.MandateOptions + .PaymentSchedule + paymentSchedule) { + this.paymentSchedule = paymentSchedule; + return this; + } + } + + public enum AmountIncludesIof implements ApiRequestParams.EnumParam { + @SerializedName("always") + ALWAYS("always"), + + @SerializedName("never") + NEVER("never"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + AmountIncludesIof(String value) { + this.value = value; + } + } + + public enum PaymentSchedule implements ApiRequestParams.EnumParam { + @SerializedName("halfyearly") + HALFYEARLY("halfyearly"), + + @SerializedName("monthly") + MONTHLY("monthly"), + + @SerializedName("quarterly") + QUARTERLY("quarterly"), + + @SerializedName("weekly") + WEEKLY("weekly"), + + @SerializedName("yearly") + YEARLY("yearly"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PaymentSchedule(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class SepaDebit { @@ -7290,6 +8156,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("pix") + PIX("pix"), + @SerializedName("promptpay") PROMPTPAY("promptpay"), diff --git a/src/main/java/com/stripe/param/TokenCreateParams.java b/src/main/java/com/stripe/param/TokenCreateParams.java index 05cfd38dfd7..97f43408949 100644 --- a/src/main/java/com/stripe/param/TokenCreateParams.java +++ b/src/main/java/com/stripe/param/TokenCreateParams.java @@ -930,11 +930,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -1037,13 +1037,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -2552,11 +2552,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -2659,13 +2659,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -3152,11 +3152,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -3259,13 +3259,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -5320,11 +5320,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -5427,13 +5427,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -6322,11 +6322,11 @@ public static class RegisteredAddress { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -6429,13 +6429,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java index 0cd3c8c08f7..bacda0115a8 100644 --- a/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java +++ b/src/main/java/com/stripe/param/WebhookEndpointCreateParams.java @@ -627,7 +627,10 @@ public enum ApiVersion implements ApiRequestParams.EnumParam { VERSION_2025_07_30_BASIL("2025-07-30.basil"), @SerializedName("2025-08-27.basil") - VERSION_2025_08_27_BASIL("2025-08-27.basil"); + VERSION_2025_08_27_BASIL("2025-08-27.basil"), + + @SerializedName("2025-09-30.clover") + VERSION_2025_09_30_CLOVER("2025-09-30.clover"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/billing/AlertCreateParams.java b/src/main/java/com/stripe/param/billing/AlertCreateParams.java index d55a7360138..15a2c125bc1 100644 --- a/src/main/java/com/stripe/param/billing/AlertCreateParams.java +++ b/src/main/java/com/stripe/param/billing/AlertCreateParams.java @@ -276,6 +276,10 @@ public Builder setLte(AlertCreateParams.CreditBalanceThreshold.Lte lte) { @Getter @EqualsAndHashCode(callSuper = false) public static class Filter { + /** The credit grants for which to configure the credit balance alert. */ + @SerializedName("credit_grants") + CreditGrants creditGrants; + /** Limit the scope to this credit balance alert only to this customer. */ @SerializedName("customer") String customer; @@ -296,7 +300,9 @@ public static class Filter { @SerializedName("type") Type type; - private Filter(String customer, Map extraParams, Type type) { + private Filter( + CreditGrants creditGrants, String customer, Map extraParams, Type type) { + this.creditGrants = creditGrants; this.customer = customer; this.extraParams = extraParams; this.type = type; @@ -307,6 +313,8 @@ public static Builder builder() { } public static class Builder { + private CreditGrants creditGrants; + private String customer; private Map extraParams; @@ -316,7 +324,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AlertCreateParams.CreditBalanceThreshold.Filter build() { return new AlertCreateParams.CreditBalanceThreshold.Filter( - this.customer, this.extraParams, this.type); + this.creditGrants, this.customer, this.extraParams, this.type); + } + + /** The credit grants for which to configure the credit balance alert. */ + public Builder setCreditGrants( + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants creditGrants) { + this.creditGrants = creditGrants; + return this; } /** Limit the scope to this credit balance alert only to this customer. */ @@ -363,6 +378,543 @@ public Builder setType(AlertCreateParams.CreditBalanceThreshold.Filter.Type type } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CreditGrants { + /** + * Required. The applicability configuration for this credit grants filter. + */ + @SerializedName("applicability_config") + ApplicabilityConfig applicabilityConfig; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 CreditGrants( + ApplicabilityConfig applicabilityConfig, Map extraParams) { + this.applicabilityConfig = applicabilityConfig; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private ApplicabilityConfig applicabilityConfig; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants build() { + return new AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants( + this.applicabilityConfig, this.extraParams); + } + + /** + * Required. The applicability configuration for this credit grants + * filter. + */ + public Builder setApplicabilityConfig( + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig + applicabilityConfig) { + this.applicabilityConfig = applicabilityConfig; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants#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 ApplicabilityConfig { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Specify the scope of this applicability config. */ + @SerializedName("scope") + Scope scope; + + private ApplicabilityConfig(Map extraParams, Scope scope) { + this.extraParams = extraParams; + this.scope = scope; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Scope scope; + + /** Finalize and obtain parameter instance from this builder. */ + public AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig + build() { + return new AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig(this.extraParams, this.scope); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig#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. Specify the scope of this applicability config. */ + public Builder setScope( + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig + .Scope + scope) { + this.scope = scope; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Scope { + /** + * A list of billable items that the credit grant can apply to. We currently only + * support metered billable items. Cannot be used in combination with {@code price_type} + * or {@code prices}. + */ + @SerializedName("billable_items") + List< + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig + .Scope.BillableItem> + billableItems; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} + * value. Instead, each key/value pair is serialized as if the key is a root-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 price type that credit grants can apply to. We currently only support the {@code + * metered} price type. Cannot be used in combination with {@code prices}. + */ + @SerializedName("price_type") + PriceType priceType; + + /** + * A list of prices that the credit grant can apply to. We currently only support the + * {@code metered} prices. Cannot be used in combination with {@code price_type}. + */ + @SerializedName("prices") + List< + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig + .Scope.Price> + prices; + + private Scope( + List< + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.BillableItem> + billableItems, + Map extraParams, + PriceType priceType, + List< + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.Price> + prices) { + this.billableItems = billableItems; + this.extraParams = extraParams; + this.priceType = priceType; + this.prices = prices; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private List< + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.BillableItem> + billableItems; + + private Map extraParams; + + private PriceType priceType; + + private List< + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.Price> + prices; + + /** Finalize and obtain parameter instance from this builder. */ + public AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope + build() { + return new AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope( + this.billableItems, this.extraParams, this.priceType, this.prices); + } + + /** + * Add an element to `billableItems` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope#billableItems} + * for the field documentation. + */ + public Builder addBillableItem( + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig + .Scope.BillableItem + element) { + if (this.billableItems == null) { + this.billableItems = new ArrayList<>(); + } + this.billableItems.add(element); + return this; + } + + /** + * Add all elements to `billableItems` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original + * list. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope#billableItems} + * for the field documentation. + */ + public Builder addAllBillableItem( + List< + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.BillableItem> + elements) { + if (this.billableItems == null) { + this.billableItems = new ArrayList<>(); + } + this.billableItems.addAll(elements); + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope#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 price type that credit grants can apply to. We currently only support the + * {@code metered} price type. Cannot be used in combination with {@code prices}. + */ + public Builder setPriceType( + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig + .Scope.PriceType + priceType) { + this.priceType = priceType; + return this; + } + + /** + * Add an element to `prices` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See + * {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope#prices} + * for the field documentation. + */ + public Builder addPrice( + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig + .Scope.Price + element) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.add(element); + return this; + } + + /** + * Add all elements to `prices` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See + * {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope#prices} + * for the field documentation. + */ + public Builder addAllPrice( + List< + AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.Price> + elements) { + if (this.prices == null) { + this.prices = new ArrayList<>(); + } + this.prices.addAll(elements); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BillableItem { + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level 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 billable item ID this credit grant should apply to. + */ + @SerializedName("id") + String id; + + private BillableItem(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 AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.BillableItem + build() { + return new AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.BillableItem(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 + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope.BillableItem#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope.BillableItem#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 billable item ID this credit grant should apply + * to. + */ + public Builder setId(String id) { + this.id = id; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Price { + /** + * Map of extra parameters for custom features not available in this client library. + * The content in this map is not serialized under this field's + * {@code @SerializedName} value. Instead, each key/value pair is serialized as if the + * key is a root-level 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 price ID this credit grant should apply to. */ + @SerializedName("id") + String id; + + private Price(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 AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.Price + build() { + return new AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants + .ApplicabilityConfig.Scope.Price(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 + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope.Price#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the + * first `put/putAll` call, and subsequent calls add additional key/value pairs to + * the original map. See {@link + * AlertCreateParams.CreditBalanceThreshold.Filter.CreditGrants.ApplicabilityConfig.Scope.Price#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 price 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"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + PriceType(String value) { + this.value = value; + } + } + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("customer") CUSTOMER("customer"), @@ -722,10 +1274,7 @@ public static class UsageThreshold { @SerializedName("meter") String meter; - /** - * Required. Whether the alert should only fire only once, or once per billing - * cycle. - */ + /** Required. Defines how the alert will behave. */ @SerializedName("recurrence") Recurrence recurrence; @@ -830,10 +1379,7 @@ public Builder setMeter(String meter) { return this; } - /** - * Required. Whether the alert should only fire only once, or once per - * billing cycle. - */ + /** Required. Defines how the alert will behave. */ public Builder setRecurrence(AlertCreateParams.UsageThreshold.Recurrence recurrence) { this.recurrence = recurrence; return this; diff --git a/src/main/java/com/stripe/param/billing/MeterUsageRetrieveParams.java b/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java similarity index 98% rename from src/main/java/com/stripe/param/billing/MeterUsageRetrieveParams.java rename to src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java index a961ffbe435..3bae6bd8753 100644 --- a/src/main/java/com/stripe/param/billing/MeterUsageRetrieveParams.java +++ b/src/main/java/com/stripe/param/billing/analytics/MeterUsageRetrieveParams.java @@ -1,5 +1,5 @@ // File generated from our OpenAPI spec -package com.stripe.param.billing; +package com.stripe.param.billing.analytics; import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; @@ -21,8 +21,8 @@ public class MeterUsageRetrieveParams extends ApiRequestParams { * Required. The timestamp from when to stop aggregating meter events * (exclusive). Must be aligned with minute boundaries. */ - @SerializedName("end_time") - Long endTime; + @SerializedName("ends_at") + Long endsAt; /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") @@ -48,8 +48,8 @@ public class MeterUsageRetrieveParams extends ApiRequestParams { * Required. The timestamp from when to start aggregating meter events * (inclusive). Must be aligned with minute boundaries. */ - @SerializedName("start_time") - Long startTime; + @SerializedName("starts_at") + Long startsAt; /** The timezone to use for the start and end times. Defaults to UTC if not specified. */ @SerializedName("timezone") @@ -64,19 +64,19 @@ public class MeterUsageRetrieveParams extends ApiRequestParams { private MeterUsageRetrieveParams( String customer, - Long endTime, + Long endsAt, List expand, Map extraParams, List meters, - Long startTime, + Long startsAt, Timezone timezone, ValueGroupingWindow valueGroupingWindow) { this.customer = customer; - this.endTime = endTime; + this.endsAt = endsAt; this.expand = expand; this.extraParams = extraParams; this.meters = meters; - this.startTime = startTime; + this.startsAt = startsAt; this.timezone = timezone; this.valueGroupingWindow = valueGroupingWindow; } @@ -88,7 +88,7 @@ public static Builder builder() { public static class Builder { private String customer; - private Long endTime; + private Long endsAt; private List expand; @@ -96,7 +96,7 @@ public static class Builder { private List meters; - private Long startTime; + private Long startsAt; private Timezone timezone; @@ -106,11 +106,11 @@ public static class Builder { public MeterUsageRetrieveParams build() { return new MeterUsageRetrieveParams( this.customer, - this.endTime, + this.endsAt, this.expand, this.extraParams, this.meters, - this.startTime, + this.startsAt, this.timezone, this.valueGroupingWindow); } @@ -125,8 +125,8 @@ public Builder setCustomer(String customer) { * Required. The timestamp from when to stop aggregating meter events * (exclusive). Must be aligned with minute boundaries. */ - public Builder setEndTime(Long endTime) { - this.endTime = endTime; + public Builder setEndsAt(Long endsAt) { + this.endsAt = endsAt; return this; } @@ -212,8 +212,8 @@ public Builder addAllMeter(List elements) { * Required. The timestamp from when to start aggregating meter events * (inclusive). Must be aligned with minute boundaries. */ - public Builder setStartTime(Long startTime) { - this.startTime = startTime; + public Builder setStartsAt(Long startsAt) { + this.startsAt = startsAt; return this; } @@ -261,8 +261,8 @@ public static class Meter { Map extraParams; /** Required. Meter id to query usage for. */ - @SerializedName("meter_id") - String meterId; + @SerializedName("meter") + String meter; /** * Key-value pairs used to filter usage events by high cardinality tenant dimension values. If @@ -275,12 +275,12 @@ private Meter( Map dimensionFilters, List dimensionGroupByKeys, Map extraParams, - String meterId, + String meter, Map tenantFilters) { this.dimensionFilters = dimensionFilters; this.dimensionGroupByKeys = dimensionGroupByKeys; this.extraParams = extraParams; - this.meterId = meterId; + this.meter = meter; this.tenantFilters = tenantFilters; } @@ -295,7 +295,7 @@ public static class Builder { private Map extraParams; - private String meterId; + private String meter; private Map tenantFilters; @@ -305,7 +305,7 @@ public MeterUsageRetrieveParams.Meter build() { this.dimensionFilters, this.dimensionGroupByKeys, this.extraParams, - this.meterId, + this.meter, this.tenantFilters); } @@ -388,8 +388,8 @@ public Builder putAllExtraParam(Map map) { } /** Required. Meter id to query usage for. */ - public Builder setMeterId(String meterId) { - this.meterId = meterId; + public Builder setMeter(String meter) { + this.meter = meter; return this; } diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java index bb3be2904af..d6db907fe3a 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationCreateParams.java @@ -1205,19 +1205,25 @@ public static class SubscriptionUpdate { @SerializedName("schedule_at_period_end") ScheduleAtPeriodEnd scheduleAtPeriodEnd; + /** The behavior when updating a subscription that is trialing. */ + @SerializedName("trial_update_behavior") + TrialUpdateBehavior trialUpdateBehavior; + private SubscriptionUpdate( Object defaultAllowedUpdates, Boolean enabled, Map extraParams, Object products, ProrationBehavior prorationBehavior, - ScheduleAtPeriodEnd scheduleAtPeriodEnd) { + ScheduleAtPeriodEnd scheduleAtPeriodEnd, + TrialUpdateBehavior trialUpdateBehavior) { this.defaultAllowedUpdates = defaultAllowedUpdates; this.enabled = enabled; this.extraParams = extraParams; this.products = products; this.prorationBehavior = prorationBehavior; this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; + this.trialUpdateBehavior = trialUpdateBehavior; } public static Builder builder() { @@ -1237,6 +1243,8 @@ public static class Builder { private ScheduleAtPeriodEnd scheduleAtPeriodEnd; + private TrialUpdateBehavior trialUpdateBehavior; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationCreateParams.Features.SubscriptionUpdate build() { return new ConfigurationCreateParams.Features.SubscriptionUpdate( @@ -1245,7 +1253,8 @@ public ConfigurationCreateParams.Features.SubscriptionUpdate build() { this.extraParams, this.products, this.prorationBehavior, - this.scheduleAtPeriodEnd); + this.scheduleAtPeriodEnd, + this.trialUpdateBehavior); } /** @@ -1415,6 +1424,14 @@ public Builder setScheduleAtPeriodEnd( this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; return this; } + + /** The behavior when updating a subscription that is trialing. */ + public Builder setTrialUpdateBehavior( + ConfigurationCreateParams.Features.SubscriptionUpdate.TrialUpdateBehavior + trialUpdateBehavior) { + this.trialUpdateBehavior = trialUpdateBehavior; + return this; + } } @Getter @@ -1903,6 +1920,21 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum TrialUpdateBehavior implements ApiRequestParams.EnumParam { + @SerializedName("continue_trial") + CONTINUE_TRIAL("continue_trial"), + + @SerializedName("end_trial") + END_TRIAL("end_trial"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TrialUpdateBehavior(String value) { + this.value = value; + } + } } } diff --git a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java index 87418baeec9..f8937cb78fe 100644 --- a/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/billingportal/ConfigurationUpdateParams.java @@ -1247,19 +1247,25 @@ public static class SubscriptionUpdate { @SerializedName("schedule_at_period_end") ScheduleAtPeriodEnd scheduleAtPeriodEnd; + /** The behavior when updating a subscription that is trialing. */ + @SerializedName("trial_update_behavior") + TrialUpdateBehavior trialUpdateBehavior; + private SubscriptionUpdate( Object defaultAllowedUpdates, Boolean enabled, Map extraParams, Object products, ProrationBehavior prorationBehavior, - ScheduleAtPeriodEnd scheduleAtPeriodEnd) { + ScheduleAtPeriodEnd scheduleAtPeriodEnd, + TrialUpdateBehavior trialUpdateBehavior) { this.defaultAllowedUpdates = defaultAllowedUpdates; this.enabled = enabled; this.extraParams = extraParams; this.products = products; this.prorationBehavior = prorationBehavior; this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; + this.trialUpdateBehavior = trialUpdateBehavior; } public static Builder builder() { @@ -1279,6 +1285,8 @@ public static class Builder { private ScheduleAtPeriodEnd scheduleAtPeriodEnd; + private TrialUpdateBehavior trialUpdateBehavior; + /** Finalize and obtain parameter instance from this builder. */ public ConfigurationUpdateParams.Features.SubscriptionUpdate build() { return new ConfigurationUpdateParams.Features.SubscriptionUpdate( @@ -1287,7 +1295,8 @@ public ConfigurationUpdateParams.Features.SubscriptionUpdate build() { this.extraParams, this.products, this.prorationBehavior, - this.scheduleAtPeriodEnd); + this.scheduleAtPeriodEnd, + this.trialUpdateBehavior); } /** @@ -1457,6 +1466,14 @@ public Builder setScheduleAtPeriodEnd( this.scheduleAtPeriodEnd = scheduleAtPeriodEnd; return this; } + + /** The behavior when updating a subscription that is trialing. */ + public Builder setTrialUpdateBehavior( + ConfigurationUpdateParams.Features.SubscriptionUpdate.TrialUpdateBehavior + trialUpdateBehavior) { + this.trialUpdateBehavior = trialUpdateBehavior; + return this; + } } @Getter @@ -1980,6 +1997,21 @@ public enum ProrationBehavior implements ApiRequestParams.EnumParam { this.value = value; } } + + public enum TrialUpdateBehavior implements ApiRequestParams.EnumParam { + @SerializedName("continue_trial") + CONTINUE_TRIAL("continue_trial"), + + @SerializedName("end_trial") + END_TRIAL("end_trial"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TrialUpdateBehavior(String value) { + this.value = value; + } + } } } diff --git a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java index f1d4bebf887..2d2db15fabd 100644 --- a/src/main/java/com/stripe/param/checkout/SessionCreateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionCreateParams.java @@ -44,6 +44,13 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("billing_address_collection") BillingAddressCollection billingAddressCollection; + /** + * The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is + * {@code custom}. + */ + @SerializedName("branding_settings") + BrandingSettings brandingSettings; + /** * If set, Checkout displays a back button and customers will be directed to this URL if they * decide to cancel payment and return to your website. This parameter is not allowed if ui_mode @@ -156,6 +163,15 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("discounts") List discounts; + /** + * A list of the types of payment methods (e.g., {@code card}) that should be excluded from this + * Checkout Session. This should only be used when payment methods for this Checkout Session are + * managed through the Stripe + * Dashboard. + */ + @SerializedName("excluded_payment_method_types") + List excludedPaymentMethodTypes; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -219,6 +235,18 @@ public class SessionCreateParams extends ApiRequestParams { @SerializedName("mode") Mode mode; + /** + * Controls name collection settings for the session. + * + *

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

If a Customer is created or provided, + * the names can be saved to the Customer object as well. + */ + @SerializedName("name_collection") + NameCollection nameCollection; + /** * A list of optional items the customer can add to their order at checkout. Use this parameter to * pass one-time or recurring Prices. @@ -403,6 +431,7 @@ private SessionCreateParams( Boolean allowPromotionCodes, AutomaticTax automaticTax, BillingAddressCollection billingAddressCollection, + BrandingSettings brandingSettings, String cancelUrl, List checkoutItems, String clientReferenceId, @@ -416,6 +445,7 @@ private SessionCreateParams( String customerEmail, CustomerUpdate customerUpdate, List discounts, + List excludedPaymentMethodTypes, List expand, Long expiresAt, Map extraParams, @@ -424,6 +454,7 @@ private SessionCreateParams( Locale locale, Map metadata, Mode mode, + NameCollection nameCollection, List optionalItems, OriginContext originContext, PaymentIntentData paymentIntentData, @@ -451,6 +482,7 @@ private SessionCreateParams( this.allowPromotionCodes = allowPromotionCodes; this.automaticTax = automaticTax; this.billingAddressCollection = billingAddressCollection; + this.brandingSettings = brandingSettings; this.cancelUrl = cancelUrl; this.checkoutItems = checkoutItems; this.clientReferenceId = clientReferenceId; @@ -464,6 +496,7 @@ private SessionCreateParams( this.customerEmail = customerEmail; this.customerUpdate = customerUpdate; this.discounts = discounts; + this.excludedPaymentMethodTypes = excludedPaymentMethodTypes; this.expand = expand; this.expiresAt = expiresAt; this.extraParams = extraParams; @@ -472,6 +505,7 @@ private SessionCreateParams( this.locale = locale; this.metadata = metadata; this.mode = mode; + this.nameCollection = nameCollection; this.optionalItems = optionalItems; this.originContext = originContext; this.paymentIntentData = paymentIntentData; @@ -511,6 +545,8 @@ public static class Builder { private BillingAddressCollection billingAddressCollection; + private BrandingSettings brandingSettings; + private String cancelUrl; private List checkoutItems; @@ -537,6 +573,8 @@ public static class Builder { private List discounts; + private List excludedPaymentMethodTypes; + private List expand; private Long expiresAt; @@ -553,6 +591,8 @@ public static class Builder { private Mode mode; + private NameCollection nameCollection; + private List optionalItems; private OriginContext originContext; @@ -605,6 +645,7 @@ public SessionCreateParams build() { this.allowPromotionCodes, this.automaticTax, this.billingAddressCollection, + this.brandingSettings, this.cancelUrl, this.checkoutItems, this.clientReferenceId, @@ -618,6 +659,7 @@ public SessionCreateParams build() { this.customerEmail, this.customerUpdate, this.discounts, + this.excludedPaymentMethodTypes, this.expand, this.expiresAt, this.extraParams, @@ -626,6 +668,7 @@ public SessionCreateParams build() { this.locale, this.metadata, this.mode, + this.nameCollection, this.optionalItems, this.originContext, this.paymentIntentData, @@ -690,6 +733,15 @@ public Builder setBillingAddressCollection( return this; } + /** + * The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is + * {@code custom}. + */ + public Builder setBrandingSettings(SessionCreateParams.BrandingSettings brandingSettings) { + this.brandingSettings = brandingSettings; + return this; + } + /** * If set, Checkout displays a back button and customers will be directed to this URL if they * decide to cancel payment and return to your website. This parameter is not allowed if ui_mode @@ -883,6 +935,34 @@ public Builder addAllDiscount(List elements) { return this; } + /** + * Add an element to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SessionCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addExcludedPaymentMethodType( + SessionCreateParams.ExcludedPaymentMethodType element) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.add(element); + return this; + } + + /** + * Add all elements to `excludedPaymentMethodTypes` list. A list is initialized for the first + * `add/addAll` call, and subsequent calls adds additional elements to the original list. See + * {@link SessionCreateParams#excludedPaymentMethodTypes} for the field documentation. + */ + public Builder addAllExcludedPaymentMethodType( + List elements) { + if (this.excludedPaymentMethodTypes == null) { + this.excludedPaymentMethodTypes = new ArrayList<>(); + } + this.excludedPaymentMethodTypes.addAll(elements); + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -1021,6 +1101,20 @@ public Builder setMode(SessionCreateParams.Mode mode) { return this; } + /** + * Controls name collection settings for the session. + * + *

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

If a Customer is created or provided, + * the names can be saved to the Customer object as well. + */ + public Builder setNameCollection(SessionCreateParams.NameCollection nameCollection) { + this.nameCollection = nameCollection; + return this; + } + /** * Add an element to `optionalItems` list. A list is initialized for the first `add/addAll` * call, and subsequent calls adds additional elements to the original list. See {@link @@ -1678,16 +1772,470 @@ public SessionCreateParams.AutomaticTax.Liability build() { this.account, this.extraParams, this.type); } - /** The connected account being referenced when {@code type} is {@code account}. */ - public Builder setAccount(String account) { - this.account = account; - return this; + /** The connected account being referenced when {@code type} is {@code account}. */ + 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 SessionCreateParams.AutomaticTax.Liability#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.AutomaticTax.Liability#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Type of the account referenced in the request. */ + public Builder setType(SessionCreateParams.AutomaticTax.Liability.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("account") + ACCOUNT("account"), + + @SerializedName("self") + SELF("self"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BrandingSettings { + /** + * A hex color value starting with {@code #} representing the background color for the Checkout + * Session. + */ + @SerializedName("background_color") + Object backgroundColor; + + /** The border style for the Checkout Session. */ + @SerializedName("border_style") + ApiRequestParams.EnumParam borderStyle; + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + @SerializedName("button_color") + Object buttonColor; + + /** A string to override the business name shown on the Checkout Session. */ + @SerializedName("display_name") + String displayName; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The font family for the Checkout Session corresponding to one of the supported + * font families. + */ + @SerializedName("font_family") + ApiRequestParams.EnumParam fontFamily; + + /** The icon for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("icon") + Icon icon; + + /** The logo for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + @SerializedName("logo") + Logo logo; + + private BrandingSettings( + Object backgroundColor, + ApiRequestParams.EnumParam borderStyle, + Object buttonColor, + String displayName, + Map extraParams, + ApiRequestParams.EnumParam fontFamily, + Icon icon, + Logo logo) { + this.backgroundColor = backgroundColor; + this.borderStyle = borderStyle; + this.buttonColor = buttonColor; + this.displayName = displayName; + this.extraParams = extraParams; + this.fontFamily = fontFamily; + this.icon = icon; + this.logo = logo; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object backgroundColor; + + private ApiRequestParams.EnumParam borderStyle; + + private Object buttonColor; + + private String displayName; + + private Map extraParams; + + private ApiRequestParams.EnumParam fontFamily; + + private Icon icon; + + private Logo logo; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.BrandingSettings build() { + return new SessionCreateParams.BrandingSettings( + this.backgroundColor, + this.borderStyle, + this.buttonColor, + this.displayName, + this.extraParams, + this.fontFamily, + this.icon, + this.logo); + } + + /** + * A hex color value starting with {@code #} representing the background color for the + * Checkout Session. + */ + public Builder setBackgroundColor(String backgroundColor) { + this.backgroundColor = backgroundColor; + return this; + } + + /** + * A hex color value starting with {@code #} representing the background color for the + * Checkout Session. + */ + public Builder setBackgroundColor(EmptyParam backgroundColor) { + this.backgroundColor = backgroundColor; + return this; + } + + /** The border style for the Checkout Session. */ + public Builder setBorderStyle(SessionCreateParams.BrandingSettings.BorderStyle borderStyle) { + this.borderStyle = borderStyle; + return this; + } + + /** The border style for the Checkout Session. */ + public Builder setBorderStyle(EmptyParam borderStyle) { + this.borderStyle = borderStyle; + return this; + } + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + public Builder setButtonColor(String buttonColor) { + this.buttonColor = buttonColor; + return this; + } + + /** + * A hex color value starting with {@code #} representing the button color for the Checkout + * Session. + */ + public Builder setButtonColor(EmptyParam buttonColor) { + this.buttonColor = buttonColor; + return this; + } + + /** A string to override the business name shown on the Checkout Session. */ + public Builder setDisplayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionCreateParams.BrandingSettings#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionCreateParams.BrandingSettings#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 font family for the Checkout Session corresponding to one of the supported + * font families. + */ + public Builder setFontFamily(SessionCreateParams.BrandingSettings.FontFamily fontFamily) { + this.fontFamily = fontFamily; + return this; + } + + /** + * The font family for the Checkout Session corresponding to one of the supported + * font families. + */ + public Builder setFontFamily(EmptyParam fontFamily) { + this.fontFamily = fontFamily; + return this; + } + + /** The icon for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + public Builder setIcon(SessionCreateParams.BrandingSettings.Icon icon) { + this.icon = icon; + return this; + } + + /** The logo for the Checkout Session. You cannot set both {@code logo} and {@code icon}. */ + public Builder setLogo(SessionCreateParams.BrandingSettings.Logo logo) { + this.logo = logo; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Icon { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 a File upload representing the + * icon. Purpose must be {@code business_icon}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** + * Required. The type of image for the icon. Must be one of {@code file} or + * {@code url}. + */ + @SerializedName("type") + Type type; + + /** The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. */ + @SerializedName("url") + String url; + + private Icon(Map extraParams, String file, Type type, String url) { + this.extraParams = extraParams; + this.file = file; + this.type = type; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String file; + + private Type type; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.BrandingSettings.Icon build() { + return new SessionCreateParams.BrandingSettings.Icon( + this.extraParams, this.file, this.type, this.url); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.BrandingSettings.Icon#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.BrandingSettings.Icon#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The ID of a File upload representing the + * icon. Purpose must be {@code business_icon}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + public Builder setFile(String file) { + this.file = file; + return this; + } + + /** + * Required. The type of image for the icon. Must be one of {@code file} or + * {@code url}. + */ + public Builder setType(SessionCreateParams.BrandingSettings.Icon.Type type) { + this.type = type; + return this; + } + + /** + * The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. + */ + public Builder setUrl(String url) { + this.url = url; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("file") + FILE("file"), + + @SerializedName("url") + URL("url"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Logo { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The ID of a File upload representing the + * logo. Purpose must be {@code business_logo}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + @SerializedName("file") + String file; + + /** + * Required. The type of image for the logo. Must be one of {@code file} or + * {@code url}. + */ + @SerializedName("type") + Type type; + + /** The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. */ + @SerializedName("url") + String url; + + private Logo(Map extraParams, String file, Type type, String url) { + this.extraParams = extraParams; + this.file = file; + this.type = type; + this.url = url; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String file; + + private Type type; + + private String url; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.BrandingSettings.Logo build() { + return new SessionCreateParams.BrandingSettings.Logo( + this.extraParams, this.file, this.type, this.url); } /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link SessionCreateParams.AutomaticTax.Liability#extraParams} for the field + * map. See {@link SessionCreateParams.BrandingSettings.Logo#extraParams} for the field * documentation. */ public Builder putExtraParam(String key, Object value) { @@ -1701,7 +2249,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link SessionCreateParams.AutomaticTax.Liability#extraParams} for the field + * map. See {@link SessionCreateParams.BrandingSettings.Logo#extraParams} for the field * documentation. */ public Builder putAllExtraParam(Map map) { @@ -1712,19 +2260,40 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Type of the account referenced in the request. */ - public Builder setType(SessionCreateParams.AutomaticTax.Liability.Type type) { + /** + * The ID of a File upload representing the + * logo. Purpose must be {@code business_logo}. Required if {@code type} is {@code file} and + * disallowed otherwise. + */ + public Builder setFile(String file) { + this.file = file; + return this; + } + + /** + * Required. The type of image for the logo. Must be one of {@code file} or + * {@code url}. + */ + public Builder setType(SessionCreateParams.BrandingSettings.Logo.Type type) { this.type = type; return this; } + + /** + * The URL of the image. Required if {@code type} is {@code url} and disallowed otherwise. + */ + public Builder setUrl(String url) { + this.url = url; + return this; + } } public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("account") - ACCOUNT("account"), + @SerializedName("file") + FILE("file"), - @SerializedName("self") - SELF("self"); + @SerializedName("url") + URL("url"); @Getter(onMethod_ = {@Override}) private final String value; @@ -1734,6 +2303,111 @@ public enum Type implements ApiRequestParams.EnumParam { } } } + + public enum BorderStyle implements ApiRequestParams.EnumParam { + @SerializedName("pill") + PILL("pill"), + + @SerializedName("rectangular") + RECTANGULAR("rectangular"), + + @SerializedName("rounded") + ROUNDED("rounded"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + BorderStyle(String value) { + this.value = value; + } + } + + public enum FontFamily implements ApiRequestParams.EnumParam { + @SerializedName("be_vietnam_pro") + BE_VIETNAM_PRO("be_vietnam_pro"), + + @SerializedName("bitter") + BITTER("bitter"), + + @SerializedName("chakra_petch") + CHAKRA_PETCH("chakra_petch"), + + @SerializedName("default") + DEFAULT("default"), + + @SerializedName("hahmlet") + HAHMLET("hahmlet"), + + @SerializedName("inconsolata") + INCONSOLATA("inconsolata"), + + @SerializedName("inter") + INTER("inter"), + + @SerializedName("lato") + LATO("lato"), + + @SerializedName("lora") + LORA("lora"), + + @SerializedName("m_plus_1_code") + M_PLUS_1_CODE("m_plus_1_code"), + + @SerializedName("montserrat") + MONTSERRAT("montserrat"), + + @SerializedName("noto_sans") + NOTO_SANS("noto_sans"), + + @SerializedName("noto_sans_jp") + NOTO_SANS_JP("noto_sans_jp"), + + @SerializedName("noto_serif") + NOTO_SERIF("noto_serif"), + + @SerializedName("nunito") + NUNITO("nunito"), + + @SerializedName("open_sans") + OPEN_SANS("open_sans"), + + @SerializedName("pridi") + PRIDI("pridi"), + + @SerializedName("pt_sans") + PT_SANS("pt_sans"), + + @SerializedName("pt_serif") + PT_SERIF("pt_serif"), + + @SerializedName("raleway") + RALEWAY("raleway"), + + @SerializedName("roboto") + ROBOTO("roboto"), + + @SerializedName("roboto_slab") + ROBOTO_SLAB("roboto_slab"), + + @SerializedName("source_sans_pro") + SOURCE_SANS_PRO("source_sans_pro"), + + @SerializedName("titillium_web") + TITILLIUM_WEB("titillium_web"), + + @SerializedName("ubuntu_mono") + UBUNTU_MONO("ubuntu_mono"), + + @SerializedName("zen_maru_gothic") + ZEN_MARU_GOTHIC("zen_maru_gothic"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FontFamily(String value) { + this.value = value; + } + } } @Getter @@ -5614,19 +6288,28 @@ public static class ProductData { @SerializedName("tax_code") String taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + String unitLabel; + private ProductData( String description, Map extraParams, List images, Map metadata, String name, - String taxCode) { + String taxCode, + String unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -5646,6 +6329,8 @@ public static class Builder { private String taxCode; + private String unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.LineItem.PriceData.ProductData build() { return new SessionCreateParams.LineItem.PriceData.ProductData( @@ -5654,7 +6339,8 @@ public SessionCreateParams.LineItem.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -5762,6 +6448,15 @@ public Builder setTaxCode(String taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } @@ -5865,43 +6560,321 @@ public Builder setIntervalCount(Long intervalCount) { } } - public enum Interval implements ApiRequestParams.EnumParam { - @SerializedName("day") - DAY("day"), - - @SerializedName("month") - MONTH("month"), + public enum Interval implements ApiRequestParams.EnumParam { + @SerializedName("day") + DAY("day"), + + @SerializedName("month") + MONTH("month"), + + @SerializedName("week") + WEEK("week"), + + @SerializedName("year") + YEAR("year"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Interval(String value) { + this.value = value; + } + } + } + + public enum TaxBehavior implements ApiRequestParams.EnumParam { + @SerializedName("exclusive") + EXCLUSIVE("exclusive"), + + @SerializedName("inclusive") + INCLUSIVE("inclusive"), + + @SerializedName("unspecified") + UNSPECIFIED("unspecified"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + TaxBehavior(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class NameCollection { + /** Controls settings applied for collecting the customer's business name on the session. */ + @SerializedName("business") + Business business; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Controls settings applied for collecting the customer's individual name on the session. */ + @SerializedName("individual") + Individual individual; + + private NameCollection( + Business business, Map extraParams, Individual individual) { + this.business = business; + this.extraParams = extraParams; + this.individual = individual; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Business business; + + private Map extraParams; + + private Individual individual; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.NameCollection build() { + return new SessionCreateParams.NameCollection( + this.business, this.extraParams, this.individual); + } + + /** Controls settings applied for collecting the customer's business name on the session. */ + public Builder setBusiness(SessionCreateParams.NameCollection.Business business) { + this.business = business; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionCreateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionCreateParams.NameCollection#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Controls settings applied for collecting the customer's individual name on the session. */ + public Builder setIndividual(SessionCreateParams.NameCollection.Individual individual) { + this.individual = individual; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Business { + /** + * Required. Enable business name collection on the Checkout Session. + * Defaults to {@code false}. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Whether the customer is required to provide a business name before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; + + private Business(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + private Boolean optional; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.NameCollection.Business build() { + return new SessionCreateParams.NameCollection.Business( + this.enabled, this.extraParams, this.optional); + } + + /** + * Required. Enable business name collection on the Checkout Session. + * Defaults to {@code false}. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.NameCollection.Business#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.NameCollection.Business#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the customer is required to provide a business name before completing the + * Checkout Session. Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Individual { + /** + * Required. Enable individual name collection on the Checkout Session. + * Defaults to {@code false}. + */ + @SerializedName("enabled") + Boolean enabled; - @SerializedName("week") - WEEK("week"), + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; - @SerializedName("year") - YEAR("year"); + /** + * Whether the customer is required to provide their name before completing the Checkout + * Session. Defaults to {@code false}. + */ + @SerializedName("optional") + Boolean optional; - @Getter(onMethod_ = {@Override}) - private final String value; + private Individual(Boolean enabled, Map extraParams, Boolean optional) { + this.enabled = enabled; + this.extraParams = extraParams; + this.optional = optional; + } - Interval(String value) { - this.value = value; - } - } + public static Builder builder() { + return new Builder(); } - public enum TaxBehavior implements ApiRequestParams.EnumParam { - @SerializedName("exclusive") - EXCLUSIVE("exclusive"), + public static class Builder { + private Boolean enabled; - @SerializedName("inclusive") - INCLUSIVE("inclusive"), + private Map extraParams; - @SerializedName("unspecified") - UNSPECIFIED("unspecified"); + private Boolean optional; - @Getter(onMethod_ = {@Override}) - private final String value; + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.NameCollection.Individual build() { + return new SessionCreateParams.NameCollection.Individual( + this.enabled, this.extraParams, this.optional); + } - TaxBehavior(String value) { - this.value = value; + /** + * Required. Enable individual name collection on the Checkout Session. + * Defaults to {@code false}. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.NameCollection.Individual#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.NameCollection.Individual#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Whether the customer is required to provide their name before completing the Checkout + * Session. Defaults to {@code false}. + */ + public Builder setOptional(Boolean optional) { + this.optional = optional; + return this; } } } @@ -6697,11 +7670,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -6804,13 +7779,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -7075,6 +8052,10 @@ public static class PaymentMethodOptions { @SerializedName("alipay") Alipay alipay; + /** contains details about the Alma payment method options. */ + @SerializedName("alma") + Alma alma; + /** contains details about the AmazonPay payment method options. */ @SerializedName("amazon_pay") AmazonPay amazonPay; @@ -7091,6 +8072,10 @@ public static class PaymentMethodOptions { @SerializedName("bancontact") Bancontact bancontact; + /** contains details about the Billie payment method options. */ + @SerializedName("billie") + Billie billie; + /** contains details about the Boleto payment method options. */ @SerializedName("boleto") Boleto boleto; @@ -7107,6 +8092,10 @@ public static class PaymentMethodOptions { @SerializedName("customer_balance") CustomerBalance customerBalance; + /** contains details about the DemoPay payment method options. */ + @SerializedName("demo_pay") + DemoPay demoPay; + /** contains details about the EPS payment method options. */ @SerializedName("eps") Eps eps; @@ -7208,6 +8197,10 @@ public static class PaymentMethodOptions { @SerializedName("samsung_pay") SamsungPay samsungPay; + /** contains details about the Satispay payment method options. */ + @SerializedName("satispay") + Satispay satispay; + /** contains details about the Sepa Debit payment method options. */ @SerializedName("sepa_debit") SepaDebit sepaDebit; @@ -7233,14 +8226,17 @@ private PaymentMethodOptions( Affirm affirm, AfterpayClearpay afterpayClearpay, Alipay alipay, + Alma alma, AmazonPay amazonPay, AuBecsDebit auBecsDebit, BacsDebit bacsDebit, Bancontact bancontact, + Billie billie, Boleto boleto, Card card, Cashapp cashapp, CustomerBalance customerBalance, + DemoPay demoPay, Eps eps, Map extraParams, Fpx fpx, @@ -7265,6 +8261,7 @@ private PaymentMethodOptions( Pix pix, RevolutPay revolutPay, SamsungPay samsungPay, + Satispay satispay, SepaDebit sepaDebit, Sofort sofort, Swish swish, @@ -7274,14 +8271,17 @@ private PaymentMethodOptions( this.affirm = affirm; this.afterpayClearpay = afterpayClearpay; this.alipay = alipay; + this.alma = alma; this.amazonPay = amazonPay; this.auBecsDebit = auBecsDebit; this.bacsDebit = bacsDebit; this.bancontact = bancontact; + this.billie = billie; this.boleto = boleto; this.card = card; this.cashapp = cashapp; this.customerBalance = customerBalance; + this.demoPay = demoPay; this.eps = eps; this.extraParams = extraParams; this.fpx = fpx; @@ -7306,6 +8306,7 @@ private PaymentMethodOptions( this.pix = pix; this.revolutPay = revolutPay; this.samsungPay = samsungPay; + this.satispay = satispay; this.sepaDebit = sepaDebit; this.sofort = sofort; this.swish = swish; @@ -7326,6 +8327,8 @@ public static class Builder { private Alipay alipay; + private Alma alma; + private AmazonPay amazonPay; private AuBecsDebit auBecsDebit; @@ -7334,6 +8337,8 @@ public static class Builder { private Bancontact bancontact; + private Billie billie; + private Boleto boleto; private Card card; @@ -7342,6 +8347,8 @@ public static class Builder { private CustomerBalance customerBalance; + private DemoPay demoPay; + private Eps eps; private Map extraParams; @@ -7390,6 +8397,8 @@ public static class Builder { private SamsungPay samsungPay; + private Satispay satispay; + private SepaDebit sepaDebit; private Sofort sofort; @@ -7407,14 +8416,17 @@ public SessionCreateParams.PaymentMethodOptions build() { this.affirm, this.afterpayClearpay, this.alipay, + this.alma, this.amazonPay, this.auBecsDebit, this.bacsDebit, this.bancontact, + this.billie, this.boleto, this.card, this.cashapp, this.customerBalance, + this.demoPay, this.eps, this.extraParams, this.fpx, @@ -7439,6 +8451,7 @@ public SessionCreateParams.PaymentMethodOptions build() { this.pix, this.revolutPay, this.samsungPay, + this.satispay, this.sepaDebit, this.sofort, this.swish, @@ -7471,6 +8484,12 @@ public Builder setAlipay(SessionCreateParams.PaymentMethodOptions.Alipay alipay) return this; } + /** contains details about the Alma payment method options. */ + public Builder setAlma(SessionCreateParams.PaymentMethodOptions.Alma alma) { + this.alma = alma; + return this; + } + /** contains details about the AmazonPay payment method options. */ public Builder setAmazonPay(SessionCreateParams.PaymentMethodOptions.AmazonPay amazonPay) { this.amazonPay = amazonPay; @@ -7496,6 +8515,12 @@ public Builder setBancontact(SessionCreateParams.PaymentMethodOptions.Bancontact return this; } + /** contains details about the Billie payment method options. */ + public Builder setBillie(SessionCreateParams.PaymentMethodOptions.Billie billie) { + this.billie = billie; + return this; + } + /** contains details about the Boleto payment method options. */ public Builder setBoleto(SessionCreateParams.PaymentMethodOptions.Boleto boleto) { this.boleto = boleto; @@ -7521,6 +8546,12 @@ public Builder setCustomerBalance( return this; } + /** contains details about the DemoPay payment method options. */ + public Builder setDemoPay(SessionCreateParams.PaymentMethodOptions.DemoPay demoPay) { + this.demoPay = demoPay; + return this; + } + /** contains details about the EPS payment method options. */ public Builder setEps(SessionCreateParams.PaymentMethodOptions.Eps eps) { this.eps = eps; @@ -7686,6 +8717,12 @@ public Builder setSamsungPay(SessionCreateParams.PaymentMethodOptions.SamsungPay return this; } + /** contains details about the Satispay payment method options. */ + public Builder setSatispay(SessionCreateParams.PaymentMethodOptions.Satispay satispay) { + this.satispay = satispay; + return this; + } + /** contains details about the Sepa Debit payment method options. */ public Builder setSepaDebit(SessionCreateParams.PaymentMethodOptions.SepaDebit sepaDebit) { this.sepaDebit = sepaDebit; @@ -8214,6 +9251,10 @@ public enum VerificationMethod implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Affirm { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -8245,7 +9286,11 @@ public static class Affirm { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Affirm(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Affirm( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -8255,6 +9300,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -8262,7 +9309,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Affirm build() { return new SessionCreateParams.PaymentMethodOptions.Affirm( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Affirm.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -8320,6 +9374,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -8336,6 +9402,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class AfterpayClearpay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -8367,7 +9437,11 @@ public static class AfterpayClearpay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AfterpayClearpay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private AfterpayClearpay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -8377,6 +9451,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -8384,7 +9460,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.AfterpayClearpay build() { return new SessionCreateParams.PaymentMethodOptions.AfterpayClearpay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.AfterpayClearpay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -8443,6 +9526,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -8565,14 +9660,99 @@ public Builder setSetupFutureUsage( } } - public enum SetupFutureUsage implements ApiRequestParams.EnumParam { - @SerializedName("none") - NONE("none"); + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Alma { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Alma(CaptureMethod captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Alma build() { + return new SessionCreateParams.PaymentMethodOptions.Alma( + this.captureMethod, this.extraParams); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Alma.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Alma#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Alma#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); @Getter(onMethod_ = {@Override}) private final String value; - SetupFutureUsage(String value) { + CaptureMethod(String value) { this.value = value; } } @@ -8581,6 +9761,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class AmazonPay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -8612,7 +9796,11 @@ public static class AmazonPay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private AmazonPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private AmazonPay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -8622,6 +9810,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -8629,7 +9819,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.AmazonPay build() { return new SessionCreateParams.PaymentMethodOptions.AmazonPay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.AmazonPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -8687,6 +9884,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -9230,6 +10439,91 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Billie { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private Billie(CaptureMethod captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.Billie build() { + return new SessionCreateParams.PaymentMethodOptions.Billie( + this.captureMethod, this.extraParams); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Billie.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Billie#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.Billie#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Boleto { @@ -9385,6 +10679,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Card { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -9498,6 +10796,7 @@ public static class Card { String statementDescriptorSuffixKanji; private Card( + CaptureMethod captureMethod, Map extraParams, Installments installments, RequestDecrementalAuthorization requestDecrementalAuthorization, @@ -9510,6 +10809,7 @@ private Card( SetupFutureUsage setupFutureUsage, String statementDescriptorSuffixKana, String statementDescriptorSuffixKanji) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.installments = installments; this.requestDecrementalAuthorization = requestDecrementalAuthorization; @@ -9529,6 +10829,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private Installments installments; @@ -9556,6 +10858,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Card build() { return new SessionCreateParams.PaymentMethodOptions.Card( + this.captureMethod, this.extraParams, this.installments, this.requestDecrementalAuthorization, @@ -9570,6 +10873,13 @@ public SessionCreateParams.PaymentMethodOptions.Card build() { this.statementDescriptorSuffixKanji); } + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Card.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -9943,6 +11253,18 @@ public enum BrandsBlocked implements ApiRequestParams.EnumParam { } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum RequestDecrementalAuthorization implements ApiRequestParams.EnumParam { @SerializedName("if_available") IF_AVAILABLE("if_available"), @@ -10055,6 +11377,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Cashapp { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -10086,7 +11412,11 @@ public static class Cashapp { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Cashapp(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Cashapp( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -10096,6 +11426,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -10103,7 +11435,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Cashapp build() { return new SessionCreateParams.PaymentMethodOptions.Cashapp( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Cashapp.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -10161,6 +11500,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -10631,23 +11982,148 @@ public enum Type implements ApiRequestParams.EnumParam { this.value = value; } } - } - - public enum FundingType implements ApiRequestParams.EnumParam { - @SerializedName("bank_transfer") - BANK_TRANSFER("bank_transfer"); + } + + public enum FundingType implements ApiRequestParams.EnumParam { + @SerializedName("bank_transfer") + BANK_TRANSFER("bank_transfer"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FundingType(String value) { + this.value = value; + } + } + + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { + @SerializedName("none") + NONE("none"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class DemoPay { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + *

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

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

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

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

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

When processing card payments, Stripe uses {@code setup_future_usage} to help you + * comply with regional legislation and network rules, such as SCA. + */ + public Builder setSetupFutureUsage( + SessionCreateParams.PaymentMethodOptions.DemoPay.SetupFutureUsage setupFutureUsage) { + this.setupFutureUsage = setupFutureUsage; + return this; } } public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") - NONE("none"); + NONE("none"), + + @SerializedName("off_session") + OFF_SESSION("off_session"); @Getter(onMethod_ = {@Override}) private final String value; @@ -11425,6 +12901,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Klarna { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -11461,9 +12941,11 @@ public static class Klarna { Object subscriptions; private Klarna( + CaptureMethod captureMethod, Map extraParams, SetupFutureUsage setupFutureUsage, Object subscriptions) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; this.subscriptions = subscriptions; @@ -11474,6 +12956,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -11483,7 +12967,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Klarna build() { return new SessionCreateParams.PaymentMethodOptions.Klarna( - this.extraParams, this.setupFutureUsage, this.subscriptions); + this.captureMethod, this.extraParams, this.setupFutureUsage, this.subscriptions); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Klarna.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -11861,6 +13352,18 @@ public enum Interval implements ApiRequestParams.EnumParam { } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -12179,6 +13682,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Link { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12210,7 +13717,11 @@ public static class Link { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Link(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Link( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -12220,6 +13731,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -12227,7 +13740,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Link build() { return new SessionCreateParams.PaymentMethodOptions.Link( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Link.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -12285,6 +13805,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -12304,6 +13836,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class Mobilepay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -12335,7 +13871,11 @@ public static class Mobilepay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private Mobilepay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private Mobilepay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -12345,6 +13885,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -12352,7 +13894,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.Mobilepay build() { return new SessionCreateParams.PaymentMethodOptions.Mobilepay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.Mobilepay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -12410,6 +13959,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"); @@ -14553,6 +16114,10 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) public static class RevolutPay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -14584,7 +16149,11 @@ public static class RevolutPay { @SerializedName("setup_future_usage") SetupFutureUsage setupFutureUsage; - private RevolutPay(Map extraParams, SetupFutureUsage setupFutureUsage) { + private RevolutPay( + CaptureMethod captureMethod, + Map extraParams, + SetupFutureUsage setupFutureUsage) { + this.captureMethod = captureMethod; this.extraParams = extraParams; this.setupFutureUsage = setupFutureUsage; } @@ -14594,6 +16163,8 @@ public static Builder builder() { } public static class Builder { + private CaptureMethod captureMethod; + private Map extraParams; private SetupFutureUsage setupFutureUsage; @@ -14601,7 +16172,14 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.PaymentMethodOptions.RevolutPay build() { return new SessionCreateParams.PaymentMethodOptions.RevolutPay( - this.extraParams, this.setupFutureUsage); + this.captureMethod, this.extraParams, this.setupFutureUsage); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.RevolutPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; } /** @@ -14659,6 +16237,18 @@ public Builder setSetupFutureUsage( } } + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { + this.value = value; + } + } + public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @SerializedName("none") NONE("none"), @@ -14669,7 +16259,92 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter(onMethod_ = {@Override}) private final String value; - SetupFutureUsage(String value) { + SetupFutureUsage(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SamsungPay { + /** Controls when the funds will be captured from the customer's account. */ + @SerializedName("capture_method") + CaptureMethod captureMethod; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private SamsungPay(CaptureMethod captureMethod, Map extraParams) { + this.captureMethod = captureMethod; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CaptureMethod captureMethod; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.PaymentMethodOptions.SamsungPay build() { + return new SessionCreateParams.PaymentMethodOptions.SamsungPay( + this.captureMethod, this.extraParams); + } + + /** Controls when the funds will be captured from the customer's account. */ + public Builder setCaptureMethod( + SessionCreateParams.PaymentMethodOptions.SamsungPay.CaptureMethod captureMethod) { + this.captureMethod = captureMethod; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + public enum CaptureMethod implements ApiRequestParams.EnumParam { + @SerializedName("manual") + MANUAL("manual"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + CaptureMethod(String value) { this.value = value; } } @@ -14677,7 +16352,7 @@ public enum SetupFutureUsage implements ApiRequestParams.EnumParam { @Getter @EqualsAndHashCode(callSuper = false) - public static class SamsungPay { + public static class Satispay { /** Controls when the funds will be captured from the customer's account. */ @SerializedName("capture_method") CaptureMethod captureMethod; @@ -14691,7 +16366,7 @@ public static class SamsungPay { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - private SamsungPay(CaptureMethod captureMethod, Map extraParams) { + private Satispay(CaptureMethod captureMethod, Map extraParams) { this.captureMethod = captureMethod; this.extraParams = extraParams; } @@ -14706,14 +16381,14 @@ public static class Builder { private Map extraParams; /** Finalize and obtain parameter instance from this builder. */ - public SessionCreateParams.PaymentMethodOptions.SamsungPay build() { - return new SessionCreateParams.PaymentMethodOptions.SamsungPay( + public SessionCreateParams.PaymentMethodOptions.Satispay build() { + return new SessionCreateParams.PaymentMethodOptions.Satispay( this.captureMethod, this.extraParams); } /** Controls when the funds will be captured from the customer's account. */ public Builder setCaptureMethod( - SessionCreateParams.PaymentMethodOptions.SamsungPay.CaptureMethod captureMethod) { + SessionCreateParams.PaymentMethodOptions.Satispay.CaptureMethod captureMethod) { this.captureMethod = captureMethod; return this; } @@ -14721,7 +16396,7 @@ public Builder setCaptureMethod( /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#extraParams} for the + * map. See {@link SessionCreateParams.PaymentMethodOptions.Satispay#extraParams} for the * field documentation. */ public Builder putExtraParam(String key, Object value) { @@ -14735,7 +16410,7 @@ public Builder putExtraParam(String key, Object value) { /** * Add all map key/value pairs to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original - * map. See {@link SessionCreateParams.PaymentMethodOptions.SamsungPay#extraParams} for the + * map. See {@link SessionCreateParams.PaymentMethodOptions.Satispay#extraParams} for the * field documentation. */ public Builder putAllExtraParam(Map map) { @@ -18719,15 +20394,20 @@ public static class BillingMode { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Configure behavior for flexible billing mode. */ + @SerializedName("flexible") + Flexible flexible; + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ @SerializedName("type") Type type; - private BillingMode(Map extraParams, Type type) { + private BillingMode(Map extraParams, Flexible flexible, Type type) { this.extraParams = extraParams; + this.flexible = flexible; this.type = type; } @@ -18738,11 +20418,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private Flexible flexible; + private Type type; /** Finalize and obtain parameter instance from this builder. */ public SessionCreateParams.SubscriptionData.BillingMode build() { - return new SessionCreateParams.SubscriptionData.BillingMode(this.extraParams, this.type); + return new SessionCreateParams.SubscriptionData.BillingMode( + this.extraParams, this.flexible, this.type); } /** @@ -18773,9 +20456,16 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Configure behavior for flexible billing mode. */ + public Builder setFlexible( + SessionCreateParams.SubscriptionData.BillingMode.Flexible flexible) { + this.flexible = flexible; + return this; + } + /** * Required. Controls the calculation and orchestration of prorations and - * invoices for subscriptions. + * invoices for subscriptions. If no value is passed, the default is {@code flexible}. */ public Builder setType(SessionCreateParams.SubscriptionData.BillingMode.Type type) { this.type = type; @@ -18783,6 +20473,100 @@ public Builder setType(SessionCreateParams.SubscriptionData.BillingMode.Type typ } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Flexible { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + @SerializedName("proration_discounts") + ProrationDiscounts prorationDiscounts; + + private Flexible(Map extraParams, ProrationDiscounts prorationDiscounts) { + this.extraParams = extraParams; + this.prorationDiscounts = prorationDiscounts; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private ProrationDiscounts prorationDiscounts; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionCreateParams.SubscriptionData.BillingMode.Flexible build() { + return new SessionCreateParams.SubscriptionData.BillingMode.Flexible( + this.extraParams, this.prorationDiscounts); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionCreateParams.SubscriptionData.BillingMode.Flexible#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Controls how invoices and invoice items display proration amounts and discount amounts. + */ + public Builder setProrationDiscounts( + SessionCreateParams.SubscriptionData.BillingMode.Flexible.ProrationDiscounts + prorationDiscounts) { + this.prorationDiscounts = prorationDiscounts; + return this; + } + } + + public enum ProrationDiscounts implements ApiRequestParams.EnumParam { + @SerializedName("included") + INCLUDED("included"), + + @SerializedName("itemized") + ITEMIZED("itemized"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ProrationDiscounts(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("classic") CLASSIC("classic"), @@ -19570,6 +21354,177 @@ public enum CustomerCreation implements ApiRequestParams.EnumParam { } } + public enum ExcludedPaymentMethodType implements ApiRequestParams.EnumParam { + @SerializedName("acss_debit") + ACSS_DEBIT("acss_debit"), + + @SerializedName("affirm") + AFFIRM("affirm"), + + @SerializedName("afterpay_clearpay") + AFTERPAY_CLEARPAY("afterpay_clearpay"), + + @SerializedName("alipay") + ALIPAY("alipay"), + + @SerializedName("alma") + ALMA("alma"), + + @SerializedName("amazon_pay") + AMAZON_PAY("amazon_pay"), + + @SerializedName("au_becs_debit") + AU_BECS_DEBIT("au_becs_debit"), + + @SerializedName("bacs_debit") + BACS_DEBIT("bacs_debit"), + + @SerializedName("bancontact") + BANCONTACT("bancontact"), + + @SerializedName("billie") + BILLIE("billie"), + + @SerializedName("blik") + BLIK("blik"), + + @SerializedName("boleto") + BOLETO("boleto"), + + @SerializedName("card") + CARD("card"), + + @SerializedName("cashapp") + CASHAPP("cashapp"), + + @SerializedName("crypto") + CRYPTO("crypto"), + + @SerializedName("customer_balance") + CUSTOMER_BALANCE("customer_balance"), + + @SerializedName("eps") + EPS("eps"), + + @SerializedName("fpx") + FPX("fpx"), + + @SerializedName("giropay") + GIROPAY("giropay"), + + @SerializedName("gopay") + GOPAY("gopay"), + + @SerializedName("grabpay") + GRABPAY("grabpay"), + + @SerializedName("ideal") + IDEAL("ideal"), + + @SerializedName("kakao_pay") + KAKAO_PAY("kakao_pay"), + + @SerializedName("klarna") + KLARNA("klarna"), + + @SerializedName("konbini") + KONBINI("konbini"), + + @SerializedName("kr_card") + KR_CARD("kr_card"), + + @SerializedName("mb_way") + MB_WAY("mb_way"), + + @SerializedName("mobilepay") + MOBILEPAY("mobilepay"), + + @SerializedName("multibanco") + MULTIBANCO("multibanco"), + + @SerializedName("naver_pay") + NAVER_PAY("naver_pay"), + + @SerializedName("nz_bank_account") + NZ_BANK_ACCOUNT("nz_bank_account"), + + @SerializedName("oxxo") + OXXO("oxxo"), + + @SerializedName("p24") + P24("p24"), + + @SerializedName("pay_by_bank") + PAY_BY_BANK("pay_by_bank"), + + @SerializedName("payco") + PAYCO("payco"), + + @SerializedName("paynow") + PAYNOW("paynow"), + + @SerializedName("paypal") + PAYPAL("paypal"), + + @SerializedName("paypay") + PAYPAY("paypay"), + + @SerializedName("payto") + PAYTO("payto"), + + @SerializedName("pix") + PIX("pix"), + + @SerializedName("promptpay") + PROMPTPAY("promptpay"), + + @SerializedName("qris") + QRIS("qris"), + + @SerializedName("rechnung") + RECHNUNG("rechnung"), + + @SerializedName("revolut_pay") + REVOLUT_PAY("revolut_pay"), + + @SerializedName("samsung_pay") + SAMSUNG_PAY("samsung_pay"), + + @SerializedName("satispay") + SATISPAY("satispay"), + + @SerializedName("sepa_debit") + SEPA_DEBIT("sepa_debit"), + + @SerializedName("shopeepay") + SHOPEEPAY("shopeepay"), + + @SerializedName("sofort") + SOFORT("sofort"), + + @SerializedName("swish") + SWISH("swish"), + + @SerializedName("twint") + TWINT("twint"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"), + + @SerializedName("wechat_pay") + WECHAT_PAY("wechat_pay"), + + @SerializedName("zip") + ZIP("zip"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + ExcludedPaymentMethodType(String value) { + this.value = value; + } + } + public enum Locale implements ApiRequestParams.EnumParam { @SerializedName("auto") AUTO("auto"), @@ -19865,6 +21820,9 @@ public enum PaymentMethodType implements ApiRequestParams.EnumParam { @SerializedName("paypal") PAYPAL("paypal"), + @SerializedName("paypay") + PAYPAY("paypay"), + @SerializedName("payto") PAYTO("payto"), diff --git a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java index 346305200eb..69152334ed3 100644 --- a/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java +++ b/src/main/java/com/stripe/param/checkout/SessionUpdateParams.java @@ -15,6 +15,13 @@ @Getter @EqualsAndHashCode(callSuper = false) public class SessionUpdateParams extends ApiRequestParams { + /** + * Settings for automatic tax lookup for this session and resulting payments, invoices, and + * subscriptions. + */ + @SerializedName("automatic_tax") + AutomaticTax automaticTax; + /** * Information about the customer collected within the Checkout Session. Can only be set when * updating {@code embedded} or {@code custom} sessions. @@ -39,6 +46,10 @@ public class SessionUpdateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** Generate a post-purchase Invoice for one-time payments. */ + @SerializedName("invoice_creation") + InvoiceCreation invoiceCreation; + /** * A list of items the customer is purchasing. * @@ -80,18 +91,22 @@ public class SessionUpdateParams extends ApiRequestParams { SubscriptionData subscriptionData; private SessionUpdateParams( + AutomaticTax automaticTax, CollectedInformation collectedInformation, Object discounts, List expand, Map extraParams, + InvoiceCreation invoiceCreation, List lineItems, Object metadata, Object shippingOptions, SubscriptionData subscriptionData) { + this.automaticTax = automaticTax; this.collectedInformation = collectedInformation; this.discounts = discounts; this.expand = expand; this.extraParams = extraParams; + this.invoiceCreation = invoiceCreation; this.lineItems = lineItems; this.metadata = metadata; this.shippingOptions = shippingOptions; @@ -103,6 +118,8 @@ public static Builder builder() { } public static class Builder { + private AutomaticTax automaticTax; + private CollectedInformation collectedInformation; private Object discounts; @@ -111,6 +128,8 @@ public static class Builder { private Map extraParams; + private InvoiceCreation invoiceCreation; + private List lineItems; private Object metadata; @@ -122,16 +141,27 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionUpdateParams build() { return new SessionUpdateParams( + this.automaticTax, this.collectedInformation, this.discounts, this.expand, this.extraParams, + this.invoiceCreation, this.lineItems, this.metadata, this.shippingOptions, this.subscriptionData); } + /** + * Settings for automatic tax lookup for this session and resulting payments, invoices, and + * subscriptions. + */ + public Builder setAutomaticTax(SessionUpdateParams.AutomaticTax automaticTax) { + this.automaticTax = automaticTax; + return this; + } + /** * Information about the customer collected within the Checkout Session. Can only be set when * updating {@code embedded} or {@code custom} sessions. @@ -234,6 +264,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** Generate a post-purchase Invoice for one-time payments. */ + public Builder setInvoiceCreation(SessionUpdateParams.InvoiceCreation invoiceCreation) { + this.invoiceCreation = invoiceCreation; + return this; + } + /** * Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call, * and subsequent calls adds additional elements to the original list. See {@link @@ -360,6 +396,189 @@ public Builder setSubscriptionData(SessionUpdateParams.SubscriptionData subscrip } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AutomaticTax { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction is + * returned in the report of the connected account. + */ + @SerializedName("liability") + Liability liability; + + private AutomaticTax(Map extraParams, Liability liability) { + this.extraParams = extraParams; + this.liability = liability; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Liability liability; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.AutomaticTax build() { + return new SessionUpdateParams.AutomaticTax(this.extraParams, this.liability); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionUpdateParams.AutomaticTax#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionUpdateParams.AutomaticTax#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The account that's liable for tax. If set, the business address and tax registrations + * required to perform the tax calculation are loaded from this account. The tax transaction + * is returned in the report of the connected account. + */ + public Builder setLiability(SessionUpdateParams.AutomaticTax.Liability liability) { + this.liability = liability; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Liability { + /** The connected account being referenced when {@code type} is {@code account}. */ + @SerializedName("account") + Object account; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Type of the account referenced in the request. */ + @SerializedName("type") + Type type; + + private Liability(Object account, Map extraParams, Type type) { + this.account = account; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object account; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.AutomaticTax.Liability build() { + return new SessionUpdateParams.AutomaticTax.Liability( + this.account, this.extraParams, this.type); + } + + /** The connected account being referenced when {@code type} is {@code account}. */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** The connected account being referenced when {@code type} is {@code account}. */ + public Builder setAccount(EmptyParam 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 SessionUpdateParams.AutomaticTax.Liability#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.AutomaticTax.Liability#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Type of the account referenced in the request. */ + public Builder setType(SessionUpdateParams.AutomaticTax.Liability.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("account") + ACCOUNT("account"), + + @SerializedName("self") + SELF("self"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class CollectedInformation { @@ -545,11 +764,13 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -669,25 +890,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1090,6 +1315,259 @@ public enum Duration implements ApiRequestParams.EnumParam { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InvoiceCreation { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Parameters passed when creating invoices for payment-mode Checkout Sessions. */ + @SerializedName("invoice_data") + InvoiceData invoiceData; + + private InvoiceCreation(Map extraParams, InvoiceData invoiceData) { + this.extraParams = extraParams; + this.invoiceData = invoiceData; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private InvoiceData invoiceData; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.InvoiceCreation build() { + return new SessionUpdateParams.InvoiceCreation(this.extraParams, this.invoiceData); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * SessionUpdateParams.InvoiceCreation#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link SessionUpdateParams.InvoiceCreation#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Parameters passed when creating invoices for payment-mode Checkout Sessions. */ + public Builder setInvoiceData(SessionUpdateParams.InvoiceCreation.InvoiceData invoiceData) { + this.invoiceData = invoiceData; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InvoiceData { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 connected account that issues the invoice. The invoice is presented with the branding + * and support information of the specified account. + */ + @SerializedName("issuer") + Issuer issuer; + + private InvoiceData(Map extraParams, Issuer issuer) { + this.extraParams = extraParams; + this.issuer = issuer; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Issuer issuer; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.InvoiceCreation.InvoiceData build() { + return new SessionUpdateParams.InvoiceCreation.InvoiceData(this.extraParams, this.issuer); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.InvoiceCreation.InvoiceData#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.InvoiceCreation.InvoiceData#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 connected account that issues the invoice. The invoice is presented with the branding + * and support information of the specified account. + */ + public Builder setIssuer(SessionUpdateParams.InvoiceCreation.InvoiceData.Issuer issuer) { + this.issuer = issuer; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Issuer { + /** The connected account being referenced when {@code type} is {@code account}. */ + @SerializedName("account") + Object account; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Type of the account referenced in the request. */ + @SerializedName("type") + Type type; + + private Issuer(Object account, Map extraParams, Type type) { + this.account = account; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object account; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.InvoiceCreation.InvoiceData.Issuer build() { + return new SessionUpdateParams.InvoiceCreation.InvoiceData.Issuer( + this.account, this.extraParams, this.type); + } + + /** The connected account being referenced when {@code type} is {@code account}. */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** The connected account being referenced when {@code type} is {@code account}. */ + public Builder setAccount(EmptyParam 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 SessionUpdateParams.InvoiceCreation.InvoiceData.Issuer#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.InvoiceCreation.InvoiceData.Issuer#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Type of the account referenced in the request. */ + public Builder setType(SessionUpdateParams.InvoiceCreation.InvoiceData.Issuer.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("account") + ACCOUNT("account"), + + @SerializedName("self") + SELF("self"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class LineItem { @@ -1799,19 +2277,28 @@ public static class ProductData { @SerializedName("tax_code") Object taxCode; + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + @SerializedName("unit_label") + Object unitLabel; + private ProductData( Object description, Map extraParams, List images, Map metadata, Object name, - Object taxCode) { + Object taxCode, + Object unitLabel) { this.description = description; this.extraParams = extraParams; this.images = images; this.metadata = metadata; this.name = name; this.taxCode = taxCode; + this.unitLabel = unitLabel; } public static Builder builder() { @@ -1831,6 +2318,8 @@ public static class Builder { private Object taxCode; + private Object unitLabel; + /** Finalize and obtain parameter instance from this builder. */ public SessionUpdateParams.LineItem.PriceData.ProductData build() { return new SessionUpdateParams.LineItem.PriceData.ProductData( @@ -1839,7 +2328,8 @@ public SessionUpdateParams.LineItem.PriceData.ProductData build() { this.images, this.metadata, this.name, - this.taxCode); + this.taxCode, + this.unitLabel); } /** @@ -1971,6 +2461,24 @@ public Builder setTaxCode(EmptyParam taxCode) { this.taxCode = taxCode; return this; } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(String unitLabel) { + this.unitLabel = unitLabel; + return this; + } + + /** + * A label that represents units of this product. When set, this will be included in + * customers' receipts, invoices, Checkout, and the customer portal. + */ + public Builder setUnitLabel(EmptyParam unitLabel) { + this.unitLabel = unitLabel; + return this; + } } } @@ -3118,6 +3626,10 @@ public static class SubscriptionData { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** All invoices will be billed using the specified settings. */ + @SerializedName("invoice_settings") + InvoiceSettings invoiceSettings; + /** * Unix timestamp representing the end of the trial period the customer will get before being * charged for the first time. Has to be at least 48 hours in the future. @@ -3133,8 +3645,12 @@ public static class SubscriptionData { Object trialPeriodDays; private SubscriptionData( - Map extraParams, Long trialEnd, Object trialPeriodDays) { + Map extraParams, + InvoiceSettings invoiceSettings, + Long trialEnd, + Object trialPeriodDays) { this.extraParams = extraParams; + this.invoiceSettings = invoiceSettings; this.trialEnd = trialEnd; this.trialPeriodDays = trialPeriodDays; } @@ -3146,6 +3662,8 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private InvoiceSettings invoiceSettings; + private Long trialEnd; private Object trialPeriodDays; @@ -3153,7 +3671,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public SessionUpdateParams.SubscriptionData build() { return new SessionUpdateParams.SubscriptionData( - this.extraParams, this.trialEnd, this.trialPeriodDays); + this.extraParams, this.invoiceSettings, this.trialEnd, this.trialPeriodDays); } /** @@ -3182,6 +3700,13 @@ public Builder putAllExtraParam(Map map) { return this; } + /** All invoices will be billed using the specified settings. */ + public Builder setInvoiceSettings( + SessionUpdateParams.SubscriptionData.InvoiceSettings invoiceSettings) { + this.invoiceSettings = invoiceSettings; + return this; + } + /** * Unix timestamp representing the end of the trial period the customer will get before being * charged for the first time. Has to be at least 48 hours in the future. @@ -3209,5 +3734,194 @@ public Builder setTrialPeriodDays(EmptyParam trialPeriodDays) { return this; } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class InvoiceSettings { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-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 connected account that issues the invoice. The invoice is presented with the branding + * and support information of the specified account. + */ + @SerializedName("issuer") + Issuer issuer; + + private InvoiceSettings(Map extraParams, Issuer issuer) { + this.extraParams = extraParams; + this.issuer = issuer; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Issuer issuer; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.SubscriptionData.InvoiceSettings build() { + return new SessionUpdateParams.SubscriptionData.InvoiceSettings( + this.extraParams, this.issuer); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.SubscriptionData.InvoiceSettings#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link SessionUpdateParams.SubscriptionData.InvoiceSettings#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 connected account that issues the invoice. The invoice is presented with the branding + * and support information of the specified account. + */ + public Builder setIssuer( + SessionUpdateParams.SubscriptionData.InvoiceSettings.Issuer issuer) { + this.issuer = issuer; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Issuer { + /** The connected account being referenced when {@code type} is {@code account}. */ + @SerializedName("account") + Object account; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Required. Type of the account referenced in the request. */ + @SerializedName("type") + Type type; + + private Issuer(Object account, Map extraParams, Type type) { + this.account = account; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object account; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public SessionUpdateParams.SubscriptionData.InvoiceSettings.Issuer build() { + return new SessionUpdateParams.SubscriptionData.InvoiceSettings.Issuer( + this.account, this.extraParams, this.type); + } + + /** The connected account being referenced when {@code type} is {@code account}. */ + public Builder setAccount(String account) { + this.account = account; + return this; + } + + /** The connected account being referenced when {@code type} is {@code account}. */ + public Builder setAccount(EmptyParam 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 + * SessionUpdateParams.SubscriptionData.InvoiceSettings.Issuer#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * SessionUpdateParams.SubscriptionData.InvoiceSettings.Issuer#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. Type of the account referenced in the request. */ + public Builder setType( + SessionUpdateParams.SubscriptionData.InvoiceSettings.Issuer.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("account") + ACCOUNT("account"), + + @SerializedName("self") + SELF("self"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } } } diff --git a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java index f0f905606c0..88ea2baed99 100644 --- a/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/AuthorizationCreateParams.java @@ -62,6 +62,13 @@ public class AuthorizationCreateParams extends ApiRequestParams { @SerializedName("fleet") Fleet fleet; + /** + * Probability that this transaction can be disputed in the event of fraud. Assessed by comparing + * the characteristics of the authorization to card network rules. + */ + @SerializedName("fraud_disputability_likelihood") + FraudDisputabilityLikelihood fraudDisputabilityLikelihood; + /** Information about fuel that was purchased with this transaction. */ @SerializedName("fuel") Fuel fuel; @@ -100,6 +107,10 @@ public class AuthorizationCreateParams extends ApiRequestParams { @SerializedName("network_data") NetworkData networkData; + /** Stripe’s assessment of the fraud risk for this authorization. */ + @SerializedName("risk_assessment") + RiskAssessment riskAssessment; + /** * Verifications that Stripe performed on information that the cardholder provided to the * merchant. @@ -123,12 +134,14 @@ private AuthorizationCreateParams( List expand, Map extraParams, Fleet fleet, + FraudDisputabilityLikelihood fraudDisputabilityLikelihood, Fuel fuel, Boolean isAmountControllable, Long merchantAmount, String merchantCurrency, MerchantData merchantData, NetworkData networkData, + RiskAssessment riskAssessment, VerificationData verificationData, Wallet wallet) { this.amount = amount; @@ -139,12 +152,14 @@ private AuthorizationCreateParams( this.expand = expand; this.extraParams = extraParams; this.fleet = fleet; + this.fraudDisputabilityLikelihood = fraudDisputabilityLikelihood; this.fuel = fuel; this.isAmountControllable = isAmountControllable; this.merchantAmount = merchantAmount; this.merchantCurrency = merchantCurrency; this.merchantData = merchantData; this.networkData = networkData; + this.riskAssessment = riskAssessment; this.verificationData = verificationData; this.wallet = wallet; } @@ -170,6 +185,8 @@ public static class Builder { private Fleet fleet; + private FraudDisputabilityLikelihood fraudDisputabilityLikelihood; + private Fuel fuel; private Boolean isAmountControllable; @@ -182,6 +199,8 @@ public static class Builder { private NetworkData networkData; + private RiskAssessment riskAssessment; + private VerificationData verificationData; private Wallet wallet; @@ -197,12 +216,14 @@ public AuthorizationCreateParams build() { this.expand, this.extraParams, this.fleet, + this.fraudDisputabilityLikelihood, this.fuel, this.isAmountControllable, this.merchantAmount, this.merchantCurrency, this.merchantData, this.networkData, + this.riskAssessment, this.verificationData, this.wallet); } @@ -309,6 +330,16 @@ public Builder setFleet(AuthorizationCreateParams.Fleet fleet) { return this; } + /** + * Probability that this transaction can be disputed in the event of fraud. Assessed by + * comparing the characteristics of the authorization to card network rules. + */ + public Builder setFraudDisputabilityLikelihood( + AuthorizationCreateParams.FraudDisputabilityLikelihood fraudDisputabilityLikelihood) { + this.fraudDisputabilityLikelihood = fraudDisputabilityLikelihood; + return this; + } + /** Information about fuel that was purchased with this transaction. */ public Builder setFuel(AuthorizationCreateParams.Fuel fuel) { this.fuel = fuel; @@ -361,6 +392,12 @@ public Builder setNetworkData(AuthorizationCreateParams.NetworkData networkData) return this; } + /** Stripe’s assessment of the fraud risk for this authorization. */ + public Builder setRiskAssessment(AuthorizationCreateParams.RiskAssessment riskAssessment) { + this.riskAssessment = riskAssessment; + return this; + } + /** * Verifications that Stripe performed on information that the cardholder provided to the * merchant. @@ -2559,6 +2596,392 @@ public Builder putAllExtraParam(Map map) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class RiskAssessment { + /** Stripe's assessment of this authorization's likelihood of being card testing activity. */ + @SerializedName("card_testing_risk") + CardTestingRisk cardTestingRisk; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The dispute risk of the merchant (the seller on a purchase) on an authorization based on all + * Stripe Issuing activity. + */ + @SerializedName("merchant_dispute_risk") + MerchantDisputeRisk merchantDisputeRisk; + + private RiskAssessment( + CardTestingRisk cardTestingRisk, + Map extraParams, + MerchantDisputeRisk merchantDisputeRisk) { + this.cardTestingRisk = cardTestingRisk; + this.extraParams = extraParams; + this.merchantDisputeRisk = merchantDisputeRisk; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CardTestingRisk cardTestingRisk; + + private Map extraParams; + + private MerchantDisputeRisk merchantDisputeRisk; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment build() { + return new AuthorizationCreateParams.RiskAssessment( + this.cardTestingRisk, this.extraParams, this.merchantDisputeRisk); + } + + /** Stripe's assessment of this authorization's likelihood of being card testing activity. */ + public Builder setCardTestingRisk( + AuthorizationCreateParams.RiskAssessment.CardTestingRisk cardTestingRisk) { + this.cardTestingRisk = cardTestingRisk; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * AuthorizationCreateParams.RiskAssessment#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link AuthorizationCreateParams.RiskAssessment#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The dispute risk of the merchant (the seller on a purchase) on an authorization based on + * all Stripe Issuing activity. + */ + public Builder setMerchantDisputeRisk( + AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk merchantDisputeRisk) { + this.merchantDisputeRisk = merchantDisputeRisk; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CardTestingRisk { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * The % of declines due to a card number not existing in the past hour, taking place at the + * same merchant. Higher rates correspond to a greater probability of card testing activity, + * meaning bad actors may be attempting different card number combinations to guess a correct + * one. Takes on values between 0 and 100. + */ + @SerializedName("invalid_account_number_decline_rate_past_hour") + Long invalidAccountNumberDeclineRatePastHour; + + /** + * The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, + * taking place at the same merchant. Higher rates correspond to a greater probability of bad + * actors attempting to utilize valid card credentials at merchants with verification + * requirements. Takes on values between 0 and 100. + */ + @SerializedName("invalid_credentials_decline_rate_past_hour") + Long invalidCredentialsDeclineRatePastHour; + + /** + * Required. The likelihood that this authorization is associated with card + * testing activity. This is assessed by evaluating decline activity over the last hour. + */ + @SerializedName("risk_level") + RiskLevel riskLevel; + + private CardTestingRisk( + Map extraParams, + Long invalidAccountNumberDeclineRatePastHour, + Long invalidCredentialsDeclineRatePastHour, + RiskLevel riskLevel) { + this.extraParams = extraParams; + this.invalidAccountNumberDeclineRatePastHour = invalidAccountNumberDeclineRatePastHour; + this.invalidCredentialsDeclineRatePastHour = invalidCredentialsDeclineRatePastHour; + this.riskLevel = riskLevel; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long invalidAccountNumberDeclineRatePastHour; + + private Long invalidCredentialsDeclineRatePastHour; + + private RiskLevel riskLevel; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment.CardTestingRisk build() { + return new AuthorizationCreateParams.RiskAssessment.CardTestingRisk( + this.extraParams, + this.invalidAccountNumberDeclineRatePastHour, + this.invalidCredentialsDeclineRatePastHour, + this.riskLevel); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.CardTestingRisk#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.CardTestingRisk#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * The % of declines due to a card number not existing in the past hour, taking place at the + * same merchant. Higher rates correspond to a greater probability of card testing activity, + * meaning bad actors may be attempting different card number combinations to guess a + * correct one. Takes on values between 0 and 100. + */ + public Builder setInvalidAccountNumberDeclineRatePastHour( + Long invalidAccountNumberDeclineRatePastHour) { + this.invalidAccountNumberDeclineRatePastHour = invalidAccountNumberDeclineRatePastHour; + return this; + } + + /** + * The % of declines due to incorrect verification data (like CVV or expiry) in the past + * hour, taking place at the same merchant. Higher rates correspond to a greater probability + * of bad actors attempting to utilize valid card credentials at merchants with verification + * requirements. Takes on values between 0 and 100. + */ + public Builder setInvalidCredentialsDeclineRatePastHour( + Long invalidCredentialsDeclineRatePastHour) { + this.invalidCredentialsDeclineRatePastHour = invalidCredentialsDeclineRatePastHour; + return this; + } + + /** + * Required. The likelihood that this authorization is associated with card + * testing activity. This is assessed by evaluating decline activity over the last hour. + */ + public Builder setRiskLevel( + AuthorizationCreateParams.RiskAssessment.CardTestingRisk.RiskLevel riskLevel) { + this.riskLevel = riskLevel; + return this; + } + } + + public enum RiskLevel implements ApiRequestParams.EnumParam { + @SerializedName("elevated") + ELEVATED("elevated"), + + @SerializedName("highest") + HIGHEST("highest"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("normal") + NORMAL("normal"), + + @SerializedName("not_assessed") + NOT_ASSESSED("not_assessed"), + + @SerializedName("unknown") + UNKNOWN("unknown"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RiskLevel(String value) { + this.value = value; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MerchantDisputeRisk { + /** + * The dispute rate observed across all Stripe Issuing authorizations for this merchant. For + * example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing + * have resulted in a dispute. Higher values mean a higher likelihood the authorization is + * disputed. Takes on values between 0 and 100. + */ + @SerializedName("dispute_rate") + Long disputeRate; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The likelihood that authorizations from this merchant will + * result in a dispute based on their history on Stripe Issuing. + */ + @SerializedName("risk_level") + RiskLevel riskLevel; + + private MerchantDisputeRisk( + Long disputeRate, Map extraParams, RiskLevel riskLevel) { + this.disputeRate = disputeRate; + this.extraParams = extraParams; + this.riskLevel = riskLevel; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long disputeRate; + + private Map extraParams; + + private RiskLevel riskLevel; + + /** Finalize and obtain parameter instance from this builder. */ + public AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk build() { + return new AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk( + this.disputeRate, this.extraParams, this.riskLevel); + } + + /** + * The dispute rate observed across all Stripe Issuing authorizations for this merchant. For + * example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing + * have resulted in a dispute. Higher values mean a higher likelihood the authorization is + * disputed. Takes on values between 0 and 100. + */ + public Builder setDisputeRate(Long disputeRate) { + this.disputeRate = disputeRate; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The likelihood that authorizations from this merchant will + * result in a dispute based on their history on Stripe Issuing. + */ + public Builder setRiskLevel( + AuthorizationCreateParams.RiskAssessment.MerchantDisputeRisk.RiskLevel riskLevel) { + this.riskLevel = riskLevel; + return this; + } + } + + public enum RiskLevel implements ApiRequestParams.EnumParam { + @SerializedName("elevated") + ELEVATED("elevated"), + + @SerializedName("highest") + HIGHEST("highest"), + + @SerializedName("low") + LOW("low"), + + @SerializedName("normal") + NORMAL("normal"), + + @SerializedName("not_assessed") + NOT_ASSESSED("not_assessed"), + + @SerializedName("unknown") + UNKNOWN("unknown"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + RiskLevel(String value) { + this.value = value; + } + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class VerificationData { @@ -3047,6 +3470,27 @@ public enum AuthorizationMethod implements ApiRequestParams.EnumParam { } } + public enum FraudDisputabilityLikelihood implements ApiRequestParams.EnumParam { + @SerializedName("neutral") + NEUTRAL("neutral"), + + @SerializedName("unknown") + UNKNOWN("unknown"), + + @SerializedName("very_likely") + VERY_LIKELY("very_likely"), + + @SerializedName("very_unlikely") + VERY_UNLIKELY("very_unlikely"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + FraudDisputabilityLikelihood(String value) { + this.value = value; + } + } + public enum Wallet implements ApiRequestParams.EnumParam { @SerializedName("apple_pay") APPLE_PAY("apple_pay"), diff --git a/src/main/java/com/stripe/param/issuing/CardCreateParams.java b/src/main/java/com/stripe/param/issuing/CardCreateParams.java index c7f5247f253..f78c4070975 100644 --- a/src/main/java/com/stripe/param/issuing/CardCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardCreateParams.java @@ -25,6 +25,22 @@ public class CardCreateParams extends ApiRequestParams { @SerializedName("currency") String currency; + /** + * The desired expiration month (1-12) for this card if specifying + * a custom expiration date. + */ + @SerializedName("exp_month") + Long expMonth; + + /** + * The desired 4-digit expiration year for this card if specifying + * a custom expiration date. + */ + @SerializedName("exp_year") + Long expYear; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -105,6 +121,8 @@ public class CardCreateParams extends ApiRequestParams { private CardCreateParams( String cardholder, String currency, + Long expMonth, + Long expYear, List expand, Map extraParams, String financialAccount, @@ -120,6 +138,8 @@ private CardCreateParams( Type type) { this.cardholder = cardholder; this.currency = currency; + this.expMonth = expMonth; + this.expYear = expYear; this.expand = expand; this.extraParams = extraParams; this.financialAccount = financialAccount; @@ -144,6 +164,10 @@ public static class Builder { private String currency; + private Long expMonth; + + private Long expYear; + private List expand; private Map extraParams; @@ -175,6 +199,8 @@ public CardCreateParams build() { return new CardCreateParams( this.cardholder, this.currency, + this.expMonth, + this.expYear, this.expand, this.extraParams, this.financialAccount, @@ -205,6 +231,26 @@ public Builder setCurrency(String currency) { return this; } + /** + * The desired expiration month (1-12) for this card if specifying + * a custom expiration date. + */ + public Builder setExpMonth(Long expMonth) { + this.expMonth = expMonth; + return this; + } + + /** + * The desired 4-digit expiration year for this card if specifying + * a custom expiration date. + */ + public Builder setExpYear(Long expYear) { + this.expYear = expYear; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -638,11 +684,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -745,13 +791,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java index e78869945d4..93be37b2f14 100644 --- a/src/main/java/com/stripe/param/issuing/CardUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardUpdateParams.java @@ -570,11 +570,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -692,25 +692,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java index fb39aeb1f04..2203bd6c985 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderCreateParams.java @@ -455,11 +455,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -562,13 +562,15 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java index ae9b204859b..a4717d2427f 100644 --- a/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java +++ b/src/main/java/com/stripe/param/issuing/CardholderUpdateParams.java @@ -411,11 +411,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** Required. Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -533,25 +533,29 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Required. Address line 1 (e.g., street, PO Box, or company name). */ + /** + * Required. Address line 1, such as the street, PO Box, or company name. + */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java index a539435d89c..81ca112fc49 100644 --- a/src/main/java/com/stripe/param/tax/CalculationCreateParams.java +++ b/src/main/java/com/stripe/param/tax/CalculationCreateParams.java @@ -442,11 +442,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -559,25 +559,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1455,11 +1455,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -1469,7 +1469,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") Object state; @@ -1571,25 +1571,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -1609,7 +1609,7 @@ public Builder setPostalCode(EmptyParam postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; @@ -1618,7 +1618,7 @@ public Builder setState(String state) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(EmptyParam state) { this.state = state; diff --git a/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java b/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java index 4b637a89ebb..b107e321fc2 100644 --- a/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java +++ b/src/main/java/com/stripe/param/tax/SettingsUpdateParams.java @@ -338,11 +338,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -352,7 +352,7 @@ public static class Address { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ @SerializedName("state") Object state; @@ -463,25 +463,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -501,7 +501,7 @@ public Builder setPostalCode(EmptyParam postalCode) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(String state) { this.state = state; @@ -510,7 +510,7 @@ public Builder setState(String state) { /** * State/province as an ISO 3166-2 - * subdivision code, without country prefix. Example: "NY" or "TX". + * subdivision code, without country prefix, such as "NY" or "TX". */ public Builder setState(EmptyParam state) { this.state = state; diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java index cce74af3004..0707a70d15f 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationCreateParams.java @@ -14,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ConfigurationCreateParams extends ApiRequestParams { + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + @SerializedName("bbpos_wisepad3") + BbposWisepad3 bbposWisepad3; + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ @SerializedName("bbpos_wisepos_e") BbposWiseposE bbposWiseposE; @@ -64,6 +68,7 @@ public class ConfigurationCreateParams extends ApiRequestParams { Object wifi; private ConfigurationCreateParams( + BbposWisepad3 bbposWisepad3, BbposWiseposE bbposWiseposE, List expand, Map extraParams, @@ -75,6 +80,7 @@ private ConfigurationCreateParams( Object tipping, VerifoneP400 verifoneP400, Object wifi) { + this.bbposWisepad3 = bbposWisepad3; this.bbposWiseposE = bbposWiseposE; this.expand = expand; this.extraParams = extraParams; @@ -93,6 +99,8 @@ public static Builder builder() { } public static class Builder { + private BbposWisepad3 bbposWisepad3; + private BbposWiseposE bbposWiseposE; private List expand; @@ -118,6 +126,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public ConfigurationCreateParams build() { return new ConfigurationCreateParams( + this.bbposWisepad3, this.bbposWiseposE, this.expand, this.extraParams, @@ -131,6 +140,12 @@ public ConfigurationCreateParams build() { this.wifi); } + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + public Builder setBbposWisepad3(ConfigurationCreateParams.BbposWisepad3 bbposWisepad3) { + this.bbposWisepad3 = bbposWisepad3; + return this; + } + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ public Builder setBbposWiseposE(ConfigurationCreateParams.BbposWiseposE bbposWiseposE) { this.bbposWiseposE = bbposWiseposE; @@ -262,6 +277,82 @@ public Builder setWifi(EmptyParam wifi) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BbposWisepad3 { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A File ID representing an image you would like displayed on the reader. */ + @SerializedName("splashscreen") + Object splashscreen; + + private BbposWisepad3(Map extraParams, Object splashscreen) { + this.extraParams = extraParams; + this.splashscreen = splashscreen; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object splashscreen; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationCreateParams.BbposWisepad3 build() { + return new ConfigurationCreateParams.BbposWisepad3(this.extraParams, this.splashscreen); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ConfigurationCreateParams.BbposWisepad3#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ConfigurationCreateParams.BbposWisepad3#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A File ID representing an image you would like displayed on the reader. */ + public Builder setSplashscreen(String splashscreen) { + this.splashscreen = splashscreen; + return this; + } + + /** A File ID representing an image you would like displayed on the reader. */ + public Builder setSplashscreen(EmptyParam splashscreen) { + this.splashscreen = splashscreen; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class BbposWiseposE { diff --git a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java index 29edeace078..6fb6482fe1a 100644 --- a/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/ConfigurationUpdateParams.java @@ -14,6 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class ConfigurationUpdateParams extends ApiRequestParams { + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + @SerializedName("bbpos_wisepad3") + Object bbposWisepad3; + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ @SerializedName("bbpos_wisepos_e") Object bbposWiseposE; @@ -64,6 +68,7 @@ public class ConfigurationUpdateParams extends ApiRequestParams { Object wifi; private ConfigurationUpdateParams( + Object bbposWisepad3, Object bbposWiseposE, List expand, Map extraParams, @@ -75,6 +80,7 @@ private ConfigurationUpdateParams( Object tipping, Object verifoneP400, Object wifi) { + this.bbposWisepad3 = bbposWisepad3; this.bbposWiseposE = bbposWiseposE; this.expand = expand; this.extraParams = extraParams; @@ -93,6 +99,8 @@ public static Builder builder() { } public static class Builder { + private Object bbposWisepad3; + private Object bbposWiseposE; private List expand; @@ -118,6 +126,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public ConfigurationUpdateParams build() { return new ConfigurationUpdateParams( + this.bbposWisepad3, this.bbposWiseposE, this.expand, this.extraParams, @@ -131,6 +140,18 @@ public ConfigurationUpdateParams build() { this.wifi); } + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + public Builder setBbposWisepad3(ConfigurationUpdateParams.BbposWisepad3 bbposWisepad3) { + this.bbposWisepad3 = bbposWisepad3; + return this; + } + + /** An object containing device type specific settings for BBPOS WisePad 3 readers. */ + public Builder setBbposWisepad3(EmptyParam bbposWisepad3) { + this.bbposWisepad3 = bbposWisepad3; + return this; + } + /** An object containing device type specific settings for BBPOS WisePOS E readers. */ public Builder setBbposWiseposE(ConfigurationUpdateParams.BbposWiseposE bbposWiseposE) { this.bbposWiseposE = bbposWiseposE; @@ -292,6 +313,82 @@ public Builder setWifi(EmptyParam wifi) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class BbposWisepad3 { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A File ID representing an image you would like displayed on the reader. */ + @SerializedName("splashscreen") + Object splashscreen; + + private BbposWisepad3(Map extraParams, Object splashscreen) { + this.extraParams = extraParams; + this.splashscreen = splashscreen; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object splashscreen; + + /** Finalize and obtain parameter instance from this builder. */ + public ConfigurationUpdateParams.BbposWisepad3 build() { + return new ConfigurationUpdateParams.BbposWisepad3(this.extraParams, this.splashscreen); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ConfigurationUpdateParams.BbposWisepad3#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ConfigurationUpdateParams.BbposWisepad3#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A File ID representing an image you would like displayed on the reader. */ + public Builder setSplashscreen(String splashscreen) { + this.splashscreen = splashscreen; + return this; + } + + /** A File ID representing an image you would like displayed on the reader. */ + public Builder setSplashscreen(EmptyParam splashscreen) { + this.splashscreen = splashscreen; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class BbposWiseposE { diff --git a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java index 1a32c9139d0..307c21a8586 100644 --- a/src/main/java/com/stripe/param/terminal/LocationCreateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationCreateParams.java @@ -14,18 +14,40 @@ @Getter @EqualsAndHashCode(callSuper = false) public class LocationCreateParams extends ApiRequestParams { - /** Required. The full address of the location. */ + /** The full address of the location. */ @SerializedName("address") Address address; + /** The Kana variation of the full address of the location (Japan only). */ + @SerializedName("address_kana") + AddressKana addressKana; + + /** The Kanji variation of the full address of the location (Japan only). */ + @SerializedName("address_kanji") + AddressKanji addressKanji; + /** The ID of a configuration that will be used to customize all readers in this location. */ @SerializedName("configuration_overrides") String configurationOverrides; - /** Required. A name for the location. Maximum length is 1000 characters. */ + /** A name for the location. Maximum length is 1000 characters. */ @SerializedName("display_name") String displayName; + /** + * The Kana variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + @SerializedName("display_name_kana") + String displayNameKana; + + /** + * The Kanji variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + @SerializedName("display_name_kanji") + String displayNameKanji; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -48,19 +70,33 @@ public class LocationCreateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** The phone number for the location. */ + @SerializedName("phone") + String phone; + private LocationCreateParams( Address address, + AddressKana addressKana, + AddressKanji addressKanji, String configurationOverrides, String displayName, + String displayNameKana, + String displayNameKanji, List expand, Map extraParams, - Object metadata) { + Object metadata, + String phone) { this.address = address; + this.addressKana = addressKana; + this.addressKanji = addressKanji; this.configurationOverrides = configurationOverrides; this.displayName = displayName; + this.displayNameKana = displayNameKana; + this.displayNameKanji = displayNameKanji; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; + this.phone = phone; } public static Builder builder() { @@ -70,45 +106,90 @@ public static Builder builder() { public static class Builder { private Address address; + private AddressKana addressKana; + + private AddressKanji addressKanji; + private String configurationOverrides; private String displayName; + private String displayNameKana; + + private String displayNameKanji; + private List expand; private Map extraParams; private Object metadata; + private String phone; + /** Finalize and obtain parameter instance from this builder. */ public LocationCreateParams build() { return new LocationCreateParams( this.address, + this.addressKana, + this.addressKanji, this.configurationOverrides, this.displayName, + this.displayNameKana, + this.displayNameKanji, this.expand, this.extraParams, - this.metadata); + this.metadata, + this.phone); } - /** Required. The full address of the location. */ + /** The full address of the location. */ public Builder setAddress(LocationCreateParams.Address address) { this.address = address; return this; } + /** The Kana variation of the full address of the location (Japan only). */ + public Builder setAddressKana(LocationCreateParams.AddressKana addressKana) { + this.addressKana = addressKana; + return this; + } + + /** The Kanji variation of the full address of the location (Japan only). */ + public Builder setAddressKanji(LocationCreateParams.AddressKanji addressKanji) { + this.addressKanji = addressKanji; + return this; + } + /** The ID of a configuration that will be used to customize all readers in this location. */ public Builder setConfigurationOverrides(String configurationOverrides) { this.configurationOverrides = configurationOverrides; return this; } - /** Required. A name for the location. Maximum length is 1000 characters. */ + /** A name for the location. Maximum length is 1000 characters. */ public Builder setDisplayName(String displayName) { this.displayName = displayName; return this; } + /** + * The Kana variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + public Builder setDisplayNameKana(String displayNameKana) { + this.displayNameKana = displayNameKana; + return this; + } + + /** + * The Kanji variation of the name for the location (Japan only). Maximum length is 1000 + * characters. + */ + public Builder setDisplayNameKanji(String displayNameKanji) { + this.displayNameKanji = displayNameKanji; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -210,6 +291,12 @@ public Builder setMetadata(Map metadata) { this.metadata = metadata; return this; } + + /** The phone number for the location. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } } @Getter @@ -235,11 +322,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -340,13 +427,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; @@ -365,4 +452,342 @@ public Builder setState(String state) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKana { + /** City or ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Block or building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** Postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private AddressKana( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationCreateParams.AddressKana build() { + return new LocationCreateParams.AddressKana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationCreateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationCreateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKanji { + /** City or ward. */ + @SerializedName("city") + String city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + String country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Block or building number. */ + @SerializedName("line1") + String line1; + + /** Building details. */ + @SerializedName("line2") + String line2; + + /** Postal code. */ + @SerializedName("postal_code") + String postalCode; + + /** Prefecture. */ + @SerializedName("state") + String state; + + /** Town or cho-me. */ + @SerializedName("town") + String town; + + private AddressKanji( + String city, + String country, + Map extraParams, + String line1, + String line2, + String postalCode, + String state, + String town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String city; + + private String country; + + private Map extraParams; + + private String line1; + + private String line2; + + private String postalCode; + + private String state; + + private String town; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationCreateParams.AddressKanji build() { + return new LocationCreateParams.AddressKanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationCreateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationCreateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java b/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java index 987c6c05e7e..9ec35e22bca 100644 --- a/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java +++ b/src/main/java/com/stripe/param/terminal/LocationUpdateParams.java @@ -22,6 +22,14 @@ public class LocationUpdateParams extends ApiRequestParams { @SerializedName("address") Address address; + /** The Kana variation of the full address of the location (Japan only). */ + @SerializedName("address_kana") + AddressKana addressKana; + + /** The Kanji variation of the full address of the location (Japan only). */ + @SerializedName("address_kanji") + AddressKanji addressKanji; + /** The ID of a configuration that will be used to customize all readers in this location. */ @SerializedName("configuration_overrides") Object configurationOverrides; @@ -30,6 +38,14 @@ public class LocationUpdateParams extends ApiRequestParams { @SerializedName("display_name") Object displayName; + /** The Kana variation of the name for the location (Japan only). */ + @SerializedName("display_name_kana") + Object displayNameKana; + + /** The Kanji variation of the name for the location (Japan only). */ + @SerializedName("display_name_kanji") + Object displayNameKanji; + /** Specifies which fields in the response should be expanded. */ @SerializedName("expand") List expand; @@ -52,19 +68,33 @@ public class LocationUpdateParams extends ApiRequestParams { @SerializedName("metadata") Object metadata; + /** The phone number for the location. */ + @SerializedName("phone") + Object phone; + private LocationUpdateParams( Address address, + AddressKana addressKana, + AddressKanji addressKanji, Object configurationOverrides, Object displayName, + Object displayNameKana, + Object displayNameKanji, List expand, Map extraParams, - Object metadata) { + Object metadata, + Object phone) { this.address = address; + this.addressKana = addressKana; + this.addressKanji = addressKanji; this.configurationOverrides = configurationOverrides; this.displayName = displayName; + this.displayNameKana = displayNameKana; + this.displayNameKanji = displayNameKanji; this.expand = expand; this.extraParams = extraParams; this.metadata = metadata; + this.phone = phone; } public static Builder builder() { @@ -74,25 +104,40 @@ public static Builder builder() { public static class Builder { private Address address; + private AddressKana addressKana; + + private AddressKanji addressKanji; + private Object configurationOverrides; private Object displayName; + private Object displayNameKana; + + private Object displayNameKanji; + private List expand; private Map extraParams; private Object metadata; + private Object phone; + /** Finalize and obtain parameter instance from this builder. */ public LocationUpdateParams build() { return new LocationUpdateParams( this.address, + this.addressKana, + this.addressKanji, this.configurationOverrides, this.displayName, + this.displayNameKana, + this.displayNameKanji, this.expand, this.extraParams, - this.metadata); + this.metadata, + this.phone); } /** @@ -105,6 +150,18 @@ public Builder setAddress(LocationUpdateParams.Address address) { return this; } + /** The Kana variation of the full address of the location (Japan only). */ + public Builder setAddressKana(LocationUpdateParams.AddressKana addressKana) { + this.addressKana = addressKana; + return this; + } + + /** The Kanji variation of the full address of the location (Japan only). */ + public Builder setAddressKanji(LocationUpdateParams.AddressKanji addressKanji) { + this.addressKanji = addressKanji; + return this; + } + /** The ID of a configuration that will be used to customize all readers in this location. */ public Builder setConfigurationOverrides(String configurationOverrides) { this.configurationOverrides = configurationOverrides; @@ -129,6 +186,30 @@ public Builder setDisplayName(EmptyParam displayName) { return this; } + /** The Kana variation of the name for the location (Japan only). */ + public Builder setDisplayNameKana(String displayNameKana) { + this.displayNameKana = displayNameKana; + return this; + } + + /** The Kana variation of the name for the location (Japan only). */ + public Builder setDisplayNameKana(EmptyParam displayNameKana) { + this.displayNameKana = displayNameKana; + return this; + } + + /** The Kanji variation of the name for the location (Japan only). */ + public Builder setDisplayNameKanji(String displayNameKanji) { + this.displayNameKanji = displayNameKanji; + return this; + } + + /** The Kanji variation of the name for the location (Japan only). */ + public Builder setDisplayNameKanji(EmptyParam displayNameKanji) { + this.displayNameKanji = displayNameKanji; + return this; + } + /** * Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and * subsequent calls adds additional elements to the original list. See {@link @@ -230,6 +311,18 @@ public Builder setMetadata(Map metadata) { this.metadata = metadata; return this; } + + /** The phone number for the location. */ + public Builder setPhone(String phone) { + this.phone = phone; + return this; + } + + /** The phone number for the location. */ + public Builder setPhone(EmptyParam phone) { + this.phone = phone; + return this; + } } @Getter @@ -255,11 +348,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") Object line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") Object line2; @@ -375,25 +468,25 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(EmptyParam line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(EmptyParam line2) { this.line2 = line2; return this; @@ -424,4 +517,432 @@ public Builder setState(EmptyParam state) { } } } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKana { + /** City or ward. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Block or building number. */ + @SerializedName("line1") + Object line1; + + /** Building details. */ + @SerializedName("line2") + Object line2; + + /** Postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** Prefecture. */ + @SerializedName("state") + Object state; + + /** Town or cho-me. */ + @SerializedName("town") + Object town; + + private AddressKana( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationUpdateParams.AddressKana build() { + return new LocationUpdateParams.AddressKana( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City or ward. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationUpdateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationUpdateParams.AddressKana#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Block or building number. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Building details. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Prefecture. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AddressKanji { + /** City or ward. */ + @SerializedName("city") + Object city; + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + @SerializedName("country") + Object country; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Block or building number. */ + @SerializedName("line1") + Object line1; + + /** Building details. */ + @SerializedName("line2") + Object line2; + + /** Postal code. */ + @SerializedName("postal_code") + Object postalCode; + + /** Prefecture. */ + @SerializedName("state") + Object state; + + /** Town or cho-me. */ + @SerializedName("town") + Object town; + + private AddressKanji( + Object city, + Object country, + Map extraParams, + Object line1, + Object line2, + Object postalCode, + Object state, + Object town) { + this.city = city; + this.country = country; + this.extraParams = extraParams; + this.line1 = line1; + this.line2 = line2; + this.postalCode = postalCode; + this.state = state; + this.town = town; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object city; + + private Object country; + + private Map extraParams; + + private Object line1; + + private Object line2; + + private Object postalCode; + + private Object state; + + private Object town; + + /** Finalize and obtain parameter instance from this builder. */ + public LocationUpdateParams.AddressKanji build() { + return new LocationUpdateParams.AddressKanji( + this.city, + this.country, + this.extraParams, + this.line1, + this.line2, + this.postalCode, + this.state, + this.town); + } + + /** City or ward. */ + public Builder setCity(String city) { + this.city = city; + return this; + } + + /** City or ward. */ + public Builder setCity(EmptyParam city) { + this.city = city; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(String country) { + this.country = country; + return this; + } + + /** + * Two-letter country code (ISO + * 3166-1 alpha-2). + */ + public Builder setCountry(EmptyParam country) { + this.country = country; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * LocationUpdateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link LocationUpdateParams.AddressKanji#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Block or building number. */ + public Builder setLine1(String line1) { + this.line1 = line1; + return this; + } + + /** Block or building number. */ + public Builder setLine1(EmptyParam line1) { + this.line1 = line1; + return this; + } + + /** Building details. */ + public Builder setLine2(String line2) { + this.line2 = line2; + return this; + } + + /** Building details. */ + public Builder setLine2(EmptyParam line2) { + this.line2 = line2; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(String postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Postal code. */ + public Builder setPostalCode(EmptyParam postalCode) { + this.postalCode = postalCode; + return this; + } + + /** Prefecture. */ + public Builder setState(String state) { + this.state = state; + return this; + } + + /** Prefecture. */ + public Builder setState(EmptyParam state) { + this.state = state; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(String town) { + this.town = town; + return this; + } + + /** Town or cho-me. */ + public Builder setTown(EmptyParam town) { + this.town = town; + return this; + } + } + } } diff --git a/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java b/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java index 7e344b0e3fb..7c73e4431d7 100644 --- a/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/treasury/OutboundPaymentCreateParams.java @@ -682,11 +682,11 @@ public static class Address { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ @SerializedName("line1") String line1; - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ @SerializedName("line2") String line2; @@ -793,13 +793,13 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Address line 1 (e.g., street, PO Box, or company name). */ + /** Address line 1, such as the street, PO Box, or company name. */ public Builder setLine1(String line1) { this.line1 = line1; return this; } - /** Address line 2 (e.g., apartment, suite, unit, or building). */ + /** Address line 2, such as the apartment, suite, unit, or building. */ public Builder setLine2(String line2) { this.line2 = line2; return this; diff --git a/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java index 4a5f3a32883..2e7c2e2e600 100644 --- a/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -182,6 +181,10 @@ public static class CreditGrant { @SerializedName("applicability_config") ApplicabilityConfig applicabilityConfig; + /** The category of the credit grant. */ + @SerializedName("category") + Category category; + /** Required. The expiry configuration for the credit grant. */ @SerializedName("expiry_config") ExpiryConfig expiryConfig; @@ -199,17 +202,28 @@ public static class CreditGrant { @SerializedName("name") String name; + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the + * default value of 50. The highest priority is 0 and the lowest is 100. + */ + @SerializedName("priority") + Long priority; + private CreditGrant( com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrant.Amount amount, ApplicabilityConfig applicabilityConfig, + Category category, ExpiryConfig expiryConfig, Map extraParams, - String name) { + String name, + Long priority) { this.amount = amount; this.applicabilityConfig = applicabilityConfig; + this.category = category; this.expiryConfig = expiryConfig; this.extraParams = extraParams; this.name = name; + this.priority = priority; } public static Builder builder() { @@ -221,16 +235,26 @@ public static class Builder { private ApplicabilityConfig applicabilityConfig; + private Category category; + private ExpiryConfig expiryConfig; private Map extraParams; private String name; + private Long priority; + /** Finalize and obtain parameter instance from this builder. */ public ActionServiceCreateParams.CreditGrant build() { return new ActionServiceCreateParams.CreditGrant( - this.amount, this.applicabilityConfig, this.expiryConfig, this.extraParams, this.name); + this.amount, + this.applicabilityConfig, + this.category, + this.expiryConfig, + this.extraParams, + this.name, + this.priority); } /** Required. The amount of the credit grant. */ @@ -246,6 +270,12 @@ public Builder setApplicabilityConfig( return this; } + /** The category of the credit grant. */ + public Builder setCategory(ActionServiceCreateParams.CreditGrant.Category category) { + this.category = category; + return this; + } + /** Required. The expiry configuration for the credit grant. */ public Builder setExpiryConfig( ActionServiceCreateParams.CreditGrant.ExpiryConfig expiryConfig) { @@ -284,6 +314,15 @@ public Builder setName(String name) { this.name = name; return this; } + + /** + * The desired priority for applying this credit grant. If not specified, it will be set to + * the default value of 50. The highest priority is 0 and the lowest is 100. + */ + public Builder setPriority(Long priority) { + this.priority = priority; + return this; + } } @Getter @@ -424,9 +463,9 @@ public static class CustomPricingUnit { * string. */ @SerializedName("value") - BigDecimal value; + String value; - private CustomPricingUnit(Map extraParams, String id, BigDecimal value) { + private CustomPricingUnit(Map extraParams, String id, String value) { this.extraParams = extraParams; this.id = id; this.value = value; @@ -441,7 +480,7 @@ public static class Builder { private String id; - private BigDecimal value; + private String value; /** Finalize and obtain parameter instance from this builder. */ public ActionServiceCreateParams.CreditGrant.Amount.CustomPricingUnit build() { @@ -489,7 +528,7 @@ public Builder setId(String id) { * Required. The value of the credit grant, decimal value represented as * a string. */ - public Builder setValue(BigDecimal value) { + public Builder setValue(String value) { this.value = value; return this; } @@ -808,6 +847,21 @@ public enum Type implements ApiRequestParams.EnumParam { } } } + + public enum Category implements ApiRequestParams.EnumParam { + @SerializedName("paid") + PAID("paid"), + + @SerializedName("promotional") + PROMOTIONAL("promotional"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Category(String value) { + this.value = value; + } + } } @Getter @@ -821,6 +875,10 @@ public static class CreditGrantPerTenant { @SerializedName("applicability_config") ApplicabilityConfig applicabilityConfig; + /** The category of the credit grant. */ + @SerializedName("category") + Category category; + /** Required. The expiry configuration for the credit grant. */ @SerializedName("expiry_config") ExpiryConfig expiryConfig; @@ -842,19 +900,30 @@ public static class CreditGrantPerTenant { @SerializedName("name") String name; + /** + * The desired priority for applying this credit grant. If not specified, it will be set to the + * default value of 50. The highest priority is 0 and the lowest is 100. + */ + @SerializedName("priority") + Long priority; + private CreditGrantPerTenant( com.stripe.param.v2.billing.ActionServiceCreateParams.CreditGrantPerTenant.Amount amount, ApplicabilityConfig applicabilityConfig, + Category category, ExpiryConfig expiryConfig, Map extraParams, GrantCondition grantCondition, - String name) { + String name, + Long priority) { this.amount = amount; this.applicabilityConfig = applicabilityConfig; + this.category = category; this.expiryConfig = expiryConfig; this.extraParams = extraParams; this.grantCondition = grantCondition; this.name = name; + this.priority = priority; } public static Builder builder() { @@ -867,6 +936,8 @@ public static class Builder { private ApplicabilityConfig applicabilityConfig; + private Category category; + private ExpiryConfig expiryConfig; private Map extraParams; @@ -875,15 +946,19 @@ public static class Builder { private String name; + private Long priority; + /** Finalize and obtain parameter instance from this builder. */ public ActionServiceCreateParams.CreditGrantPerTenant build() { return new ActionServiceCreateParams.CreditGrantPerTenant( this.amount, this.applicabilityConfig, + this.category, this.expiryConfig, this.extraParams, this.grantCondition, - this.name); + this.name, + this.priority); } /** Required. The amount of the credit grant. */ @@ -899,6 +974,12 @@ public Builder setApplicabilityConfig( return this; } + /** The category of the credit grant. */ + public Builder setCategory(ActionServiceCreateParams.CreditGrantPerTenant.Category category) { + this.category = category; + return this; + } + /** Required. The expiry configuration for the credit grant. */ public Builder setExpiryConfig( ActionServiceCreateParams.CreditGrantPerTenant.ExpiryConfig expiryConfig) { @@ -945,6 +1026,15 @@ public Builder setName(String name) { this.name = name; return this; } + + /** + * The desired priority for applying this credit grant. If not specified, it will be set to + * the default value of 50. The highest priority is 0 and the lowest is 100. + */ + public Builder setPriority(Long priority) { + this.priority = priority; + return this; + } } @Getter @@ -1086,9 +1176,9 @@ public static class CustomPricingUnit { * string. */ @SerializedName("value") - BigDecimal value; + String value; - private CustomPricingUnit(Map extraParams, String id, BigDecimal value) { + private CustomPricingUnit(Map extraParams, String id, String value) { this.extraParams = extraParams; this.id = id; this.value = value; @@ -1103,7 +1193,7 @@ public static class Builder { private String id; - private BigDecimal value; + private String value; /** Finalize and obtain parameter instance from this builder. */ public ActionServiceCreateParams.CreditGrantPerTenant.Amount.CustomPricingUnit build() { @@ -1151,7 +1241,7 @@ public Builder setId(String id) { * Required. The value of the credit grant, decimal value represented as * a string. */ - public Builder setValue(BigDecimal value) { + public Builder setValue(String value) { this.value = value; return this; } @@ -1911,6 +2001,21 @@ public enum Type implements ApiRequestParams.EnumParam { } } } + + public enum Category implements ApiRequestParams.EnumParam { + @SerializedName("paid") + PAID("paid"), + + @SerializedName("promotional") + PROMOTIONAL("promotional"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Category(String value) { + this.value = value; + } + } } public enum ServiceInterval implements ApiRequestParams.EnumParam { diff --git a/src/main/java/com/stripe/param/v2/billing/ActionServiceUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/ActionServiceUpdateParams.java new file mode 100644 index 00000000000..a7882caf331 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/billing/ActionServiceUpdateParams.java @@ -0,0 +1,289 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.billing; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class ActionServiceUpdateParams extends ApiRequestParams { + /** + * Details for the credit grant. Can only be set if the service action's {@code type} is {@code + * credit_grant}. + */ + @SerializedName("credit_grant") + CreditGrant creditGrant; + + /** + * Details for the credit grant per tenant. Can only be set if the service action's {@code type} + * is {@code credit_grant_per_tenant}. + */ + @SerializedName("credit_grant_per_tenant") + CreditGrantPerTenant creditGrantPerTenant; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * An internal key you can use to search for this service action. Maximum length of 200 + * characters. + */ + @SerializedName("lookup_key") + Object lookupKey; + + private ActionServiceUpdateParams( + CreditGrant creditGrant, + CreditGrantPerTenant creditGrantPerTenant, + Map extraParams, + Object lookupKey) { + this.creditGrant = creditGrant; + this.creditGrantPerTenant = creditGrantPerTenant; + this.extraParams = extraParams; + this.lookupKey = lookupKey; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CreditGrant creditGrant; + + private CreditGrantPerTenant creditGrantPerTenant; + + private Map extraParams; + + private Object lookupKey; + + /** Finalize and obtain parameter instance from this builder. */ + public ActionServiceUpdateParams build() { + return new ActionServiceUpdateParams( + this.creditGrant, this.creditGrantPerTenant, this.extraParams, this.lookupKey); + } + + /** + * Details for the credit grant. Can only be set if the service action's {@code type} is {@code + * credit_grant}. + */ + public Builder setCreditGrant(ActionServiceUpdateParams.CreditGrant creditGrant) { + this.creditGrant = creditGrant; + return this; + } + + /** + * Details for the credit grant per tenant. Can only be set if the service action's {@code type} + * is {@code credit_grant_per_tenant}. + */ + public Builder setCreditGrantPerTenant( + ActionServiceUpdateParams.CreditGrantPerTenant creditGrantPerTenant) { + this.creditGrantPerTenant = creditGrantPerTenant; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ActionServiceUpdateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ActionServiceUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * An internal key you can use to search for this service action. Maximum length of 200 + * characters. + */ + public Builder setLookupKey(String lookupKey) { + this.lookupKey = lookupKey; + return this; + } + + /** + * An internal key you can use to search for this service action. Maximum length of 200 + * characters. + */ + public Builder setLookupKey(EmptyParam lookupKey) { + this.lookupKey = lookupKey; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CreditGrant { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A descriptive name shown in dashboard. */ + @SerializedName("name") + Object name; + + private CreditGrant(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public ActionServiceUpdateParams.CreditGrant build() { + return new ActionServiceUpdateParams.CreditGrant(this.extraParams, this.name); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ActionServiceUpdateParams.CreditGrant#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ActionServiceUpdateParams.CreditGrant#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A descriptive name shown in dashboard. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** A descriptive name shown in dashboard. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CreditGrantPerTenant { + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** A descriptive name shown in dashboard. */ + @SerializedName("name") + Object name; + + private CreditGrantPerTenant(Map extraParams, Object name) { + this.extraParams = extraParams; + this.name = name; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Object name; + + /** Finalize and obtain parameter instance from this builder. */ + public ActionServiceUpdateParams.CreditGrantPerTenant build() { + return new ActionServiceUpdateParams.CreditGrantPerTenant(this.extraParams, this.name); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * ActionServiceUpdateParams.CreditGrantPerTenant#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link ActionServiceUpdateParams.CreditGrantPerTenant#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** A descriptive name shown in dashboard. */ + public Builder setName(String name) { + this.name = name; + return this; + } + + /** A descriptive name shown in dashboard. */ + public Builder setName(EmptyParam name) { + this.name = name; + return this; + } + } + } +} diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceCancelParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceCancelParams.java index a8d6f2bf338..1c9ec08b4cd 100644 --- a/src/main/java/com/stripe/param/v2/billing/CadenceCancelParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CadenceCancelParams.java @@ -101,7 +101,10 @@ public Builder addAllInclude(List elements) { public enum Include implements ApiRequestParams.EnumParam { @SerializedName("invoice_discount_rules") - INVOICE_DISCOUNT_RULES("invoice_discount_rules"); + INVOICE_DISCOUNT_RULES("invoice_discount_rules"), + + @SerializedName("settings_data") + SETTINGS_DATA("settings_data"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java index d5f08623587..e659e289508 100644 --- a/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CadenceCreateParams.java @@ -33,6 +33,13 @@ public class CadenceCreateParams extends ApiRequestParams { @SerializedName("include") List include; + /** + * A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 + * characters. + */ + @SerializedName("lookup_key") + String lookupKey; + /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -56,12 +63,14 @@ private CadenceCreateParams( BillingCycle billingCycle, Map extraParams, List include, + String lookupKey, Map metadata, Payer payer, Settings settings) { this.billingCycle = billingCycle; this.extraParams = extraParams; this.include = include; + this.lookupKey = lookupKey; this.metadata = metadata; this.payer = payer; this.settings = settings; @@ -78,6 +87,8 @@ public static class Builder { private List include; + private String lookupKey; + private Map metadata; private Payer payer; @@ -90,6 +101,7 @@ public CadenceCreateParams build() { this.billingCycle, this.extraParams, this.include, + this.lookupKey, this.metadata, this.payer, this.settings); @@ -156,6 +168,15 @@ public Builder addAllInclude(List elements) { return this; } + /** + * A lookup key used to retrieve cadences dynamically from a static string. Maximum length of + * 200 characters. + */ + public Builder setLookupKey(String lookupKey) { + this.lookupKey = lookupKey; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -568,6 +589,15 @@ public static class Month { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** + * The month to anchor the billing on for a type="month" billing cycle from 1-12. If + * not provided, this will default to the month the cadence was created. This setting can only + * be used for monthly billing cycles with {@code interval_count} of 2, 3, 4 or 6. All + * occurrences will be calculated from month provided. + */ + @SerializedName("month_of_year") + Long monthOfYear; + /** * The time at which the billing cycle ends. This field is optional, and if not provided, it * will default to the time at which the cadence was created in UTC timezone. @@ -575,9 +605,10 @@ public static class Month { @SerializedName("time") Time time; - private Month(Long dayOfMonth, Map extraParams, Time time) { + private Month(Long dayOfMonth, Map extraParams, Long monthOfYear, Time time) { this.dayOfMonth = dayOfMonth; this.extraParams = extraParams; + this.monthOfYear = monthOfYear; this.time = time; } @@ -590,12 +621,14 @@ public static class Builder { private Map extraParams; + private Long monthOfYear; + private Time time; /** Finalize and obtain parameter instance from this builder. */ public CadenceCreateParams.BillingCycle.Month build() { return new CadenceCreateParams.BillingCycle.Month( - this.dayOfMonth, this.extraParams, this.time); + this.dayOfMonth, this.extraParams, this.monthOfYear, this.time); } /** @@ -637,6 +670,17 @@ public Builder putAllExtraParam(Map map) { return this; } + /** + * The month to anchor the billing on for a type="month" billing cycle from 1-12. + * If not provided, this will default to the month the cadence was created. This setting can + * only be used for monthly billing cycles with {@code interval_count} of 2, 3, 4 or 6. All + * occurrences will be calculated from month provided. + */ + public Builder setMonthOfYear(Long monthOfYear) { + this.monthOfYear = monthOfYear; + return this; + } + /** * The time at which the billing cycle ends. This field is optional, and if not provided, it * will default to the time at which the cadence was created in UTC timezone. @@ -1244,17 +1288,12 @@ public enum Type implements ApiRequestParams.EnumParam { @EqualsAndHashCode(callSuper = false) public static class Payer { /** - * The ID of the Billing Profile object which determines how a bill will be paid. If provided, - * the created cadence will be associated with the provided Billing Profile. If not provided, a - * new Billing Profile will be created and associated with the cadence. + * Required. The ID of the Billing Profile object which determines how a bill + * will be paid. */ @SerializedName("billing_profile") String billingProfile; - /** The ID of the Customer object. */ - @SerializedName("customer") - String customer; - /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -1264,19 +1303,9 @@ public static class Payer { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** - * A string identifying the type of the payer. Currently the only supported value is {@code - * customer}. - */ - @SerializedName("type") - Type type; - - private Payer( - String billingProfile, String customer, Map extraParams, Type type) { + private Payer(String billingProfile, Map extraParams) { this.billingProfile = billingProfile; - this.customer = customer; this.extraParams = extraParams; - this.type = type; } public static Builder builder() { @@ -1286,34 +1315,22 @@ public static Builder builder() { public static class Builder { private String billingProfile; - private String customer; - private Map extraParams; - private Type type; - /** Finalize and obtain parameter instance from this builder. */ public CadenceCreateParams.Payer build() { - return new CadenceCreateParams.Payer( - this.billingProfile, this.customer, this.extraParams, this.type); + return new CadenceCreateParams.Payer(this.billingProfile, this.extraParams); } /** - * The ID of the Billing Profile object which determines how a bill will be paid. If provided, - * the created cadence will be associated with the provided Billing Profile. If not provided, - * a new Billing Profile will be created and associated with the cadence. + * Required. The ID of the Billing Profile object which determines how a bill + * will be paid. */ public Builder setBillingProfile(String billingProfile) { this.billingProfile = billingProfile; return this; } - /** The ID of the Customer object. */ - public Builder setCustomer(String customer) { - this.customer = customer; - return this; - } - /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -1339,27 +1356,6 @@ public Builder putAllExtraParam(Map map) { this.extraParams.putAll(map); return this; } - - /** - * A string identifying the type of the payer. Currently the only supported value is {@code - * customer}. - */ - public Builder setType(CadenceCreateParams.Payer.Type type) { - this.type = type; - return this; - } - } - - public enum Type implements ApiRequestParams.EnumParam { - @SerializedName("customer") - CUSTOMER("customer"); - - @Getter(onMethod_ = {@Override}) - private final String value; - - Type(String value) { - this.value = value; - } } } @@ -1647,7 +1643,10 @@ public Builder setVersion(String version) { public enum Include implements ApiRequestParams.EnumParam { @SerializedName("invoice_discount_rules") - INVOICE_DISCOUNT_RULES("invoice_discount_rules"); + INVOICE_DISCOUNT_RULES("invoice_discount_rules"), + + @SerializedName("settings_data") + SETTINGS_DATA("settings_data"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceListParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceListParams.java index b6f56040685..faa3c21d05d 100644 --- a/src/main/java/com/stripe/param/v2/billing/CadenceListParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CadenceListParams.java @@ -30,9 +30,16 @@ public class CadenceListParams extends ApiRequestParams { @SerializedName("limit") Long limit; + /** + * Only return the cadences with these lookup_keys, if any exist. You can specify up to 10 + * lookup_keys. Mutually exclusive with {@code test_clock} and {@code payer}. + */ + @SerializedName("lookup_keys") + List lookupKeys; + /** * If provided, only cadences that specifically reference the payer will be returned. Mutually - * exclusive with {@code test_clock}. + * exclusive with {@code test_clock} and {@code lookup_keys}. */ @SerializedName("payer") Payer payer; @@ -48,11 +55,13 @@ private CadenceListParams( Map extraParams, List include, Long limit, + List lookupKeys, Payer payer, String testClock) { this.extraParams = extraParams; this.include = include; this.limit = limit; + this.lookupKeys = lookupKeys; this.payer = payer; this.testClock = testClock; } @@ -68,6 +77,8 @@ public static class Builder { private Long limit; + private List lookupKeys; + private Payer payer; private String testClock; @@ -75,7 +86,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CadenceListParams build() { return new CadenceListParams( - this.extraParams, this.include, this.limit, this.payer, this.testClock); + this.extraParams, this.include, this.limit, this.lookupKeys, this.payer, this.testClock); } /** @@ -136,9 +147,35 @@ public Builder setLimit(Long limit) { return this; } + /** + * Add an element to `lookupKeys` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CadenceListParams#lookupKeys} for the field documentation. + */ + public Builder addLookupKey(String element) { + if (this.lookupKeys == null) { + this.lookupKeys = new ArrayList<>(); + } + this.lookupKeys.add(element); + return this; + } + + /** + * Add all elements to `lookupKeys` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * CadenceListParams#lookupKeys} for the field documentation. + */ + public Builder addAllLookupKey(List elements) { + if (this.lookupKeys == null) { + this.lookupKeys = new ArrayList<>(); + } + this.lookupKeys.addAll(elements); + return this; + } + /** * If provided, only cadences that specifically reference the payer will be returned. Mutually - * exclusive with {@code test_clock}. + * exclusive with {@code test_clock} and {@code lookup_keys}. */ public Builder setPayer(CadenceListParams.Payer payer) { this.payer = payer; @@ -263,7 +300,10 @@ public enum Type implements ApiRequestParams.EnumParam { public enum Include implements ApiRequestParams.EnumParam { @SerializedName("invoice_discount_rules") - INVOICE_DISCOUNT_RULES("invoice_discount_rules"); + INVOICE_DISCOUNT_RULES("invoice_discount_rules"), + + @SerializedName("settings_data") + SETTINGS_DATA("settings_data"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceRetrieveParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceRetrieveParams.java index 128f0453401..709ddac4150 100644 --- a/src/main/java/com/stripe/param/v2/billing/CadenceRetrieveParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CadenceRetrieveParams.java @@ -101,7 +101,10 @@ public Builder addAllInclude(List elements) { public enum Include implements ApiRequestParams.EnumParam { @SerializedName("invoice_discount_rules") - INVOICE_DISCOUNT_RULES("invoice_discount_rules"); + INVOICE_DISCOUNT_RULES("invoice_discount_rules"), + + @SerializedName("settings_data") + SETTINGS_DATA("settings_data"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java index bf74589bcc0..6879e3955d8 100644 --- a/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/CadenceUpdateParams.java @@ -27,6 +27,13 @@ public class CadenceUpdateParams extends ApiRequestParams { @SerializedName("include") List include; + /** + * A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 + * characters. + */ + @SerializedName("lookup_key") + Object lookupKey; + /** * Set of key-value pairs that you can attach * to an object. This can be useful for storing additional information about the object in a @@ -46,11 +53,13 @@ public class CadenceUpdateParams extends ApiRequestParams { private CadenceUpdateParams( Map extraParams, List include, + Object lookupKey, Map metadata, Payer payer, Settings settings) { this.extraParams = extraParams; this.include = include; + this.lookupKey = lookupKey; this.metadata = metadata; this.payer = payer; this.settings = settings; @@ -65,6 +74,8 @@ public static class Builder { private List include; + private Object lookupKey; + private Map metadata; private Payer payer; @@ -74,7 +85,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public CadenceUpdateParams build() { return new CadenceUpdateParams( - this.extraParams, this.include, this.metadata, this.payer, this.settings); + this.extraParams, this.include, this.lookupKey, this.metadata, this.payer, this.settings); } /** @@ -129,6 +140,24 @@ public Builder addAllInclude(List elements) { return this; } + /** + * A lookup key used to retrieve cadences dynamically from a static string. Maximum length of + * 200 characters. + */ + public Builder setLookupKey(String lookupKey) { + this.lookupKey = lookupKey; + return this; + } + + /** + * A lookup key used to retrieve cadences dynamically from a static string. Maximum length of + * 200 characters. + */ + public Builder setLookupKey(EmptyParam lookupKey) { + this.lookupKey = lookupKey; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -582,7 +611,10 @@ public Builder setVersion(EmptyParam version) { public enum Include implements ApiRequestParams.EnumParam { @SerializedName("invoice_discount_rules") - INVOICE_DISCOUNT_RULES("invoice_discount_rules"); + INVOICE_DISCOUNT_RULES("invoice_discount_rules"), + + @SerializedName("settings_data") + SETTINGS_DATA("settings_data"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/billing/IntentCreateParams.java b/src/main/java/com/stripe/param/v2/billing/IntentCreateParams.java index d49701cc2e0..df917424505 100644 --- a/src/main/java/com/stripe/param/v2/billing/IntentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/IntentCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import java.math.BigDecimal; import java.time.Instant; import java.util.ArrayList; import java.util.HashMap; @@ -502,12 +501,12 @@ public static class PercentOff { * percent_off of 50.0 will make $100 amount $50 instead. */ @SerializedName("percent_off") - BigDecimal percentOff; + String percentOff; private PercentOff( Map extraParams, MaximumApplications maximumApplications, - BigDecimal percentOff) { + String percentOff) { this.extraParams = extraParams; this.maximumApplications = maximumApplications; this.percentOff = percentOff; @@ -522,7 +521,7 @@ public static class Builder { private MaximumApplications maximumApplications; - private BigDecimal percentOff; + private String percentOff; /** Finalize and obtain parameter instance from this builder. */ public IntentCreateParams.Action.Apply.InvoiceDiscountRule.PercentOff build() { @@ -575,7 +574,7 @@ public Builder setMaximumApplications( * Required. Percent that will be taken off of the amount. For example, * percent_off of 50.0 will make $100 amount $50 instead. */ - public Builder setPercentOff(BigDecimal percentOff) { + public Builder setPercentOff(String percentOff) { this.percentOff = percentOff; return this; } @@ -1024,6 +1023,9 @@ public Builder setType(IntentCreateParams.Action.Deactivate.EffectiveAt.Type typ } public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("current_billing_period_end") + CURRENT_BILLING_PERIOD_END("current_billing_period_end"), + @SerializedName("current_billing_period_start") CURRENT_BILLING_PERIOD_START("current_billing_period_start"), diff --git a/src/main/java/com/stripe/param/v2/billing/LicenseFeeCreateParams.java b/src/main/java/com/stripe/param/v2/billing/LicenseFeeCreateParams.java index 4b752444490..beb736e8731 100644 --- a/src/main/java/com/stripe/param/v2/billing/LicenseFeeCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/LicenseFeeCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -393,7 +392,7 @@ public static class Tier { * up_to_decimal} and {@code up_to_inf} may be set. */ @SerializedName("up_to_decimal") - BigDecimal upToDecimal; + String upToDecimal; /** * No upper bound to this tier. Only one of {@code up_to_decimal} and {@code up_to_inf} may be @@ -406,7 +405,7 @@ private Tier( Map extraParams, String flatAmount, String unitAmount, - BigDecimal upToDecimal, + String upToDecimal, UpToInf upToInf) { this.extraParams = extraParams; this.flatAmount = flatAmount; @@ -426,7 +425,7 @@ public static class Builder { private String unitAmount; - private BigDecimal upToDecimal; + private String upToDecimal; private UpToInf upToInf; @@ -484,7 +483,7 @@ public Builder setUnitAmount(String unitAmount) { * Up to and including this quantity will be contained in the tier. Only one of {@code * up_to_decimal} and {@code up_to_inf} may be set. */ - public Builder setUpToDecimal(BigDecimal upToDecimal) { + public Builder setUpToDecimal(String upToDecimal) { this.upToDecimal = upToDecimal; return this; } diff --git a/src/main/java/com/stripe/param/v2/billing/LicenseFeeUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/LicenseFeeUpdateParams.java index 382176e36da..83a356b9d73 100644 --- a/src/main/java/com/stripe/param/v2/billing/LicenseFeeUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/LicenseFeeUpdateParams.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -16,9 +15,9 @@ @EqualsAndHashCode(callSuper = false) public class LicenseFeeUpdateParams extends ApiRequestParams { /** - * Required. A customer-facing name for the License Fee. This name is used in - * Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. - * Maximum length of 250 characters. + * A customer-facing name for the License Fee. This name is used in Stripe-hosted products like + * the Customer Portal and Checkout. It does not show up on Invoices. Maximum length of 250 + * characters. */ @SerializedName("display_name") Object displayName; @@ -139,9 +138,9 @@ public LicenseFeeUpdateParams build() { } /** - * Required. A customer-facing name for the License Fee. This name is used in - * Stripe-hosted products like the Customer Portal and Checkout. It does not show up on - * Invoices. Maximum length of 250 characters. + * A customer-facing name for the License Fee. This name is used in Stripe-hosted products like + * the Customer Portal and Checkout. It does not show up on Invoices. Maximum length of 250 + * characters. */ public Builder setDisplayName(String displayName) { this.displayName = displayName; @@ -149,9 +148,9 @@ public Builder setDisplayName(String displayName) { } /** - * Required. A customer-facing name for the License Fee. This name is used in - * Stripe-hosted products like the Customer Portal and Checkout. It does not show up on - * Invoices. Maximum length of 250 characters. + * A customer-facing name for the License Fee. This name is used in Stripe-hosted products like + * the Customer Portal and Checkout. It does not show up on Invoices. Maximum length of 250 + * characters. */ public Builder setDisplayName(EmptyParam displayName) { this.displayName = displayName; @@ -470,7 +469,7 @@ public Builder setUnitAmount(EmptyParam unitAmount) { * Up to and including this quantity will be contained in the tier. Only one of {@code * up_to_decimal} and {@code up_to_inf} may be set. */ - public Builder setUpToDecimal(BigDecimal upToDecimal) { + public Builder setUpToDecimal(String upToDecimal) { this.upToDecimal = upToDecimal; return this; } diff --git a/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java b/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java index 5b0d475cd51..8712b57029c 100644 --- a/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/MeterEventStreamCreateParams.java @@ -14,7 +14,10 @@ @Getter @EqualsAndHashCode(callSuper = false) public class MeterEventStreamCreateParams extends ApiRequestParams { - /** Required. List of meter events to include in the request. */ + /** + * Required. List of meter events to include in the request. Supports up to 100 + * events per request. + */ @SerializedName("events") List events; diff --git a/src/main/java/com/stripe/param/v2/billing/PricingPlanSubscriptionUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/PricingPlanSubscriptionUpdateParams.java new file mode 100644 index 00000000000..e83b23f7e0e --- /dev/null +++ b/src/main/java/com/stripe/param/v2/billing/PricingPlanSubscriptionUpdateParams.java @@ -0,0 +1,141 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.billing; + +import com.google.gson.annotations.SerializedName; +import com.stripe.net.ApiRequestParams; +import com.stripe.param.common.EmptyParam; +import java.util.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class PricingPlanSubscriptionUpdateParams extends ApiRequestParams { + /** + * When set to true, the {@code servicing_status_transition.will_cancel_at} field will be cleared. + */ + @SerializedName("clear_cancel_at") + Boolean clearCancelAt; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Set of key-value pairs that you can attach + * to an object. This can be useful for storing additional information about the object in a + * structured format. + */ + @SerializedName("metadata") + Map metadata; + + private PricingPlanSubscriptionUpdateParams( + Boolean clearCancelAt, Map extraParams, Map metadata) { + this.clearCancelAt = clearCancelAt; + this.extraParams = extraParams; + this.metadata = metadata; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean clearCancelAt; + + private Map extraParams; + + private Map metadata; + + /** Finalize and obtain parameter instance from this builder. */ + public PricingPlanSubscriptionUpdateParams build() { + return new PricingPlanSubscriptionUpdateParams( + this.clearCancelAt, this.extraParams, this.metadata); + } + + /** + * When set to true, the {@code servicing_status_transition.will_cancel_at} field will be + * cleared. + */ + public Builder setClearCancelAt(Boolean clearCancelAt) { + this.clearCancelAt = clearCancelAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * PricingPlanSubscriptionUpdateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link PricingPlanSubscriptionUpdateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PricingPlanSubscriptionUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, String value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, + * and subsequent calls add additional key/value pairs to the original map. See {@link + * PricingPlanSubscriptionUpdateParams#metadata} for the field documentation. + */ + public Builder putMetadata(String key, EmptyParam value) { + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `metadata` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * Map values can only be one of the following types: `String`, `EmptyParam`. See {@link + * PricingPlanSubscriptionUpdateParams#metadata} for the field documentation. + */ + public Builder putAllMetadata(Map map) { + if (!map.values().stream().allMatch(v -> v instanceof String || v instanceof EmptyParam)) { + throw new IllegalArgumentException( + "All map values must one of the following types: String, EmptyParam"); + } + if (this.metadata == null) { + this.metadata = new HashMap<>(); + } + this.metadata.putAll(map); + return this; + } + } +} diff --git a/src/main/java/com/stripe/param/v2/billing/ratecards/RateCreateParams.java b/src/main/java/com/stripe/param/v2/billing/ratecards/RateCreateParams.java index aea0d8aa517..66d287f5f16 100644 --- a/src/main/java/com/stripe/param/v2/billing/ratecards/RateCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/ratecards/RateCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -39,14 +38,6 @@ public class RateCreateParams extends ApiRequestParams { @SerializedName("metered_item") String meteredItem; - /** - * The ID of the price object to take price information from. The price must have the same - * interval as the rate card. Updates to the Price will not be reflected in the Rate Card or its - * rates. - */ - @SerializedName("price") - String price; - /** * Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, * the maximum quantity within a period determines the per-unit price. In graduated tiering, the @@ -78,7 +69,6 @@ private RateCreateParams( Map extraParams, Map metadata, String meteredItem, - String price, TieringMode tieringMode, List tiers, TransformQuantity transformQuantity, @@ -87,7 +77,6 @@ private RateCreateParams( this.extraParams = extraParams; this.metadata = metadata; this.meteredItem = meteredItem; - this.price = price; this.tieringMode = tieringMode; this.tiers = tiers; this.transformQuantity = transformQuantity; @@ -107,8 +96,6 @@ public static class Builder { private String meteredItem; - private String price; - private TieringMode tieringMode; private List tiers; @@ -124,7 +111,6 @@ public RateCreateParams build() { this.extraParams, this.metadata, this.meteredItem, - this.price, this.tieringMode, this.tiers, this.transformQuantity, @@ -196,16 +182,6 @@ public Builder setMeteredItem(String meteredItem) { return this; } - /** - * The ID of the price object to take price information from. The price must have the same - * interval as the rate card. Updates to the Price will not be reflected in the Rate Card or its - * rates. - */ - public Builder setPrice(String price) { - this.price = price; - return this; - } - /** * Defines whether the tiered price should be graduated or volume-based. In volume-based * tiering, the maximum quantity within a period determines the per-unit price. In graduated @@ -376,7 +352,7 @@ public static class Tier { * up_to_decimal} and {@code up_to_inf} may be set. */ @SerializedName("up_to_decimal") - BigDecimal upToDecimal; + String upToDecimal; /** * No upper bound to this tier. Only one of {@code up_to_decimal} and {@code up_to_inf} may be @@ -389,7 +365,7 @@ private Tier( Map extraParams, String flatAmount, String unitAmount, - BigDecimal upToDecimal, + String upToDecimal, UpToInf upToInf) { this.extraParams = extraParams; this.flatAmount = flatAmount; @@ -409,7 +385,7 @@ public static class Builder { private String unitAmount; - private BigDecimal upToDecimal; + private String upToDecimal; private UpToInf upToInf; @@ -467,7 +443,7 @@ public Builder setUnitAmount(String unitAmount) { * Up to and including this quantity will be contained in the tier. Only one of {@code * up_to_decimal} and {@code up_to_inf} may be set. */ - public Builder setUpToDecimal(BigDecimal upToDecimal) { + public Builder setUpToDecimal(String upToDecimal) { this.upToDecimal = upToDecimal; return this; } 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 b7c6c388685..fcc1946509c 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.v2.Amount; -import java.math.BigDecimal; import java.time.Instant; import java.util.ArrayList; import java.util.HashMap; @@ -7051,6 +7050,10 @@ public static class Capabilities { @SerializedName("cards") Cards cards; + /** Capabilities that enable OutboundPayments to a crypto wallet linked to this Account. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -7068,10 +7071,12 @@ public static class Capabilities { private Capabilities( BankAccounts bankAccounts, Cards cards, + CryptoWallets cryptoWallets, Map extraParams, StripeBalance stripeBalance) { this.bankAccounts = bankAccounts; this.cards = cards; + this.cryptoWallets = cryptoWallets; this.extraParams = extraParams; this.stripeBalance = stripeBalance; } @@ -7085,6 +7090,8 @@ public static class Builder { private Cards cards; + private CryptoWallets cryptoWallets; + private Map extraParams; private StripeBalance stripeBalance; @@ -7092,7 +7099,11 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Configuration.Recipient.Capabilities build() { return new AccountCreateParams.Configuration.Recipient.Capabilities( - this.bankAccounts, this.cards, this.extraParams, this.stripeBalance); + this.bankAccounts, + this.cards, + this.cryptoWallets, + this.extraParams, + this.stripeBalance); } /** Capabilities that enable OutboundPayments to a bank account linked to this Account. */ @@ -7109,6 +7120,16 @@ public Builder setCards( return this; } + /** + * Capabilities that enable OutboundPayments to a crypto wallet linked to this Account. + */ + public Builder setCryptoWallets( + AccountCreateParams.Configuration.Recipient.Capabilities.CryptoWallets + cryptoWallets) { + this.cryptoWallets = cryptoWallets; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -7491,6 +7512,87 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. To request a new Capability for an account, pass true. There + * can be a delay before the requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CryptoWallets(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Configuration.Recipient.Capabilities.CryptoWallets build() { + return new AccountCreateParams.Configuration.Recipient.Capabilities.CryptoWallets( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Recipient.Capabilities.CryptoWallets#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountCreateParams.Configuration.Recipient.Capabilities.CryptoWallets#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. To request a new Capability for an account, pass true. + * There can be a delay before the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class StripeBalance { @@ -9023,6 +9125,10 @@ public static class Defaults { @SerializedName("locales") List locales; + /** Account profile information. */ + @SerializedName("profile") + Profile profile; + /** Default responsibilities held by either Stripe or the platform. */ @SerializedName("responsibilities") Responsibilities responsibilities; @@ -9031,10 +9137,12 @@ private Defaults( String currency, Map extraParams, List locales, + Profile profile, Responsibilities responsibilities) { this.currency = currency; this.extraParams = extraParams; this.locales = locales; + this.profile = profile; this.responsibilities = responsibilities; } @@ -9049,12 +9157,14 @@ public static class Builder { private List locales; + private Profile profile; + private Responsibilities responsibilities; /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Defaults build() { return new AccountCreateParams.Defaults( - this.currency, this.extraParams, this.locales, this.responsibilities); + this.currency, this.extraParams, this.locales, this.profile, this.responsibilities); } /** @@ -9119,6 +9229,12 @@ public Builder addAllLocale(List elements) return this; } + /** Account profile information. */ + public Builder setProfile(AccountCreateParams.Defaults.Profile profile) { + this.profile = profile; + return this; + } + /** Default responsibilities held by either Stripe or the platform. */ public Builder setResponsibilities( AccountCreateParams.Defaults.Responsibilities responsibilities) { @@ -9127,6 +9243,114 @@ public Builder setResponsibilities( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Profile { + /** The business's publicly-available website. */ + @SerializedName("business_url") + String businessUrl; + + /** The name which is used by the business. */ + @SerializedName("doing_business_as") + String doingBusinessAs; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + @SerializedName("product_description") + String productDescription; + + private Profile( + String businessUrl, + String doingBusinessAs, + Map extraParams, + String productDescription) { + this.businessUrl = businessUrl; + this.doingBusinessAs = doingBusinessAs; + this.extraParams = extraParams; + this.productDescription = productDescription; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String businessUrl; + + private String doingBusinessAs; + + private Map extraParams; + + private String productDescription; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountCreateParams.Defaults.Profile build() { + return new AccountCreateParams.Defaults.Profile( + this.businessUrl, this.doingBusinessAs, this.extraParams, this.productDescription); + } + + /** The business's publicly-available website. */ + public Builder setBusinessUrl(String businessUrl) { + this.businessUrl = businessUrl; + return this; + } + + /** The name which is used by the business. */ + public Builder setDoingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Defaults.Profile#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountCreateParams.Defaults.Profile#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + public Builder setProductDescription(String productDescription) { + this.productDescription = productDescription; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Responsibilities { @@ -10536,10 +10760,6 @@ public static class BusinessDetails { @SerializedName("documents") Documents documents; - /** The name which is used by the business. */ - @SerializedName("doing_business_as") - String doingBusinessAs; - /** * An estimated upper bound of employees, contractors, vendors, etc. currently working for the * business. @@ -10568,13 +10788,6 @@ public static class BusinessDetails { @SerializedName("phone") String phone; - /** - * Internal-only description of the product sold or service provided by the business. It's - * used by Stripe for risk and underwriting purposes. - */ - @SerializedName("product_description") - String productDescription; - /** The business legal name. */ @SerializedName("registered_name") String registeredName; @@ -10591,41 +10804,31 @@ public static class BusinessDetails { @SerializedName("structure") Structure structure; - /** The business's publicly available website. */ - @SerializedName("url") - String url; - private BusinessDetails( Address address, AnnualRevenue annualRevenue, Documents documents, - String doingBusinessAs, Long estimatedWorkerCount, Map extraParams, List idNumbers, MonthlyEstimatedRevenue monthlyEstimatedRevenue, String phone, - String productDescription, String registeredName, ScriptAddresses scriptAddresses, ScriptNames scriptNames, - Structure structure, - String url) { + Structure structure) { this.address = address; this.annualRevenue = annualRevenue; this.documents = documents; - this.doingBusinessAs = doingBusinessAs; this.estimatedWorkerCount = estimatedWorkerCount; this.extraParams = extraParams; this.idNumbers = idNumbers; this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; this.phone = phone; - this.productDescription = productDescription; this.registeredName = registeredName; this.scriptAddresses = scriptAddresses; this.scriptNames = scriptNames; this.structure = structure; - this.url = url; } public static Builder builder() { @@ -10639,8 +10842,6 @@ public static class Builder { private Documents documents; - private String doingBusinessAs; - private Long estimatedWorkerCount; private Map extraParams; @@ -10651,8 +10852,6 @@ public static class Builder { private String phone; - private String productDescription; - private String registeredName; private ScriptAddresses scriptAddresses; @@ -10661,26 +10860,21 @@ public static class Builder { private Structure structure; - private String url; - /** Finalize and obtain parameter instance from this builder. */ public AccountCreateParams.Identity.BusinessDetails build() { return new AccountCreateParams.Identity.BusinessDetails( this.address, this.annualRevenue, this.documents, - this.doingBusinessAs, this.estimatedWorkerCount, this.extraParams, this.idNumbers, this.monthlyEstimatedRevenue, this.phone, - this.productDescription, this.registeredName, this.scriptAddresses, this.scriptNames, - this.structure, - this.url); + this.structure); } /** The business registration address of the business entity. */ @@ -10703,12 +10897,6 @@ public Builder setDocuments( return this; } - /** The name which is used by the business. */ - public Builder setDoingBusinessAs(String doingBusinessAs) { - this.doingBusinessAs = doingBusinessAs; - return this; - } - /** * An estimated upper bound of employees, contractors, vendors, etc. currently working for * the business. @@ -10787,15 +10975,6 @@ public Builder setPhone(String phone) { return this; } - /** - * Internal-only description of the product sold or service provided by the business. It's - * used by Stripe for risk and underwriting purposes. - */ - public Builder setProductDescription(String productDescription) { - this.productDescription = productDescription; - return this; - } - /** The business legal name. */ public Builder setRegisteredName(String registeredName) { this.registeredName = registeredName; @@ -10822,12 +11001,6 @@ public Builder setStructure( this.structure = structure; return this; } - - /** The business's publicly available website. */ - public Builder setUrl(String url) { - this.url = url; - return this; - } } @Getter @@ -16285,7 +16458,7 @@ public static class Relationship { /** The percent owned by the person of the account's legal entity. */ @SerializedName("percent_ownership") - BigDecimal percentOwnership; + String percentOwnership; /** The person's title (e.g., CEO, Support Engineer). */ @SerializedName("title") @@ -16296,7 +16469,7 @@ private Relationship( Boolean executive, Map extraParams, Boolean owner, - BigDecimal percentOwnership, + String percentOwnership, String title) { this.director = director; this.executive = executive; @@ -16319,7 +16492,7 @@ public static class Builder { private Boolean owner; - private BigDecimal percentOwnership; + private String percentOwnership; private String title; @@ -16388,7 +16561,7 @@ public Builder setOwner(Boolean owner) { } /** The percent owned by the person of the account's legal entity. */ - public Builder setPercentOwnership(BigDecimal percentOwnership) { + public Builder setPercentOwnership(String percentOwnership) { this.percentOwnership = percentOwnership; return this; } 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 c79aadb314c..345f3558fe2 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -5,7 +5,6 @@ import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; import com.stripe.v2.Amount; -import java.math.BigDecimal; import java.time.Instant; import java.util.ArrayList; import java.util.HashMap; @@ -7382,7 +7381,9 @@ public static class Recipient { * The payout method id to be used as a default outbound destination. This will allow the * PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via * dashboard. Can also be explicitly set to {@code null} to clear the existing default - * outbound destination. + * outbound destination. For further details about creating an Outbound Destination, see Collect + * recipient's payment details. */ @SerializedName("default_outbound_destination") Object defaultOutboundDestination; @@ -7446,7 +7447,9 @@ public Builder setCapabilities( * The payout method id to be used as a default outbound destination. This will allow the * PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via * dashboard. Can also be explicitly set to {@code null} to clear the existing default - * outbound destination. + * outbound destination. For further details about creating an Outbound Destination, see Collect + * recipient's payment details. */ public Builder setDefaultOutboundDestination(String defaultOutboundDestination) { this.defaultOutboundDestination = defaultOutboundDestination; @@ -7457,7 +7460,9 @@ public Builder setDefaultOutboundDestination(String defaultOutboundDestination) * The payout method id to be used as a default outbound destination. This will allow the * PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via * dashboard. Can also be explicitly set to {@code null} to clear the existing default - * outbound destination. + * outbound destination. For further details about creating an Outbound Destination, see Collect + * recipient's payment details. */ public Builder setDefaultOutboundDestination(EmptyParam defaultOutboundDestination) { this.defaultOutboundDestination = defaultOutboundDestination; @@ -7504,6 +7509,10 @@ public static class Capabilities { @SerializedName("cards") Cards cards; + /** Capabilities that enable OutboundPayments to a crypto wallet linked to this Account. */ + @SerializedName("crypto_wallets") + CryptoWallets cryptoWallets; + /** * Map of extra parameters for custom features not available in this client library. The * content in this map is not serialized under this field's {@code @SerializedName} value. @@ -7521,10 +7530,12 @@ public static class Capabilities { private Capabilities( BankAccounts bankAccounts, Cards cards, + CryptoWallets cryptoWallets, Map extraParams, StripeBalance stripeBalance) { this.bankAccounts = bankAccounts; this.cards = cards; + this.cryptoWallets = cryptoWallets; this.extraParams = extraParams; this.stripeBalance = stripeBalance; } @@ -7538,6 +7549,8 @@ public static class Builder { private Cards cards; + private CryptoWallets cryptoWallets; + private Map extraParams; private StripeBalance stripeBalance; @@ -7545,7 +7558,11 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Configuration.Recipient.Capabilities build() { return new AccountUpdateParams.Configuration.Recipient.Capabilities( - this.bankAccounts, this.cards, this.extraParams, this.stripeBalance); + this.bankAccounts, + this.cards, + this.cryptoWallets, + this.extraParams, + this.stripeBalance); } /** Capabilities that enable OutboundPayments to a bank account linked to this Account. */ @@ -7562,6 +7579,16 @@ public Builder setCards( return this; } + /** + * Capabilities that enable OutboundPayments to a crypto wallet linked to this Account. + */ + public Builder setCryptoWallets( + AccountUpdateParams.Configuration.Recipient.Capabilities.CryptoWallets + cryptoWallets) { + this.cryptoWallets = cryptoWallets; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first * `put/putAll` call, and subsequent calls add additional key/value pairs to the original @@ -7944,6 +7971,87 @@ public Builder setRequested(Boolean requested) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallets { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its + * parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * To request a new Capability for an account, pass true. There can be a delay before the + * requested Capability becomes active. + */ + @SerializedName("requested") + Boolean requested; + + private CryptoWallets(Map extraParams, Boolean requested) { + this.extraParams = extraParams; + this.requested = requested; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Boolean requested; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Configuration.Recipient.Capabilities.CryptoWallets build() { + return new AccountUpdateParams.Configuration.Recipient.Capabilities.CryptoWallets( + this.extraParams, this.requested); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Recipient.Capabilities.CryptoWallets#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the + * original map. See {@link + * AccountUpdateParams.Configuration.Recipient.Capabilities.CryptoWallets#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * To request a new Capability for an account, pass true. There can be a delay before + * the requested Capability becomes active. + */ + public Builder setRequested(Boolean requested) { + this.requested = requested; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class StripeBalance { @@ -9496,6 +9604,10 @@ public static class Defaults { @SerializedName("locales") List locales; + /** Account profile information. */ + @SerializedName("profile") + Profile profile; + /** Default responsibilities held by either Stripe or the platform. */ @SerializedName("responsibilities") Responsibilities responsibilities; @@ -9504,10 +9616,12 @@ private Defaults( Object currency, Map extraParams, List locales, + Profile profile, Responsibilities responsibilities) { this.currency = currency; this.extraParams = extraParams; this.locales = locales; + this.profile = profile; this.responsibilities = responsibilities; } @@ -9522,12 +9636,14 @@ public static class Builder { private List locales; + private Profile profile; + private Responsibilities responsibilities; /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Defaults build() { return new AccountUpdateParams.Defaults( - this.currency, this.extraParams, this.locales, this.responsibilities); + this.currency, this.extraParams, this.locales, this.profile, this.responsibilities); } /** @@ -9602,6 +9718,12 @@ public Builder addAllLocale(List elements) return this; } + /** Account profile information. */ + public Builder setProfile(AccountUpdateParams.Defaults.Profile profile) { + this.profile = profile; + return this; + } + /** Default responsibilities held by either Stripe or the platform. */ public Builder setResponsibilities( AccountUpdateParams.Defaults.Responsibilities responsibilities) { @@ -9610,6 +9732,135 @@ public Builder setResponsibilities( } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Profile { + /** The business's publicly-available website. */ + @SerializedName("business_url") + Object businessUrl; + + /** The name which is used by the business. */ + @SerializedName("doing_business_as") + Object doingBusinessAs; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + @SerializedName("product_description") + Object productDescription; + + private Profile( + Object businessUrl, + Object doingBusinessAs, + Map extraParams, + Object productDescription) { + this.businessUrl = businessUrl; + this.doingBusinessAs = doingBusinessAs; + this.extraParams = extraParams; + this.productDescription = productDescription; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Object businessUrl; + + private Object doingBusinessAs; + + private Map extraParams; + + private Object productDescription; + + /** Finalize and obtain parameter instance from this builder. */ + public AccountUpdateParams.Defaults.Profile build() { + return new AccountUpdateParams.Defaults.Profile( + this.businessUrl, this.doingBusinessAs, this.extraParams, this.productDescription); + } + + /** The business's publicly-available website. */ + public Builder setBusinessUrl(String businessUrl) { + this.businessUrl = businessUrl; + return this; + } + + /** The business's publicly-available website. */ + public Builder setBusinessUrl(EmptyParam businessUrl) { + this.businessUrl = businessUrl; + return this; + } + + /** The name which is used by the business. */ + public Builder setDoingBusinessAs(String doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + return this; + } + + /** The name which is used by the business. */ + public Builder setDoingBusinessAs(EmptyParam doingBusinessAs) { + this.doingBusinessAs = doingBusinessAs; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Defaults.Profile#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link AccountUpdateParams.Defaults.Profile#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + public Builder setProductDescription(String productDescription) { + this.productDescription = productDescription; + return this; + } + + /** + * Internal-only description of the product sold or service provided by the business. It's + * used by Stripe for risk and underwriting purposes. + */ + public Builder setProductDescription(EmptyParam productDescription) { + this.productDescription = productDescription; + return this; + } + } + } + @Getter @EqualsAndHashCode(callSuper = false) public static class Responsibilities { @@ -11090,10 +11341,6 @@ public static class BusinessDetails { @SerializedName("documents") Documents documents; - /** The name which is used by the business. */ - @SerializedName("doing_business_as") - Object doingBusinessAs; - /** * An estimated upper bound of employees, contractors, vendors, etc. currently working for the * business. @@ -11122,13 +11369,6 @@ public static class BusinessDetails { @SerializedName("phone") Object phone; - /** - * Internal-only description of the product sold or service provided by the business. It’s - * used by Stripe for risk and underwriting purposes. - */ - @SerializedName("product_description") - Object productDescription; - /** The business legal name. */ @SerializedName("registered_name") Object registeredName; @@ -11145,41 +11385,31 @@ public static class BusinessDetails { @SerializedName("structure") Structure structure; - /** The business's publicly available website. */ - @SerializedName("url") - Object url; - private BusinessDetails( Address address, AnnualRevenue annualRevenue, Documents documents, - Object doingBusinessAs, Long estimatedWorkerCount, Map extraParams, List idNumbers, MonthlyEstimatedRevenue monthlyEstimatedRevenue, Object phone, - Object productDescription, Object registeredName, ScriptAddresses scriptAddresses, ScriptNames scriptNames, - Structure structure, - Object url) { + Structure structure) { this.address = address; this.annualRevenue = annualRevenue; this.documents = documents; - this.doingBusinessAs = doingBusinessAs; this.estimatedWorkerCount = estimatedWorkerCount; this.extraParams = extraParams; this.idNumbers = idNumbers; this.monthlyEstimatedRevenue = monthlyEstimatedRevenue; this.phone = phone; - this.productDescription = productDescription; this.registeredName = registeredName; this.scriptAddresses = scriptAddresses; this.scriptNames = scriptNames; this.structure = structure; - this.url = url; } public static Builder builder() { @@ -11193,8 +11423,6 @@ public static class Builder { private Documents documents; - private Object doingBusinessAs; - private Long estimatedWorkerCount; private Map extraParams; @@ -11205,8 +11433,6 @@ public static class Builder { private Object phone; - private Object productDescription; - private Object registeredName; private ScriptAddresses scriptAddresses; @@ -11215,26 +11441,21 @@ public static class Builder { private Structure structure; - private Object url; - /** Finalize and obtain parameter instance from this builder. */ public AccountUpdateParams.Identity.BusinessDetails build() { return new AccountUpdateParams.Identity.BusinessDetails( this.address, this.annualRevenue, this.documents, - this.doingBusinessAs, this.estimatedWorkerCount, this.extraParams, this.idNumbers, this.monthlyEstimatedRevenue, this.phone, - this.productDescription, this.registeredName, this.scriptAddresses, this.scriptNames, - this.structure, - this.url); + this.structure); } /** The business registration address of the business entity. */ @@ -11257,18 +11478,6 @@ public Builder setDocuments( return this; } - /** The name which is used by the business. */ - public Builder setDoingBusinessAs(String doingBusinessAs) { - this.doingBusinessAs = doingBusinessAs; - return this; - } - - /** The name which is used by the business. */ - public Builder setDoingBusinessAs(EmptyParam doingBusinessAs) { - this.doingBusinessAs = doingBusinessAs; - return this; - } - /** * An estimated upper bound of employees, contractors, vendors, etc. currently working for * the business. @@ -11353,24 +11562,6 @@ public Builder setPhone(EmptyParam phone) { return this; } - /** - * Internal-only description of the product sold or service provided by the business. It’s - * used by Stripe for risk and underwriting purposes. - */ - public Builder setProductDescription(String productDescription) { - this.productDescription = productDescription; - return this; - } - - /** - * Internal-only description of the product sold or service provided by the business. It’s - * used by Stripe for risk and underwriting purposes. - */ - public Builder setProductDescription(EmptyParam productDescription) { - this.productDescription = productDescription; - return this; - } - /** The business legal name. */ public Builder setRegisteredName(String registeredName) { this.registeredName = registeredName; @@ -11403,18 +11594,6 @@ public Builder setStructure( this.structure = structure; return this; } - - /** The business's publicly available website. */ - public Builder setUrl(String url) { - this.url = url; - return this; - } - - /** The business's publicly available website. */ - public Builder setUrl(EmptyParam url) { - this.url = url; - return this; - } } @Getter @@ -17368,7 +17547,7 @@ public Builder setOwner(Boolean owner) { } /** The percent owned by the person of the account's legal entity. */ - public Builder setPercentOwnership(BigDecimal percentOwnership) { + public Builder setPercentOwnership(String percentOwnership) { this.percentOwnership = percentOwnership; return this; } diff --git a/src/main/java/com/stripe/param/v2/core/ClaimableSandboxCreateParams.java b/src/main/java/com/stripe/param/v2/core/ClaimableSandboxCreateParams.java index d84d301f4c4..7eeb4559b3a 100644 --- a/src/main/java/com/stripe/param/v2/core/ClaimableSandboxCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/ClaimableSandboxCreateParams.java @@ -27,7 +27,10 @@ public class ClaimableSandboxCreateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; - /** Required. Values that are prefilled when a user claims the sandbox. */ + /** + * Required. Values that are prefilled when a user claims the sandbox. When a + * user claims the sandbox, they will be able to update these values. + */ @SerializedName("prefill") Prefill prefill; @@ -89,7 +92,10 @@ public Builder putAllExtraParam(Map map) { return this; } - /** Required. Values that are prefilled when a user claims the sandbox. */ + /** + * Required. Values that are prefilled when a user claims the sandbox. When a + * user claims the sandbox, they will be able to update these values. + */ public Builder setPrefill(ClaimableSandboxCreateParams.Prefill prefill) { this.prefill = prefill; return this; diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java index 3dbdff2d833..0359efc61a8 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonCreateParams.java @@ -3,7 +3,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; -import java.math.BigDecimal; import java.time.Instant; import java.util.ArrayList; import java.util.HashMap; @@ -2423,7 +2422,7 @@ public static class Relationship { /** The percentage of ownership the person has in the associated legal entity. */ @SerializedName("percent_ownership") - BigDecimal percentOwnership; + String percentOwnership; /** Indicates whether the person is a representative of the associated legal entity. */ @SerializedName("representative") @@ -2440,7 +2439,7 @@ private Relationship( Map extraParams, Boolean legalGuardian, Boolean owner, - BigDecimal percentOwnership, + String percentOwnership, Boolean representative, String title) { this.authorizer = authorizer; @@ -2471,7 +2470,7 @@ public static class Builder { private Boolean owner; - private BigDecimal percentOwnership; + private String percentOwnership; private Boolean representative; @@ -2548,7 +2547,7 @@ public Builder setOwner(Boolean owner) { } /** The percentage of ownership the person has in the associated legal entity. */ - public Builder setPercentOwnership(BigDecimal percentOwnership) { + public Builder setPercentOwnership(String percentOwnership) { this.percentOwnership = percentOwnership; return this; } diff --git a/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java index 45700552040..ee996fdc0e0 100644 --- a/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/accounts/PersonUpdateParams.java @@ -4,7 +4,6 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.param.common.EmptyParam; -import java.math.BigDecimal; import java.time.Instant; import java.util.ArrayList; import java.util.HashMap; @@ -2760,7 +2759,7 @@ public Builder setOwner(Boolean owner) { } /** The percentage of ownership the person has in the associated legal entity. */ - public Builder setPercentOwnership(BigDecimal percentOwnership) { + public Builder setPercentOwnership(String percentOwnership) { this.percentOwnership = percentOwnership; return this; } diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java index 6d63e32b118..e4d3404c87b 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressCreateParams.java @@ -11,13 +11,6 @@ @Getter @EqualsAndHashCode(callSuper = false) public class FinancialAddressCreateParams extends ApiRequestParams { - /** - * Required. Open Enum. The currency the FinancialAddress should support. - * Currently, only the {@code usd} and {@code gbp} values are supported. - */ - @SerializedName("currency") - String currency; - /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -34,11 +27,26 @@ public class FinancialAddressCreateParams extends ApiRequestParams { @SerializedName("financial_account") String financialAccount; + /** + * Optional SEPA Bank account options, used to configure the type of SEPA Bank account to create, + * such as the originating country. + */ + @SerializedName("sepa_bank_account") + SepaBankAccount sepaBankAccount; + + /** Required. The type of FinancialAddress details to provision. */ + @SerializedName("type") + Type type; + private FinancialAddressCreateParams( - String currency, Map extraParams, String financialAccount) { - this.currency = currency; + Map extraParams, + String financialAccount, + SepaBankAccount sepaBankAccount, + Type type) { this.extraParams = extraParams; this.financialAccount = financialAccount; + this.sepaBankAccount = sepaBankAccount; + this.type = type; } public static Builder builder() { @@ -46,25 +54,18 @@ public static Builder builder() { } public static class Builder { - private String currency; - private Map extraParams; private String financialAccount; + private SepaBankAccount sepaBankAccount; + + private Type type; + /** Finalize and obtain parameter instance from this builder. */ public FinancialAddressCreateParams build() { return new FinancialAddressCreateParams( - this.currency, this.extraParams, this.financialAccount); - } - - /** - * Required. Open Enum. The currency the FinancialAddress should support. - * Currently, only the {@code usd} and {@code gbp} values are supported. - */ - public Builder setCurrency(String currency) { - this.currency = currency; - return this; + this.extraParams, this.financialAccount, this.sepaBankAccount, this.type); } /** @@ -101,5 +102,109 @@ public Builder setFinancialAccount(String financialAccount) { this.financialAccount = financialAccount; return this; } + + /** + * Optional SEPA Bank account options, used to configure the type of SEPA Bank account to + * create, such as the originating country. + */ + public Builder setSepaBankAccount( + FinancialAddressCreateParams.SepaBankAccount sepaBankAccount) { + this.sepaBankAccount = sepaBankAccount; + return this; + } + + /** Required. The type of FinancialAddress details to provision. */ + public Builder setType(FinancialAddressCreateParams.Type type) { + this.type = type; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class SepaBankAccount { + /** Required. The originating country of the SEPA Bank account. */ + @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; + + private SepaBankAccount(String country, Map extraParams) { + this.country = country; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String country; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public FinancialAddressCreateParams.SepaBankAccount build() { + return new FinancialAddressCreateParams.SepaBankAccount(this.country, this.extraParams); + } + + /** Required. The originating country of the SEPA Bank account. */ + 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 + * FinancialAddressCreateParams.SepaBankAccount#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link FinancialAddressCreateParams.SepaBankAccount#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("gb_bank_account") + GB_BANK_ACCOUNT("gb_bank_account"), + + @SerializedName("sepa_bank_account") + SEPA_BANK_ACCOUNT("sepa_bank_account"), + + @SerializedName("us_bank_account") + US_BANK_ACCOUNT("us_bank_account"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } } } diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressListParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressListParams.java index c1648bcb8ff..cb6aed72fa9 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressListParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressListParams.java @@ -133,6 +133,9 @@ public enum Include implements ApiRequestParams.EnumParam { @SerializedName("credentials.gb_bank_account.account_number") CREDENTIALS__GB_BANK_ACCOUNT__ACCOUNT_NUMBER("credentials.gb_bank_account.account_number"), + @SerializedName("credentials.sepa_bank_account.iban") + CREDENTIALS__SEPA_BANK_ACCOUNT__IBAN("credentials.sepa_bank_account.iban"), + @SerializedName("credentials.us_bank_account.account_number") CREDENTIALS__US_BANK_ACCOUNT__ACCOUNT_NUMBER("credentials.us_bank_account.account_number"); diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressRetrieveParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressRetrieveParams.java index b2d70ad8565..d16b2d0820d 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressRetrieveParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/FinancialAddressRetrieveParams.java @@ -103,6 +103,9 @@ public enum Include implements ApiRequestParams.EnumParam { @SerializedName("credentials.gb_bank_account.account_number") CREDENTIALS__GB_BANK_ACCOUNT__ACCOUNT_NUMBER("credentials.gb_bank_account.account_number"), + @SerializedName("credentials.sepa_bank_account.iban") + CREDENTIALS__SEPA_BANK_ACCOUNT__IBAN("credentials.sepa_bank_account.iban"), + @SerializedName("credentials.us_bank_account.account_number") CREDENTIALS__US_BANK_ACCOUNT__ACCOUNT_NUMBER("credentials.us_bank_account.account_number"); 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 c18f4ffb7c1..b31304b8ea5 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundPaymentCreateParams.java @@ -55,6 +55,13 @@ public class OutboundPaymentCreateParams extends ApiRequestParams { @SerializedName("recipient_notification") RecipientNotification recipientNotification; + /** + * The recipient verification id for this OutboundPayment. Only required for countries with + * regulatory mandates to verify recipient names before OutboundPayment creation. + */ + @SerializedName("recipient_verification") + String recipientVerification; + /** Required. To which payout method to send the OutboundPayment. */ @SerializedName("to") To to; @@ -68,6 +75,7 @@ private OutboundPaymentCreateParams( Map metadata, String outboundPaymentQuote, RecipientNotification recipientNotification, + String recipientVerification, To to) { this.amount = amount; this.deliveryOptions = deliveryOptions; @@ -77,6 +85,7 @@ private OutboundPaymentCreateParams( this.metadata = metadata; this.outboundPaymentQuote = outboundPaymentQuote; this.recipientNotification = recipientNotification; + this.recipientVerification = recipientVerification; this.to = to; } @@ -101,6 +110,8 @@ public static class Builder { private RecipientNotification recipientNotification; + private String recipientVerification; + private To to; /** Finalize and obtain parameter instance from this builder. */ @@ -114,6 +125,7 @@ public OutboundPaymentCreateParams build() { this.metadata, this.outboundPaymentQuote, this.recipientNotification, + this.recipientVerification, this.to); } @@ -215,6 +227,15 @@ public Builder setRecipientNotification( return this; } + /** + * The recipient verification id for this OutboundPayment. Only required for countries with + * regulatory mandates to verify recipient names before OutboundPayment creation. + */ + public Builder setRecipientVerification(String recipientVerification) { + this.recipientVerification = recipientVerification; + return this; + } + /** Required. To which payout method to send the OutboundPayment. */ public Builder setTo(OutboundPaymentCreateParams.To to) { this.to = to; diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java index bd00528301b..a26592fb16e 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentCreateParams.java @@ -141,6 +141,10 @@ public static class PayoutMethodData { @SerializedName("card") Card card; + /** The type specific details of the crypto wallet payout method. */ + @SerializedName("crypto_wallet") + CryptoWallet cryptoWallet; + /** * Map of extra parameters for custom features not available in this client library. The content * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each @@ -155,9 +159,14 @@ public static class PayoutMethodData { Type type; private PayoutMethodData( - BankAccount bankAccount, Card card, Map extraParams, Type type) { + BankAccount bankAccount, + Card card, + CryptoWallet cryptoWallet, + Map extraParams, + Type type) { this.bankAccount = bankAccount; this.card = card; + this.cryptoWallet = cryptoWallet; this.extraParams = extraParams; this.type = type; } @@ -171,6 +180,8 @@ public static class Builder { private Card card; + private CryptoWallet cryptoWallet; + private Map extraParams; private Type type; @@ -178,7 +189,7 @@ public static class Builder { /** Finalize and obtain parameter instance from this builder. */ public OutboundSetupIntentCreateParams.PayoutMethodData build() { return new OutboundSetupIntentCreateParams.PayoutMethodData( - this.bankAccount, this.card, this.extraParams, this.type); + this.bankAccount, this.card, this.cryptoWallet, this.extraParams, this.type); } /** The type specific details of the bank account payout method. */ @@ -194,6 +205,13 @@ public Builder setCard(OutboundSetupIntentCreateParams.PayoutMethodData.Card car return this; } + /** The type specific details of the crypto wallet payout method. */ + public Builder setCryptoWallet( + OutboundSetupIntentCreateParams.PayoutMethodData.CryptoWallet cryptoWallet) { + this.cryptoWallet = cryptoWallet; + return this; + } + /** * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` * call, and subsequent calls add additional key/value pairs to the original map. See {@link @@ -494,12 +512,160 @@ public Builder setNumber(String number) { } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CryptoWallet { + /** Required. Crypto wallet address. */ + @SerializedName("address") + String address; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Optional field, required if network supports memos (only "stellar" currently). + */ + @SerializedName("memo") + String memo; + + /** + * Required. Which rail we should use to make an Outbound money movement to + * this wallet. + */ + @SerializedName("network") + Network network; + + private CryptoWallet( + String address, Map extraParams, String memo, Network network) { + this.address = address; + this.extraParams = extraParams; + this.memo = memo; + this.network = network; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private String address; + + private Map extraParams; + + private String memo; + + private Network network; + + /** Finalize and obtain parameter instance from this builder. */ + public OutboundSetupIntentCreateParams.PayoutMethodData.CryptoWallet build() { + return new OutboundSetupIntentCreateParams.PayoutMethodData.CryptoWallet( + this.address, this.extraParams, this.memo, this.network); + } + + /** Required. Crypto wallet address. */ + public Builder setAddress(String address) { + this.address = address; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * OutboundSetupIntentCreateParams.PayoutMethodData.CryptoWallet#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link + * OutboundSetupIntentCreateParams.PayoutMethodData.CryptoWallet#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Optional field, required if network supports memos (only "stellar" currently). + */ + public Builder setMemo(String memo) { + this.memo = memo; + return this; + } + + /** + * Required. Which rail we should use to make an Outbound money movement to + * this wallet. + */ + public Builder setNetwork( + OutboundSetupIntentCreateParams.PayoutMethodData.CryptoWallet.Network network) { + this.network = network; + return this; + } + } + + public enum Network implements ApiRequestParams.EnumParam { + @SerializedName("arbitrum") + ARBITRUM("arbitrum"), + + @SerializedName("avalanche_c_chain") + AVALANCHE_C_CHAIN("avalanche_c_chain"), + + @SerializedName("base") + BASE("base"), + + @SerializedName("ethereum") + ETHEREUM("ethereum"), + + @SerializedName("optimism") + OPTIMISM("optimism"), + + @SerializedName("polygon") + POLYGON("polygon"), + + @SerializedName("solana") + SOLANA("solana"), + + @SerializedName("stellar") + STELLAR("stellar"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Network(String value) { + this.value = value; + } + } + } + public enum Type implements ApiRequestParams.EnumParam { @SerializedName("bank_account") BANK_ACCOUNT("bank_account"), @SerializedName("card") - CARD("card"); + CARD("card"), + + @SerializedName("crypto_wallet") + CRYPTO_WALLET("crypto_wallet"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java index 549f5910120..d40727bc9b0 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundSetupIntentUpdateParams.java @@ -535,7 +535,10 @@ public enum Type implements ApiRequestParams.EnumParam { BANK_ACCOUNT("bank_account"), @SerializedName("card") - CARD("card"); + CARD("card"), + + @SerializedName("crypto_wallet") + CRYPTO_WALLET("crypto_wallet"); @Getter(onMethod_ = {@Override}) private final String value; diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java index 75ea1360a1a..b738831fc9b 100644 --- a/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java +++ b/src/main/java/com/stripe/param/v2/moneymanagement/OutboundTransferCreateParams.java @@ -44,6 +44,13 @@ public class OutboundTransferCreateParams extends ApiRequestParams { @SerializedName("metadata") Map metadata; + /** + * The recipient verification id for this OutboundTransfer. Only required for countries with + * regulatory mandates to verify recipient names before OutboundTransfer creation. + */ + @SerializedName("recipient_verification") + String recipientVerification; + /** Required. To which payout method to send the OutboundTransfer. */ @SerializedName("to") To to; @@ -55,6 +62,7 @@ private OutboundTransferCreateParams( Map extraParams, From from, Map metadata, + String recipientVerification, To to) { this.amount = amount; this.deliveryOptions = deliveryOptions; @@ -62,6 +70,7 @@ private OutboundTransferCreateParams( this.extraParams = extraParams; this.from = from; this.metadata = metadata; + this.recipientVerification = recipientVerification; this.to = to; } @@ -82,6 +91,8 @@ public static class Builder { private Map metadata; + private String recipientVerification; + private To to; /** Finalize and obtain parameter instance from this builder. */ @@ -93,6 +104,7 @@ public OutboundTransferCreateParams build() { this.extraParams, this.from, this.metadata, + this.recipientVerification, this.to); } @@ -175,6 +187,15 @@ public Builder putAllMetadata(Map map) { return this; } + /** + * The recipient verification id for this OutboundTransfer. Only required for countries with + * regulatory mandates to verify recipient names before OutboundTransfer creation. + */ + public Builder setRecipientVerification(String recipientVerification) { + this.recipientVerification = recipientVerification; + return this; + } + /** Required. To which payout method to send the OutboundTransfer. */ public Builder setTo(OutboundTransferCreateParams.To to) { this.to = to; diff --git a/src/main/java/com/stripe/param/v2/moneymanagement/RecipientVerificationCreateParams.java b/src/main/java/com/stripe/param/v2/moneymanagement/RecipientVerificationCreateParams.java new file mode 100644 index 00000000000..8931e8279ee --- /dev/null +++ b/src/main/java/com/stripe/param/v2/moneymanagement/RecipientVerificationCreateParams.java @@ -0,0 +1,99 @@ +// 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.HashMap; +import java.util.Map; +import lombok.EqualsAndHashCode; +import lombok.Getter; + +@Getter +@EqualsAndHashCode(callSuper = false) +public class RecipientVerificationCreateParams 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; + + /** Required. ID of the payout method. */ + @SerializedName("payout_method") + String payoutMethod; + + /** + * ID of the recipient account. Required if the recipient distinct from the sender. Leave empty if + * the recipient and sender are the same entity (i.e. for me-to-me payouts). + */ + @SerializedName("recipient") + String recipient; + + private RecipientVerificationCreateParams( + Map extraParams, String payoutMethod, String recipient) { + this.extraParams = extraParams; + this.payoutMethod = payoutMethod; + this.recipient = recipient; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String payoutMethod; + + private String recipient; + + /** Finalize and obtain parameter instance from this builder. */ + public RecipientVerificationCreateParams build() { + return new RecipientVerificationCreateParams( + this.extraParams, this.payoutMethod, this.recipient); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * RecipientVerificationCreateParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link RecipientVerificationCreateParams#extraParams} for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Required. ID of the payout method. */ + public Builder setPayoutMethod(String payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** + * ID of the recipient account. Required if the recipient distinct from the sender. Leave empty + * if the recipient and sender are the same entity (i.e. for me-to-me payouts). + */ + public Builder setRecipient(String recipient) { + this.recipient = recipient; + return this; + } + } +} 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 bfbd00c1cb5..0bc6f32556f 100644 --- a/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/payments/OffSessionPaymentCreateParams.java @@ -4,7 +4,10 @@ import com.google.gson.annotations.SerializedName; import com.stripe.net.ApiRequestParams; import com.stripe.v2.Amount; +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; @@ -16,6 +19,10 @@ public class OffSessionPaymentCreateParams extends ApiRequestParams { @SerializedName("amount") Amount amount; + /** Provides industry-specific information about the amount. */ + @SerializedName("amount_details") + AmountDetails amountDetails; + /** Required. The frequency of the underlying payment. */ @SerializedName("cadence") Cadence cadence; @@ -33,6 +40,10 @@ public class OffSessionPaymentCreateParams extends ApiRequestParams { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** This hash contains details about the Mandate to create. */ + @SerializedName("mandate_data") + MandateData mandateData; + /** * Required. Set of key-value * pairs that you can attach to an object. This can be useful for storing additional @@ -51,6 +62,14 @@ public class OffSessionPaymentCreateParams extends ApiRequestParams { @SerializedName("payment_method") String paymentMethod; + /** Payment method options for the off-session payment. */ + @SerializedName("payment_method_options") + PaymentMethodOptions paymentMethodOptions; + + /** Details about the payments orchestration configuration. */ + @SerializedName("payments_orchestration") + PaymentsOrchestration paymentsOrchestration; + /** Details about the OffSessionPayment retries. */ @SerializedName("retry_details") RetryDetails retryDetails; @@ -88,24 +107,32 @@ public class OffSessionPaymentCreateParams extends ApiRequestParams { private OffSessionPaymentCreateParams( Amount amount, + AmountDetails amountDetails, Cadence cadence, String customer, Map extraParams, + MandateData mandateData, Map metadata, String onBehalfOf, String paymentMethod, + PaymentMethodOptions paymentMethodOptions, + PaymentsOrchestration paymentsOrchestration, RetryDetails retryDetails, String statementDescriptor, String statementDescriptorSuffix, String testClock, TransferData transferData) { this.amount = amount; + this.amountDetails = amountDetails; this.cadence = cadence; this.customer = customer; this.extraParams = extraParams; + this.mandateData = mandateData; this.metadata = metadata; this.onBehalfOf = onBehalfOf; this.paymentMethod = paymentMethod; + this.paymentMethodOptions = paymentMethodOptions; + this.paymentsOrchestration = paymentsOrchestration; this.retryDetails = retryDetails; this.statementDescriptor = statementDescriptor; this.statementDescriptorSuffix = statementDescriptorSuffix; @@ -120,18 +147,26 @@ public static Builder builder() { public static class Builder { private Amount amount; + private AmountDetails amountDetails; + private Cadence cadence; private String customer; private Map extraParams; + private MandateData mandateData; + private Map metadata; private String onBehalfOf; private String paymentMethod; + private PaymentMethodOptions paymentMethodOptions; + + private PaymentsOrchestration paymentsOrchestration; + private RetryDetails retryDetails; private String statementDescriptor; @@ -146,12 +181,16 @@ public static class Builder { public OffSessionPaymentCreateParams build() { return new OffSessionPaymentCreateParams( this.amount, + this.amountDetails, this.cadence, this.customer, this.extraParams, + this.mandateData, this.metadata, this.onBehalfOf, this.paymentMethod, + this.paymentMethodOptions, + this.paymentsOrchestration, this.retryDetails, this.statementDescriptor, this.statementDescriptorSuffix, @@ -165,6 +204,12 @@ public Builder setAmount(Amount amount) { return this; } + /** Provides industry-specific information about the amount. */ + public Builder setAmountDetails(OffSessionPaymentCreateParams.AmountDetails amountDetails) { + this.amountDetails = amountDetails; + return this; + } + /** Required. The frequency of the underlying payment. */ public Builder setCadence(OffSessionPaymentCreateParams.Cadence cadence) { this.cadence = cadence; @@ -203,6 +248,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** This hash contains details about the Mandate to create. */ + public Builder setMandateData(OffSessionPaymentCreateParams.MandateData mandateData) { + this.mandateData = mandateData; + return this; + } + /** * Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, * and subsequent calls add additional key/value pairs to the original map. See {@link @@ -241,6 +292,20 @@ public Builder setPaymentMethod(String paymentMethod) { return this; } + /** Payment method options for the off-session payment. */ + public Builder setPaymentMethodOptions( + OffSessionPaymentCreateParams.PaymentMethodOptions paymentMethodOptions) { + this.paymentMethodOptions = paymentMethodOptions; + return this; + } + + /** Details about the payments orchestration configuration. */ + public Builder setPaymentsOrchestration( + OffSessionPaymentCreateParams.PaymentsOrchestration paymentsOrchestration) { + this.paymentsOrchestration = paymentsOrchestration; + return this; + } + /** Details about the OffSessionPayment retries. */ public Builder setRetryDetails(OffSessionPaymentCreateParams.RetryDetails retryDetails) { this.retryDetails = retryDetails; @@ -287,6 +352,965 @@ public Builder setTransferData(OffSessionPaymentCreateParams.TransferData transf } } + @Getter + @EqualsAndHashCode(callSuper = false) + public static class AmountDetails { + /** The amount the total transaction was discounted for. */ + @SerializedName("discount_amount") + Long discountAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. A list of line items, each containing information about a product + * in the PaymentIntent. There is a maximum of 100 line items. + */ + @SerializedName("line_items") + List lineItems; + + /** Contains information about the shipping portion of the amount. */ + @SerializedName("shipping") + Shipping shipping; + + /** Contains information about the tax portion of the amount. */ + @SerializedName("tax") + Tax tax; + + private AmountDetails( + Long discountAmount, + Map extraParams, + List lineItems, + Shipping shipping, + Tax tax) { + this.discountAmount = discountAmount; + this.extraParams = extraParams; + this.lineItems = lineItems; + this.shipping = shipping; + this.tax = tax; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long discountAmount; + + private Map extraParams; + + private List lineItems; + + private Shipping shipping; + + private Tax tax; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.AmountDetails build() { + return new OffSessionPaymentCreateParams.AmountDetails( + this.discountAmount, this.extraParams, this.lineItems, this.shipping, this.tax); + } + + /** The amount the total transaction was discounted for. */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * OffSessionPaymentCreateParams.AmountDetails#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OffSessionPaymentCreateParams.AmountDetails#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Add an element to `lineItems` list. A list is initialized for the first `add/addAll` call, + * and subsequent calls adds additional elements to the original list. See {@link + * OffSessionPaymentCreateParams.AmountDetails#lineItems} for the field documentation. + */ + public Builder addLineItem(OffSessionPaymentCreateParams.AmountDetails.LineItem element) { + if (this.lineItems == null) { + this.lineItems = new ArrayList<>(); + } + this.lineItems.add(element); + return this; + } + + /** + * Add all elements to `lineItems` list. A list is initialized for the first `add/addAll` + * call, and subsequent calls adds additional elements to the original list. See {@link + * OffSessionPaymentCreateParams.AmountDetails#lineItems} for the field documentation. + */ + public Builder addAllLineItem( + List elements) { + if (this.lineItems == null) { + this.lineItems = new ArrayList<>(); + } + this.lineItems.addAll(elements); + return this; + } + + /** Contains information about the shipping portion of the amount. */ + public Builder setShipping(OffSessionPaymentCreateParams.AmountDetails.Shipping shipping) { + this.shipping = shipping; + return this; + } + + /** Contains information about the tax portion of the amount. */ + public Builder setTax(OffSessionPaymentCreateParams.AmountDetails.Tax tax) { + this.tax = tax; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class LineItem { + /** The amount an item was discounted for. Positive integer. */ + @SerializedName("discount_amount") + Long discountAmount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Unique identifier of the product. At most 12 characters long. */ + @SerializedName("product_code") + String productCode; + + /** Required. Name of the product. At most 100 characters long. */ + @SerializedName("product_name") + String productName; + + /** Required. Number of items of the product. Positive integer. */ + @SerializedName("quantity") + Long quantity; + + /** Contains information about the tax on the item. */ + @SerializedName("tax") + Tax tax; + + /** Required. Cost of the product. Non-negative integer. */ + @SerializedName("unit_cost") + Long unitCost; + + private LineItem( + Long discountAmount, + Map extraParams, + String productCode, + String productName, + Long quantity, + Tax tax, + Long unitCost) { + this.discountAmount = discountAmount; + this.extraParams = extraParams; + this.productCode = productCode; + this.productName = productName; + this.quantity = quantity; + this.tax = tax; + this.unitCost = unitCost; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long discountAmount; + + private Map extraParams; + + private String productCode; + + private String productName; + + private Long quantity; + + private Tax tax; + + private Long unitCost; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.AmountDetails.LineItem build() { + return new OffSessionPaymentCreateParams.AmountDetails.LineItem( + this.discountAmount, + this.extraParams, + this.productCode, + this.productName, + this.quantity, + this.tax, + this.unitCost); + } + + /** The amount an item was discounted for. Positive integer. */ + public Builder setDiscountAmount(Long discountAmount) { + this.discountAmount = discountAmount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.AmountDetails.LineItem#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.AmountDetails.LineItem#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Unique identifier of the product. At most 12 characters long. */ + public Builder setProductCode(String productCode) { + this.productCode = productCode; + return this; + } + + /** Required. Name of the product. At most 100 characters long. */ + public Builder setProductName(String productName) { + this.productName = productName; + return this; + } + + /** Required. Number of items of the product. Positive integer. */ + public Builder setQuantity(Long quantity) { + this.quantity = quantity; + return this; + } + + /** Contains information about the tax on the item. */ + public Builder setTax(OffSessionPaymentCreateParams.AmountDetails.LineItem.Tax tax) { + this.tax = tax; + return this; + } + + /** Required. Cost of the product. Non-negative integer. */ + public Builder setUnitCost(Long unitCost) { + this.unitCost = unitCost; + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field + * (serialized) name in this param object. Effectively, this map is flattened to its parent + * instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Total portion of the amount that is for tax. */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.AmountDetails.LineItem.Tax build() { + return new OffSessionPaymentCreateParams.AmountDetails.LineItem.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.AmountDetails.LineItem.Tax#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.AmountDetails.LineItem.Tax#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Total portion of the amount that is for tax. */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Shipping { + /** Portion of the amount that is for shipping. */ + @SerializedName("amount") + Long amount; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** The postal code that represents the shipping source. */ + @SerializedName("from_postal_code") + String fromPostalCode; + + /** The postal code that represents the shipping destination. */ + @SerializedName("to_postal_code") + String toPostalCode; + + private Shipping( + Long amount, + Map extraParams, + String fromPostalCode, + String toPostalCode) { + this.amount = amount; + this.extraParams = extraParams; + this.fromPostalCode = fromPostalCode; + this.toPostalCode = toPostalCode; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Long amount; + + private Map extraParams; + + private String fromPostalCode; + + private String toPostalCode; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.AmountDetails.Shipping build() { + return new OffSessionPaymentCreateParams.AmountDetails.Shipping( + this.amount, this.extraParams, this.fromPostalCode, this.toPostalCode); + } + + /** Portion of the amount that is for shipping. */ + public Builder setAmount(Long amount) { + this.amount = amount; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.AmountDetails.Shipping#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.AmountDetails.Shipping#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** The postal code that represents the shipping source. */ + public Builder setFromPostalCode(String fromPostalCode) { + this.fromPostalCode = fromPostalCode; + return this; + } + + /** The postal code that represents the shipping destination. */ + public Builder setToPostalCode(String toPostalCode) { + this.toPostalCode = toPostalCode; + return this; + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Tax { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** Total portion of the amount that is for tax. */ + @SerializedName("total_tax_amount") + Long totalTaxAmount; + + private Tax(Map extraParams, Long totalTaxAmount) { + this.extraParams = extraParams; + this.totalTaxAmount = totalTaxAmount; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private Long totalTaxAmount; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.AmountDetails.Tax build() { + return new OffSessionPaymentCreateParams.AmountDetails.Tax( + this.extraParams, this.totalTaxAmount); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.AmountDetails.Tax#extraParams} for the + * field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.AmountDetails.Tax#extraParams} for the + * field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** Total portion of the amount that is for tax. */ + public Builder setTotalTaxAmount(Long totalTaxAmount) { + this.totalTaxAmount = totalTaxAmount; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class MandateData { + /** + * Required. This hash contains details about the customer acceptance of the + * Mandate. + */ + @SerializedName("customer_acceptance") + CustomerAcceptance customerAcceptance; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private MandateData(CustomerAcceptance customerAcceptance, Map extraParams) { + this.customerAcceptance = customerAcceptance; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private CustomerAcceptance customerAcceptance; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.MandateData build() { + return new OffSessionPaymentCreateParams.MandateData( + this.customerAcceptance, this.extraParams); + } + + /** + * Required. This hash contains details about the customer acceptance of the + * Mandate. + */ + public Builder setCustomerAcceptance( + OffSessionPaymentCreateParams.MandateData.CustomerAcceptance customerAcceptance) { + this.customerAcceptance = customerAcceptance; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * OffSessionPaymentCreateParams.MandateData#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OffSessionPaymentCreateParams.MandateData#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class CustomerAcceptance { + /** The time at which the customer accepted the Mandate. */ + @SerializedName("accepted_at") + Instant acceptedAt; + + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. The type of customer acceptance information included with the + * Mandate. + */ + @SerializedName("type") + Type type; + + private CustomerAcceptance(Instant acceptedAt, Map extraParams, Type type) { + this.acceptedAt = acceptedAt; + this.extraParams = extraParams; + this.type = type; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Instant acceptedAt; + + private Map extraParams; + + private Type type; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.MandateData.CustomerAcceptance build() { + return new OffSessionPaymentCreateParams.MandateData.CustomerAcceptance( + this.acceptedAt, this.extraParams, this.type); + } + + /** The time at which the customer accepted the Mandate. */ + public Builder setAcceptedAt(Instant acceptedAt) { + this.acceptedAt = acceptedAt; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.MandateData.CustomerAcceptance#extraParams} + * for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.MandateData.CustomerAcceptance#extraParams} + * for the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. The type of customer acceptance information included with the + * Mandate. + */ + public Builder setType( + OffSessionPaymentCreateParams.MandateData.CustomerAcceptance.Type type) { + this.type = type; + return this; + } + } + + public enum Type implements ApiRequestParams.EnumParam { + @SerializedName("offline") + OFFLINE("offline"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + Type(String value) { + this.value = value; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentMethodOptions { + /** Payment method options for the card payment type. */ + @SerializedName("card") + Card card; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PaymentMethodOptions(Card card, Map extraParams) { + this.card = card; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Card card; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.PaymentMethodOptions build() { + return new OffSessionPaymentCreateParams.PaymentMethodOptions(this.card, this.extraParams); + } + + /** Payment method options for the card payment type. */ + public Builder setCard(OffSessionPaymentCreateParams.PaymentMethodOptions.Card card) { + this.card = card; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * OffSessionPaymentCreateParams.PaymentMethodOptions#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OffSessionPaymentCreateParams.PaymentMethodOptions#extraParams} for the field + * documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class Card { + /** + * Map of extra parameters for custom features not available in this client library. The + * content in this map is not serialized under this field's {@code @SerializedName} value. + * Instead, each key/value pair is serialized as if the key is a root-level field (serialized) + * name in this param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + /** + * Required. If you are making a Credential On File transaction with a + * previously saved card, you should pass the Network Transaction ID from a prior initial + * authorization on Stripe (from a successful SetupIntent or a PaymentIntent with {@code + * setup_future_usage} set), or one that you have obtained from another payment processor. + * This is a token from the network which uniquely identifies the transaction. Visa calls this + * the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the + * Acquirer Reference Data. Note that you should pass in a Network Transaction ID if you have + * one, regardless of whether this is a Customer-Initiated Transaction (CIT) or a + * Merchant-Initiated Transaction (MIT). + */ + @SerializedName("network_transaction_id") + String networkTransactionId; + + private Card(Map extraParams, String networkTransactionId) { + this.extraParams = extraParams; + this.networkTransactionId = networkTransactionId; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private String networkTransactionId; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.PaymentMethodOptions.Card build() { + return new OffSessionPaymentCreateParams.PaymentMethodOptions.Card( + this.extraParams, this.networkTransactionId); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.PaymentMethodOptions.Card#extraParams} for + * the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original + * map. See {@link OffSessionPaymentCreateParams.PaymentMethodOptions.Card#extraParams} for + * the field documentation. + */ + public Builder putAllExtraParam(Map map) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.putAll(map); + return this; + } + + /** + * Required. If you are making a Credential On File transaction with a + * previously saved card, you should pass the Network Transaction ID from a prior initial + * authorization on Stripe (from a successful SetupIntent or a PaymentIntent with {@code + * setup_future_usage} set), or one that you have obtained from another payment processor. + * This is a token from the network which uniquely identifies the transaction. Visa calls + * this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls + * this the Acquirer Reference Data. Note that you should pass in a Network Transaction ID + * if you have one, regardless of whether this is a Customer-Initiated Transaction (CIT) or + * a Merchant-Initiated Transaction (MIT). + */ + public Builder setNetworkTransactionId(String networkTransactionId) { + this.networkTransactionId = networkTransactionId; + return this; + } + } + } + } + + @Getter + @EqualsAndHashCode(callSuper = false) + public static class PaymentsOrchestration { + /** + * Required. True when you want to enable payments orchestration for this + * off-session payment. False otherwise. + */ + @SerializedName("enabled") + Boolean enabled; + + /** + * Map of extra parameters for custom features not available in this client library. The content + * in this map is not serialized under this field's {@code @SerializedName} value. Instead, each + * key/value pair is serialized as if the key is a root-level field (serialized) name in this + * param object. Effectively, this map is flattened to its parent instance. + */ + @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) + Map extraParams; + + private PaymentsOrchestration(Boolean enabled, Map extraParams) { + this.enabled = enabled; + this.extraParams = extraParams; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Boolean enabled; + + private Map extraParams; + + /** Finalize and obtain parameter instance from this builder. */ + public OffSessionPaymentCreateParams.PaymentsOrchestration build() { + return new OffSessionPaymentCreateParams.PaymentsOrchestration( + this.enabled, this.extraParams); + } + + /** + * Required. True when you want to enable payments orchestration for this + * off-session payment. False otherwise. + */ + public Builder setEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * OffSessionPaymentCreateParams.PaymentsOrchestration#extraParams} for the field + * documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link OffSessionPaymentCreateParams.PaymentsOrchestration#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 RetryDetails { @@ -299,6 +1323,10 @@ public static class RetryDetails { @SerializedName(ApiRequestParams.EXTRA_PARAMS_KEY) Map extraParams; + /** The pre-configured retry policy to use for the payment. */ + @SerializedName("retry_policy") + String retryPolicy; + /** * Required. Indicates the strategy for how you want Stripe to retry the * payment. @@ -306,8 +1334,10 @@ public static class RetryDetails { @SerializedName("retry_strategy") RetryStrategy retryStrategy; - private RetryDetails(Map extraParams, RetryStrategy retryStrategy) { + private RetryDetails( + Map extraParams, String retryPolicy, RetryStrategy retryStrategy) { this.extraParams = extraParams; + this.retryPolicy = retryPolicy; this.retryStrategy = retryStrategy; } @@ -318,11 +1348,14 @@ public static Builder builder() { public static class Builder { private Map extraParams; + private String retryPolicy; + private RetryStrategy retryStrategy; /** Finalize and obtain parameter instance from this builder. */ public OffSessionPaymentCreateParams.RetryDetails build() { - return new OffSessionPaymentCreateParams.RetryDetails(this.extraParams, this.retryStrategy); + return new OffSessionPaymentCreateParams.RetryDetails( + this.extraParams, this.retryPolicy, this.retryStrategy); } /** @@ -352,6 +1385,12 @@ public Builder putAllExtraParam(Map map) { return this; } + /** The pre-configured retry policy to use for the payment. */ + public Builder setRetryPolicy(String retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + /** * Required. Indicates the strategy for how you want Stripe to retry the * payment. @@ -364,9 +1403,15 @@ public Builder setRetryStrategy( } public enum RetryStrategy implements ApiRequestParams.EnumParam { + @SerializedName("heuristic") + HEURISTIC("heuristic"), + @SerializedName("none") NONE("none"), + @SerializedName("scheduled") + SCHEDULED("scheduled"), + @SerializedName("smart") SMART("smart"); diff --git a/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java b/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java index 8a0fd4193a7..b76549eb9e0 100644 --- a/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java +++ b/src/main/java/com/stripe/param/v2/testhelpers/FinancialAddressCreditParams.java @@ -127,6 +127,9 @@ public enum Network implements ApiRequestParams.EnumParam { @SerializedName("rtp") RTP("rtp"), + @SerializedName("sepa_credit_transfer") + SEPA_CREDIT_TRANSFER("sepa_credit_transfer"), + @SerializedName("wire") WIRE("wire"); diff --git a/src/main/java/com/stripe/param/v2/testhelpers/MoneyManagementRecipientVerificationsParams.java b/src/main/java/com/stripe/param/v2/testhelpers/MoneyManagementRecipientVerificationsParams.java new file mode 100644 index 00000000000..cab3b84e370 --- /dev/null +++ b/src/main/java/com/stripe/param/v2/testhelpers/MoneyManagementRecipientVerificationsParams.java @@ -0,0 +1,144 @@ +// File generated from our OpenAPI spec +package com.stripe.param.v2.testhelpers; + +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 MoneyManagementRecipientVerificationsParams 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; + + /** + * Required. Expected match level of the RecipientVerification to be created: + * {@code match}, {@code close_match}, {@code no_match}, {@code unavailable}. + */ + @SerializedName("match_result") + MatchResult matchResult; + + /** Required. ID of the payout method. */ + @SerializedName("payout_method") + String payoutMethod; + + /** + * ID of the recipient account. Required if the recipient distinct from the sender. Leave empty if + * the recipient and sender are the same entity (i.e. for me-to-me payouts). + */ + @SerializedName("recipient") + String recipient; + + private MoneyManagementRecipientVerificationsParams( + Map extraParams, + MatchResult matchResult, + String payoutMethod, + String recipient) { + this.extraParams = extraParams; + this.matchResult = matchResult; + this.payoutMethod = payoutMethod; + this.recipient = recipient; + } + + public static Builder builder() { + return new Builder(); + } + + public static class Builder { + private Map extraParams; + + private MatchResult matchResult; + + private String payoutMethod; + + private String recipient; + + /** Finalize and obtain parameter instance from this builder. */ + public MoneyManagementRecipientVerificationsParams build() { + return new MoneyManagementRecipientVerificationsParams( + this.extraParams, this.matchResult, this.payoutMethod, this.recipient); + } + + /** + * Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` + * call, and subsequent calls add additional key/value pairs to the original map. See {@link + * MoneyManagementRecipientVerificationsParams#extraParams} for the field documentation. + */ + public Builder putExtraParam(String key, Object value) { + if (this.extraParams == null) { + this.extraParams = new HashMap<>(); + } + this.extraParams.put(key, value); + return this; + } + + /** + * Add all map key/value pairs to `extraParams` map. A map is initialized for the first + * `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. + * See {@link MoneyManagementRecipientVerificationsParams#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. Expected match level of the RecipientVerification to be created: + * {@code match}, {@code close_match}, {@code no_match}, {@code unavailable}. + */ + public Builder setMatchResult( + MoneyManagementRecipientVerificationsParams.MatchResult matchResult) { + this.matchResult = matchResult; + return this; + } + + /** Required. ID of the payout method. */ + public Builder setPayoutMethod(String payoutMethod) { + this.payoutMethod = payoutMethod; + return this; + } + + /** + * ID of the recipient account. Required if the recipient distinct from the sender. Leave empty + * if the recipient and sender are the same entity (i.e. for me-to-me payouts). + */ + public Builder setRecipient(String recipient) { + this.recipient = recipient; + return this; + } + } + + public enum MatchResult implements ApiRequestParams.EnumParam { + @SerializedName("close_match") + CLOSE_MATCH("close_match"), + + @SerializedName("match") + MATCH("match"), + + @SerializedName("no_match") + NO_MATCH("no_match"), + + @SerializedName("unavailable") + UNAVAILABLE("unavailable"); + + @Getter(onMethod_ = {@Override}) + private final String value; + + MatchResult(String value) { + this.value = value; + } + } +} diff --git a/src/main/java/com/stripe/service/BalanceSettingsService.java b/src/main/java/com/stripe/service/BalanceSettingsService.java index f1e901bc4c1..463e5cd1756 100644 --- a/src/main/java/com/stripe/service/BalanceSettingsService.java +++ b/src/main/java/com/stripe/service/BalanceSettingsService.java @@ -62,6 +62,20 @@ public BalanceSettings retrieve(BalanceSettingsRetrieveParams params, RequestOpt public BalanceSettings update(BalanceSettingsUpdateParams params) throws StripeException { return update(params, (RequestOptions) null); } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update(RequestOptions options) throws StripeException { + return update((BalanceSettingsUpdateParams) null, options); + } + /** + * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts + */ + public BalanceSettings update() throws StripeException { + return update((BalanceSettingsUpdateParams) null, (RequestOptions) null); + } /** * Updates balance settings for a given connected account. Related guide: Making API calls for connected accounts diff --git a/src/main/java/com/stripe/service/BillingService.java b/src/main/java/com/stripe/service/BillingService.java index 94dff2a2fee..9217247b823 100644 --- a/src/main/java/com/stripe/service/BillingService.java +++ b/src/main/java/com/stripe/service/BillingService.java @@ -13,6 +13,10 @@ public com.stripe.service.billing.AlertService alerts() { return new com.stripe.service.billing.AlertService(this.getResponseGetter()); } + public com.stripe.service.billing.AnalyticsService analytics() { + return new com.stripe.service.billing.AnalyticsService(this.getResponseGetter()); + } + public com.stripe.service.billing.CreditBalanceSummaryService creditBalanceSummary() { return new com.stripe.service.billing.CreditBalanceSummaryService(this.getResponseGetter()); } @@ -33,10 +37,6 @@ public com.stripe.service.billing.MeterEventService meterEvents() { return new com.stripe.service.billing.MeterEventService(this.getResponseGetter()); } - public com.stripe.service.billing.MeterUsageService meterUsage() { - return new com.stripe.service.billing.MeterUsageService(this.getResponseGetter()); - } - public com.stripe.service.billing.MeterService meters() { return new com.stripe.service.billing.MeterService(this.getResponseGetter()); } diff --git a/src/main/java/com/stripe/service/ExchangeRateService.java b/src/main/java/com/stripe/service/ExchangeRateService.java index c8e50cb422f..83cacab1a98 100644 --- a/src/main/java/com/stripe/service/ExchangeRateService.java +++ b/src/main/java/com/stripe/service/ExchangeRateService.java @@ -21,29 +21,45 @@ public ExchangeRateService(StripeResponseGetter responseGetter) { } /** - * Returns a list of objects that contain the rates at which foreign currencies are converted to - * one another. Only shows the currencies for which Stripe supports. + * [Deprecated] The {@code ExchangeRate} APIs are deprecated. Please use the FX Quotes + * API instead. + * + *

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

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

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

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

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

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

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

Retrieves the exchange rates from the given currency to every supported currency. + */ public ExchangeRate retrieve( String rateId, ExchangeRateRetrieveParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/PaymentRecordService.java b/src/main/java/com/stripe/service/PaymentRecordService.java index 7c62b0d39af..a0a45a0f08e 100644 --- a/src/main/java/com/stripe/service/PaymentRecordService.java +++ b/src/main/java/com/stripe/service/PaymentRecordService.java @@ -13,6 +13,7 @@ import com.stripe.param.PaymentRecordReportPaymentAttemptCanceledParams; import com.stripe.param.PaymentRecordReportPaymentAttemptFailedParams; import com.stripe.param.PaymentRecordReportPaymentAttemptGuaranteedParams; +import com.stripe.param.PaymentRecordReportPaymentAttemptInformationalParams; import com.stripe.param.PaymentRecordReportPaymentAttemptParams; import com.stripe.param.PaymentRecordReportPaymentParams; import com.stripe.param.PaymentRecordRetrieveParams; @@ -143,6 +144,42 @@ public PaymentRecord reportPaymentAttemptGuaranteed( options); return this.request(request, PaymentRecord.class); } + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + String id, PaymentRecordReportPaymentAttemptInformationalParams params) + throws StripeException { + return reportPaymentAttemptInformational(id, params, (RequestOptions) null); + } + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational(String id, RequestOptions options) + throws StripeException { + return reportPaymentAttemptInformational( + id, (PaymentRecordReportPaymentAttemptInformationalParams) null, options); + } + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational(String id) throws StripeException { + return reportPaymentAttemptInformational( + id, (PaymentRecordReportPaymentAttemptInformationalParams) null, (RequestOptions) null); + } + /** Report informational updates on the specified Payment Record. */ + public PaymentRecord reportPaymentAttemptInformational( + String id, + PaymentRecordReportPaymentAttemptInformationalParams params, + RequestOptions options) + throws StripeException { + String path = + String.format( + "/v1/payment_records/%s/report_payment_attempt_informational", + ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PaymentRecord.class); + } /** * Report a new Payment Record. You may report a Payment Record as it is initialized and later * report updates through the other report_* methods, or report Payment Records in a terminal diff --git a/src/main/java/com/stripe/service/PromotionCodeService.java b/src/main/java/com/stripe/service/PromotionCodeService.java index 706d2adbc87..42cefa9cdbb 100644 --- a/src/main/java/com/stripe/service/PromotionCodeService.java +++ b/src/main/java/com/stripe/service/PromotionCodeService.java @@ -49,15 +49,15 @@ public StripeCollection list( return this.request(request, new TypeToken>() {}.getType()); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public PromotionCode create(PromotionCodeCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } /** - * A promotion code points to a coupon. You can optionally restrict the code to a specific - * customer, redemption limit, and expiration date. + * A promotion code points to an underlying promotion. You can optionally restrict the code to a + * specific customer, redemption limit, and expiration date. */ public PromotionCode create(PromotionCodeCreateParams params, RequestOptions options) throws StripeException { diff --git a/src/main/java/com/stripe/service/billing/AnalyticsService.java b/src/main/java/com/stripe/service/billing/AnalyticsService.java new file mode 100644 index 00000000000..ecf865aca6d --- /dev/null +++ b/src/main/java/com/stripe/service/billing/AnalyticsService.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.service.billing; + +import com.stripe.net.ApiService; +import com.stripe.net.StripeResponseGetter; + +public final class AnalyticsService extends ApiService { + public AnalyticsService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + public com.stripe.service.billing.analytics.MeterUsageService meterUsage() { + return new com.stripe.service.billing.analytics.MeterUsageService(this.getResponseGetter()); + } +} diff --git a/src/main/java/com/stripe/service/billing/MeterUsageService.java b/src/main/java/com/stripe/service/billing/analytics/MeterUsageService.java similarity index 89% rename from src/main/java/com/stripe/service/billing/MeterUsageService.java rename to src/main/java/com/stripe/service/billing/analytics/MeterUsageService.java index 0beae5f7166..d30623ead25 100644 --- a/src/main/java/com/stripe/service/billing/MeterUsageService.java +++ b/src/main/java/com/stripe/service/billing/analytics/MeterUsageService.java @@ -1,8 +1,8 @@ // File generated from our OpenAPI spec -package com.stripe.service.billing; +package com.stripe.service.billing.analytics; import com.stripe.exception.StripeException; -import com.stripe.model.billing.MeterUsage; +import com.stripe.model.billing.analytics.MeterUsage; import com.stripe.net.ApiRequest; import com.stripe.net.ApiRequestParams; import com.stripe.net.ApiResource; @@ -10,7 +10,7 @@ import com.stripe.net.BaseAddress; import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; -import com.stripe.param.billing.MeterUsageRetrieveParams; +import com.stripe.param.billing.analytics.MeterUsageRetrieveParams; public final class MeterUsageService extends ApiService { public MeterUsageService(StripeResponseGetter responseGetter) { diff --git a/src/main/java/com/stripe/service/terminal/LocationService.java b/src/main/java/com/stripe/service/terminal/LocationService.java index a12d3a5f8d7..33c074d6ef7 100644 --- a/src/main/java/com/stripe/service/terminal/LocationService.java +++ b/src/main/java/com/stripe/service/terminal/LocationService.java @@ -128,6 +128,22 @@ public StripeCollection list(LocationListParams params, RequestOptions public Location create(LocationCreateParams params) throws StripeException { return create(params, (RequestOptions) null); } + /** + * Creates a new {@code Location} object. For further details, including which address fields are + * required in each country, see the Manage locations guide. + */ + public Location create(RequestOptions options) throws StripeException { + return create((LocationCreateParams) null, options); + } + /** + * Creates a new {@code Location} object. For further details, including which address fields are + * required in each country, see the Manage locations guide. + */ + public Location create() throws StripeException { + return create((LocationCreateParams) null, (RequestOptions) null); + } /** * Creates a new {@code Location} object. For further details, including which address fields are * required in each country, see the >() {}.getType(), - "{\"data\":[{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.CadenceListParams params = @@ -24550,7 +24501,7 @@ public void testV2BillingCadencePostServices() throws StripeException { null, null, com.stripe.model.v2.billing.Cadence.class, - "{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}"); + "{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.CadenceCreateParams params = @@ -24572,6 +24523,7 @@ public void testV2BillingCadencePostServices() throws StripeException { .setMonth( com.stripe.param.v2.billing.CadenceCreateParams.BillingCycle.Month.builder() .setDayOfMonth(1361669285L) + .setMonthOfYear(82933018L) .setTime( com.stripe.param.v2.billing.CadenceCreateParams.BillingCycle.Month .Time.builder() @@ -24607,8 +24559,6 @@ public void testV2BillingCadencePostServices() throws StripeException { .setPayer( com.stripe.param.v2.billing.CadenceCreateParams.Payer.builder() .setBillingProfile("billing_profile") - .setCustomer("customer") - .setType(com.stripe.param.v2.billing.CadenceCreateParams.Payer.Type.CUSTOMER) .build()) .build(); @@ -24631,7 +24581,7 @@ public void testV2BillingCadenceGet2Services() throws StripeException { null, null, com.stripe.model.v2.billing.Cadence.class, - "{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}"); + "{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.CadenceRetrieveParams params = @@ -24657,7 +24607,7 @@ public void testV2BillingCadencePost2Services() throws StripeException { null, null, com.stripe.model.v2.billing.Cadence.class, - "{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}"); + "{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.CadenceUpdateParams params = @@ -24683,7 +24633,7 @@ public void testV2BillingCadencePost3Services() throws StripeException { null, null, com.stripe.model.v2.billing.Cadence.class, - "{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}"); + "{\"billing_cycle\":{\"interval_count\":797691627,\"type\":\"week\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.cadence\",\"payer\":{\"billing_profile\":\"billing_profile\",\"type\":\"customer\"},\"status\":\"active\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.CadenceCancelParams params = @@ -25042,7 +24992,7 @@ public void testV2BillingIntentPostServices() throws StripeException { .InvoiceDiscountRule.PercentOff .MaximumApplications.Type.INDEFINITE) .build()) - .setPercentOff(new BigDecimal("991934883.3333334")) + .setPercentOff("percent_off") .build()) .build()) .build()) @@ -25062,8 +25012,7 @@ public void testV2BillingIntentPostServices() throws StripeException { .setTimestamp(Instant.parse("1970-01-01T15:18:46.294Z")) .setType( com.stripe.param.v2.billing.IntentCreateParams.Action - .Deactivate.EffectiveAt.Type - .CURRENT_BILLING_PERIOD_START) + .Deactivate.EffectiveAt.Type.ON_RESERVE) .build()) .setPricingPlanSubscriptionDetails( com.stripe.param.v2.billing.IntentCreateParams.Action.Deactivate @@ -25445,9 +25394,7 @@ public void testV2BillingLicenseFeePost2Services() throws StripeException { StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.billing.LicenseFeeUpdateParams params = - com.stripe.param.v2.billing.LicenseFeeUpdateParams.builder() - .setDisplayName("display_name") - .build(); + com.stripe.param.v2.billing.LicenseFeeUpdateParams.builder().build(); com.stripe.model.v2.billing.LicenseFee licenseFee = client.v2().billing().licenseFees().update("id_123", params); @@ -26209,6 +26156,32 @@ public void testV2BillingPricingPlanSubscriptionGet2Services() throws StripeExce null); } + @Test + public void testV2BillingPricingPlanSubscriptionPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/billing/pricing_plan_subscriptions/id_123", + null, + null, + com.stripe.model.v2.billing.PricingPlanSubscription.class, + "{\"billing_cadence\":\"billing_cadence\",\"collection_status\":\"past_due\",\"collection_status_transitions\":{},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.pricing_plan_subscription\",\"pricing_plan\":\"pricing_plan\",\"pricing_plan_version\":\"pricing_plan_version\",\"servicing_status\":\"pending\",\"servicing_status_transitions\":{},\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.billing.PricingPlanSubscriptionUpdateParams params = + com.stripe.param.v2.billing.PricingPlanSubscriptionUpdateParams.builder().build(); + + com.stripe.model.v2.billing.PricingPlanSubscription pricingPlanSubscription = + client.v2().billing().pricingPlanSubscriptions().update("id_123", params); + assertNotNull(pricingPlanSubscription); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/billing/pricing_plan_subscriptions/id_123", + params.toMap(), + null); + } + @Test public void testV2BillingProfileGetServices() throws StripeException { stubRequest( @@ -26753,6 +26726,32 @@ public void testV2BillingServiceActionGetServices() throws StripeException { null); } + @Test + public void testV2BillingServiceActionPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/billing/service_actions/id_123", + null, + null, + com.stripe.model.v2.billing.ServiceAction.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.billing.service_action\",\"service_interval\":\"month\",\"service_interval_count\":1375336415,\"type\":\"credit_grant\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.billing.ActionServiceUpdateParams params = + com.stripe.param.v2.billing.ActionServiceUpdateParams.builder().build(); + + com.stripe.model.v2.billing.ServiceAction serviceAction = + client.v2().billing().serviceActions().update("id_123", params); + assertNotNull(serviceAction); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/billing/service_actions/id_123", + params.toMap(), + null); + } + @Test public void testV2CoreAccountGetServices() throws StripeException { stubRequest( @@ -27085,7 +27084,7 @@ public void testV2CoreClaimableSandboxPostServices() throws StripeException { null, null, com.stripe.model.v2.core.ClaimableSandbox.class, - "{\"api_keys\":{\"publishable\":\"publishable\",\"secret\":\"secret\"},\"claim_url\":\"claim_url\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.claimable_sandbox\",\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"livemode\":true}"); + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.claimable_sandbox\",\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"claimed\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.core.ClaimableSandboxCreateParams params = @@ -27110,6 +27109,29 @@ public void testV2CoreClaimableSandboxPostServices() throws StripeException { null); } + @Test + public void testV2CoreClaimableSandboxGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/claimable_sandboxes/id_123", + null, + null, + com.stripe.model.v2.core.ClaimableSandbox.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.claimable_sandbox\",\"prefill\":{\"country\":\"country\",\"email\":\"email\",\"name\":\"name\"},\"sandbox_details\":{\"account\":\"account\"},\"status\":\"claimed\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.core.ClaimableSandbox claimableSandbox = + client.v2().core().claimableSandboxes().retrieve("id_123"); + assertNotNull(claimableSandbox); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/claimable_sandboxes/id_123", + null, + null); + } + @Test public void testV2CoreEventGetServices() throws StripeException { stubRequest( @@ -27777,8 +27799,10 @@ public void testV2MoneyManagementFinancialAddressPostServices() throws StripeExc com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams params = com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.builder() - .setCurrency("usd") .setFinancialAccount("financial_account") + .setType( + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.Type + .GB_BANK_ACCOUNT) .build(); com.stripe.model.v2.moneymanagement.FinancialAddress financialAddress = @@ -28029,7 +28053,7 @@ public void testV2MoneyManagementOutboundPaymentQuotePostServices() throws Strip null, null, com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.moneymanagement.OutboundPaymentQuoteCreateParams params = @@ -28068,7 +28092,7 @@ public void testV2MoneyManagementOutboundPaymentQuoteGetServices() throws Stripe null, null, com.stripe.model.v2.moneymanagement.OutboundPaymentQuote.class, - "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_expires_at\":\"1970-01-18T15:15:29.586Z\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); + "{\"amount\":{\"currency\":\"USD\",\"value\":96},\"created\":\"1970-01-12T21:42:34.472Z\",\"estimated_fees\":[{\"amount\":{\"currency\":\"USD\",\"value\":96},\"type\":\"cross_border_payout_fee\"}],\"from\":{\"debited\":{\"currency\":\"USD\",\"value\":55},\"financial_account\":\"financial_account\"},\"fx_quote\":{\"lock_duration\":\"five_minutes\",\"lock_status\":\"active\",\"rates\":{\"key\":{\"exchange_rate\":\"exchange_rate\"}},\"to_currency\":\"usd\"},\"id\":\"obj_123\",\"object\":\"v2.money_management.outbound_payment_quote\",\"to\":{\"credited\":{\"currency\":\"USD\",\"value\":68},\"payout_method\":\"payout_method\",\"recipient\":\"recipient\"},\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.moneymanagement.OutboundPaymentQuote outboundPaymentQuote = @@ -28547,6 +28571,80 @@ public void testV2MoneyManagementReceivedDebitGet2Services() throws StripeExcept null); } + @Test + public void testV2MoneyManagementRecipientVerificationPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/recipient_verifications", + null, + null, + com.stripe.model.v2.moneymanagement.RecipientVerification.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"object\":\"v2.money_management.recipient_verification\",\"status\":\"acknowledged\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.moneymanagement.RecipientVerificationCreateParams params = + com.stripe.param.v2.moneymanagement.RecipientVerificationCreateParams.builder() + .setPayoutMethod("payout_method") + .build(); + + com.stripe.model.v2.moneymanagement.RecipientVerification recipientVerification = + client.v2().moneyManagement().recipientVerifications().create(params); + assertNotNull(recipientVerification); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/recipient_verifications", + params.toMap(), + null); + } + + @Test + public void testV2MoneyManagementRecipientVerificationGetServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/recipient_verifications/id_123", + null, + null, + com.stripe.model.v2.moneymanagement.RecipientVerification.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"object\":\"v2.money_management.recipient_verification\",\"status\":\"acknowledged\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.RecipientVerification recipientVerification = + client.v2().moneyManagement().recipientVerifications().retrieve("id_123"); + assertNotNull(recipientVerification); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/money_management/recipient_verifications/id_123", + null, + null); + } + + @Test + public void testV2MoneyManagementRecipientVerificationPost2Services() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/recipient_verifications/id_123/acknowledge", + null, + null, + com.stripe.model.v2.moneymanagement.RecipientVerification.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"object\":\"v2.money_management.recipient_verification\",\"status\":\"acknowledged\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.model.v2.moneymanagement.RecipientVerification recipientVerification = + client.v2().moneyManagement().recipientVerifications().acknowledge("id_123"); + assertNotNull(recipientVerification); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/money_management/recipient_verifications/id_123/acknowledge", + null, + null); + } + @Test public void testV2MoneyManagementTransactionGetServices() throws StripeException { stubRequest( @@ -28660,7 +28758,7 @@ public void testV2PaymentsOffSessionPaymentGetServices() throws StripeException new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.payments.OffSessionPayment>>() {}.getType(), - "{\"data\":[{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}],\"next_page_url\":null,\"previous_page_url\":null}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentListParams params = @@ -28686,7 +28784,7 @@ public void testV2PaymentsOffSessionPaymentPostServices() throws StripeException null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.param.v2.payments.OffSessionPaymentCreateParams params = @@ -28719,7 +28817,7 @@ public void testV2PaymentsOffSessionPaymentGet2Services() throws StripeException null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = @@ -28742,7 +28840,7 @@ public void testV2PaymentsOffSessionPaymentPost2Services() throws StripeExceptio null, null, com.stripe.model.v2.payments.OffSessionPayment.class, - "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"none\"},\"status\":\"pending\"}"); + "{\"amount_requested\":{\"currency\":\"USD\",\"value\":47},\"cadence\":\"unscheduled\",\"compartment_id\":\"compartment_id\",\"created\":\"1970-01-12T21:42:34.472Z\",\"customer\":\"customer\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"object\":\"v2.payments.off_session_payment\",\"payment_method\":\"payment_method\",\"payments_orchestration\":{\"enabled\":true},\"retry_details\":{\"attempts\":542738246,\"retry_strategy\":\"scheduled\"},\"status\":\"pending\"}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.payments.OffSessionPayment offSessionPayment = @@ -28900,7 +28998,7 @@ public void testV2TestHelpersFinancialAddressPostServices() throws StripeExcepti com.stripe.param.v2.testhelpers.FinancialAddressCreditParams params = com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.builder() .setAmount(new com.stripe.v2.Amount(96, "USD")) - .setNetwork(com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Network.RTP) + .setNetwork(com.stripe.param.v2.testhelpers.FinancialAddressCreditParams.Network.ACH) .build(); com.stripe.model.v2.FinancialAddressCreditSimulation financialAddressCreditSimulation = @@ -28938,6 +29036,37 @@ public void testV2TestHelpersFinancialAddressPost2Services() throws StripeExcept null); } + @Test + public void testV2TestHelpersMoneyManagementPostServices() throws StripeException { + stubRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/test_helpers/money_management/recipient_verifications", + null, + null, + com.stripe.model.v2.moneymanagement.RecipientVerification.class, + "{\"created\":\"1970-01-12T21:42:34.472Z\",\"expires_at\":\"1970-01-10T15:36:51.170Z\",\"id\":\"obj_123\",\"match_result\":\"unavailable\",\"match_result_details\":{\"message\":\"message\",\"provided_name\":\"provided_name\"},\"object\":\"v2.money_management.recipient_verification\",\"status\":\"acknowledged\",\"livemode\":true}"); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.testhelpers.MoneyManagementRecipientVerificationsParams params = + com.stripe.param.v2.testhelpers.MoneyManagementRecipientVerificationsParams.builder() + .setMatchResult( + com.stripe.param.v2.testhelpers.MoneyManagementRecipientVerificationsParams + .MatchResult.UNAVAILABLE) + .setPayoutMethod("payout_method") + .build(); + + com.stripe.model.v2.moneymanagement.RecipientVerification recipientVerification = + client.v2().testHelpers().moneyManagement().recipientVerifications(params); + assertNotNull(recipientVerification); + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + "/v2/test_helpers/money_management/recipient_verifications", + params.toMap(), + null); + } + @Test public void testAlreadyCanceledErrorServices() throws StripeException { stubRequestReturnError( @@ -29097,8 +29226,10 @@ public void testFinancialAccountNotOpenErrorServices() throws StripeException { com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams params = com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.builder() - .setCurrency("usd") .setFinancialAccount("financial_account") + .setType( + com.stripe.param.v2.moneymanagement.FinancialAddressCreateParams.Type + .GB_BANK_ACCOUNT) .build(); try { @@ -29301,6 +29432,35 @@ public void testQuotaExceededErrorServices() throws StripeException { null); } + @Test + public void testRateLimitErrorServices() throws StripeException { + stubRequestReturnError( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/id_123", + null, + null, + "{\"error\":{\"type\":\"rate_limit\",\"code\":\"account_rate_limit_exceeded\"}}", + 400); + StripeClient client = new StripeClient(networkSpy); + + com.stripe.param.v2.core.AccountRetrieveParams params = + com.stripe.param.v2.core.AccountRetrieveParams.builder().build(); + + try { + client.v2().core().accounts().retrieve("id_123", params); + } catch (RateLimitException e) { + + } + ; + verifyRequest( + BaseAddress.API, + ApiResource.RequestMethod.GET, + "/v2/core/accounts/id_123", + params.toMap(), + null); + } + @Test public void testRecipientNotNotifiableErrorServices() throws StripeException { stubRequestReturnError(