diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f295f551191..747de357ce3 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -768c16b55352ce5cc78d27c0bbd7448263942018 \ No newline at end of file +a054f45b8f1a2bb50e950d2012fd3b3b7dec4512 \ No newline at end of file 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/V2CoreHealthAuthorizationRateDropResolvedEvent.java b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEvent.java index 2d519e65571..346ad227ca3 100644 --- a/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEvent.java @@ -18,9 +18,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; 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/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..6393c7f37c1 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", Account.class); + classLookup.put("application_fee", ApplicationFee.class); + classLookup.put("capability", Capability.class); + classLookup.put("charge", Charge.class); + classLookup.put("coupon", Coupon.class); + classLookup.put("credit_note", CreditNote.class); + classLookup.put("customer", Customer.class); + classLookup.put("discount", Discount.class); + classLookup.put("dispute", Dispute.class); + classLookup.put("file", File.class); + classLookup.put("invoice", Invoice.class); + classLookup.put("invoice_payment", InvoicePayment.class); + classLookup.put("invoiceitem", InvoiceItem.class); + classLookup.put("mandate", Mandate.class); + classLookup.put("payment_intent", PaymentIntent.class); + classLookup.put("payment_link", PaymentLink.class); + classLookup.put("payment_method", PaymentMethod.class); + classLookup.put("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("promotion_code", PromotionCode.class); + classLookup.put("quote", Quote.class); + classLookup.put("refund", Refund.class); + classLookup.put("review", Review.class); + classLookup.put("setup_intent", SetupIntent.class); + classLookup.put("source", Source.class); + classLookup.put("subscription", Subscription.class); + classLookup.put("subscription_schedule", SubscriptionSchedule.class); + classLookup.put("tax_id", TaxId.class); + classLookup.put("tax_rate", TaxRate.class); + classLookup.put("topup", Topup.class); + classLookup.put("transfer", 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..51ffa63ce45 100644 --- a/src/main/java/com/stripe/model/v2/billing/Cadence.java +++ b/src/main/java/com/stripe/model/v2/billing/Cadence.java @@ -40,6 +40,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 +76,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 +178,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; @@ -425,4 +443,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..395715a09bf 100644 --- a/src/main/java/com/stripe/model/v2/billing/IntentAction.java +++ b/src/main/java/com/stripe/model/v2/billing/IntentAction.java @@ -212,7 +212,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/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..8abf21e321a 100644 --- a/src/main/java/com/stripe/model/v2/billing/RateCardRate.java +++ b/src/main/java/com/stripe/model/v2/billing/RateCardRate.java @@ -101,6 +101,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") 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..9fc49e5568e 100644 --- a/src/main/java/com/stripe/model/v2/billing/ServiceAction.java +++ b/src/main/java/com/stripe/model/v2/billing/ServiceAction.java @@ -88,6 +88,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 +104,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 +121,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 +145,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") @@ -201,6 +221,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 +237,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 +254,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 +278,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") 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..d55573f972a 100644 --- a/src/main/java/com/stripe/model/v2/core/Account.java +++ b/src/main/java/com/stripe/model/v2/core/Account.java @@ -3376,7 +3376,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 +3394,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 +3588,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 +3778,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 +3795,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 +4424,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 +4724,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 +4743,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 +4772,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 @@ -6140,19 +6209,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/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/v2/billing/ActionServiceCreateParams.java b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java index 4a5f3a32883..f4f421c5954 100644 --- a/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/ActionServiceCreateParams.java @@ -182,6 +182,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 +203,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 +236,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 +271,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 +315,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 @@ -808,6 +848,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 +876,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 +901,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 +937,8 @@ public static class Builder { private ApplicabilityConfig applicabilityConfig; + private Category category; + private ExpiryConfig expiryConfig; private Map extraParams; @@ -875,15 +947,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 +975,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 +1027,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 @@ -1911,6 +2002,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..8a5d6898a89 100644 --- a/src/main/java/com/stripe/param/v2/billing/IntentCreateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/IntentCreateParams.java @@ -1024,6 +1024,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/LicenseFeeUpdateParams.java b/src/main/java/com/stripe/param/v2/billing/LicenseFeeUpdateParams.java index 382176e36da..4ca591f88e8 100644 --- a/src/main/java/com/stripe/param/v2/billing/LicenseFeeUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/billing/LicenseFeeUpdateParams.java @@ -16,9 +16,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 +139,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 +149,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; 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..f44742d2f04 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 @@ -39,14 +39,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 +70,6 @@ private RateCreateParams( Map extraParams, Map metadata, String meteredItem, - String price, TieringMode tieringMode, List tiers, TransformQuantity transformQuantity, @@ -87,7 +78,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 +97,6 @@ public static class Builder { private String meteredItem; - private String price; - private TieringMode tieringMode; private List tiers; @@ -124,7 +112,6 @@ public RateCreateParams build() { this.extraParams, this.metadata, this.meteredItem, - this.price, this.tieringMode, this.tiers, this.transformQuantity, @@ -196,16 +183,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 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..9ad106a3fa2 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountCreateParams.java @@ -7051,6 +7051,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 +7072,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 +7091,8 @@ public static class Builder { private Cards cards; + private CryptoWallets cryptoWallets; + private Map extraParams; private StripeBalance stripeBalance; @@ -7092,7 +7100,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 +7121,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 +7513,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 +9126,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 +9138,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 +9158,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 +9230,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 +9244,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 +10761,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 +10789,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 +10805,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 +10843,6 @@ public static class Builder { private Documents documents; - private String doingBusinessAs; - private Long estimatedWorkerCount; private Map extraParams; @@ -10651,8 +10853,6 @@ public static class Builder { private String phone; - private String productDescription; - private String registeredName; private ScriptAddresses scriptAddresses; @@ -10661,26 +10861,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 +10898,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 +10976,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 +11002,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 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..30f57ee2e8f 100644 --- a/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java +++ b/src/main/java/com/stripe/param/v2/core/AccountUpdateParams.java @@ -7382,7 +7382,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 +7448,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 +7461,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 +7510,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 +7531,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 +7550,8 @@ public static class Builder { private Cards cards; + private CryptoWallets cryptoWallets; + private Map extraParams; private StripeBalance stripeBalance; @@ -7545,7 +7559,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 +7580,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 +7972,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 +9605,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 +9617,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 +9637,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 +9719,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 +9733,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 +11342,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 +11370,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 +11386,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 +11424,6 @@ public static class Builder { private Documents documents; - private Object doingBusinessAs; - private Long estimatedWorkerCount; private Map extraParams; @@ -11205,8 +11434,6 @@ public static class Builder { private Object phone; - private Object productDescription; - private Object registeredName; private ScriptAddresses scriptAddresses; @@ -11215,26 +11442,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 +11479,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 +11563,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 +11595,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 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/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/v2/MoneyManagementService.java b/src/main/java/com/stripe/service/v2/MoneyManagementService.java index 8477b49c65b..a928c338789 100644 --- a/src/main/java/com/stripe/service/v2/MoneyManagementService.java +++ b/src/main/java/com/stripe/service/v2/MoneyManagementService.java @@ -67,6 +67,12 @@ public com.stripe.service.v2.moneymanagement.ReceivedDebitService receivedDebits return new com.stripe.service.v2.moneymanagement.ReceivedDebitService(this.getResponseGetter()); } + public com.stripe.service.v2.moneymanagement.RecipientVerificationService + recipientVerifications() { + return new com.stripe.service.v2.moneymanagement.RecipientVerificationService( + this.getResponseGetter()); + } + public com.stripe.service.v2.moneymanagement.TransactionEntryService transactionEntries() { return new com.stripe.service.v2.moneymanagement.TransactionEntryService( this.getResponseGetter()); diff --git a/src/main/java/com/stripe/service/v2/TestHelperService.java b/src/main/java/com/stripe/service/v2/TestHelperService.java index 3db3949ce33..91f2eabd8f9 100644 --- a/src/main/java/com/stripe/service/v2/TestHelperService.java +++ b/src/main/java/com/stripe/service/v2/TestHelperService.java @@ -12,4 +12,8 @@ public TestHelperService(StripeResponseGetter responseGetter) { public com.stripe.service.v2.testhelpers.FinancialAddressService financialAddresses() { return new com.stripe.service.v2.testhelpers.FinancialAddressService(this.getResponseGetter()); } + + public com.stripe.service.v2.testhelpers.MoneyManagementService moneyManagement() { + return new com.stripe.service.v2.testhelpers.MoneyManagementService(this.getResponseGetter()); + } } diff --git a/src/main/java/com/stripe/service/v2/billing/LicenseFeeService.java b/src/main/java/com/stripe/service/v2/billing/LicenseFeeService.java index e33454dfb13..c32d902b718 100644 --- a/src/main/java/com/stripe/service/v2/billing/LicenseFeeService.java +++ b/src/main/java/com/stripe/service/v2/billing/LicenseFeeService.java @@ -71,6 +71,14 @@ public LicenseFee update(String id, LicenseFeeUpdateParams params) throws Stripe return update(id, params, (RequestOptions) null); } /** Update a License Fee object. */ + public LicenseFee update(String id, RequestOptions options) throws StripeException { + return update(id, (LicenseFeeUpdateParams) null, options); + } + /** Update a License Fee object. */ + public LicenseFee update(String id) throws StripeException { + return update(id, (LicenseFeeUpdateParams) null, (RequestOptions) null); + } + /** Update a License Fee object. */ public LicenseFee update(String id, LicenseFeeUpdateParams params, RequestOptions options) throws StripeException { String path = String.format("/v2/billing/license_fees/%s", ApiResource.urlEncodeId(id)); diff --git a/src/main/java/com/stripe/service/v2/billing/PricingPlanSubscriptionService.java b/src/main/java/com/stripe/service/v2/billing/PricingPlanSubscriptionService.java index 52a324550c7..d66b52c82eb 100644 --- a/src/main/java/com/stripe/service/v2/billing/PricingPlanSubscriptionService.java +++ b/src/main/java/com/stripe/service/v2/billing/PricingPlanSubscriptionService.java @@ -13,6 +13,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.v2.billing.PricingPlanSubscriptionListParams; +import com.stripe.param.v2.billing.PricingPlanSubscriptionUpdateParams; public final class PricingPlanSubscriptionService extends ApiService { public PricingPlanSubscriptionService(StripeResponseGetter responseGetter) { @@ -60,4 +61,32 @@ public PricingPlanSubscription retrieve(String id, RequestOptions options) new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); return this.request(request, PricingPlanSubscription.class); } + /** Update a Pricing Plan Subscription object. */ + public PricingPlanSubscription update(String id, PricingPlanSubscriptionUpdateParams params) + throws StripeException { + return update(id, params, (RequestOptions) null); + } + /** Update a Pricing Plan Subscription object. */ + public PricingPlanSubscription update(String id, RequestOptions options) throws StripeException { + return update(id, (PricingPlanSubscriptionUpdateParams) null, options); + } + /** Update a Pricing Plan Subscription object. */ + public PricingPlanSubscription update(String id) throws StripeException { + return update(id, (PricingPlanSubscriptionUpdateParams) null, (RequestOptions) null); + } + /** Update a Pricing Plan Subscription object. */ + public PricingPlanSubscription update( + String id, PricingPlanSubscriptionUpdateParams params, RequestOptions options) + throws StripeException { + String path = + String.format("/v2/billing/pricing_plan_subscriptions/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, PricingPlanSubscription.class); + } } diff --git a/src/main/java/com/stripe/service/v2/billing/ServiceActionService.java b/src/main/java/com/stripe/service/v2/billing/ServiceActionService.java index c05c1ef4644..7eb466968cc 100644 --- a/src/main/java/com/stripe/service/v2/billing/ServiceActionService.java +++ b/src/main/java/com/stripe/service/v2/billing/ServiceActionService.java @@ -11,6 +11,7 @@ import com.stripe.net.RequestOptions; import com.stripe.net.StripeResponseGetter; import com.stripe.param.v2.billing.ActionServiceCreateParams; +import com.stripe.param.v2.billing.ActionServiceUpdateParams; public final class ServiceActionService extends ApiService { public ServiceActionService(StripeResponseGetter responseGetter) { @@ -45,4 +46,29 @@ public ServiceAction retrieve(String id, RequestOptions options) throws StripeEx new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); return this.request(request, ServiceAction.class); } + /** Update a ServiceAction object. */ + public ServiceAction update(String id, ActionServiceUpdateParams params) throws StripeException { + return update(id, params, (RequestOptions) null); + } + /** Update a ServiceAction object. */ + public ServiceAction update(String id, RequestOptions options) throws StripeException { + return update(id, (ActionServiceUpdateParams) null, options); + } + /** Update a ServiceAction object. */ + public ServiceAction update(String id) throws StripeException { + return update(id, (ActionServiceUpdateParams) null, (RequestOptions) null); + } + /** Update a ServiceAction object. */ + public ServiceAction update(String id, ActionServiceUpdateParams params, RequestOptions options) + throws StripeException { + String path = String.format("/v2/billing/service_actions/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, ServiceAction.class); + } } diff --git a/src/main/java/com/stripe/service/v2/core/AccountService.java b/src/main/java/com/stripe/service/v2/core/AccountService.java index a140809df6c..a0d19e3ac01 100644 --- a/src/main/java/com/stripe/service/v2/core/AccountService.java +++ b/src/main/java/com/stripe/service/v2/core/AccountService.java @@ -2,6 +2,7 @@ package com.stripe.service.v2.core; import com.google.gson.reflect.TypeToken; +import com.stripe.exception.RateLimitException; import com.stripe.exception.StripeException; import com.stripe.model.v2.StripeCollection; import com.stripe.model.v2.core.Account; @@ -93,20 +94,22 @@ public Account create(AccountCreateParams params, RequestOptions options) throws return this.request(request, Account.class); } /** Retrieves the details of an Account. */ - public Account retrieve(String id, AccountRetrieveParams params) throws StripeException { + public Account retrieve(String id, AccountRetrieveParams params) + throws StripeException, RateLimitException { return retrieve(id, params, (RequestOptions) null); } /** Retrieves the details of an Account. */ - public Account retrieve(String id, RequestOptions options) throws StripeException { + public Account retrieve(String id, RequestOptions options) + throws StripeException, RateLimitException { return retrieve(id, (AccountRetrieveParams) null, options); } /** Retrieves the details of an Account. */ - public Account retrieve(String id) throws StripeException { + public Account retrieve(String id) throws StripeException, RateLimitException { return retrieve(id, (AccountRetrieveParams) null, (RequestOptions) null); } /** Retrieves the details of an Account. */ public Account retrieve(String id, AccountRetrieveParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest( @@ -118,20 +121,22 @@ public Account retrieve(String id, AccountRetrieveParams params, RequestOptions return this.request(request, Account.class); } /** Updates the details of an Account. */ - public Account update(String id, AccountUpdateParams params) throws StripeException { + public Account update(String id, AccountUpdateParams params) + throws StripeException, RateLimitException { return update(id, params, (RequestOptions) null); } /** Updates the details of an Account. */ - public Account update(String id, RequestOptions options) throws StripeException { + public Account update(String id, RequestOptions options) + throws StripeException, RateLimitException { return update(id, (AccountUpdateParams) null, options); } /** Updates the details of an Account. */ - public Account update(String id) throws StripeException { + public Account update(String id) throws StripeException, RateLimitException { return update(id, (AccountUpdateParams) null, (RequestOptions) null); } /** Updates the details of an Account. */ public Account update(String id, AccountUpdateParams params, RequestOptions options) - throws StripeException { + throws StripeException, RateLimitException { String path = String.format("/v2/core/accounts/%s", ApiResource.urlEncodeId(id)); ApiRequest request = new ApiRequest( diff --git a/src/main/java/com/stripe/service/v2/core/ClaimableSandboxService.java b/src/main/java/com/stripe/service/v2/core/ClaimableSandboxService.java index 11aa464d526..1b446abbd10 100644 --- a/src/main/java/com/stripe/service/v2/core/ClaimableSandboxService.java +++ b/src/main/java/com/stripe/service/v2/core/ClaimableSandboxService.java @@ -40,4 +40,23 @@ public ClaimableSandbox create(ClaimableSandboxCreateParams params, RequestOptio options); return this.request(request, ClaimableSandbox.class); } + /** + * Retrieves the details of a claimable sandbox that was previously been created. Supply the + * unique claimable sandbox ID that was returned from your creation request, and Stripe will + * return the corresponding sandbox information. + */ + public ClaimableSandbox retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** + * Retrieves the details of a claimable sandbox that was previously been created. Supply the + * unique claimable sandbox ID that was returned from your creation request, and Stripe will + * return the corresponding sandbox information. + */ + public ClaimableSandbox retrieve(String id, RequestOptions options) throws StripeException { + String path = String.format("/v2/core/claimable_sandboxes/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, ClaimableSandbox.class); + } } diff --git a/src/main/java/com/stripe/service/v2/moneymanagement/RecipientVerificationService.java b/src/main/java/com/stripe/service/v2/moneymanagement/RecipientVerificationService.java new file mode 100644 index 00000000000..39972511ceb --- /dev/null +++ b/src/main/java/com/stripe/service/v2/moneymanagement/RecipientVerificationService.java @@ -0,0 +1,78 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.moneymanagement; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.moneymanagement.RecipientVerificationCreateParams; + +public final class RecipientVerificationService extends ApiService { + public RecipientVerificationService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** Creates a RecipientVerification to verify the recipient you intend to send funds to. */ + public RecipientVerification create(RecipientVerificationCreateParams params) + throws StripeException { + return create(params, (RequestOptions) null); + } + /** Creates a RecipientVerification to verify the recipient you intend to send funds to. */ + public RecipientVerification create( + RecipientVerificationCreateParams params, RequestOptions options) throws StripeException { + String path = "/v2/money_management/recipient_verifications"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, RecipientVerification.class); + } + /** + * Retrieves the details of an existing RecipientVerification by passing the unique + * RecipientVerification ID. + */ + public RecipientVerification retrieve(String id) throws StripeException { + return retrieve(id, (RequestOptions) null); + } + /** + * Retrieves the details of an existing RecipientVerification by passing the unique + * RecipientVerification ID. + */ + public RecipientVerification retrieve(String id, RequestOptions options) throws StripeException { + String path = + String.format( + "/v2/money_management/recipient_verifications/%s", ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.GET, path, null, options); + return this.request(request, RecipientVerification.class); + } + /** + * Acknowledges an existing RecipientVerification. Only RecipientVerification awaiting + * acknowledgement can be acknowledged. + */ + public RecipientVerification acknowledge(String id) throws StripeException { + return acknowledge(id, (RequestOptions) null); + } + /** + * Acknowledges an existing RecipientVerification. Only RecipientVerification awaiting + * acknowledgement can be acknowledged. + */ + public RecipientVerification acknowledge(String id, RequestOptions options) + throws StripeException { + String path = + String.format( + "/v2/money_management/recipient_verifications/%s/acknowledge", + ApiResource.urlEncodeId(id)); + ApiRequest request = + new ApiRequest(BaseAddress.API, ApiResource.RequestMethod.POST, path, null, options); + return this.request(request, RecipientVerification.class); + } +} diff --git a/src/main/java/com/stripe/service/v2/testhelpers/MoneyManagementService.java b/src/main/java/com/stripe/service/v2/testhelpers/MoneyManagementService.java new file mode 100644 index 00000000000..d0bd916960a --- /dev/null +++ b/src/main/java/com/stripe/service/v2/testhelpers/MoneyManagementService.java @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec +package com.stripe.service.v2.testhelpers; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.moneymanagement.RecipientVerification; +import com.stripe.net.ApiRequest; +import com.stripe.net.ApiRequestParams; +import com.stripe.net.ApiResource; +import com.stripe.net.ApiService; +import com.stripe.net.BaseAddress; +import com.stripe.net.RequestOptions; +import com.stripe.net.StripeResponseGetter; +import com.stripe.param.v2.testhelpers.MoneyManagementRecipientVerificationsParams; + +public final class MoneyManagementService extends ApiService { + public MoneyManagementService(StripeResponseGetter responseGetter) { + super(responseGetter); + } + + /** + * Creates a RecipientVerification with a specified match result for testing purposes in a Sandbox + * environment. + */ + public RecipientVerification recipientVerifications( + MoneyManagementRecipientVerificationsParams params) throws StripeException { + return recipientVerifications(params, (RequestOptions) null); + } + /** + * Creates a RecipientVerification with a specified match result for testing purposes in a Sandbox + * environment. + */ + public RecipientVerification recipientVerifications( + MoneyManagementRecipientVerificationsParams params, RequestOptions options) + throws StripeException { + String path = "/v2/test_helpers/money_management/recipient_verifications"; + ApiRequest request = + new ApiRequest( + BaseAddress.API, + ApiResource.RequestMethod.POST, + path, + ApiRequestParams.paramsToMap(params), + options); + return this.request(request, RecipientVerification.class); + } +} diff --git a/src/test/java/com/stripe/functional/GeneratedExamples.java b/src/test/java/com/stripe/functional/GeneratedExamples.java index 62b6faee174..c77fc7c5ce5 100644 --- a/src/test/java/com/stripe/functional/GeneratedExamples.java +++ b/src/test/java/com/stripe/functional/GeneratedExamples.java @@ -3208,7 +3208,7 @@ public void testCoreEventsGetServices() throws StripeException { null, null, com.stripe.model.v2.Event.class, - "{\"changes\":{\"key\":{}},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\",\"livemode\":true}"); + "{\"changes\":{\"key\":{}},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\",\"v1_event_id\":\"v1_event_id\",\"livemode\":true}"); StripeClient client = new StripeClient(networkSpy); com.stripe.model.v2.Event event = client.v2().core().events().retrieve("ll_123"); @@ -12811,55 +12811,6 @@ public void testPromotionCodesGet2ServicesNonNamespaced() throws StripeException @Test public void testPromotionCodesPost() throws StripeException { - PromotionCodeCreateParams params = - PromotionCodeCreateParams.builder().setCoupon("Z4OV52SU").build(); - - PromotionCode promotionCode = PromotionCode.create(params); - assertNotNull(promotionCode); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v1/promotion_codes", - params.toMap(), - null); - } - - @Test - public void testPromotionCodesPostServices() throws StripeException { - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.PromotionCodeCreateParams params = - com.stripe.param.PromotionCodeCreateParams.builder().setCoupon("Z4OV52SU").build(); - - com.stripe.model.PromotionCode promotionCode = client.v1().promotionCodes().create(params); - assertNotNull(promotionCode); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v1/promotion_codes", - params.toMap(), - null); - } - - @Test - public void testPromotionCodesPostServicesNonNamespaced() throws StripeException { - StripeClient client = new StripeClient(networkSpy); - - com.stripe.param.PromotionCodeCreateParams params = - com.stripe.param.PromotionCodeCreateParams.builder().setCoupon("Z4OV52SU").build(); - - com.stripe.model.PromotionCode promotionCode = client.promotionCodes().create(params); - assertNotNull(promotionCode); - verifyRequest( - BaseAddress.API, - ApiResource.RequestMethod.POST, - "/v1/promotion_codes", - params.toMap(), - null); - } - - @Test - public void testPromotionCodesPost2() throws StripeException { PromotionCode resource = PromotionCode.retrieve("promo_xxxxxxxxxxxxx"); PromotionCodeUpdateParams params = @@ -12876,7 +12827,7 @@ public void testPromotionCodesPost2() throws StripeException { } @Test - public void testPromotionCodesPost2Services() throws StripeException { + public void testPromotionCodesPostServices() throws StripeException { StripeClient client = new StripeClient(networkSpy); com.stripe.param.PromotionCodeUpdateParams params = @@ -12896,7 +12847,7 @@ public void testPromotionCodesPost2Services() throws StripeException { } @Test - public void testPromotionCodesPost2ServicesNonNamespaced() throws StripeException { + public void testPromotionCodesPostServicesNonNamespaced() throws StripeException { StripeClient client = new StripeClient(networkSpy); com.stripe.param.PromotionCodeUpdateParams params = @@ -24524,7 +24475,7 @@ public void testV2BillingCadenceGetServices() throws StripeException { new TypeToken< com.stripe.model.v2.StripeCollection< com.stripe.model.v2.billing.Cadence>>() {}.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 = @@ -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(