diff --git a/src/main/java/com/stripe/StripeClient.java b/src/main/java/com/stripe/StripeClient.java index e5b816ddb45..356f474d768 100644 --- a/src/main/java/com/stripe/StripeClient.java +++ b/src/main/java/com/stripe/StripeClient.java @@ -3,7 +3,7 @@ import com.stripe.exception.SignatureVerificationException; import com.stripe.exception.StripeException; import com.stripe.model.StripeObject; -import com.stripe.model.ThinEvent; +import com.stripe.model.v2.EventNotification; import com.stripe.net.*; import com.stripe.net.Webhook.Signature; import java.net.PasswordAuthentication; @@ -52,9 +52,9 @@ protected StripeResponseGetter getResponseGetter() { * @return the StripeEvent instance * @throws SignatureVerificationException if the verification fails. */ - public ThinEvent parseThinEvent(String payload, String sigHeader, String secret) + public EventNotification parseEventNotification(String payload, String sigHeader, String secret) throws SignatureVerificationException { - return parseThinEvent(payload, sigHeader, secret, Webhook.DEFAULT_TOLERANCE); + return parseEventNotification(payload, sigHeader, secret, Webhook.DEFAULT_TOLERANCE); } /** @@ -70,11 +70,12 @@ public ThinEvent parseThinEvent(String payload, String sigHeader, String secret) * @return the StripeEvent instance * @throws SignatureVerificationException if the verification fails. */ - public ThinEvent parseThinEvent(String payload, String sigHeader, String secret, long tolerance) + public EventNotification parseEventNotification( + String payload, String sigHeader, String secret, long tolerance) throws SignatureVerificationException { Signature.verifyHeader(payload, sigHeader, secret, tolerance); - return ApiResource.GSON.fromJson(payload, ThinEvent.class); + return EventNotification.fromJson(payload, this); } /** diff --git a/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java index bab476098a3..89ec7c14531 100644 --- a/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java +++ b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.billing.Meter; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import java.time.Instant; import java.util.List; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEventNotification.java b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEventNotification.java new file mode 100644 index 00000000000..367a95aa50f --- /dev/null +++ b/src/main/java/com/stripe/events/V1BillingMeterErrorReportTriggeredEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.billing.Meter; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1BillingMeterErrorReportTriggeredEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Meter fetchRelatedObject() throws StripeException { + return (Meter) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1BillingMeterErrorReportTriggeredEvent fetchEvent() throws StripeException { + return (V1BillingMeterErrorReportTriggeredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEventNotification.java b/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEventNotification.java new file mode 100644 index 00000000000..e533858cff0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1BillingMeterNoMeterFoundEventNotification.java @@ -0,0 +1,13 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V1BillingMeterNoMeterFoundEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1BillingMeterNoMeterFoundEvent fetchEvent() throws StripeException { + return (V1BillingMeterNoMeterFoundEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java b/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java index 21fa0a13c73..2d6084b5886 100644 --- a/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.billing.BillSetting; import java.time.Instant; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEventNotification.java new file mode 100644 index 00000000000..9af45757d7e --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingBillSettingUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.billing.BillSetting; +import lombok.Getter; + +@Getter +public final class V2BillingBillSettingUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public BillSetting fetchRelatedObject() throws StripeException { + return (BillSetting) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingBillSettingUpdatedEvent fetchEvent() throws StripeException { + return (V2BillingBillSettingUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java index fcb7ccad65c..8e1550bb8a0 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountClosedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java new file mode 100644 index 00000000000..112474652cf --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountClosedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountClosedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountClosedEvent fetchEvent() throws StripeException { + return (V2CoreAccountClosedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java index 1ddaea50aad..b58d08beedf 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountCreatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java new file mode 100644 index 00000000000..20f06885b75 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountCreatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java index 9f3e530d5e2..5d8a3bfb498 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..9fe85d2ef2b --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final +class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java index c9997f52540..900ef39bc56 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java new file mode 100644 index 00000000000..d53a3147f98 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationCustomerUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationCustomerUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java index e0f9e3277e2..5cfd9900bb3 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..1ee2665d742 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final +class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java index 9ba30fcb762..b82a7027f87 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java new file mode 100644 index 00000000000..579890ec4a4 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationMerchantUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationMerchantUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java index 68ea8fcc6f6..4a9cf048cfd 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..ed594d7a539 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final +class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java index 0e6d2123045..54d60c31637 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java new file mode 100644 index 00000000000..6833033286a --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationRecipientUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationRecipientUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java index e18e72ec8e8..0a0ca2b4967 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification.java new file mode 100644 index 00000000000..289eb4f0abe --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification.java @@ -0,0 +1,30 @@ +// File 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.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerUpdatedEvent.java index d057a78f52d..89701f76748 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification.java new file mode 100644 index 00000000000..6d8159e99a6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingConfigurationStorerUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingConfigurationStorerUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java index ae52d938d29..9df07897f72 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java new file mode 100644 index 00000000000..2362fac5797 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingDefaultsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingDefaultsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingDefaultsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java index 6765dfbbff9..a2ca6417c0b 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java new file mode 100644 index 00000000000..8c5cb570aee --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingIdentityUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingIdentityUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingIdentityUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingIdentityUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java index fdc9c03a996..ae6db587a21 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java new file mode 100644 index 00000000000..6d99ccac484 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountIncludingRequirementsUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountIncludingRequirementsUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountIncludingRequirementsUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java new file mode 100644 index 00000000000..22c01a82692 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountLinkReturnedEventNotification.java @@ -0,0 +1,13 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreAccountLinkReturnedEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountLinkReturnedEvent fetchEvent() throws StripeException { + return (V2CoreAccountLinkReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java index df147f10d99..8ea68e3c48d 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.AccountPerson; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java new file mode 100644 index 00000000000..0d981e7e5b4 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.AccountPerson; +import lombok.Getter; + +@Getter +public final class V2CoreAccountPersonCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountPersonCreatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountPersonCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java index 021e1273d8a..2b1c403623c 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.AccountPerson; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java new file mode 100644 index 00000000000..06e3ac8b55e --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonDeletedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.AccountPerson; +import lombok.Getter; + +@Getter +public final class V2CoreAccountPersonDeletedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountPersonDeletedEvent fetchEvent() throws StripeException { + return (V2CoreAccountPersonDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java index 0ab14ed5003..0b17ebd2c0a 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.AccountPerson; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java new file mode 100644 index 00000000000..b6789389c37 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountPersonUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.AccountPerson; +import lombok.Getter; + +@Getter +public final class V2CoreAccountPersonUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public AccountPerson fetchRelatedObject() throws StripeException { + return (AccountPerson) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountPersonUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountPersonUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java index ab021a3a5e6..e76cb2c21a4 100644 --- a/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.core.Account; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java new file mode 100644 index 00000000000..60fcb1a50d6 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreAccountUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.core.Account; +import lombok.Getter; + +@Getter +public final class V2CoreAccountUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Account fetchRelatedObject() throws StripeException { + return (Account) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreAccountUpdatedEvent fetchEvent() throws StripeException { + return (V2CoreAccountUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreEventDestinationPingEvent.java b/src/main/java/com/stripe/events/V2CoreEventDestinationPingEvent.java index 7d94b5d35f5..f56280dc61d 100644 --- a/src/main/java/com/stripe/events/V2CoreEventDestinationPingEvent.java +++ b/src/main/java/com/stripe/events/V2CoreEventDestinationPingEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.EventDestination; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreEventDestinationPingEventNotification.java b/src/main/java/com/stripe/events/V2CoreEventDestinationPingEventNotification.java new file mode 100644 index 00000000000..e6d0c7da525 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreEventDestinationPingEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventDestination; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V2CoreEventDestinationPingEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public EventDestination fetchRelatedObject() throws StripeException { + return (EventDestination) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreEventDestinationPingEvent fetchEvent() throws StripeException { + return (V2CoreEventDestinationPingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEvent.java index c49cef0b590..07bd8859901 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.Adjustment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEventNotification.java new file mode 100644 index 00000000000..0ea6e9e5574 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementAdjustmentCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.Adjustment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementAdjustmentCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Adjustment fetchRelatedObject() throws StripeException { + return (Adjustment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementAdjustmentCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementAdjustmentCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEvent.java index 577b9adcd73..89ecbea26d1 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.FinancialAccount; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEventNotification.java new file mode 100644 index 00000000000..29b04f53c7d --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountCreatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.FinancialAccount; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAccountCreatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAccount fetchRelatedObject() throws StripeException { + return (FinancialAccount) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementFinancialAccountCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementFinancialAccountCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEvent.java index a25c2f0376f..33edf898615 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.FinancialAccount; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEventNotification.java new file mode 100644 index 00000000000..073e8e54a81 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAccountUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.FinancialAccount; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAccountUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAccount fetchRelatedObject() throws StripeException { + return (FinancialAccount) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementFinancialAccountUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementFinancialAccountUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEvent.java index a4d553a335c..c4ac42358ef 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.FinancialAddress; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEventNotification.java new file mode 100644 index 00000000000..31ae0273fb8 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressActivatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.FinancialAddress; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAddressActivatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAddress fetchRelatedObject() throws StripeException { + return (FinancialAddress) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementFinancialAddressActivatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementFinancialAddressActivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEvent.java index b36da4c2052..240294bb068 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.FinancialAddress; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEventNotification.java new file mode 100644 index 00000000000..bf3aa0f19af --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementFinancialAddressFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.FinancialAddress; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementFinancialAddressFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public FinancialAddress fetchRelatedObject() throws StripeException { + return (FinancialAddress) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementFinancialAddressFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementFinancialAddressFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEvent.java index 6b062a0da1f..3047c7bf7fd 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.InboundTransfer; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEventNotification.java new file mode 100644 index 00000000000..7e0613a8800 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferAvailableEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferAvailableEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferAvailableEvent fetchEvent() throws StripeException { + return (V2MoneyManagementInboundTransferAvailableEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEvent.java index 45c3609996b..55644f79660 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.InboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEventNotification.java new file mode 100644 index 00000000000..954a7595afc --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.java index c8ef8383888..d87d4304556 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.InboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEventNotification.java new file mode 100644 index 00000000000..0b5ac997bca --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitProcessingEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitProcessingEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitProcessingEvent fetchEvent() + throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitProcessingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.java index 440ad713697..5d163fc4f10 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.InboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.java new file mode 100644 index 00000000000..05fd13e8409 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitQueuedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitQueuedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitQueuedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.java index 7ff0df672fc..bd32c9997ba 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.InboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.java new file mode 100644 index 00000000000..b6ecfe06b8e --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitReturnedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitReturnedEvent fetchEvent() + throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.java index a758c8ea3dd..8bf2e732179 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.InboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.java new file mode 100644 index 00000000000..1c9a3f081c9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.InboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementInboundTransferBankDebitSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public InboundTransfer fetchRelatedObject() throws StripeException { + return (InboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementInboundTransferBankDebitSucceededEvent fetchEvent() + throws StripeException { + return (V2MoneyManagementInboundTransferBankDebitSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEvent.java index e05cab15362..f5652721144 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEventNotification.java new file mode 100644 index 00000000000..65ec57521cf --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCanceledEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentCanceledEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentCanceledEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEvent.java index 8199431922b..78d681ab75d 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEventNotification.java new file mode 100644 index 00000000000..4a54ffeebae --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentCreatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentCreatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEvent.java index 51e00b2bd8b..543076b6e71 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEventNotification.java new file mode 100644 index 00000000000..3286a458c71 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEvent.java index 97094ba5707..d2e2ffffdf2 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEventNotification.java new file mode 100644 index 00000000000..b60d2aa1d01 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentPostedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentPostedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentPostedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentPostedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEvent.java index 20cd3e99d59..56f44a37c3f 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEventNotification.java new file mode 100644 index 00000000000..00ef67dae2b --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentReturnedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentReturnedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentReturnedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEvent.java index df6a44bf6d6..399fda693cc 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.java new file mode 100644 index 00000000000..c0b858a1956 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundPayment; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundPaymentUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundPayment fetchRelatedObject() throws StripeException { + return (OutboundPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundPaymentUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundPaymentUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCanceledEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCanceledEvent.java index 7bdefa71434..83b4caa79d3 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCanceledEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCanceledEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCanceledEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCanceledEventNotification.java new file mode 100644 index 00000000000..2c04fd3724e --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCanceledEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundTransferCanceledEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundTransfer fetchRelatedObject() throws StripeException { + return (OutboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundTransferCanceledEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundTransferCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCreatedEvent.java index c6a7e72cd73..10dd840e974 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCreatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCreatedEventNotification.java new file mode 100644 index 00000000000..5f114d7cb77 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferCreatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundTransferCreatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundTransfer fetchRelatedObject() throws StripeException { + return (OutboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundTransferCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundTransferCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferFailedEvent.java index becbaa18022..e50febc0a6e 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferFailedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferFailedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferFailedEventNotification.java new file mode 100644 index 00000000000..7bb69333287 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundTransferFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundTransfer fetchRelatedObject() throws StripeException { + return (OutboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundTransferFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundTransferFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferPostedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferPostedEvent.java index f83c3fdc514..09223087b5e 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferPostedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferPostedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferPostedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferPostedEventNotification.java new file mode 100644 index 00000000000..61f2b11147f --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferPostedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundTransferPostedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundTransfer fetchRelatedObject() throws StripeException { + return (OutboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundTransferPostedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundTransferPostedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferReturnedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferReturnedEvent.java index edf505e25ad..b2e7562901f 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferReturnedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferReturnedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferReturnedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferReturnedEventNotification.java new file mode 100644 index 00000000000..1e5682041e2 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferReturnedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundTransferReturnedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundTransfer fetchRelatedObject() throws StripeException { + return (OutboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundTransferReturnedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundTransferReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferUpdatedEvent.java index cb00fd9ae7b..ad134388a6f 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.OutboundTransfer; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferUpdatedEventNotification.java new file mode 100644 index 00000000000..e74007aa889 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementOutboundTransferUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.OutboundTransfer; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementOutboundTransferUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OutboundTransfer fetchRelatedObject() throws StripeException { + return (OutboundTransfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementOutboundTransferUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementOutboundTransferUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEvent.java index ac0fef5e97e..3204e532be0 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.PayoutMethod; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEventNotification.java new file mode 100644 index 00000000000..8b571b385e3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementPayoutMethodUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.PayoutMethod; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementPayoutMethodUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public PayoutMethod fetchRelatedObject() throws StripeException { + return (PayoutMethod) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementPayoutMethodUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementPayoutMethodUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEvent.java index 827216bff82..844431bb728 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.ReceivedCredit; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEventNotification.java new file mode 100644 index 00000000000..b116ede1d4a --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditAvailableEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditAvailableEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedCreditAvailableEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedCreditAvailableEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEvent.java index b586e3b640f..83f572e3dcf 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.ReceivedCredit; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEventNotification.java new file mode 100644 index 00000000000..3715ca966d3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditFailedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedCreditFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedCreditFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEvent.java index fd09a5a73d8..d6fc3586e29 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.ReceivedCredit; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEventNotification.java new file mode 100644 index 00000000000..36b16347614 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditReturnedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditReturnedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedCreditReturnedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedCreditReturnedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEvent.java index ce9892bc56e..c30b7123954 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.ReceivedCredit; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEventNotification.java new file mode 100644 index 00000000000..31423c75961 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedCreditSucceededEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedCredit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedCreditSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedCredit fetchRelatedObject() throws StripeException { + return (ReceivedCredit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedCreditSucceededEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedCreditSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCanceledEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCanceledEvent.java index 0b7e444652d..e4d2bd9f139 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCanceledEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCanceledEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.ReceivedDebit; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCanceledEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCanceledEventNotification.java new file mode 100644 index 00000000000..0ebb50ac13a --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitCanceledEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitCanceledEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedDebit fetchRelatedObject() throws StripeException { + return (ReceivedDebit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitCanceledEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitFailedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitFailedEvent.java index 4444c09fb7f..b686d6f66e7 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitFailedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitFailedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.ReceivedDebit; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitFailedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitFailedEventNotification.java new file mode 100644 index 00000000000..fb41b5494ef --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitFailedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitFailedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedDebit fetchRelatedObject() throws StripeException { + return (ReceivedDebit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitFailedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitPendingEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitPendingEvent.java index 6c31ee3f30d..2dc23c0bda7 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitPendingEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitPendingEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.ReceivedDebit; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitPendingEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitPendingEventNotification.java new file mode 100644 index 00000000000..40a91fef0ef --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitPendingEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitPendingEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedDebit fetchRelatedObject() throws StripeException { + return (ReceivedDebit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitPendingEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitPendingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitSucceededEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitSucceededEvent.java index 7a7b1b1371f..d3da8915b91 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitSucceededEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitSucceededEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.ReceivedDebit; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitSucceededEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitSucceededEventNotification.java new file mode 100644 index 00000000000..7e67345ee78 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitSucceededEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitSucceededEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedDebit fetchRelatedObject() throws StripeException { + return (ReceivedDebit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitSucceededEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitUpdatedEvent.java index 5bac7233606..47abad46148 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.ReceivedDebit; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitUpdatedEventNotification.java new file mode 100644 index 00000000000..bfea1d5cf8a --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementReceivedDebitUpdatedEventNotification.java @@ -0,0 +1,28 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.ReceivedDebit; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementReceivedDebitUpdatedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public ReceivedDebit fetchRelatedObject() throws StripeException { + return (ReceivedDebit) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementReceivedDebitUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementReceivedDebitUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java index a1b1fab15f7..f3460fca31e 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.Transaction; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEventNotification.java new file mode 100644 index 00000000000..326c49e9422 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementTransactionCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.Transaction; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementTransactionCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Transaction fetchRelatedObject() throws StripeException { + return (Transaction) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementTransactionCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementTransactionCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEvent.java index d005e359a54..e974da3f02b 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.moneymanagement.Transaction; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEventNotification.java new file mode 100644 index 00000000000..c7252c61bc0 --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementTransactionUpdatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.moneymanagement.Transaction; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementTransactionUpdatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public Transaction fetchRelatedObject() throws StripeException { + return (Transaction) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementTransactionUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementTransactionUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.java index dcfd26ea0be..90c1aa77008 100644 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.java +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.payments.OffSessionPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.java new file mode 100644 index 00000000000..1f5d0bae0e9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent fetchEvent() + throws StripeException { + return (V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.java index e5e4529cd04..9864372f9f7 100644 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.java +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.payments.OffSessionPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.java new file mode 100644 index 00000000000..2b1a9c22202 --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.java @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification + extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent fetchEvent() + throws StripeException { + return (V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEvent.java index dcc0b2fef50..23fdf2c6eef 100644 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEvent.java +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.payments.OffSessionPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEventNotification.java new file mode 100644 index 00000000000..d2d27218d0f --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCanceledEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentCanceledEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2PaymentsOffSessionPaymentCanceledEvent fetchEvent() throws StripeException { + return (V2PaymentsOffSessionPaymentCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEvent.java index 4ea1f62dda1..7e4a282de49 100644 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.payments.OffSessionPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEventNotification.java new file mode 100644 index 00000000000..a458e987631 --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentCreatedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentCreatedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2PaymentsOffSessionPaymentCreatedEvent fetchEvent() throws StripeException { + return (V2PaymentsOffSessionPaymentCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEvent.java index cb294e12b12..19194defedf 100644 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEvent.java +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.payments.OffSessionPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEventNotification.java new file mode 100644 index 00000000000..64326c604ff --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentFailedEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentFailedEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2PaymentsOffSessionPaymentFailedEvent fetchEvent() throws StripeException { + return (V2PaymentsOffSessionPaymentFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEvent.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEvent.java index 53e3a37eb7c..0de7e6b2e8b 100644 --- a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEvent.java +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEvent.java @@ -4,6 +4,7 @@ import com.google.gson.annotations.SerializedName; import com.stripe.exception.StripeException; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import com.stripe.model.v2.payments.OffSessionPayment; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEventNotification.java b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEventNotification.java new file mode 100644 index 00000000000..8d3af017182 --- /dev/null +++ b/src/main/java/com/stripe/events/V2PaymentsOffSessionPaymentSucceededEventNotification.java @@ -0,0 +1,27 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.google.gson.annotations.SerializedName; +import com.stripe.exception.StripeException; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.payments.OffSessionPayment; +import lombok.Getter; + +@Getter +public final class V2PaymentsOffSessionPaymentSucceededEventNotification extends EventNotification { + @SerializedName("related_object") + + /** Object containing the reference to API resource relevant to the event. */ + RelatedObject relatedObject; + + /** Retrieves the related object from the API. Make an API request on every call. */ + public OffSessionPayment fetchRelatedObject() throws StripeException { + return (OffSessionPayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2PaymentsOffSessionPaymentSucceededEvent fetchEvent() throws StripeException { + return (V2PaymentsOffSessionPaymentSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/examples/ThinEventWebhookHandler.java b/src/main/java/com/stripe/examples/EventNotificationWebhookHandler.java similarity index 56% rename from src/main/java/com/stripe/examples/ThinEventWebhookHandler.java rename to src/main/java/com/stripe/examples/EventNotificationWebhookHandler.java index f26cdf99bae..d5869d57281 100644 --- a/src/main/java/com/stripe/examples/ThinEventWebhookHandler.java +++ b/src/main/java/com/stripe/examples/EventNotificationWebhookHandler.java @@ -2,10 +2,12 @@ import com.stripe.StripeClient; import com.stripe.events.V1BillingMeterErrorReportTriggeredEvent; +import com.stripe.events.V1BillingMeterErrorReportTriggeredEventNotification; import com.stripe.exception.StripeException; -import com.stripe.model.ThinEvent; import com.stripe.model.billing.Meter; import com.stripe.model.v2.Event; +import com.stripe.model.v2.EventNotification; +import com.stripe.model.v2.UnknownEventNotification; import com.sun.net.httpserver.HttpExchange; import com.sun.net.httpserver.HttpHandler; import com.sun.net.httpserver.HttpServer; @@ -16,18 +18,18 @@ import java.nio.charset.StandardCharsets; /** - * Receive and process thin events like the v1.billing.meter.error_report_triggered event. + * Receive and process EventNotifications like the v1.billing.meter.error_report_triggered event. * *
In this example, we: * *
Equal to {@code request}. + */ + @SerializedName("type") + String type; + } + + /** Unique identifier for the event. */ + @SerializedName("id") + public String id; + + /** The type of the event. */ + @SerializedName("type") + public String type; + + /** Time at which the object was created. */ + @SerializedName("created") + public Instant created; + + /** Livemode indicates if the event is from a production(true) or test(false) account. */ + @SerializedName("livemode") + public Boolean livemode; + + /** [Optional] Authentication context needed to fetch the event or related object. */ + @SerializedName("context") + public String context; + + /** [Optional] Reason for the event. */ + @SerializedName("reason") + public Reason reason; + + @Getter(AccessLevel.NONE) + protected transient StripeClient client; + + /** + * Helper for constructing an Event Notification. Doesn't perform signature validation, so you + * should use {@link com.stripe.StripeClient#parseEventNotification} instead for initial handling. + * This is useful in unit tests and working with EventNotifications that you've already validated + * the authenticity of. + */ + public static EventNotification fromJson(String payload, StripeClient client) { + // don't love the double json parse here, but I don't think we can avoid it? + JsonObject jsonObject = ApiResource.GSON.fromJson(payload, JsonObject.class).getAsJsonObject(); + + Class extends EventNotification> cls = + EventNotificationClassLookup.eventClassLookup.get(jsonObject.get("type").getAsString()); + if (cls == null) { + cls = UnknownEventNotification.class; + } + + EventNotification e = ApiResource.GSON.fromJson(payload, cls); + e.client = client; + return e; + } + + private RawRequestOptions getRequestOptions() { + if (context == null) { + return null; + } + return new RawRequestOptions.RawRequestOptionsBuilder().setStripeContext(context).build(); + } + + /* retrieves the full payload for an event. Protected because individual push classes use it, but type it correctly */ + protected Event fetchEvent() throws StripeException { + StripeResponse response = + client.rawRequest( + RequestMethod.GET, String.format("/v2/core/events/%s", id), null, getRequestOptions()); + + return (Event) client.deserialize(response.body(), ApiMode.V2); + } + + /** Retrieves the object associated with the event. */ + protected StripeObject fetchRelatedObject(RelatedObject relatedObject) throws StripeException { + if (relatedObject == null) { + // used by UnknownEventNotification, so be a little defensive + return null; + } + + String relativeUrl = relatedObject.getUrl(); + + StripeResponse response = + client.rawRequest(RequestMethod.GET, relativeUrl, null, getRequestOptions()); + + return client.deserialize(response.body(), ApiMode.getMode(relativeUrl)); + } +} diff --git a/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java new file mode 100644 index 00000000000..88ece3628cc --- /dev/null +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -0,0 +1,220 @@ +// File generated from our OpenAPI spec +package com.stripe.model.v2; + +import java.util.HashMap; +import java.util.Map; + +/** + * Event data class look up used in event deserialization. The key to look up is `object` string of + * the model. + * + *
For internal use by Stripe SDK only.
+ */
+public final class EventNotificationClassLookup {
+ public static final Map