diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 10868909ef7..eea9a87371f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -4776797593c966ebe1494340934edf45a6764bf2 \ No newline at end of file +1bc3aceb31e76e2eb165647acb28d8801c4b6911 \ No newline at end of file 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/V1AccountUpdatedEvent.java b/src/main/java/com/stripe/events/V1AccountUpdatedEvent.java index e2bc6d3fbf4..a0300b8070b 100644 --- a/src/main/java/com/stripe/events/V1AccountUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1AccountUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Account; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1AccountUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1AccountUpdatedEventNotification.java new file mode 100644 index 00000000000..bada4948038 --- /dev/null +++ b/src/main/java/com/stripe/events/V1AccountUpdatedEventNotification.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.Account; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1AccountUpdatedEventNotification 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 V1AccountUpdatedEvent fetchEvent() throws StripeException { + return (V1AccountUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEvent.java b/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEvent.java index c6ff682b97f..6091255de5f 100644 --- a/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.ApplicationFee; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEventNotification.java b/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEventNotification.java new file mode 100644 index 00000000000..bd516647c69 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ApplicationFeeCreatedEventNotification.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.ApplicationFee; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ApplicationFeeCreatedEventNotification 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 ApplicationFee fetchRelatedObject() throws StripeException { + return (ApplicationFee) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ApplicationFeeCreatedEvent fetchEvent() throws StripeException { + return (V1ApplicationFeeCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEvent.java b/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEvent.java index 55d46fc4fde..d96d0e0de3e 100644 --- a/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEvent.java +++ b/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.ApplicationFee; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEventNotification.java b/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEventNotification.java new file mode 100644 index 00000000000..ffd8085b0c7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ApplicationFeeRefundedEventNotification.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.ApplicationFee; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ApplicationFeeRefundedEventNotification 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 ApplicationFee fetchRelatedObject() throws StripeException { + return (ApplicationFee) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ApplicationFeeRefundedEvent fetchEvent() throws StripeException { + return (V1ApplicationFeeRefundedEvent) super.fetchEvent(); + } +} 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/V1BillingPortalConfigurationCreatedEvent.java b/src/main/java/com/stripe/events/V1BillingPortalConfigurationCreatedEvent.java index 14ebb1692d6..58272a17ab8 100644 --- a/src/main/java/com/stripe/events/V1BillingPortalConfigurationCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1BillingPortalConfigurationCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.billingportal.Configuration; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1BillingPortalConfigurationCreatedEventNotification.java b/src/main/java/com/stripe/events/V1BillingPortalConfigurationCreatedEventNotification.java new file mode 100644 index 00000000000..562744ad88c --- /dev/null +++ b/src/main/java/com/stripe/events/V1BillingPortalConfigurationCreatedEventNotification.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.billingportal.Configuration; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1BillingPortalConfigurationCreatedEventNotification 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 Configuration fetchRelatedObject() throws StripeException { + return (Configuration) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1BillingPortalConfigurationCreatedEvent fetchEvent() throws StripeException { + return (V1BillingPortalConfigurationCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEvent.java b/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEvent.java index 75934378a51..6dd9b299178 100644 --- a/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.billingportal.Configuration; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEventNotification.java new file mode 100644 index 00000000000..bdc62e39144 --- /dev/null +++ b/src/main/java/com/stripe/events/V1BillingPortalConfigurationUpdatedEventNotification.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.billingportal.Configuration; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1BillingPortalConfigurationUpdatedEventNotification 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 Configuration fetchRelatedObject() throws StripeException { + return (Configuration) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1BillingPortalConfigurationUpdatedEvent fetchEvent() throws StripeException { + return (V1BillingPortalConfigurationUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CapabilityUpdatedEvent.java b/src/main/java/com/stripe/events/V1CapabilityUpdatedEvent.java index 1a82f26ed6e..fc01d669682 100644 --- a/src/main/java/com/stripe/events/V1CapabilityUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1CapabilityUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Capability; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CapabilityUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1CapabilityUpdatedEventNotification.java new file mode 100644 index 00000000000..b8917639d04 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CapabilityUpdatedEventNotification.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.Capability; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CapabilityUpdatedEventNotification 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 Capability fetchRelatedObject() throws StripeException { + return (Capability) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CapabilityUpdatedEvent fetchEvent() throws StripeException { + return (V1CapabilityUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeCapturedEvent.java b/src/main/java/com/stripe/events/V1ChargeCapturedEvent.java index 26dd4bd6acb..e9897958e50 100644 --- a/src/main/java/com/stripe/events/V1ChargeCapturedEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeCapturedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Charge; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeCapturedEventNotification.java b/src/main/java/com/stripe/events/V1ChargeCapturedEventNotification.java new file mode 100644 index 00000000000..c736a03d0e7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeCapturedEventNotification.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.Charge; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeCapturedEventNotification 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeCapturedEvent fetchEvent() throws StripeException { + return (V1ChargeCapturedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeClosedEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeClosedEvent.java index 7e86b41e67d..b6cd9a8ffe6 100644 --- a/src/main/java/com/stripe/events/V1ChargeDisputeClosedEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeDisputeClosedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeClosedEventNotification.java b/src/main/java/com/stripe/events/V1ChargeDisputeClosedEventNotification.java new file mode 100644 index 00000000000..6727a631841 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeClosedEventNotification.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.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeClosedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeDisputeClosedEvent fetchEvent() throws StripeException { + return (V1ChargeDisputeClosedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEvent.java index bf43cb9006a..cf731a50ba9 100644 --- a/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEventNotification.java b/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEventNotification.java new file mode 100644 index 00000000000..bd757038841 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeCreatedEventNotification.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.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeCreatedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeDisputeCreatedEvent fetchEvent() throws StripeException { + return (V1ChargeDisputeCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEvent.java index 64ad03dd9d6..c6b1839812a 100644 --- a/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEventNotification.java b/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEventNotification.java new file mode 100644 index 00000000000..4e50b064a24 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeFundsReinstatedEventNotification.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.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeFundsReinstatedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeDisputeFundsReinstatedEvent fetchEvent() throws StripeException { + return (V1ChargeDisputeFundsReinstatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEvent.java index 84f893cce52..f49125ef922 100644 --- a/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEventNotification.java b/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEventNotification.java new file mode 100644 index 00000000000..fed34bef73c --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeFundsWithdrawnEventNotification.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.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeFundsWithdrawnEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeDisputeFundsWithdrawnEvent fetchEvent() throws StripeException { + return (V1ChargeDisputeFundsWithdrawnEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEvent.java b/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEvent.java index fcebe5b230f..ab6db6a28b5 100644 --- a/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEventNotification.java new file mode 100644 index 00000000000..43317e7f5e7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeDisputeUpdatedEventNotification.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.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeDisputeUpdatedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeDisputeUpdatedEvent fetchEvent() throws StripeException { + return (V1ChargeDisputeUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeExpiredEvent.java b/src/main/java/com/stripe/events/V1ChargeExpiredEvent.java index 3d46c4bb55a..befe0ea883b 100644 --- a/src/main/java/com/stripe/events/V1ChargeExpiredEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeExpiredEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Charge; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeExpiredEventNotification.java b/src/main/java/com/stripe/events/V1ChargeExpiredEventNotification.java new file mode 100644 index 00000000000..244c53d9ae8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeExpiredEventNotification.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.Charge; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeExpiredEventNotification 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeExpiredEvent fetchEvent() throws StripeException { + return (V1ChargeExpiredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeFailedEvent.java b/src/main/java/com/stripe/events/V1ChargeFailedEvent.java index 8a3135691dd..f5c75522b61 100644 --- a/src/main/java/com/stripe/events/V1ChargeFailedEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Charge; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeFailedEventNotification.java b/src/main/java/com/stripe/events/V1ChargeFailedEventNotification.java new file mode 100644 index 00000000000..85fcaa2222f --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeFailedEventNotification.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.Charge; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeFailedEventNotification 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeFailedEvent fetchEvent() throws StripeException { + return (V1ChargeFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargePendingEvent.java b/src/main/java/com/stripe/events/V1ChargePendingEvent.java index 0b1fa6e0a23..007e4c2878a 100644 --- a/src/main/java/com/stripe/events/V1ChargePendingEvent.java +++ b/src/main/java/com/stripe/events/V1ChargePendingEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Charge; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargePendingEventNotification.java b/src/main/java/com/stripe/events/V1ChargePendingEventNotification.java new file mode 100644 index 00000000000..5ec86223eb2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargePendingEventNotification.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.Charge; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargePendingEventNotification 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargePendingEvent fetchEvent() throws StripeException { + return (V1ChargePendingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEvent.java b/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEvent.java index 577b601817c..4c268758fe9 100644 --- a/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Refund; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEventNotification.java new file mode 100644 index 00000000000..1def83328b4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeRefundUpdatedEventNotification.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.Refund; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeRefundUpdatedEventNotification 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 Refund fetchRelatedObject() throws StripeException { + return (Refund) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeRefundUpdatedEvent fetchEvent() throws StripeException { + return (V1ChargeRefundUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeRefundedEvent.java b/src/main/java/com/stripe/events/V1ChargeRefundedEvent.java index f3232a3bc49..6dc0330e5cd 100644 --- a/src/main/java/com/stripe/events/V1ChargeRefundedEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeRefundedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Charge; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeRefundedEventNotification.java b/src/main/java/com/stripe/events/V1ChargeRefundedEventNotification.java new file mode 100644 index 00000000000..d278c5fc87a --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeRefundedEventNotification.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.Charge; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeRefundedEventNotification 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeRefundedEvent fetchEvent() throws StripeException { + return (V1ChargeRefundedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeSucceededEvent.java b/src/main/java/com/stripe/events/V1ChargeSucceededEvent.java index aac3ba87eb3..becb7c08501 100644 --- a/src/main/java/com/stripe/events/V1ChargeSucceededEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeSucceededEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Charge; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeSucceededEventNotification.java b/src/main/java/com/stripe/events/V1ChargeSucceededEventNotification.java new file mode 100644 index 00000000000..a31f84b117f --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeSucceededEventNotification.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.Charge; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeSucceededEventNotification 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeSucceededEvent fetchEvent() throws StripeException { + return (V1ChargeSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ChargeUpdatedEvent.java b/src/main/java/com/stripe/events/V1ChargeUpdatedEvent.java index bd5c79fd731..e4fb3fa51c5 100644 --- a/src/main/java/com/stripe/events/V1ChargeUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1ChargeUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Charge; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ChargeUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1ChargeUpdatedEventNotification.java new file mode 100644 index 00000000000..c0e5965ef20 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ChargeUpdatedEventNotification.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.Charge; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ChargeUpdatedEventNotification 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 Charge fetchRelatedObject() throws StripeException { + return (Charge) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ChargeUpdatedEvent fetchEvent() throws StripeException { + return (V1ChargeUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEvent.java b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEvent.java index d3a0519085e..d134ff1bcf4 100644 --- a/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEvent.java +++ b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.checkout.Session; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEventNotification.java b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEventNotification.java new file mode 100644 index 00000000000..bee2a9c48e2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentFailedEventNotification.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.checkout.Session; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CheckoutSessionAsyncPaymentFailedEventNotification 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 Session fetchRelatedObject() throws StripeException { + return (Session) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CheckoutSessionAsyncPaymentFailedEvent fetchEvent() throws StripeException { + return (V1CheckoutSessionAsyncPaymentFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEvent.java b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEvent.java index 9502ee83924..c6073d853eb 100644 --- a/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEvent.java +++ b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.checkout.Session; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEventNotification.java b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEventNotification.java new file mode 100644 index 00000000000..fe4ef6316de --- /dev/null +++ b/src/main/java/com/stripe/events/V1CheckoutSessionAsyncPaymentSucceededEventNotification.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.checkout.Session; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CheckoutSessionAsyncPaymentSucceededEventNotification + 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 Session fetchRelatedObject() throws StripeException { + return (Session) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CheckoutSessionAsyncPaymentSucceededEvent fetchEvent() throws StripeException { + return (V1CheckoutSessionAsyncPaymentSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEvent.java b/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEvent.java index 899e712a318..d2bbe9e0240 100644 --- a/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEvent.java +++ b/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.checkout.Session; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEventNotification.java b/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEventNotification.java new file mode 100644 index 00000000000..b825ebd042d --- /dev/null +++ b/src/main/java/com/stripe/events/V1CheckoutSessionCompletedEventNotification.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.checkout.Session; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CheckoutSessionCompletedEventNotification 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 Session fetchRelatedObject() throws StripeException { + return (Session) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CheckoutSessionCompletedEvent fetchEvent() throws StripeException { + return (V1CheckoutSessionCompletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEvent.java b/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEvent.java index 7f71695cdc8..a36016e9147 100644 --- a/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEvent.java +++ b/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.checkout.Session; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEventNotification.java b/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEventNotification.java new file mode 100644 index 00000000000..234984cfa48 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CheckoutSessionExpiredEventNotification.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.checkout.Session; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CheckoutSessionExpiredEventNotification 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 Session fetchRelatedObject() throws StripeException { + return (Session) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CheckoutSessionExpiredEvent fetchEvent() throws StripeException { + return (V1CheckoutSessionExpiredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderCanceledEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderCanceledEvent.java index dca4460e91c..9073ee1b8b7 100644 --- a/src/main/java/com/stripe/events/V1ClimateOrderCanceledEvent.java +++ b/src/main/java/com/stripe/events/V1ClimateOrderCanceledEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.climate.Order; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ClimateOrderCanceledEventNotification.java b/src/main/java/com/stripe/events/V1ClimateOrderCanceledEventNotification.java new file mode 100644 index 00000000000..f2c5e7a7863 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderCanceledEventNotification.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.climate.Order; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderCanceledEventNotification 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ClimateOrderCanceledEvent fetchEvent() throws StripeException { + return (V1ClimateOrderCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderCreatedEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderCreatedEvent.java index 541ced71acc..37b06f88822 100644 --- a/src/main/java/com/stripe/events/V1ClimateOrderCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1ClimateOrderCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.climate.Order; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ClimateOrderCreatedEventNotification.java b/src/main/java/com/stripe/events/V1ClimateOrderCreatedEventNotification.java new file mode 100644 index 00000000000..f83cab7d9af --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderCreatedEventNotification.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.climate.Order; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderCreatedEventNotification 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ClimateOrderCreatedEvent fetchEvent() throws StripeException { + return (V1ClimateOrderCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderDelayedEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderDelayedEvent.java index eb9a91c5ef4..d3cb4f2e808 100644 --- a/src/main/java/com/stripe/events/V1ClimateOrderDelayedEvent.java +++ b/src/main/java/com/stripe/events/V1ClimateOrderDelayedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.climate.Order; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ClimateOrderDelayedEventNotification.java b/src/main/java/com/stripe/events/V1ClimateOrderDelayedEventNotification.java new file mode 100644 index 00000000000..f6c7d6be9be --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderDelayedEventNotification.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.climate.Order; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderDelayedEventNotification 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ClimateOrderDelayedEvent fetchEvent() throws StripeException { + return (V1ClimateOrderDelayedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEvent.java index 9e3bf4e6640..233e6a4e3eb 100644 --- a/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEvent.java +++ b/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.climate.Order; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEventNotification.java b/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEventNotification.java new file mode 100644 index 00000000000..86e35e3b481 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderDeliveredEventNotification.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.climate.Order; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderDeliveredEventNotification 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ClimateOrderDeliveredEvent fetchEvent() throws StripeException { + return (V1ClimateOrderDeliveredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEvent.java b/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEvent.java index a03781c469b..8e1870f4bee 100644 --- a/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEvent.java +++ b/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.climate.Order; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEventNotification.java b/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEventNotification.java new file mode 100644 index 00000000000..4f980f1f517 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateOrderProductSubstitutedEventNotification.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.climate.Order; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ClimateOrderProductSubstitutedEventNotification 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 Order fetchRelatedObject() throws StripeException { + return (Order) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ClimateOrderProductSubstitutedEvent fetchEvent() throws StripeException { + return (V1ClimateOrderProductSubstitutedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateProductCreatedEvent.java b/src/main/java/com/stripe/events/V1ClimateProductCreatedEvent.java index fb416c60161..d54d6fa94db 100644 --- a/src/main/java/com/stripe/events/V1ClimateProductCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1ClimateProductCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.climate.Product; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ClimateProductCreatedEventNotification.java b/src/main/java/com/stripe/events/V1ClimateProductCreatedEventNotification.java new file mode 100644 index 00000000000..24663d617b9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateProductCreatedEventNotification.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.climate.Product; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ClimateProductCreatedEventNotification 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ClimateProductCreatedEvent fetchEvent() throws StripeException { + return (V1ClimateProductCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEvent.java b/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEvent.java index 445018972ec..3b253749982 100644 --- a/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.climate.Product; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEventNotification.java new file mode 100644 index 00000000000..654a10d5b02 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ClimateProductPricingUpdatedEventNotification.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.climate.Product; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ClimateProductPricingUpdatedEventNotification 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ClimateProductPricingUpdatedEvent fetchEvent() throws StripeException { + return (V1ClimateProductPricingUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CouponCreatedEvent.java b/src/main/java/com/stripe/events/V1CouponCreatedEvent.java index f66cd5999a3..05cc5a216a9 100644 --- a/src/main/java/com/stripe/events/V1CouponCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1CouponCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Coupon; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CouponCreatedEventNotification.java b/src/main/java/com/stripe/events/V1CouponCreatedEventNotification.java new file mode 100644 index 00000000000..916b7a95a06 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CouponCreatedEventNotification.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.Coupon; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CouponCreatedEventNotification 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 Coupon fetchRelatedObject() throws StripeException { + return (Coupon) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CouponCreatedEvent fetchEvent() throws StripeException { + return (V1CouponCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CouponDeletedEvent.java b/src/main/java/com/stripe/events/V1CouponDeletedEvent.java index eab84e2ac26..144eb53e3f7 100644 --- a/src/main/java/com/stripe/events/V1CouponDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1CouponDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Coupon; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CouponDeletedEventNotification.java b/src/main/java/com/stripe/events/V1CouponDeletedEventNotification.java new file mode 100644 index 00000000000..1a6467532a1 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CouponDeletedEventNotification.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.Coupon; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CouponDeletedEventNotification 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 Coupon fetchRelatedObject() throws StripeException { + return (Coupon) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CouponDeletedEvent fetchEvent() throws StripeException { + return (V1CouponDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CouponUpdatedEvent.java b/src/main/java/com/stripe/events/V1CouponUpdatedEvent.java index 8570d69d94c..dd210cbc837 100644 --- a/src/main/java/com/stripe/events/V1CouponUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1CouponUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Coupon; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CouponUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1CouponUpdatedEventNotification.java new file mode 100644 index 00000000000..a155f4738f5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CouponUpdatedEventNotification.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.Coupon; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CouponUpdatedEventNotification 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 Coupon fetchRelatedObject() throws StripeException { + return (Coupon) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CouponUpdatedEvent fetchEvent() throws StripeException { + return (V1CouponUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CreditNoteCreatedEvent.java b/src/main/java/com/stripe/events/V1CreditNoteCreatedEvent.java index b608da7ffc8..f1f150184aa 100644 --- a/src/main/java/com/stripe/events/V1CreditNoteCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1CreditNoteCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.CreditNote; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CreditNoteCreatedEventNotification.java b/src/main/java/com/stripe/events/V1CreditNoteCreatedEventNotification.java new file mode 100644 index 00000000000..d315d00e97c --- /dev/null +++ b/src/main/java/com/stripe/events/V1CreditNoteCreatedEventNotification.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.CreditNote; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CreditNoteCreatedEventNotification 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 CreditNote fetchRelatedObject() throws StripeException { + return (CreditNote) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CreditNoteCreatedEvent fetchEvent() throws StripeException { + return (V1CreditNoteCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CreditNoteUpdatedEvent.java b/src/main/java/com/stripe/events/V1CreditNoteUpdatedEvent.java index d60f03d39ec..58821d1a5bc 100644 --- a/src/main/java/com/stripe/events/V1CreditNoteUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1CreditNoteUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.CreditNote; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CreditNoteUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1CreditNoteUpdatedEventNotification.java new file mode 100644 index 00000000000..da4547582af --- /dev/null +++ b/src/main/java/com/stripe/events/V1CreditNoteUpdatedEventNotification.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.CreditNote; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CreditNoteUpdatedEventNotification 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 CreditNote fetchRelatedObject() throws StripeException { + return (CreditNote) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CreditNoteUpdatedEvent fetchEvent() throws StripeException { + return (V1CreditNoteUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CreditNoteVoidedEvent.java b/src/main/java/com/stripe/events/V1CreditNoteVoidedEvent.java index 826339cee26..0abdb0fe2f6 100644 --- a/src/main/java/com/stripe/events/V1CreditNoteVoidedEvent.java +++ b/src/main/java/com/stripe/events/V1CreditNoteVoidedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.CreditNote; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CreditNoteVoidedEventNotification.java b/src/main/java/com/stripe/events/V1CreditNoteVoidedEventNotification.java new file mode 100644 index 00000000000..cc698557131 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CreditNoteVoidedEventNotification.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.CreditNote; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CreditNoteVoidedEventNotification 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 CreditNote fetchRelatedObject() throws StripeException { + return (CreditNote) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CreditNoteVoidedEvent fetchEvent() throws StripeException { + return (V1CreditNoteVoidedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerCreatedEvent.java b/src/main/java/com/stripe/events/V1CustomerCreatedEvent.java index 6c7ead47766..33b477b4ca8 100644 --- a/src/main/java/com/stripe/events/V1CustomerCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Customer; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerCreatedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerCreatedEventNotification.java new file mode 100644 index 00000000000..272c7523dcd --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerCreatedEventNotification.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.Customer; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerCreatedEventNotification 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 Customer fetchRelatedObject() throws StripeException { + return (Customer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerCreatedEvent fetchEvent() throws StripeException { + return (V1CustomerCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerDeletedEvent.java b/src/main/java/com/stripe/events/V1CustomerDeletedEvent.java index 23f66650389..ea7156d579e 100644 --- a/src/main/java/com/stripe/events/V1CustomerDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Customer; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerDeletedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerDeletedEventNotification.java new file mode 100644 index 00000000000..4c5debf96e0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDeletedEventNotification.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.Customer; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerDeletedEventNotification 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 Customer fetchRelatedObject() throws StripeException { + return (Customer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerDeletedEvent fetchEvent() throws StripeException { + return (V1CustomerDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEvent.java b/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEvent.java index e9a470608d4..31ca58cec0a 100644 --- a/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Discount; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEventNotification.java new file mode 100644 index 00000000000..5eb71b5124a --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDiscountCreatedEventNotification.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.Discount; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerDiscountCreatedEventNotification 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 Discount fetchRelatedObject() throws StripeException { + return (Discount) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerDiscountCreatedEvent fetchEvent() throws StripeException { + return (V1CustomerDiscountCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEvent.java b/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEvent.java index 8827566918f..79ec69657d8 100644 --- a/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Discount; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEventNotification.java new file mode 100644 index 00000000000..0116d935110 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDiscountDeletedEventNotification.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.Discount; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerDiscountDeletedEventNotification 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 Discount fetchRelatedObject() throws StripeException { + return (Discount) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerDiscountDeletedEvent fetchEvent() throws StripeException { + return (V1CustomerDiscountDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEvent.java b/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEvent.java index 49439f578fb..af5741883f1 100644 --- a/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Discount; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEventNotification.java new file mode 100644 index 00000000000..043d32ed986 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerDiscountUpdatedEventNotification.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.Discount; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerDiscountUpdatedEventNotification 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 Discount fetchRelatedObject() throws StripeException { + return (Discount) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerDiscountUpdatedEvent fetchEvent() throws StripeException { + return (V1CustomerDiscountUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEvent.java index f8cb9e50e14..8b772b2d54c 100644 --- a/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Subscription; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEventNotification.java new file mode 100644 index 00000000000..2a1c9196d2d --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionCreatedEventNotification.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.Subscription; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionCreatedEventNotification 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionCreatedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEvent.java index f357e6d9e60..cf40cad2f7b 100644 --- a/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Subscription; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEventNotification.java new file mode 100644 index 00000000000..a6255470da9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionDeletedEventNotification.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.Subscription; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionDeletedEventNotification 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionDeletedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEvent.java index 639dbc1941d..33a03b166e7 100644 --- a/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Subscription; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEventNotification.java new file mode 100644 index 00000000000..3e86c4815ca --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPausedEventNotification.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.Subscription; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionPausedEventNotification 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionPausedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionPausedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEvent.java index d6bf95c956d..82b16e35924 100644 --- a/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Subscription; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEventNotification.java new file mode 100644 index 00000000000..6803d6698d2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateAppliedEventNotification.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.Subscription; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionPendingUpdateAppliedEventNotification + 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionPendingUpdateAppliedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionPendingUpdateAppliedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEvent.java index 7b40144efbf..08c20034455 100644 --- a/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Subscription; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEventNotification.java new file mode 100644 index 00000000000..78dc248a775 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionPendingUpdateExpiredEventNotification.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.Subscription; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionPendingUpdateExpiredEventNotification + 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionPendingUpdateExpiredEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionPendingUpdateExpiredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEvent.java index 002edfe504f..ab8d670d98f 100644 --- a/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Subscription; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEventNotification.java new file mode 100644 index 00000000000..195d850dcf7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionResumedEventNotification.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.Subscription; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionResumedEventNotification 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionResumedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionResumedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEvent.java index f8c659b2df5..1a2cd76b20f 100644 --- a/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Subscription; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEventNotification.java new file mode 100644 index 00000000000..ec9a8dfa486 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionTrialWillEndEventNotification.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.Subscription; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionTrialWillEndEventNotification 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionTrialWillEndEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionTrialWillEndEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEvent.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEvent.java index a299b9e11aa..5f552364211 100644 --- a/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Subscription; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEventNotification.java new file mode 100644 index 00000000000..bdb57c7cf2d --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerSubscriptionUpdatedEventNotification.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.Subscription; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerSubscriptionUpdatedEventNotification 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 Subscription fetchRelatedObject() throws StripeException { + return (Subscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerSubscriptionUpdatedEvent fetchEvent() throws StripeException { + return (V1CustomerSubscriptionUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEvent.java b/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEvent.java index 34f8e87a057..4eac7846b27 100644 --- a/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.TaxId; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEventNotification.java new file mode 100644 index 00000000000..cbaf94f5ce5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerTaxIdCreatedEventNotification.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.TaxId; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerTaxIdCreatedEventNotification 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 TaxId fetchRelatedObject() throws StripeException { + return (TaxId) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerTaxIdCreatedEvent fetchEvent() throws StripeException { + return (V1CustomerTaxIdCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEvent.java b/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEvent.java index 7fed1e1b3b7..6267c7c0b2e 100644 --- a/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.TaxId; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEventNotification.java new file mode 100644 index 00000000000..8cb4818daa4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerTaxIdDeletedEventNotification.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.TaxId; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerTaxIdDeletedEventNotification 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 TaxId fetchRelatedObject() throws StripeException { + return (TaxId) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerTaxIdDeletedEvent fetchEvent() throws StripeException { + return (V1CustomerTaxIdDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEvent.java b/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEvent.java index 5b3d529e374..6079ecc2a34 100644 --- a/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.TaxId; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEventNotification.java new file mode 100644 index 00000000000..9b506f2bb1b --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerTaxIdUpdatedEventNotification.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.TaxId; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerTaxIdUpdatedEventNotification 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 TaxId fetchRelatedObject() throws StripeException { + return (TaxId) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerTaxIdUpdatedEvent fetchEvent() throws StripeException { + return (V1CustomerTaxIdUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1CustomerUpdatedEvent.java b/src/main/java/com/stripe/events/V1CustomerUpdatedEvent.java index 0fb86cc6d1c..60fbb951f16 100644 --- a/src/main/java/com/stripe/events/V1CustomerUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1CustomerUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Customer; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1CustomerUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1CustomerUpdatedEventNotification.java new file mode 100644 index 00000000000..5c5e37b7da0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1CustomerUpdatedEventNotification.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.Customer; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1CustomerUpdatedEventNotification 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 Customer fetchRelatedObject() throws StripeException { + return (Customer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1CustomerUpdatedEvent fetchEvent() throws StripeException { + return (V1CustomerUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FileCreatedEvent.java b/src/main/java/com/stripe/events/V1FileCreatedEvent.java index 2eb0255cddd..c5b868f49d1 100644 --- a/src/main/java/com/stripe/events/V1FileCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1FileCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.File; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1FileCreatedEventNotification.java b/src/main/java/com/stripe/events/V1FileCreatedEventNotification.java new file mode 100644 index 00000000000..3c58dcf2b0e --- /dev/null +++ b/src/main/java/com/stripe/events/V1FileCreatedEventNotification.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.File; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FileCreatedEventNotification 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 File fetchRelatedObject() throws StripeException { + return (File) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1FileCreatedEvent fetchEvent() throws StripeException { + return (V1FileCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEvent.java index b718f533428..35b3164d95b 100644 --- a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.financialconnections.Account; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEventNotification.java new file mode 100644 index 00000000000..555594dd052 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountCreatedEventNotification.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.financialconnections.Account; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountCreatedEventNotification 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 V1FinancialConnectionsAccountCreatedEvent fetchEvent() throws StripeException { + return (V1FinancialConnectionsAccountCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEvent.java index d41b65650d9..e08291cb1dd 100644 --- a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEvent.java +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.financialconnections.Account; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEventNotification.java new file mode 100644 index 00000000000..e2cbd1a7554 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDeactivatedEventNotification.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.financialconnections.Account; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountDeactivatedEventNotification + 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 V1FinancialConnectionsAccountDeactivatedEvent fetchEvent() throws StripeException { + return (V1FinancialConnectionsAccountDeactivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEvent.java index 92808aaf546..f6ab77ac28b 100644 --- a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEvent.java +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.financialconnections.Account; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEventNotification.java new file mode 100644 index 00000000000..b1913996d0c --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountDisconnectedEventNotification.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.financialconnections.Account; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountDisconnectedEventNotification + 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 V1FinancialConnectionsAccountDisconnectedEvent fetchEvent() throws StripeException { + return (V1FinancialConnectionsAccountDisconnectedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEvent.java index 9ec4624da70..1876efbad70 100644 --- a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEvent.java +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.financialconnections.Account; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEventNotification.java new file mode 100644 index 00000000000..04978a9d8f7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountReactivatedEventNotification.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.financialconnections.Account; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountReactivatedEventNotification + 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 V1FinancialConnectionsAccountReactivatedEvent fetchEvent() throws StripeException { + return (V1FinancialConnectionsAccountReactivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEvent.java index be9370685fa..84726e555d7 100644 --- a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEvent.java +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.financialconnections.Account; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEventNotification.java new file mode 100644 index 00000000000..ae67bccd887 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedBalanceEventNotification.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.financialconnections.Account; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRefreshedBalanceEventNotification + 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 V1FinancialConnectionsAccountRefreshedBalanceEvent fetchEvent() throws StripeException { + return (V1FinancialConnectionsAccountRefreshedBalanceEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEvent.java index 08ba0ada61b..054b02f8d05 100644 --- a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEvent.java +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.financialconnections.Account; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEventNotification.java new file mode 100644 index 00000000000..faebb452cb4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedOwnershipEventNotification.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.financialconnections.Account; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRefreshedOwnershipEventNotification + 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 V1FinancialConnectionsAccountRefreshedOwnershipEvent fetchEvent() throws StripeException { + return (V1FinancialConnectionsAccountRefreshedOwnershipEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEvent.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEvent.java index df337128eb6..6c2f7d1fad2 100644 --- a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEvent.java +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.financialconnections.Account; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEventNotification.java b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEventNotification.java new file mode 100644 index 00000000000..42982f225a2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1FinancialConnectionsAccountRefreshedTransactionsEventNotification.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.financialconnections.Account; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1FinancialConnectionsAccountRefreshedTransactionsEventNotification + 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 V1FinancialConnectionsAccountRefreshedTransactionsEvent fetchEvent() + throws StripeException { + return (V1FinancialConnectionsAccountRefreshedTransactionsEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEvent.java index 5479d81c266..40e87abeec9 100644 --- a/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEvent.java +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.identity.VerificationSession; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEventNotification.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEventNotification.java new file mode 100644 index 00000000000..5f847deaf4a --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCanceledEventNotification.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.identity.VerificationSession; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionCanceledEventNotification + 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IdentityVerificationSessionCanceledEvent fetchEvent() throws StripeException { + return (V1IdentityVerificationSessionCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEvent.java index 3c29cd7aab2..6d5c28a1189 100644 --- a/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.identity.VerificationSession; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEventNotification.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEventNotification.java new file mode 100644 index 00000000000..88886138a74 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionCreatedEventNotification.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.identity.VerificationSession; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionCreatedEventNotification 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IdentityVerificationSessionCreatedEvent fetchEvent() throws StripeException { + return (V1IdentityVerificationSessionCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEvent.java index 78e40bce284..b3f1f30af7e 100644 --- a/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEvent.java +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.identity.VerificationSession; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEventNotification.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEventNotification.java new file mode 100644 index 00000000000..8723ad60afa --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionProcessingEventNotification.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.identity.VerificationSession; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionProcessingEventNotification + 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IdentityVerificationSessionProcessingEvent fetchEvent() throws StripeException { + return (V1IdentityVerificationSessionProcessingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEvent.java index 56816477efc..71c7370f0fe 100644 --- a/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEvent.java +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.identity.VerificationSession; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEventNotification.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEventNotification.java new file mode 100644 index 00000000000..a480b549506 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRedactedEventNotification.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.identity.VerificationSession; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionRedactedEventNotification + 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IdentityVerificationSessionRedactedEvent fetchEvent() throws StripeException { + return (V1IdentityVerificationSessionRedactedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEvent.java index ea7bd06c783..d34a268e234 100644 --- a/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEvent.java +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.identity.VerificationSession; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEventNotification.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEventNotification.java new file mode 100644 index 00000000000..c137752acfe --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionRequiresInputEventNotification.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.identity.VerificationSession; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionRequiresInputEventNotification + 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IdentityVerificationSessionRequiresInputEvent fetchEvent() throws StripeException { + return (V1IdentityVerificationSessionRequiresInputEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEvent.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEvent.java index 8b021123cef..4ce5b89ed3f 100644 --- a/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEvent.java +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.identity.VerificationSession; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEventNotification.java b/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEventNotification.java new file mode 100644 index 00000000000..5da0b743606 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IdentityVerificationSessionVerifiedEventNotification.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.identity.VerificationSession; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IdentityVerificationSessionVerifiedEventNotification + 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 VerificationSession fetchRelatedObject() throws StripeException { + return (VerificationSession) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IdentityVerificationSessionVerifiedEvent fetchEvent() throws StripeException { + return (V1IdentityVerificationSessionVerifiedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceCreatedEvent.java b/src/main/java/com/stripe/events/V1InvoiceCreatedEvent.java index 5917971f379..fa6f533e0e8 100644 --- a/src/main/java/com/stripe/events/V1InvoiceCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceCreatedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceCreatedEventNotification.java new file mode 100644 index 00000000000..9b57a1b5f73 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceCreatedEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceCreatedEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceCreatedEvent fetchEvent() throws StripeException { + return (V1InvoiceCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceDeletedEvent.java b/src/main/java/com/stripe/events/V1InvoiceDeletedEvent.java index 97154bb592f..60ae59226a7 100644 --- a/src/main/java/com/stripe/events/V1InvoiceDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceDeletedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceDeletedEventNotification.java new file mode 100644 index 00000000000..49894df7344 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceDeletedEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceDeletedEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceDeletedEvent fetchEvent() throws StripeException { + return (V1InvoiceDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEvent.java b/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEvent.java index ae3aac7f527..c503beb7ac3 100644 --- a/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEventNotification.java new file mode 100644 index 00000000000..db78adf9e8f --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceFinalizationFailedEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceFinalizationFailedEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceFinalizationFailedEvent fetchEvent() throws StripeException { + return (V1InvoiceFinalizationFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceFinalizedEvent.java b/src/main/java/com/stripe/events/V1InvoiceFinalizedEvent.java index 4ed951a33ae..75090c0921d 100644 --- a/src/main/java/com/stripe/events/V1InvoiceFinalizedEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceFinalizedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceFinalizedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceFinalizedEventNotification.java new file mode 100644 index 00000000000..03519fedad5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceFinalizedEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceFinalizedEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceFinalizedEvent fetchEvent() throws StripeException { + return (V1InvoiceFinalizedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEvent.java b/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEvent.java index 3b3ed380ef9..463a7c7675d 100644 --- a/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEventNotification.java new file mode 100644 index 00000000000..63c44e7600c --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceMarkedUncollectibleEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceMarkedUncollectibleEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceMarkedUncollectibleEvent fetchEvent() throws StripeException { + return (V1InvoiceMarkedUncollectibleEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceOverdueEvent.java b/src/main/java/com/stripe/events/V1InvoiceOverdueEvent.java index 93282bc99de..1e2d0abb8c3 100644 --- a/src/main/java/com/stripe/events/V1InvoiceOverdueEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceOverdueEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceOverdueEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceOverdueEventNotification.java new file mode 100644 index 00000000000..2c680862425 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceOverdueEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceOverdueEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceOverdueEvent fetchEvent() throws StripeException { + return (V1InvoiceOverdueEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceOverpaidEvent.java b/src/main/java/com/stripe/events/V1InvoiceOverpaidEvent.java index 3a39a436249..8ae494b0ba8 100644 --- a/src/main/java/com/stripe/events/V1InvoiceOverpaidEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceOverpaidEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceOverpaidEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceOverpaidEventNotification.java new file mode 100644 index 00000000000..02b1d717897 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceOverpaidEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceOverpaidEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceOverpaidEvent fetchEvent() throws StripeException { + return (V1InvoiceOverpaidEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaidEvent.java b/src/main/java/com/stripe/events/V1InvoicePaidEvent.java index 3ab4373d782..f4ca039ec5f 100644 --- a/src/main/java/com/stripe/events/V1InvoicePaidEvent.java +++ b/src/main/java/com/stripe/events/V1InvoicePaidEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoicePaidEventNotification.java b/src/main/java/com/stripe/events/V1InvoicePaidEventNotification.java new file mode 100644 index 00000000000..55f91cfdd5b --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaidEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoicePaidEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoicePaidEvent fetchEvent() throws StripeException { + return (V1InvoicePaidEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEvent.java index c8409d5b3ac..d7d9465d0ff 100644 --- a/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEvent.java +++ b/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEventNotification.java b/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEventNotification.java new file mode 100644 index 00000000000..7fe970a0698 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentActionRequiredEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentActionRequiredEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoicePaymentActionRequiredEvent fetchEvent() throws StripeException { + return (V1InvoicePaymentActionRequiredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentFailedEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentFailedEvent.java index ab9800dbf9e..6a012fe8d8e 100644 --- a/src/main/java/com/stripe/events/V1InvoicePaymentFailedEvent.java +++ b/src/main/java/com/stripe/events/V1InvoicePaymentFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentFailedEventNotification.java b/src/main/java/com/stripe/events/V1InvoicePaymentFailedEventNotification.java new file mode 100644 index 00000000000..595116e4227 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentFailedEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentFailedEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoicePaymentFailedEvent fetchEvent() throws StripeException { + return (V1InvoicePaymentFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentPaidEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentPaidEvent.java index 1c62a094fc2..28b741499a7 100644 --- a/src/main/java/com/stripe/events/V1InvoicePaymentPaidEvent.java +++ b/src/main/java/com/stripe/events/V1InvoicePaymentPaidEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.InvoicePayment; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentPaidEventNotification.java b/src/main/java/com/stripe/events/V1InvoicePaymentPaidEventNotification.java new file mode 100644 index 00000000000..d1153e1fbf9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentPaidEventNotification.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.InvoicePayment; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentPaidEventNotification 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 InvoicePayment fetchRelatedObject() throws StripeException { + return (InvoicePayment) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoicePaymentPaidEvent fetchEvent() throws StripeException { + return (V1InvoicePaymentPaidEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEvent.java b/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEvent.java index 1ccd807f735..6c1f00de148 100644 --- a/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEvent.java +++ b/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEventNotification.java b/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEventNotification.java new file mode 100644 index 00000000000..6e275ca58d3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoicePaymentSucceededEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoicePaymentSucceededEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoicePaymentSucceededEvent fetchEvent() throws StripeException { + return (V1InvoicePaymentSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceSentEvent.java b/src/main/java/com/stripe/events/V1InvoiceSentEvent.java index 1a2586e4869..f2a4280b617 100644 --- a/src/main/java/com/stripe/events/V1InvoiceSentEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceSentEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceSentEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceSentEventNotification.java new file mode 100644 index 00000000000..659d21d432b --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceSentEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceSentEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceSentEvent fetchEvent() throws StripeException { + return (V1InvoiceSentEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java b/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java index ba73d3a0bb2..21743a25661 100644 --- a/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceUpcomingEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceUpcomingEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceUpcomingEventNotification.java new file mode 100644 index 00000000000..90e9ceb30ee --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceUpcomingEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceUpcomingEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceUpcomingEvent fetchEvent() throws StripeException { + return (V1InvoiceUpcomingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceUpdatedEvent.java b/src/main/java/com/stripe/events/V1InvoiceUpdatedEvent.java index d3ce6c8efe7..599663e41e0 100644 --- a/src/main/java/com/stripe/events/V1InvoiceUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceUpdatedEventNotification.java new file mode 100644 index 00000000000..465242ce0a8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceUpdatedEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceUpdatedEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceUpdatedEvent fetchEvent() throws StripeException { + return (V1InvoiceUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceVoidedEvent.java b/src/main/java/com/stripe/events/V1InvoiceVoidedEvent.java index 5624db4938e..790c066b36d 100644 --- a/src/main/java/com/stripe/events/V1InvoiceVoidedEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceVoidedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceVoidedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceVoidedEventNotification.java new file mode 100644 index 00000000000..474bbf91eb3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceVoidedEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceVoidedEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceVoidedEvent fetchEvent() throws StripeException { + return (V1InvoiceVoidedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceWillBeDueEvent.java b/src/main/java/com/stripe/events/V1InvoiceWillBeDueEvent.java index 3a940d865ed..d4cb7d8b4f0 100644 --- a/src/main/java/com/stripe/events/V1InvoiceWillBeDueEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceWillBeDueEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Invoice; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceWillBeDueEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceWillBeDueEventNotification.java new file mode 100644 index 00000000000..df3b5d4e4e8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceWillBeDueEventNotification.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.Invoice; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceWillBeDueEventNotification 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 Invoice fetchRelatedObject() throws StripeException { + return (Invoice) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceWillBeDueEvent fetchEvent() throws StripeException { + return (V1InvoiceWillBeDueEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemCreatedEvent.java b/src/main/java/com/stripe/events/V1InvoiceitemCreatedEvent.java index 91961b7130e..b49b27a9380 100644 --- a/src/main/java/com/stripe/events/V1InvoiceitemCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceitemCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.InvoiceItem; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceitemCreatedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceitemCreatedEventNotification.java new file mode 100644 index 00000000000..73e64c28d04 --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemCreatedEventNotification.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.InvoiceItem; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemCreatedEventNotification 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 InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceitemCreatedEvent fetchEvent() throws StripeException { + return (V1InvoiceitemCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1InvoiceitemDeletedEvent.java b/src/main/java/com/stripe/events/V1InvoiceitemDeletedEvent.java index a70be0a8a49..52478c9e0c4 100644 --- a/src/main/java/com/stripe/events/V1InvoiceitemDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1InvoiceitemDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.InvoiceItem; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1InvoiceitemDeletedEventNotification.java b/src/main/java/com/stripe/events/V1InvoiceitemDeletedEventNotification.java new file mode 100644 index 00000000000..3d31106ec6e --- /dev/null +++ b/src/main/java/com/stripe/events/V1InvoiceitemDeletedEventNotification.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.InvoiceItem; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1InvoiceitemDeletedEventNotification 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 InvoiceItem fetchRelatedObject() throws StripeException { + return (InvoiceItem) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1InvoiceitemDeletedEvent fetchEvent() throws StripeException { + return (V1InvoiceitemDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEvent.java index 1aff019a6d4..c08b5104a29 100644 --- a/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Authorization; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEventNotification.java new file mode 100644 index 00000000000..a444f2098ae --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingAuthorizationCreatedEventNotification.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.issuing.Authorization; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingAuthorizationCreatedEventNotification 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 Authorization fetchRelatedObject() throws StripeException { + return (Authorization) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingAuthorizationCreatedEvent fetchEvent() throws StripeException { + return (V1IssuingAuthorizationCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEvent.java b/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEvent.java index af2ebbeea8b..58c36b87c29 100644 --- a/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Authorization; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEventNotification.java b/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEventNotification.java new file mode 100644 index 00000000000..13e503c663e --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingAuthorizationRequestEventNotification.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.issuing.Authorization; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingAuthorizationRequestEventNotification 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 Authorization fetchRelatedObject() throws StripeException { + return (Authorization) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingAuthorizationRequestEvent fetchEvent() throws StripeException { + return (V1IssuingAuthorizationRequestEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEvent.java index c8c17a76541..28a89fb174b 100644 --- a/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Authorization; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEventNotification.java new file mode 100644 index 00000000000..26132f7a56a --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingAuthorizationUpdatedEventNotification.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.issuing.Authorization; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingAuthorizationUpdatedEventNotification 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 Authorization fetchRelatedObject() throws StripeException { + return (Authorization) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingAuthorizationUpdatedEvent fetchEvent() throws StripeException { + return (V1IssuingAuthorizationUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingCardCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingCardCreatedEvent.java index 52c0baa5f87..82a5712355d 100644 --- a/src/main/java/com/stripe/events/V1IssuingCardCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingCardCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Card; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingCardCreatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingCardCreatedEventNotification.java new file mode 100644 index 00000000000..3c5b093cf84 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingCardCreatedEventNotification.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.issuing.Card; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingCardCreatedEventNotification 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 Card fetchRelatedObject() throws StripeException { + return (Card) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingCardCreatedEvent fetchEvent() throws StripeException { + return (V1IssuingCardCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingCardUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingCardUpdatedEvent.java index a2d329cf1ac..ccb7f992f0a 100644 --- a/src/main/java/com/stripe/events/V1IssuingCardUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingCardUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Card; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingCardUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingCardUpdatedEventNotification.java new file mode 100644 index 00000000000..ac6624856e9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingCardUpdatedEventNotification.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.issuing.Card; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingCardUpdatedEventNotification 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 Card fetchRelatedObject() throws StripeException { + return (Card) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingCardUpdatedEvent fetchEvent() throws StripeException { + return (V1IssuingCardUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEvent.java index e05d1114698..5278cc16125 100644 --- a/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Cardholder; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEventNotification.java new file mode 100644 index 00000000000..f1fa9b93787 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingCardholderCreatedEventNotification.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.issuing.Cardholder; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingCardholderCreatedEventNotification 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 Cardholder fetchRelatedObject() throws StripeException { + return (Cardholder) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingCardholderCreatedEvent fetchEvent() throws StripeException { + return (V1IssuingCardholderCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEvent.java index 92e6d87378c..5ed2ed70840 100644 --- a/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Cardholder; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEventNotification.java new file mode 100644 index 00000000000..e8c816d60e3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingCardholderUpdatedEventNotification.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.issuing.Cardholder; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingCardholderUpdatedEventNotification 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 Cardholder fetchRelatedObject() throws StripeException { + return (Cardholder) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingCardholderUpdatedEvent fetchEvent() throws StripeException { + return (V1IssuingCardholderUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeClosedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeClosedEvent.java index 3161bcd9f3a..8b6d3b196d6 100644 --- a/src/main/java/com/stripe/events/V1IssuingDisputeClosedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingDisputeClosedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeClosedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingDisputeClosedEventNotification.java new file mode 100644 index 00000000000..57e76e6a3ff --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeClosedEventNotification.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.issuing.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeClosedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingDisputeClosedEvent fetchEvent() throws StripeException { + return (V1IssuingDisputeClosedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEvent.java index 59e5cd6ceb1..698fe84233e 100644 --- a/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEventNotification.java new file mode 100644 index 00000000000..ee0d3e420c0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeCreatedEventNotification.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.issuing.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeCreatedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingDisputeCreatedEvent fetchEvent() throws StripeException { + return (V1IssuingDisputeCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEvent.java index 4c2c12e08f0..4b0fc322e0b 100644 --- a/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEventNotification.java new file mode 100644 index 00000000000..8a113be5a2f --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeFundsReinstatedEventNotification.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.issuing.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeFundsReinstatedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingDisputeFundsReinstatedEvent fetchEvent() throws StripeException { + return (V1IssuingDisputeFundsReinstatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEvent.java index 4472b13c2f7..97e4e4c5413 100644 --- a/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEventNotification.java new file mode 100644 index 00000000000..2c5a60e2587 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeFundsRescindedEventNotification.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.issuing.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeFundsRescindedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingDisputeFundsRescindedEvent fetchEvent() throws StripeException { + return (V1IssuingDisputeFundsRescindedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEvent.java index 9e3fc04dabb..62d2b8a2fe1 100644 --- a/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEventNotification.java new file mode 100644 index 00000000000..1c829dfbc87 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeSubmittedEventNotification.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.issuing.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeSubmittedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingDisputeSubmittedEvent fetchEvent() throws StripeException { + return (V1IssuingDisputeSubmittedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEvent.java index c76e254a72d..7eb2bc12d52 100644 --- a/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Dispute; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEventNotification.java new file mode 100644 index 00000000000..76dea6d92bc --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingDisputeUpdatedEventNotification.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.issuing.Dispute; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingDisputeUpdatedEventNotification 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 Dispute fetchRelatedObject() throws StripeException { + return (Dispute) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingDisputeUpdatedEvent fetchEvent() throws StripeException { + return (V1IssuingDisputeUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEvent.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEvent.java index b256df4c107..22f612c21a7 100644 --- a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.PersonalizationDesign; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEventNotification.java new file mode 100644 index 00000000000..b084c52bd5e --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignActivatedEventNotification.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.issuing.PersonalizationDesign; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingPersonalizationDesignActivatedEventNotification + 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 PersonalizationDesign fetchRelatedObject() throws StripeException { + return (PersonalizationDesign) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingPersonalizationDesignActivatedEvent fetchEvent() throws StripeException { + return (V1IssuingPersonalizationDesignActivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEvent.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEvent.java index f22e82d69d5..9ead95502c5 100644 --- a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.PersonalizationDesign; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEventNotification.java new file mode 100644 index 00000000000..6b80c422e24 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignDeactivatedEventNotification.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.issuing.PersonalizationDesign; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingPersonalizationDesignDeactivatedEventNotification + 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 PersonalizationDesign fetchRelatedObject() throws StripeException { + return (PersonalizationDesign) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingPersonalizationDesignDeactivatedEvent fetchEvent() throws StripeException { + return (V1IssuingPersonalizationDesignDeactivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEvent.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEvent.java index 1e92c929c52..144ff6342d2 100644 --- a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.PersonalizationDesign; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEventNotification.java new file mode 100644 index 00000000000..61b21893aa5 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignRejectedEventNotification.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.issuing.PersonalizationDesign; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingPersonalizationDesignRejectedEventNotification + 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 PersonalizationDesign fetchRelatedObject() throws StripeException { + return (PersonalizationDesign) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingPersonalizationDesignRejectedEvent fetchEvent() throws StripeException { + return (V1IssuingPersonalizationDesignRejectedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEvent.java index 8fc0bd0898c..a10bab02ec4 100644 --- a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.PersonalizationDesign; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEventNotification.java new file mode 100644 index 00000000000..025cfd2ba05 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingPersonalizationDesignUpdatedEventNotification.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.issuing.PersonalizationDesign; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingPersonalizationDesignUpdatedEventNotification + 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 PersonalizationDesign fetchRelatedObject() throws StripeException { + return (PersonalizationDesign) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingPersonalizationDesignUpdatedEvent fetchEvent() throws StripeException { + return (V1IssuingPersonalizationDesignUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTokenCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTokenCreatedEvent.java index c071a15d2fa..33b885a1ded 100644 --- a/src/main/java/com/stripe/events/V1IssuingTokenCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingTokenCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Token; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingTokenCreatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingTokenCreatedEventNotification.java new file mode 100644 index 00000000000..e85df8381bf --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTokenCreatedEventNotification.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.issuing.Token; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingTokenCreatedEventNotification 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 Token fetchRelatedObject() throws StripeException { + return (Token) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingTokenCreatedEvent fetchEvent() throws StripeException { + return (V1IssuingTokenCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEvent.java index 59817d9b3a6..ba12d72abaa 100644 --- a/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Token; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEventNotification.java new file mode 100644 index 00000000000..b3dd2899492 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTokenUpdatedEventNotification.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.issuing.Token; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingTokenUpdatedEventNotification 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 Token fetchRelatedObject() throws StripeException { + return (Token) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1IssuingTokenUpdatedEvent fetchEvent() throws StripeException { + return (V1IssuingTokenUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEvent.java index d952fd4505f..aa63751186e 100644 --- a/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Transaction; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEventNotification.java new file mode 100644 index 00000000000..826e1b90761 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTransactionCreatedEventNotification.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.issuing.Transaction; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingTransactionCreatedEventNotification 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 V1IssuingTransactionCreatedEvent fetchEvent() throws StripeException { + return (V1IssuingTransactionCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent.java index 3693c2d2914..245d91bbf7a 100644 --- a/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Transaction; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification.java new file mode 100644 index 00000000000..29adbc611e2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification.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.issuing.Transaction; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification + 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 V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent fetchEvent() + throws StripeException { + return (V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEvent.java b/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEvent.java index 4b7c62389b0..6668a8649a1 100644 --- a/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.issuing.Transaction; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEventNotification.java new file mode 100644 index 00000000000..b32eb601476 --- /dev/null +++ b/src/main/java/com/stripe/events/V1IssuingTransactionUpdatedEventNotification.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.issuing.Transaction; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1IssuingTransactionUpdatedEventNotification 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 V1IssuingTransactionUpdatedEvent fetchEvent() throws StripeException { + return (V1IssuingTransactionUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1MandateUpdatedEvent.java b/src/main/java/com/stripe/events/V1MandateUpdatedEvent.java index 2c8d2aa0a27..b8f2bb972ef 100644 --- a/src/main/java/com/stripe/events/V1MandateUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1MandateUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Mandate; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1MandateUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1MandateUpdatedEventNotification.java new file mode 100644 index 00000000000..336f33815f0 --- /dev/null +++ b/src/main/java/com/stripe/events/V1MandateUpdatedEventNotification.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.Mandate; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1MandateUpdatedEventNotification 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 Mandate fetchRelatedObject() throws StripeException { + return (Mandate) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1MandateUpdatedEvent fetchEvent() throws StripeException { + return (V1MandateUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEvent.java index 0a2f82162b8..459a5138183 100644 --- a/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEventNotification.java new file mode 100644 index 00000000000..1ac1dbe7bd7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentAmountCapturableUpdatedEventNotification.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.PaymentIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentAmountCapturableUpdatedEventNotification + 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentIntentAmountCapturableUpdatedEvent fetchEvent() throws StripeException { + return (V1PaymentIntentAmountCapturableUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentCanceledEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentCanceledEvent.java index 510ecbf5d01..97d537d1c54 100644 --- a/src/main/java/com/stripe/events/V1PaymentIntentCanceledEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentIntentCanceledEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentIntentCanceledEventNotification.java b/src/main/java/com/stripe/events/V1PaymentIntentCanceledEventNotification.java new file mode 100644 index 00000000000..cec3235c1ce --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentCanceledEventNotification.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.PaymentIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentCanceledEventNotification 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentIntentCanceledEvent fetchEvent() throws StripeException { + return (V1PaymentIntentCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentCreatedEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentCreatedEvent.java index 0e672a1402f..6cc59a2d0d9 100644 --- a/src/main/java/com/stripe/events/V1PaymentIntentCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentIntentCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentIntentCreatedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentIntentCreatedEventNotification.java new file mode 100644 index 00000000000..4d906270466 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentCreatedEventNotification.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.PaymentIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentCreatedEventNotification 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentIntentCreatedEvent fetchEvent() throws StripeException { + return (V1PaymentIntentCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEvent.java index dd14549db2b..6c0129f4547 100644 --- a/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEventNotification.java new file mode 100644 index 00000000000..9d8fb920b5c --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentPartiallyFundedEventNotification.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.PaymentIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentPartiallyFundedEventNotification 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentIntentPartiallyFundedEvent fetchEvent() throws StripeException { + return (V1PaymentIntentPartiallyFundedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEvent.java index 618e609b907..fba40f2dc3c 100644 --- a/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEventNotification.java new file mode 100644 index 00000000000..fe859913609 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentPaymentFailedEventNotification.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.PaymentIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentPaymentFailedEventNotification 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentIntentPaymentFailedEvent fetchEvent() throws StripeException { + return (V1PaymentIntentPaymentFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentProcessingEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentProcessingEvent.java index 10ccb4938c7..a57b7fe5c86 100644 --- a/src/main/java/com/stripe/events/V1PaymentIntentProcessingEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentIntentProcessingEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentIntentProcessingEventNotification.java b/src/main/java/com/stripe/events/V1PaymentIntentProcessingEventNotification.java new file mode 100644 index 00000000000..d0ae37d312a --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentProcessingEventNotification.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.PaymentIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentProcessingEventNotification 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentIntentProcessingEvent fetchEvent() throws StripeException { + return (V1PaymentIntentProcessingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEvent.java index 7f4bdaeb200..0f374e821ac 100644 --- a/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEventNotification.java b/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEventNotification.java new file mode 100644 index 00000000000..60dd3abef5d --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentRequiresActionEventNotification.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.PaymentIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentRequiresActionEventNotification 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentIntentRequiresActionEvent fetchEvent() throws StripeException { + return (V1PaymentIntentRequiresActionEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentIntentSucceededEvent.java b/src/main/java/com/stripe/events/V1PaymentIntentSucceededEvent.java index 9582e904826..6dda1d8ba60 100644 --- a/src/main/java/com/stripe/events/V1PaymentIntentSucceededEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentIntentSucceededEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentIntentSucceededEventNotification.java b/src/main/java/com/stripe/events/V1PaymentIntentSucceededEventNotification.java new file mode 100644 index 00000000000..6444d478adf --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentIntentSucceededEventNotification.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.PaymentIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentIntentSucceededEventNotification 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 PaymentIntent fetchRelatedObject() throws StripeException { + return (PaymentIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentIntentSucceededEvent fetchEvent() throws StripeException { + return (V1PaymentIntentSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentLinkCreatedEvent.java b/src/main/java/com/stripe/events/V1PaymentLinkCreatedEvent.java index a890e0217fc..fccf42883a1 100644 --- a/src/main/java/com/stripe/events/V1PaymentLinkCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentLinkCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentLink; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentLinkCreatedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentLinkCreatedEventNotification.java new file mode 100644 index 00000000000..86c4a3975a8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentLinkCreatedEventNotification.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.PaymentLink; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentLinkCreatedEventNotification 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 PaymentLink fetchRelatedObject() throws StripeException { + return (PaymentLink) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentLinkCreatedEvent fetchEvent() throws StripeException { + return (V1PaymentLinkCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEvent.java b/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEvent.java index 2c631b60238..5d70871cd07 100644 --- a/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentLink; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEventNotification.java new file mode 100644 index 00000000000..2c759cd1101 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentLinkUpdatedEventNotification.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.PaymentLink; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentLinkUpdatedEventNotification 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 PaymentLink fetchRelatedObject() throws StripeException { + return (PaymentLink) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentLinkUpdatedEvent fetchEvent() throws StripeException { + return (V1PaymentLinkUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentMethodAttachedEvent.java b/src/main/java/com/stripe/events/V1PaymentMethodAttachedEvent.java index 5a2ff8a1d1f..93f12cf59ee 100644 --- a/src/main/java/com/stripe/events/V1PaymentMethodAttachedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentMethodAttachedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentMethod; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentMethodAttachedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentMethodAttachedEventNotification.java new file mode 100644 index 00000000000..30e88264145 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentMethodAttachedEventNotification.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.PaymentMethod; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentMethodAttachedEventNotification 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 PaymentMethod fetchRelatedObject() throws StripeException { + return (PaymentMethod) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentMethodAttachedEvent fetchEvent() throws StripeException { + return (V1PaymentMethodAttachedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEvent.java b/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEvent.java index ee67d2080e9..3bc0dea6024 100644 --- a/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentMethod; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEventNotification.java new file mode 100644 index 00000000000..b19c0f56d1b --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentMethodAutomaticallyUpdatedEventNotification.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.PaymentMethod; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentMethodAutomaticallyUpdatedEventNotification 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 PaymentMethod fetchRelatedObject() throws StripeException { + return (PaymentMethod) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentMethodAutomaticallyUpdatedEvent fetchEvent() throws StripeException { + return (V1PaymentMethodAutomaticallyUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentMethodDetachedEvent.java b/src/main/java/com/stripe/events/V1PaymentMethodDetachedEvent.java index 89e9d9d8b52..71fcb03b214 100644 --- a/src/main/java/com/stripe/events/V1PaymentMethodDetachedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentMethodDetachedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentMethod; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentMethodDetachedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentMethodDetachedEventNotification.java new file mode 100644 index 00000000000..200e651fd6f --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentMethodDetachedEventNotification.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.PaymentMethod; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentMethodDetachedEventNotification 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 PaymentMethod fetchRelatedObject() throws StripeException { + return (PaymentMethod) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentMethodDetachedEvent fetchEvent() throws StripeException { + return (V1PaymentMethodDetachedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEvent.java b/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEvent.java index 748de7cb281..01e1e35a0b8 100644 --- a/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PaymentMethod; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEventNotification.java new file mode 100644 index 00000000000..0147cb29242 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PaymentMethodUpdatedEventNotification.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.PaymentMethod; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PaymentMethodUpdatedEventNotification 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 PaymentMethod fetchRelatedObject() throws StripeException { + return (PaymentMethod) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PaymentMethodUpdatedEvent fetchEvent() throws StripeException { + return (V1PaymentMethodUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutCanceledEvent.java b/src/main/java/com/stripe/events/V1PayoutCanceledEvent.java index af40bd23d96..dda78c6ad80 100644 --- a/src/main/java/com/stripe/events/V1PayoutCanceledEvent.java +++ b/src/main/java/com/stripe/events/V1PayoutCanceledEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Payout; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PayoutCanceledEventNotification.java b/src/main/java/com/stripe/events/V1PayoutCanceledEventNotification.java new file mode 100644 index 00000000000..067c9bd236e --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutCanceledEventNotification.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.Payout; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PayoutCanceledEventNotification 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PayoutCanceledEvent fetchEvent() throws StripeException { + return (V1PayoutCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutCreatedEvent.java b/src/main/java/com/stripe/events/V1PayoutCreatedEvent.java index 6640a65ff55..66623fb854d 100644 --- a/src/main/java/com/stripe/events/V1PayoutCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1PayoutCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Payout; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PayoutCreatedEventNotification.java b/src/main/java/com/stripe/events/V1PayoutCreatedEventNotification.java new file mode 100644 index 00000000000..9fd606e9baa --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutCreatedEventNotification.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.Payout; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PayoutCreatedEventNotification 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PayoutCreatedEvent fetchEvent() throws StripeException { + return (V1PayoutCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutFailedEvent.java b/src/main/java/com/stripe/events/V1PayoutFailedEvent.java index 215d787935d..56c9a1af895 100644 --- a/src/main/java/com/stripe/events/V1PayoutFailedEvent.java +++ b/src/main/java/com/stripe/events/V1PayoutFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Payout; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PayoutFailedEventNotification.java b/src/main/java/com/stripe/events/V1PayoutFailedEventNotification.java new file mode 100644 index 00000000000..4bb27ede376 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutFailedEventNotification.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.Payout; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PayoutFailedEventNotification 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PayoutFailedEvent fetchEvent() throws StripeException { + return (V1PayoutFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutPaidEvent.java b/src/main/java/com/stripe/events/V1PayoutPaidEvent.java index d289f1617ce..8e5d83634ef 100644 --- a/src/main/java/com/stripe/events/V1PayoutPaidEvent.java +++ b/src/main/java/com/stripe/events/V1PayoutPaidEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Payout; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PayoutPaidEventNotification.java b/src/main/java/com/stripe/events/V1PayoutPaidEventNotification.java new file mode 100644 index 00000000000..262b6b4c759 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutPaidEventNotification.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.Payout; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PayoutPaidEventNotification 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PayoutPaidEvent fetchEvent() throws StripeException { + return (V1PayoutPaidEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEvent.java b/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEvent.java index a72b3e2196b..9ee2d564312 100644 --- a/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEvent.java +++ b/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Payout; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEventNotification.java b/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEventNotification.java new file mode 100644 index 00000000000..b23bf68c0f2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutReconciliationCompletedEventNotification.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.Payout; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PayoutReconciliationCompletedEventNotification 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PayoutReconciliationCompletedEvent fetchEvent() throws StripeException { + return (V1PayoutReconciliationCompletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PayoutUpdatedEvent.java b/src/main/java/com/stripe/events/V1PayoutUpdatedEvent.java index 50084b78fb2..7a11e04e88c 100644 --- a/src/main/java/com/stripe/events/V1PayoutUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1PayoutUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Payout; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PayoutUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1PayoutUpdatedEventNotification.java new file mode 100644 index 00000000000..9cf6e6f40d4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PayoutUpdatedEventNotification.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.Payout; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PayoutUpdatedEventNotification 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 Payout fetchRelatedObject() throws StripeException { + return (Payout) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PayoutUpdatedEvent fetchEvent() throws StripeException { + return (V1PayoutUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PersonCreatedEvent.java b/src/main/java/com/stripe/events/V1PersonCreatedEvent.java index eb25520814a..8da3b3533bd 100644 --- a/src/main/java/com/stripe/events/V1PersonCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1PersonCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Person; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PersonCreatedEventNotification.java b/src/main/java/com/stripe/events/V1PersonCreatedEventNotification.java new file mode 100644 index 00000000000..7b36c06e7a7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PersonCreatedEventNotification.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.Person; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PersonCreatedEventNotification 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 Person fetchRelatedObject() throws StripeException { + return (Person) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PersonCreatedEvent fetchEvent() throws StripeException { + return (V1PersonCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PersonDeletedEvent.java b/src/main/java/com/stripe/events/V1PersonDeletedEvent.java index 007a159fe87..d3015d648f2 100644 --- a/src/main/java/com/stripe/events/V1PersonDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1PersonDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Person; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PersonDeletedEventNotification.java b/src/main/java/com/stripe/events/V1PersonDeletedEventNotification.java new file mode 100644 index 00000000000..0a90a7f4dca --- /dev/null +++ b/src/main/java/com/stripe/events/V1PersonDeletedEventNotification.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.Person; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PersonDeletedEventNotification 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 Person fetchRelatedObject() throws StripeException { + return (Person) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PersonDeletedEvent fetchEvent() throws StripeException { + return (V1PersonDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PersonUpdatedEvent.java b/src/main/java/com/stripe/events/V1PersonUpdatedEvent.java index b1dbefc088d..14838d5bf68 100644 --- a/src/main/java/com/stripe/events/V1PersonUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1PersonUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Person; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PersonUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1PersonUpdatedEventNotification.java new file mode 100644 index 00000000000..02c8c2f9992 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PersonUpdatedEventNotification.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.Person; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PersonUpdatedEventNotification 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 Person fetchRelatedObject() throws StripeException { + return (Person) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PersonUpdatedEvent fetchEvent() throws StripeException { + return (V1PersonUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PlanCreatedEvent.java b/src/main/java/com/stripe/events/V1PlanCreatedEvent.java index fd4e04faf55..a8b4f185628 100644 --- a/src/main/java/com/stripe/events/V1PlanCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1PlanCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Plan; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PlanCreatedEventNotification.java b/src/main/java/com/stripe/events/V1PlanCreatedEventNotification.java new file mode 100644 index 00000000000..be1110d1098 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PlanCreatedEventNotification.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.Plan; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PlanCreatedEventNotification 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 Plan fetchRelatedObject() throws StripeException { + return (Plan) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PlanCreatedEvent fetchEvent() throws StripeException { + return (V1PlanCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PlanDeletedEvent.java b/src/main/java/com/stripe/events/V1PlanDeletedEvent.java index f289fc74065..f304edac95c 100644 --- a/src/main/java/com/stripe/events/V1PlanDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1PlanDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Plan; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PlanDeletedEventNotification.java b/src/main/java/com/stripe/events/V1PlanDeletedEventNotification.java new file mode 100644 index 00000000000..bb2140539fe --- /dev/null +++ b/src/main/java/com/stripe/events/V1PlanDeletedEventNotification.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.Plan; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PlanDeletedEventNotification 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 Plan fetchRelatedObject() throws StripeException { + return (Plan) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PlanDeletedEvent fetchEvent() throws StripeException { + return (V1PlanDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PlanUpdatedEvent.java b/src/main/java/com/stripe/events/V1PlanUpdatedEvent.java index 493fdde603a..2dfcdfea60b 100644 --- a/src/main/java/com/stripe/events/V1PlanUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1PlanUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Plan; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PlanUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1PlanUpdatedEventNotification.java new file mode 100644 index 00000000000..2230d53c4df --- /dev/null +++ b/src/main/java/com/stripe/events/V1PlanUpdatedEventNotification.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.Plan; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PlanUpdatedEventNotification 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 Plan fetchRelatedObject() throws StripeException { + return (Plan) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PlanUpdatedEvent fetchEvent() throws StripeException { + return (V1PlanUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceCreatedEvent.java b/src/main/java/com/stripe/events/V1PriceCreatedEvent.java index 75591d7be4c..a65ce7b61b9 100644 --- a/src/main/java/com/stripe/events/V1PriceCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1PriceCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Price; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PriceCreatedEventNotification.java b/src/main/java/com/stripe/events/V1PriceCreatedEventNotification.java new file mode 100644 index 00000000000..4a1d3d533fa --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceCreatedEventNotification.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.Price; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PriceCreatedEventNotification 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 Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PriceCreatedEvent fetchEvent() throws StripeException { + return (V1PriceCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceDeletedEvent.java b/src/main/java/com/stripe/events/V1PriceDeletedEvent.java index a9abad0384c..9124cc29963 100644 --- a/src/main/java/com/stripe/events/V1PriceDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1PriceDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Price; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PriceDeletedEventNotification.java b/src/main/java/com/stripe/events/V1PriceDeletedEventNotification.java new file mode 100644 index 00000000000..12120d58ce8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceDeletedEventNotification.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.Price; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PriceDeletedEventNotification 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 Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PriceDeletedEvent fetchEvent() throws StripeException { + return (V1PriceDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PriceUpdatedEvent.java b/src/main/java/com/stripe/events/V1PriceUpdatedEvent.java index 46e8debfa60..6a66c18d4d1 100644 --- a/src/main/java/com/stripe/events/V1PriceUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1PriceUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Price; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PriceUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1PriceUpdatedEventNotification.java new file mode 100644 index 00000000000..902c3c0a97e --- /dev/null +++ b/src/main/java/com/stripe/events/V1PriceUpdatedEventNotification.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.Price; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PriceUpdatedEventNotification 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 Price fetchRelatedObject() throws StripeException { + return (Price) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PriceUpdatedEvent fetchEvent() throws StripeException { + return (V1PriceUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductCreatedEvent.java b/src/main/java/com/stripe/events/V1ProductCreatedEvent.java index 3da87191c6a..5fcaebf015f 100644 --- a/src/main/java/com/stripe/events/V1ProductCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1ProductCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Product; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ProductCreatedEventNotification.java b/src/main/java/com/stripe/events/V1ProductCreatedEventNotification.java new file mode 100644 index 00000000000..15b19c42e68 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductCreatedEventNotification.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.Product; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ProductCreatedEventNotification 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ProductCreatedEvent fetchEvent() throws StripeException { + return (V1ProductCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductDeletedEvent.java b/src/main/java/com/stripe/events/V1ProductDeletedEvent.java index 5f30bdaba26..4bd62226e1c 100644 --- a/src/main/java/com/stripe/events/V1ProductDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1ProductDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Product; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ProductDeletedEventNotification.java b/src/main/java/com/stripe/events/V1ProductDeletedEventNotification.java new file mode 100644 index 00000000000..212a577a8f9 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductDeletedEventNotification.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.Product; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ProductDeletedEventNotification 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ProductDeletedEvent fetchEvent() throws StripeException { + return (V1ProductDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ProductUpdatedEvent.java b/src/main/java/com/stripe/events/V1ProductUpdatedEvent.java index 93880bc0e72..47f4176569f 100644 --- a/src/main/java/com/stripe/events/V1ProductUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1ProductUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Product; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ProductUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1ProductUpdatedEventNotification.java new file mode 100644 index 00000000000..c6a61ce6531 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ProductUpdatedEventNotification.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.Product; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ProductUpdatedEventNotification 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 Product fetchRelatedObject() throws StripeException { + return (Product) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ProductUpdatedEvent fetchEvent() throws StripeException { + return (V1ProductUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PromotionCodeCreatedEvent.java b/src/main/java/com/stripe/events/V1PromotionCodeCreatedEvent.java index 855317a63d6..99b8c9862d8 100644 --- a/src/main/java/com/stripe/events/V1PromotionCodeCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1PromotionCodeCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PromotionCode; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PromotionCodeCreatedEventNotification.java b/src/main/java/com/stripe/events/V1PromotionCodeCreatedEventNotification.java new file mode 100644 index 00000000000..5219b33907d --- /dev/null +++ b/src/main/java/com/stripe/events/V1PromotionCodeCreatedEventNotification.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.PromotionCode; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PromotionCodeCreatedEventNotification 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 PromotionCode fetchRelatedObject() throws StripeException { + return (PromotionCode) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PromotionCodeCreatedEvent fetchEvent() throws StripeException { + return (V1PromotionCodeCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEvent.java b/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEvent.java index 91620868840..f77547185ef 100644 --- a/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.PromotionCode; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEventNotification.java new file mode 100644 index 00000000000..6f8aa910065 --- /dev/null +++ b/src/main/java/com/stripe/events/V1PromotionCodeUpdatedEventNotification.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.PromotionCode; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1PromotionCodeUpdatedEventNotification 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 PromotionCode fetchRelatedObject() throws StripeException { + return (PromotionCode) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1PromotionCodeUpdatedEvent fetchEvent() throws StripeException { + return (V1PromotionCodeUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1QuoteAcceptedEvent.java b/src/main/java/com/stripe/events/V1QuoteAcceptedEvent.java index 012d43fa216..2a520b995f6 100644 --- a/src/main/java/com/stripe/events/V1QuoteAcceptedEvent.java +++ b/src/main/java/com/stripe/events/V1QuoteAcceptedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Quote; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1QuoteAcceptedEventNotification.java b/src/main/java/com/stripe/events/V1QuoteAcceptedEventNotification.java new file mode 100644 index 00000000000..33f8a57d5fa --- /dev/null +++ b/src/main/java/com/stripe/events/V1QuoteAcceptedEventNotification.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.Quote; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1QuoteAcceptedEventNotification 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 Quote fetchRelatedObject() throws StripeException { + return (Quote) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1QuoteAcceptedEvent fetchEvent() throws StripeException { + return (V1QuoteAcceptedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1QuoteCanceledEvent.java b/src/main/java/com/stripe/events/V1QuoteCanceledEvent.java index d443303eed5..b9c50d7d77b 100644 --- a/src/main/java/com/stripe/events/V1QuoteCanceledEvent.java +++ b/src/main/java/com/stripe/events/V1QuoteCanceledEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Quote; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1QuoteCanceledEventNotification.java b/src/main/java/com/stripe/events/V1QuoteCanceledEventNotification.java new file mode 100644 index 00000000000..72509c52ef7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1QuoteCanceledEventNotification.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.Quote; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1QuoteCanceledEventNotification 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 Quote fetchRelatedObject() throws StripeException { + return (Quote) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1QuoteCanceledEvent fetchEvent() throws StripeException { + return (V1QuoteCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1QuoteCreatedEvent.java b/src/main/java/com/stripe/events/V1QuoteCreatedEvent.java index a2e956d2042..afb483965b7 100644 --- a/src/main/java/com/stripe/events/V1QuoteCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1QuoteCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Quote; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1QuoteCreatedEventNotification.java b/src/main/java/com/stripe/events/V1QuoteCreatedEventNotification.java new file mode 100644 index 00000000000..f21f903e338 --- /dev/null +++ b/src/main/java/com/stripe/events/V1QuoteCreatedEventNotification.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.Quote; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1QuoteCreatedEventNotification 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 Quote fetchRelatedObject() throws StripeException { + return (Quote) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1QuoteCreatedEvent fetchEvent() throws StripeException { + return (V1QuoteCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1QuoteFinalizedEvent.java b/src/main/java/com/stripe/events/V1QuoteFinalizedEvent.java index 599417cc636..c10f20ea890 100644 --- a/src/main/java/com/stripe/events/V1QuoteFinalizedEvent.java +++ b/src/main/java/com/stripe/events/V1QuoteFinalizedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Quote; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1QuoteFinalizedEventNotification.java b/src/main/java/com/stripe/events/V1QuoteFinalizedEventNotification.java new file mode 100644 index 00000000000..1ed6b679180 --- /dev/null +++ b/src/main/java/com/stripe/events/V1QuoteFinalizedEventNotification.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.Quote; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1QuoteFinalizedEventNotification 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 Quote fetchRelatedObject() throws StripeException { + return (Quote) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1QuoteFinalizedEvent fetchEvent() throws StripeException { + return (V1QuoteFinalizedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEvent.java b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEvent.java index 9f87b9889fc..46affb4dd8a 100644 --- a/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.radar.EarlyFraudWarning; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEventNotification.java b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEventNotification.java new file mode 100644 index 00000000000..e8f2455e09e --- /dev/null +++ b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningCreatedEventNotification.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.radar.EarlyFraudWarning; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1RadarEarlyFraudWarningCreatedEventNotification 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 EarlyFraudWarning fetchRelatedObject() throws StripeException { + return (EarlyFraudWarning) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1RadarEarlyFraudWarningCreatedEvent fetchEvent() throws StripeException { + return (V1RadarEarlyFraudWarningCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEvent.java b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEvent.java index 71e189f7aaf..f35181b511a 100644 --- a/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.radar.EarlyFraudWarning; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEventNotification.java new file mode 100644 index 00000000000..bb10722b973 --- /dev/null +++ b/src/main/java/com/stripe/events/V1RadarEarlyFraudWarningUpdatedEventNotification.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.radar.EarlyFraudWarning; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1RadarEarlyFraudWarningUpdatedEventNotification 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 EarlyFraudWarning fetchRelatedObject() throws StripeException { + return (EarlyFraudWarning) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1RadarEarlyFraudWarningUpdatedEvent fetchEvent() throws StripeException { + return (V1RadarEarlyFraudWarningUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1RefundCreatedEvent.java b/src/main/java/com/stripe/events/V1RefundCreatedEvent.java index 189c4f1cd89..057c2a8da80 100644 --- a/src/main/java/com/stripe/events/V1RefundCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1RefundCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Refund; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1RefundCreatedEventNotification.java b/src/main/java/com/stripe/events/V1RefundCreatedEventNotification.java new file mode 100644 index 00000000000..e45767dc9a2 --- /dev/null +++ b/src/main/java/com/stripe/events/V1RefundCreatedEventNotification.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.Refund; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1RefundCreatedEventNotification 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 Refund fetchRelatedObject() throws StripeException { + return (Refund) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1RefundCreatedEvent fetchEvent() throws StripeException { + return (V1RefundCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1RefundFailedEvent.java b/src/main/java/com/stripe/events/V1RefundFailedEvent.java index dfb5e61567a..0c1c6649298 100644 --- a/src/main/java/com/stripe/events/V1RefundFailedEvent.java +++ b/src/main/java/com/stripe/events/V1RefundFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Refund; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1RefundFailedEventNotification.java b/src/main/java/com/stripe/events/V1RefundFailedEventNotification.java new file mode 100644 index 00000000000..86e537723fe --- /dev/null +++ b/src/main/java/com/stripe/events/V1RefundFailedEventNotification.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.Refund; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1RefundFailedEventNotification 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 Refund fetchRelatedObject() throws StripeException { + return (Refund) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1RefundFailedEvent fetchEvent() throws StripeException { + return (V1RefundFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1RefundUpdatedEvent.java b/src/main/java/com/stripe/events/V1RefundUpdatedEvent.java index 8bfb15cd8d3..10408d37294 100644 --- a/src/main/java/com/stripe/events/V1RefundUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1RefundUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Refund; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1RefundUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1RefundUpdatedEventNotification.java new file mode 100644 index 00000000000..e50e50d1645 --- /dev/null +++ b/src/main/java/com/stripe/events/V1RefundUpdatedEventNotification.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.Refund; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1RefundUpdatedEventNotification 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 Refund fetchRelatedObject() throws StripeException { + return (Refund) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1RefundUpdatedEvent fetchEvent() throws StripeException { + return (V1RefundUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ReviewClosedEvent.java b/src/main/java/com/stripe/events/V1ReviewClosedEvent.java index f3a33010e18..3cc28c00666 100644 --- a/src/main/java/com/stripe/events/V1ReviewClosedEvent.java +++ b/src/main/java/com/stripe/events/V1ReviewClosedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Review; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ReviewClosedEventNotification.java b/src/main/java/com/stripe/events/V1ReviewClosedEventNotification.java new file mode 100644 index 00000000000..0e5d3c84139 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ReviewClosedEventNotification.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.Review; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ReviewClosedEventNotification 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 Review fetchRelatedObject() throws StripeException { + return (Review) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ReviewClosedEvent fetchEvent() throws StripeException { + return (V1ReviewClosedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1ReviewOpenedEvent.java b/src/main/java/com/stripe/events/V1ReviewOpenedEvent.java index 1934d216f79..96d72672bfd 100644 --- a/src/main/java/com/stripe/events/V1ReviewOpenedEvent.java +++ b/src/main/java/com/stripe/events/V1ReviewOpenedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Review; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1ReviewOpenedEventNotification.java b/src/main/java/com/stripe/events/V1ReviewOpenedEventNotification.java new file mode 100644 index 00000000000..3eb16c48b67 --- /dev/null +++ b/src/main/java/com/stripe/events/V1ReviewOpenedEventNotification.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.Review; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1ReviewOpenedEventNotification 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 Review fetchRelatedObject() throws StripeException { + return (Review) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1ReviewOpenedEvent fetchEvent() throws StripeException { + return (V1ReviewOpenedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentCanceledEvent.java b/src/main/java/com/stripe/events/V1SetupIntentCanceledEvent.java index 4628aaae40d..e36d8899884 100644 --- a/src/main/java/com/stripe/events/V1SetupIntentCanceledEvent.java +++ b/src/main/java/com/stripe/events/V1SetupIntentCanceledEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SetupIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SetupIntentCanceledEventNotification.java b/src/main/java/com/stripe/events/V1SetupIntentCanceledEventNotification.java new file mode 100644 index 00000000000..a517cf6fe94 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentCanceledEventNotification.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.SetupIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SetupIntentCanceledEventNotification 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SetupIntentCanceledEvent fetchEvent() throws StripeException { + return (V1SetupIntentCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentCreatedEvent.java b/src/main/java/com/stripe/events/V1SetupIntentCreatedEvent.java index bc2529191f0..000a18b16d2 100644 --- a/src/main/java/com/stripe/events/V1SetupIntentCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1SetupIntentCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SetupIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SetupIntentCreatedEventNotification.java b/src/main/java/com/stripe/events/V1SetupIntentCreatedEventNotification.java new file mode 100644 index 00000000000..bf7ae700517 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentCreatedEventNotification.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.SetupIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SetupIntentCreatedEventNotification 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SetupIntentCreatedEvent fetchEvent() throws StripeException { + return (V1SetupIntentCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEvent.java b/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEvent.java index 2d261e92c58..90170e0c369 100644 --- a/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEvent.java +++ b/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SetupIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEventNotification.java b/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEventNotification.java new file mode 100644 index 00000000000..aadce03b4a4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentRequiresActionEventNotification.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.SetupIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SetupIntentRequiresActionEventNotification 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SetupIntentRequiresActionEvent fetchEvent() throws StripeException { + return (V1SetupIntentRequiresActionEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEvent.java b/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEvent.java index 0604cb664b4..5f36b65ec31 100644 --- a/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEvent.java +++ b/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SetupIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEventNotification.java b/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEventNotification.java new file mode 100644 index 00000000000..4d36cff01a6 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentSetupFailedEventNotification.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.SetupIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SetupIntentSetupFailedEventNotification 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SetupIntentSetupFailedEvent fetchEvent() throws StripeException { + return (V1SetupIntentSetupFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SetupIntentSucceededEvent.java b/src/main/java/com/stripe/events/V1SetupIntentSucceededEvent.java index 76cdd53d9a1..6aff1955be6 100644 --- a/src/main/java/com/stripe/events/V1SetupIntentSucceededEvent.java +++ b/src/main/java/com/stripe/events/V1SetupIntentSucceededEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SetupIntent; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SetupIntentSucceededEventNotification.java b/src/main/java/com/stripe/events/V1SetupIntentSucceededEventNotification.java new file mode 100644 index 00000000000..25ece662912 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SetupIntentSucceededEventNotification.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.SetupIntent; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SetupIntentSucceededEventNotification 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 SetupIntent fetchRelatedObject() throws StripeException { + return (SetupIntent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SetupIntentSucceededEvent fetchEvent() throws StripeException { + return (V1SetupIntentSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEvent.java b/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEvent.java index 48e29aaf0f5..31e6af4dc41 100644 --- a/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.sigma.ScheduledQueryRun; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEventNotification.java b/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEventNotification.java new file mode 100644 index 00000000000..5c85f4bac37 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SigmaScheduledQueryRunCreatedEventNotification.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.sigma.ScheduledQueryRun; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SigmaScheduledQueryRunCreatedEventNotification 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 ScheduledQueryRun fetchRelatedObject() throws StripeException { + return (ScheduledQueryRun) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SigmaScheduledQueryRunCreatedEvent fetchEvent() throws StripeException { + return (V1SigmaScheduledQueryRunCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SourceCanceledEvent.java b/src/main/java/com/stripe/events/V1SourceCanceledEvent.java index 724caf8f567..93671740e6e 100644 --- a/src/main/java/com/stripe/events/V1SourceCanceledEvent.java +++ b/src/main/java/com/stripe/events/V1SourceCanceledEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Source; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SourceCanceledEventNotification.java b/src/main/java/com/stripe/events/V1SourceCanceledEventNotification.java new file mode 100644 index 00000000000..d98782ba9fa --- /dev/null +++ b/src/main/java/com/stripe/events/V1SourceCanceledEventNotification.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.Source; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SourceCanceledEventNotification 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 Source fetchRelatedObject() throws StripeException { + return (Source) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SourceCanceledEvent fetchEvent() throws StripeException { + return (V1SourceCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SourceChargeableEvent.java b/src/main/java/com/stripe/events/V1SourceChargeableEvent.java index f420b72f305..584bd3e89b8 100644 --- a/src/main/java/com/stripe/events/V1SourceChargeableEvent.java +++ b/src/main/java/com/stripe/events/V1SourceChargeableEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Source; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SourceChargeableEventNotification.java b/src/main/java/com/stripe/events/V1SourceChargeableEventNotification.java new file mode 100644 index 00000000000..5db5b3beb06 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SourceChargeableEventNotification.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.Source; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SourceChargeableEventNotification 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 Source fetchRelatedObject() throws StripeException { + return (Source) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SourceChargeableEvent fetchEvent() throws StripeException { + return (V1SourceChargeableEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SourceFailedEvent.java b/src/main/java/com/stripe/events/V1SourceFailedEvent.java index 1d4daef254b..98130b0fb83 100644 --- a/src/main/java/com/stripe/events/V1SourceFailedEvent.java +++ b/src/main/java/com/stripe/events/V1SourceFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Source; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SourceFailedEventNotification.java b/src/main/java/com/stripe/events/V1SourceFailedEventNotification.java new file mode 100644 index 00000000000..e826db8b237 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SourceFailedEventNotification.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.Source; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SourceFailedEventNotification 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 Source fetchRelatedObject() throws StripeException { + return (Source) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SourceFailedEvent fetchEvent() throws StripeException { + return (V1SourceFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEvent.java b/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEvent.java index 7439f6d093e..9e317a3e039 100644 --- a/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEvent.java +++ b/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Source; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEventNotification.java b/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEventNotification.java new file mode 100644 index 00000000000..1143a6ab1f4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1SourceRefundAttributesRequiredEventNotification.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.Source; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SourceRefundAttributesRequiredEventNotification 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 Source fetchRelatedObject() throws StripeException { + return (Source) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SourceRefundAttributesRequiredEvent fetchEvent() throws StripeException { + return (V1SourceRefundAttributesRequiredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEvent.java index 23674e71120..47e191641cb 100644 --- a/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEvent.java +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SubscriptionSchedule; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEventNotification.java new file mode 100644 index 00000000000..5efb1dc4b2a --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleAbortedEventNotification.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.SubscriptionSchedule; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleAbortedEventNotification 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionScheduleAbortedEvent fetchEvent() throws StripeException { + return (V1SubscriptionScheduleAbortedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEvent.java index 38fde7b3dc3..636fcf9b1fb 100644 --- a/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEvent.java +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SubscriptionSchedule; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEventNotification.java new file mode 100644 index 00000000000..456dff8d2fd --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleCanceledEventNotification.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.SubscriptionSchedule; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleCanceledEventNotification 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionScheduleCanceledEvent fetchEvent() throws StripeException { + return (V1SubscriptionScheduleCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEvent.java index 5f523eec458..6efa8dfea05 100644 --- a/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEvent.java +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SubscriptionSchedule; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEventNotification.java new file mode 100644 index 00000000000..ed9dba7047a --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleCompletedEventNotification.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.SubscriptionSchedule; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleCompletedEventNotification 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionScheduleCompletedEvent fetchEvent() throws StripeException { + return (V1SubscriptionScheduleCompletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEvent.java index 0a2b9a8a602..e04e6aac6f6 100644 --- a/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SubscriptionSchedule; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEventNotification.java new file mode 100644 index 00000000000..659b67b765b --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleCreatedEventNotification.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.SubscriptionSchedule; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleCreatedEventNotification 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionScheduleCreatedEvent fetchEvent() throws StripeException { + return (V1SubscriptionScheduleCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEvent.java index c78bcc4e4bd..0d605d00960 100644 --- a/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEvent.java +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SubscriptionSchedule; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEventNotification.java new file mode 100644 index 00000000000..8bf31f6ba0f --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleExpiringEventNotification.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.SubscriptionSchedule; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleExpiringEventNotification 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionScheduleExpiringEvent fetchEvent() throws StripeException { + return (V1SubscriptionScheduleExpiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEvent.java index e76a0fa7064..3f6e0fb7c90 100644 --- a/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEvent.java +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SubscriptionSchedule; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEventNotification.java new file mode 100644 index 00000000000..614a8c08e1f --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleReleasedEventNotification.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.SubscriptionSchedule; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleReleasedEventNotification 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionScheduleReleasedEvent fetchEvent() throws StripeException { + return (V1SubscriptionScheduleReleasedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEvent.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEvent.java index ce426683dd0..3f6dab29d19 100644 --- a/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.SubscriptionSchedule; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEventNotification.java new file mode 100644 index 00000000000..77a4630ebff --- /dev/null +++ b/src/main/java/com/stripe/events/V1SubscriptionScheduleUpdatedEventNotification.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.SubscriptionSchedule; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1SubscriptionScheduleUpdatedEventNotification 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 SubscriptionSchedule fetchRelatedObject() throws StripeException { + return (SubscriptionSchedule) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1SubscriptionScheduleUpdatedEvent fetchEvent() throws StripeException { + return (V1SubscriptionScheduleUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TaxRateCreatedEvent.java b/src/main/java/com/stripe/events/V1TaxRateCreatedEvent.java index a92fd638e1e..60584a49b77 100644 --- a/src/main/java/com/stripe/events/V1TaxRateCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1TaxRateCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.TaxRate; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TaxRateCreatedEventNotification.java b/src/main/java/com/stripe/events/V1TaxRateCreatedEventNotification.java new file mode 100644 index 00000000000..7fb63f16064 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TaxRateCreatedEventNotification.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.TaxRate; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TaxRateCreatedEventNotification 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 TaxRate fetchRelatedObject() throws StripeException { + return (TaxRate) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TaxRateCreatedEvent fetchEvent() throws StripeException { + return (V1TaxRateCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TaxRateUpdatedEvent.java b/src/main/java/com/stripe/events/V1TaxRateUpdatedEvent.java index d28bf3836c4..6d62b0bac6f 100644 --- a/src/main/java/com/stripe/events/V1TaxRateUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1TaxRateUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.TaxRate; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TaxRateUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1TaxRateUpdatedEventNotification.java new file mode 100644 index 00000000000..91aacd6ac21 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TaxRateUpdatedEventNotification.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.TaxRate; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TaxRateUpdatedEventNotification 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 TaxRate fetchRelatedObject() throws StripeException { + return (TaxRate) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TaxRateUpdatedEvent fetchEvent() throws StripeException { + return (V1TaxRateUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEvent.java b/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEvent.java index 29fc054b96f..9e1bdd4bd6d 100644 --- a/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEvent.java +++ b/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.terminal.Reader; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEventNotification.java b/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEventNotification.java new file mode 100644 index 00000000000..3aeba8678e7 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TerminalReaderActionFailedEventNotification.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.terminal.Reader; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TerminalReaderActionFailedEventNotification 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 Reader fetchRelatedObject() throws StripeException { + return (Reader) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TerminalReaderActionFailedEvent fetchEvent() throws StripeException { + return (V1TerminalReaderActionFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEvent.java b/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEvent.java index 2fca525b8c9..5c8171baaa5 100644 --- a/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEvent.java +++ b/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.terminal.Reader; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEventNotification.java b/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEventNotification.java new file mode 100644 index 00000000000..5797f051484 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TerminalReaderActionSucceededEventNotification.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.terminal.Reader; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TerminalReaderActionSucceededEventNotification 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 Reader fetchRelatedObject() throws StripeException { + return (Reader) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TerminalReaderActionSucceededEvent fetchEvent() throws StripeException { + return (V1TerminalReaderActionSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEvent.java b/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEvent.java index cebe388db8d..3890309849b 100644 --- a/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.terminal.Reader; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEventNotification.java new file mode 100644 index 00000000000..dfe9c11d0ce --- /dev/null +++ b/src/main/java/com/stripe/events/V1TerminalReaderActionUpdatedEventNotification.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.terminal.Reader; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TerminalReaderActionUpdatedEventNotification 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 Reader fetchRelatedObject() throws StripeException { + return (Reader) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TerminalReaderActionUpdatedEvent fetchEvent() throws StripeException { + return (V1TerminalReaderActionUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEvent.java index ec9a83c68c9..45556aeaab3 100644 --- a/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEvent.java +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.testhelpers.TestClock; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEventNotification.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEventNotification.java new file mode 100644 index 00000000000..1a3368a2cc4 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockAdvancingEventNotification.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.testhelpers.TestClock; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockAdvancingEventNotification 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TestHelpersTestClockAdvancingEvent fetchEvent() throws StripeException { + return (V1TestHelpersTestClockAdvancingEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEvent.java index 372f38f93cd..e37b96db11d 100644 --- a/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.testhelpers.TestClock; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEventNotification.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEventNotification.java new file mode 100644 index 00000000000..da1e6b4e5d3 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockCreatedEventNotification.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.testhelpers.TestClock; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockCreatedEventNotification 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TestHelpersTestClockCreatedEvent fetchEvent() throws StripeException { + return (V1TestHelpersTestClockCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEvent.java index e874fd854d2..325b44002ef 100644 --- a/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEvent.java +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.testhelpers.TestClock; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEventNotification.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEventNotification.java new file mode 100644 index 00000000000..e518edda070 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockDeletedEventNotification.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.testhelpers.TestClock; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockDeletedEventNotification 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TestHelpersTestClockDeletedEvent fetchEvent() throws StripeException { + return (V1TestHelpersTestClockDeletedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEvent.java index 3e2bdf5f803..093b3d2c684 100644 --- a/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEvent.java +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.testhelpers.TestClock; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEventNotification.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEventNotification.java new file mode 100644 index 00000000000..0de6e72f200 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockInternalFailureEventNotification.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.testhelpers.TestClock; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockInternalFailureEventNotification + 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TestHelpersTestClockInternalFailureEvent fetchEvent() throws StripeException { + return (V1TestHelpersTestClockInternalFailureEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEvent.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEvent.java index 081563e5a87..c2164cec913 100644 --- a/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEvent.java +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.testhelpers.TestClock; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEventNotification.java b/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEventNotification.java new file mode 100644 index 00000000000..dd725b5de68 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TestHelpersTestClockReadyEventNotification.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.testhelpers.TestClock; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TestHelpersTestClockReadyEventNotification 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 TestClock fetchRelatedObject() throws StripeException { + return (TestClock) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TestHelpersTestClockReadyEvent fetchEvent() throws StripeException { + return (V1TestHelpersTestClockReadyEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupCanceledEvent.java b/src/main/java/com/stripe/events/V1TopupCanceledEvent.java index ed2caff61ae..6734d25a170 100644 --- a/src/main/java/com/stripe/events/V1TopupCanceledEvent.java +++ b/src/main/java/com/stripe/events/V1TopupCanceledEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Topup; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TopupCanceledEventNotification.java b/src/main/java/com/stripe/events/V1TopupCanceledEventNotification.java new file mode 100644 index 00000000000..c17f934dd30 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupCanceledEventNotification.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.Topup; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TopupCanceledEventNotification 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TopupCanceledEvent fetchEvent() throws StripeException { + return (V1TopupCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupCreatedEvent.java b/src/main/java/com/stripe/events/V1TopupCreatedEvent.java index 7a00cbc9d02..d72667eb25d 100644 --- a/src/main/java/com/stripe/events/V1TopupCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1TopupCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Topup; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TopupCreatedEventNotification.java b/src/main/java/com/stripe/events/V1TopupCreatedEventNotification.java new file mode 100644 index 00000000000..97c2f289374 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupCreatedEventNotification.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.Topup; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TopupCreatedEventNotification 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TopupCreatedEvent fetchEvent() throws StripeException { + return (V1TopupCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupFailedEvent.java b/src/main/java/com/stripe/events/V1TopupFailedEvent.java index caf85fc316e..3970659b6bc 100644 --- a/src/main/java/com/stripe/events/V1TopupFailedEvent.java +++ b/src/main/java/com/stripe/events/V1TopupFailedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Topup; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TopupFailedEventNotification.java b/src/main/java/com/stripe/events/V1TopupFailedEventNotification.java new file mode 100644 index 00000000000..acc93feb46a --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupFailedEventNotification.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.Topup; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TopupFailedEventNotification 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TopupFailedEvent fetchEvent() throws StripeException { + return (V1TopupFailedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupReversedEvent.java b/src/main/java/com/stripe/events/V1TopupReversedEvent.java index 833f94ba60e..a82988bb805 100644 --- a/src/main/java/com/stripe/events/V1TopupReversedEvent.java +++ b/src/main/java/com/stripe/events/V1TopupReversedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Topup; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TopupReversedEventNotification.java b/src/main/java/com/stripe/events/V1TopupReversedEventNotification.java new file mode 100644 index 00000000000..809332ca7b8 --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupReversedEventNotification.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.Topup; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TopupReversedEventNotification 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TopupReversedEvent fetchEvent() throws StripeException { + return (V1TopupReversedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TopupSucceededEvent.java b/src/main/java/com/stripe/events/V1TopupSucceededEvent.java index bed45d60492..820f6aa659b 100644 --- a/src/main/java/com/stripe/events/V1TopupSucceededEvent.java +++ b/src/main/java/com/stripe/events/V1TopupSucceededEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Topup; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TopupSucceededEventNotification.java b/src/main/java/com/stripe/events/V1TopupSucceededEventNotification.java new file mode 100644 index 00000000000..6b390b72f3c --- /dev/null +++ b/src/main/java/com/stripe/events/V1TopupSucceededEventNotification.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.Topup; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TopupSucceededEventNotification 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 Topup fetchRelatedObject() throws StripeException { + return (Topup) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TopupSucceededEvent fetchEvent() throws StripeException { + return (V1TopupSucceededEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TransferCreatedEvent.java b/src/main/java/com/stripe/events/V1TransferCreatedEvent.java index 161bd7afd33..fd87a295ed3 100644 --- a/src/main/java/com/stripe/events/V1TransferCreatedEvent.java +++ b/src/main/java/com/stripe/events/V1TransferCreatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Transfer; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TransferCreatedEventNotification.java b/src/main/java/com/stripe/events/V1TransferCreatedEventNotification.java new file mode 100644 index 00000000000..25aa74b329c --- /dev/null +++ b/src/main/java/com/stripe/events/V1TransferCreatedEventNotification.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.Transfer; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TransferCreatedEventNotification 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 Transfer fetchRelatedObject() throws StripeException { + return (Transfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TransferCreatedEvent fetchEvent() throws StripeException { + return (V1TransferCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TransferReversedEvent.java b/src/main/java/com/stripe/events/V1TransferReversedEvent.java index 4ab28e15e24..e7cb62f647d 100644 --- a/src/main/java/com/stripe/events/V1TransferReversedEvent.java +++ b/src/main/java/com/stripe/events/V1TransferReversedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Transfer; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TransferReversedEventNotification.java b/src/main/java/com/stripe/events/V1TransferReversedEventNotification.java new file mode 100644 index 00000000000..3124af95fda --- /dev/null +++ b/src/main/java/com/stripe/events/V1TransferReversedEventNotification.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.Transfer; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TransferReversedEventNotification 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 Transfer fetchRelatedObject() throws StripeException { + return (Transfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TransferReversedEvent fetchEvent() throws StripeException { + return (V1TransferReversedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V1TransferUpdatedEvent.java b/src/main/java/com/stripe/events/V1TransferUpdatedEvent.java index a674cb0b8b9..39641e00d6b 100644 --- a/src/main/java/com/stripe/events/V1TransferUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V1TransferUpdatedEvent.java @@ -5,6 +5,7 @@ import com.stripe.exception.StripeException; import com.stripe.model.Transfer; import com.stripe.model.v2.Event; +import com.stripe.model.v2.Event.RelatedObject; import lombok.Getter; @Getter diff --git a/src/main/java/com/stripe/events/V1TransferUpdatedEventNotification.java b/src/main/java/com/stripe/events/V1TransferUpdatedEventNotification.java new file mode 100644 index 00000000000..9feb7fdf1fe --- /dev/null +++ b/src/main/java/com/stripe/events/V1TransferUpdatedEventNotification.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.Transfer; +import com.stripe.model.v2.Event.RelatedObject; +import com.stripe.model.v2.EventNotification; +import lombok.Getter; + +@Getter +public final class V1TransferUpdatedEventNotification 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 Transfer fetchRelatedObject() throws StripeException { + return (Transfer) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V1TransferUpdatedEvent fetchEvent() throws StripeException { + return (V1TransferUpdatedEvent) 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/V2BillingCadenceBilledEvent.java b/src/main/java/com/stripe/events/V2BillingCadenceBilledEvent.java index a279e41b702..7224c3f64d3 100644 --- a/src/main/java/com/stripe/events/V2BillingCadenceBilledEvent.java +++ b/src/main/java/com/stripe/events/V2BillingCadenceBilledEvent.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.Cadence; import java.util.List; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingCadenceBilledEventNotification.java b/src/main/java/com/stripe/events/V2BillingCadenceBilledEventNotification.java new file mode 100644 index 00000000000..2ce75dd2c24 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingCadenceBilledEventNotification.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.Cadence; +import lombok.Getter; + +@Getter +public final class V2BillingCadenceBilledEventNotification 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 Cadence fetchRelatedObject() throws StripeException { + return (Cadence) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingCadenceBilledEvent fetchEvent() throws StripeException { + return (V2BillingCadenceBilledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingCadenceCanceledEvent.java b/src/main/java/com/stripe/events/V2BillingCadenceCanceledEvent.java index 4acb446a7bb..4915ba245db 100644 --- a/src/main/java/com/stripe/events/V2BillingCadenceCanceledEvent.java +++ b/src/main/java/com/stripe/events/V2BillingCadenceCanceledEvent.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.Cadence; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingCadenceCanceledEventNotification.java b/src/main/java/com/stripe/events/V2BillingCadenceCanceledEventNotification.java new file mode 100644 index 00000000000..526c8414ab0 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingCadenceCanceledEventNotification.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.Cadence; +import lombok.Getter; + +@Getter +public final class V2BillingCadenceCanceledEventNotification 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 Cadence fetchRelatedObject() throws StripeException { + return (Cadence) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingCadenceCanceledEvent fetchEvent() throws StripeException { + return (V2BillingCadenceCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingCadenceCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingCadenceCreatedEvent.java index c66e12d7b08..f18a4d8bb4b 100644 --- a/src/main/java/com/stripe/events/V2BillingCadenceCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingCadenceCreatedEvent.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.Cadence; import java.time.Instant; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingCadenceCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingCadenceCreatedEventNotification.java new file mode 100644 index 00000000000..c0689e76850 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingCadenceCreatedEventNotification.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.Cadence; +import lombok.Getter; + +@Getter +public final class V2BillingCadenceCreatedEventNotification 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 Cadence fetchRelatedObject() throws StripeException { + return (Cadence) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingCadenceCreatedEvent fetchEvent() throws StripeException { + return (V2BillingCadenceCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingLicenseFeeCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingLicenseFeeCreatedEvent.java index eb70d6a952d..cd8eb37dc35 100644 --- a/src/main/java/com/stripe/events/V2BillingLicenseFeeCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingLicenseFeeCreatedEvent.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.LicenseFee; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingLicenseFeeCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingLicenseFeeCreatedEventNotification.java new file mode 100644 index 00000000000..b4551c35ba1 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingLicenseFeeCreatedEventNotification.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.LicenseFee; +import lombok.Getter; + +@Getter +public final class V2BillingLicenseFeeCreatedEventNotification 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 LicenseFee fetchRelatedObject() throws StripeException { + return (LicenseFee) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingLicenseFeeCreatedEvent fetchEvent() throws StripeException { + return (V2BillingLicenseFeeCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingLicenseFeeUpdatedEvent.java b/src/main/java/com/stripe/events/V2BillingLicenseFeeUpdatedEvent.java index 62db3599fa0..a56a6066b1c 100644 --- a/src/main/java/com/stripe/events/V2BillingLicenseFeeUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingLicenseFeeUpdatedEvent.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.LicenseFee; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingLicenseFeeUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingLicenseFeeUpdatedEventNotification.java new file mode 100644 index 00000000000..76a6bf82f27 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingLicenseFeeUpdatedEventNotification.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.LicenseFee; +import lombok.Getter; + +@Getter +public final class V2BillingLicenseFeeUpdatedEventNotification 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 LicenseFee fetchRelatedObject() throws StripeException { + return (LicenseFee) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingLicenseFeeUpdatedEvent fetchEvent() throws StripeException { + return (V2BillingLicenseFeeUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingLicenseFeeVersionCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingLicenseFeeVersionCreatedEvent.java index 7bff0b73cbd..e5dfeb1f595 100644 --- a/src/main/java/com/stripe/events/V2BillingLicenseFeeVersionCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingLicenseFeeVersionCreatedEvent.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.LicenseFeeVersion; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2BillingLicenseFeeVersionCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingLicenseFeeVersionCreatedEventNotification.java new file mode 100644 index 00000000000..4ab9d7552e3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingLicenseFeeVersionCreatedEventNotification.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.LicenseFeeVersion; +import lombok.Getter; + +@Getter +public final class V2BillingLicenseFeeVersionCreatedEventNotification 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 LicenseFeeVersion fetchRelatedObject() throws StripeException { + return (LicenseFeeVersion) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingLicenseFeeVersionCreatedEvent fetchEvent() throws StripeException { + return (V2BillingLicenseFeeVersionCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingLicensedItemCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingLicensedItemCreatedEvent.java index 09830faf44d..4adc7808c86 100644 --- a/src/main/java/com/stripe/events/V2BillingLicensedItemCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingLicensedItemCreatedEvent.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.LicensedItem; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingLicensedItemCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingLicensedItemCreatedEventNotification.java new file mode 100644 index 00000000000..b963f96f192 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingLicensedItemCreatedEventNotification.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.LicensedItem; +import lombok.Getter; + +@Getter +public final class V2BillingLicensedItemCreatedEventNotification 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 LicensedItem fetchRelatedObject() throws StripeException { + return (LicensedItem) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingLicensedItemCreatedEvent fetchEvent() throws StripeException { + return (V2BillingLicensedItemCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingLicensedItemUpdatedEvent.java b/src/main/java/com/stripe/events/V2BillingLicensedItemUpdatedEvent.java index be3b9dd63e9..8f5ec0ebe51 100644 --- a/src/main/java/com/stripe/events/V2BillingLicensedItemUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingLicensedItemUpdatedEvent.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.LicensedItem; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingLicensedItemUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingLicensedItemUpdatedEventNotification.java new file mode 100644 index 00000000000..d7dd3783c49 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingLicensedItemUpdatedEventNotification.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.LicensedItem; +import lombok.Getter; + +@Getter +public final class V2BillingLicensedItemUpdatedEventNotification 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 LicensedItem fetchRelatedObject() throws StripeException { + return (LicensedItem) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingLicensedItemUpdatedEvent fetchEvent() throws StripeException { + return (V2BillingLicensedItemUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingMeteredItemCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingMeteredItemCreatedEvent.java index c8625307798..7b3f433808e 100644 --- a/src/main/java/com/stripe/events/V2BillingMeteredItemCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingMeteredItemCreatedEvent.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.MeteredItem; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingMeteredItemCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingMeteredItemCreatedEventNotification.java new file mode 100644 index 00000000000..0ee64016f40 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingMeteredItemCreatedEventNotification.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.MeteredItem; +import lombok.Getter; + +@Getter +public final class V2BillingMeteredItemCreatedEventNotification 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 MeteredItem fetchRelatedObject() throws StripeException { + return (MeteredItem) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingMeteredItemCreatedEvent fetchEvent() throws StripeException { + return (V2BillingMeteredItemCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingMeteredItemUpdatedEvent.java b/src/main/java/com/stripe/events/V2BillingMeteredItemUpdatedEvent.java index 2f43f49148f..9a41088cfdf 100644 --- a/src/main/java/com/stripe/events/V2BillingMeteredItemUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingMeteredItemUpdatedEvent.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.MeteredItem; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingMeteredItemUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingMeteredItemUpdatedEventNotification.java new file mode 100644 index 00000000000..4c1c2126d63 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingMeteredItemUpdatedEventNotification.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.MeteredItem; +import lombok.Getter; + +@Getter +public final class V2BillingMeteredItemUpdatedEventNotification 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 MeteredItem fetchRelatedObject() throws StripeException { + return (MeteredItem) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingMeteredItemUpdatedEvent fetchEvent() throws StripeException { + return (V2BillingMeteredItemUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanComponentCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanComponentCreatedEvent.java index 669ff03a8d7..2104655cfec 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanComponentCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanComponentCreatedEvent.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.PricingPlanComponent; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanComponentCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanComponentCreatedEventNotification.java new file mode 100644 index 00000000000..e91a05bb256 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanComponentCreatedEventNotification.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.PricingPlanComponent; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanComponentCreatedEventNotification 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 PricingPlanComponent fetchRelatedObject() throws StripeException { + return (PricingPlanComponent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanComponentCreatedEvent fetchEvent() throws StripeException { + return (V2BillingPricingPlanComponentCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanComponentUpdatedEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanComponentUpdatedEvent.java index f98bb4356f8..b1fd0ffedbc 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanComponentUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanComponentUpdatedEvent.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.PricingPlanComponent; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanComponentUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanComponentUpdatedEventNotification.java new file mode 100644 index 00000000000..32cffe1f50a --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanComponentUpdatedEventNotification.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.PricingPlanComponent; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanComponentUpdatedEventNotification 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 PricingPlanComponent fetchRelatedObject() throws StripeException { + return (PricingPlanComponent) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanComponentUpdatedEvent fetchEvent() throws StripeException { + return (V2BillingPricingPlanComponentUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanCreatedEvent.java index 5f1f4703cdc..6f803944b03 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanCreatedEvent.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.PricingPlan; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanCreatedEventNotification.java new file mode 100644 index 00000000000..ed0bb988b45 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanCreatedEventNotification.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.PricingPlan; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanCreatedEventNotification 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 PricingPlan fetchRelatedObject() throws StripeException { + return (PricingPlan) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanCreatedEvent fetchEvent() throws StripeException { + return (V2BillingPricingPlanCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent.java index 7cf7ea91016..e748aa65c72 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent.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.PricingPlanSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification.java new file mode 100644 index 00000000000..4f5a6758e91 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification.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.billing.PricingPlanSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification + 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 PricingPlanSubscription fetchRelatedObject() throws StripeException { + return (PricingPlanSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent fetchEvent() + throws StripeException { + return (V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent) + super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionCurrentEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionCurrentEvent.java index c800cea2bec..220aaae4ff8 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionCurrentEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionCurrentEvent.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.PricingPlanSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification.java new file mode 100644 index 00000000000..f68b66f260a --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification.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.billing.PricingPlanSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification + 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 PricingPlanSubscription fetchRelatedObject() throws StripeException { + return (PricingPlanSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanSubscriptionCollectionCurrentEvent fetchEvent() + throws StripeException { + return (V2BillingPricingPlanSubscriptionCollectionCurrentEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPastDueEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPastDueEvent.java index cb9cec96f63..0bf06c70b3b 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPastDueEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPastDueEvent.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.PricingPlanSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification.java new file mode 100644 index 00000000000..ad05a13bc01 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification.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.billing.PricingPlanSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification + 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 PricingPlanSubscription fetchRelatedObject() throws StripeException { + return (PricingPlanSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanSubscriptionCollectionPastDueEvent fetchEvent() + throws StripeException { + return (V2BillingPricingPlanSubscriptionCollectionPastDueEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPausedEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPausedEvent.java index 5da4d2b28bc..8b7e215e2a8 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPausedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPausedEvent.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.PricingPlanSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPausedEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPausedEventNotification.java new file mode 100644 index 00000000000..1174bab71d7 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionPausedEventNotification.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.billing.PricingPlanSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanSubscriptionCollectionPausedEventNotification + 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 PricingPlanSubscription fetchRelatedObject() throws StripeException { + return (PricingPlanSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanSubscriptionCollectionPausedEvent fetchEvent() throws StripeException { + return (V2BillingPricingPlanSubscriptionCollectionPausedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionUnpaidEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionUnpaidEvent.java index 4f6922a261a..dac8583e02e 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionUnpaidEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionUnpaidEvent.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.PricingPlanSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification.java new file mode 100644 index 00000000000..234c51052be --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification.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.billing.PricingPlanSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification + 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 PricingPlanSubscription fetchRelatedObject() throws StripeException { + return (PricingPlanSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanSubscriptionCollectionUnpaidEvent fetchEvent() throws StripeException { + return (V2BillingPricingPlanSubscriptionCollectionUnpaidEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingActivatedEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingActivatedEvent.java index 003992fafde..551002fb142 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingActivatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingActivatedEvent.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.PricingPlanSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingActivatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingActivatedEventNotification.java new file mode 100644 index 00000000000..fa431351094 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingActivatedEventNotification.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.billing.PricingPlanSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanSubscriptionServicingActivatedEventNotification + 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 PricingPlanSubscription fetchRelatedObject() throws StripeException { + return (PricingPlanSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanSubscriptionServicingActivatedEvent fetchEvent() + throws StripeException { + return (V2BillingPricingPlanSubscriptionServicingActivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingCanceledEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingCanceledEvent.java index 4fd485690da..f19a3046973 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingCanceledEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingCanceledEvent.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.PricingPlanSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingCanceledEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingCanceledEventNotification.java new file mode 100644 index 00000000000..1e066881f79 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingCanceledEventNotification.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.billing.PricingPlanSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanSubscriptionServicingCanceledEventNotification + 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 PricingPlanSubscription fetchRelatedObject() throws StripeException { + return (PricingPlanSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanSubscriptionServicingCanceledEvent fetchEvent() + throws StripeException { + return (V2BillingPricingPlanSubscriptionServicingCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingPausedEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingPausedEvent.java index 2cc1cb4e582..820332f81ea 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingPausedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingPausedEvent.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.PricingPlanSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingPausedEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingPausedEventNotification.java new file mode 100644 index 00000000000..18ff4766072 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanSubscriptionServicingPausedEventNotification.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.billing.PricingPlanSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanSubscriptionServicingPausedEventNotification + 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 PricingPlanSubscription fetchRelatedObject() throws StripeException { + return (PricingPlanSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanSubscriptionServicingPausedEvent fetchEvent() throws StripeException { + return (V2BillingPricingPlanSubscriptionServicingPausedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanUpdatedEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanUpdatedEvent.java index 99ee4220b71..e5b2f457f9d 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanUpdatedEvent.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.PricingPlan; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanUpdatedEventNotification.java new file mode 100644 index 00000000000..f0b5de55b11 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanUpdatedEventNotification.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.PricingPlan; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanUpdatedEventNotification 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 PricingPlan fetchRelatedObject() throws StripeException { + return (PricingPlan) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanUpdatedEvent fetchEvent() throws StripeException { + return (V2BillingPricingPlanUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanVersionCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingPricingPlanVersionCreatedEvent.java index 2dac5685d7b..10fcf7583d3 100644 --- a/src/main/java/com/stripe/events/V2BillingPricingPlanVersionCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanVersionCreatedEvent.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.PricingPlanVersion; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2BillingPricingPlanVersionCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingPricingPlanVersionCreatedEventNotification.java new file mode 100644 index 00000000000..7cc0bf3c598 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingPricingPlanVersionCreatedEventNotification.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.PricingPlanVersion; +import lombok.Getter; + +@Getter +public final class V2BillingPricingPlanVersionCreatedEventNotification 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 PricingPlanVersion fetchRelatedObject() throws StripeException { + return (PricingPlanVersion) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingPricingPlanVersionCreatedEvent fetchEvent() throws StripeException { + return (V2BillingPricingPlanVersionCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardCreatedEvent.java index af267d2339b..15ec129ed23 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardCreatedEvent.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.RateCard; import java.time.Instant; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardCreatedEventNotification.java new file mode 100644 index 00000000000..1e3f9e05f20 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardCreatedEventNotification.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.RateCard; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardCreatedEventNotification 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 RateCard fetchRelatedObject() throws StripeException { + return (RateCard) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardCreatedEvent fetchEvent() throws StripeException { + return (V2BillingRateCardCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardRateCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardRateCreatedEvent.java index 357536846f7..cc502a99125 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardRateCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardRateCreatedEvent.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.RateCardRate; import java.time.Instant; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardRateCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardRateCreatedEventNotification.java new file mode 100644 index 00000000000..c791c7d168f --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardRateCreatedEventNotification.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.RateCardRate; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardRateCreatedEventNotification 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 RateCardRate fetchRelatedObject() throws StripeException { + return (RateCardRate) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardRateCreatedEvent fetchEvent() throws StripeException { + return (V2BillingRateCardRateCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionActivatedEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionActivatedEvent.java index 5453b33b47f..84fd3f5aa88 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionActivatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionActivatedEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionActivatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionActivatedEventNotification.java new file mode 100644 index 00000000000..38e98a67ab2 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionActivatedEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionActivatedEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionActivatedEvent fetchEvent() throws StripeException { + return (V2BillingRateCardSubscriptionActivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCanceledEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCanceledEvent.java index 7c238c9b769..7aa7409708f 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCanceledEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCanceledEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCanceledEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCanceledEventNotification.java new file mode 100644 index 00000000000..04a4c07c05f --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCanceledEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionCanceledEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionCanceledEvent fetchEvent() throws StripeException { + return (V2BillingRateCardSubscriptionCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent.java index dc965ffc3dc..0736c19db64 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification.java new file mode 100644 index 00000000000..c3d09d3a879 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent fetchEvent() + throws StripeException { + return (V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionCurrentEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionCurrentEvent.java index 59e77eb7f80..9274fca2de9 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionCurrentEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionCurrentEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionCurrentEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionCurrentEventNotification.java new file mode 100644 index 00000000000..11a10d96fb9 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionCurrentEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionCollectionCurrentEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionCollectionCurrentEvent fetchEvent() throws StripeException { + return (V2BillingRateCardSubscriptionCollectionCurrentEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPastDueEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPastDueEvent.java index 78656778f26..f7ff491c0ae 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPastDueEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPastDueEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPastDueEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPastDueEventNotification.java new file mode 100644 index 00000000000..7636734ec03 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPastDueEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionCollectionPastDueEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionCollectionPastDueEvent fetchEvent() throws StripeException { + return (V2BillingRateCardSubscriptionCollectionPastDueEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPausedEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPausedEvent.java index f28eac52acc..19322704147 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPausedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPausedEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPausedEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPausedEventNotification.java new file mode 100644 index 00000000000..ca76996ba0b --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionPausedEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionCollectionPausedEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionCollectionPausedEvent fetchEvent() throws StripeException { + return (V2BillingRateCardSubscriptionCollectionPausedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionUnpaidEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionUnpaidEvent.java index adbbf9cc44d..e31595521ab 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionUnpaidEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionUnpaidEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionUnpaidEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionUnpaidEventNotification.java new file mode 100644 index 00000000000..3ba4d15c842 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionCollectionUnpaidEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionCollectionUnpaidEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionCollectionUnpaidEvent fetchEvent() throws StripeException { + return (V2BillingRateCardSubscriptionCollectionUnpaidEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingActivatedEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingActivatedEvent.java index a8256434b1a..1c233bc4582 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingActivatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingActivatedEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingActivatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingActivatedEventNotification.java new file mode 100644 index 00000000000..866d095cd44 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingActivatedEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionServicingActivatedEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionServicingActivatedEvent fetchEvent() throws StripeException { + return (V2BillingRateCardSubscriptionServicingActivatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingCanceledEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingCanceledEvent.java index 667067f0a34..f836173dbfb 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingCanceledEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingCanceledEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingCanceledEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingCanceledEventNotification.java new file mode 100644 index 00000000000..e5e840bfab5 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingCanceledEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionServicingCanceledEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionServicingCanceledEvent fetchEvent() throws StripeException { + return (V2BillingRateCardSubscriptionServicingCanceledEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingPausedEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingPausedEvent.java index 9293b4337db..a897663164c 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingPausedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingPausedEvent.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.RateCardSubscription; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingPausedEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingPausedEventNotification.java new file mode 100644 index 00000000000..747743d6433 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardSubscriptionServicingPausedEventNotification.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.billing.RateCardSubscription; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardSubscriptionServicingPausedEventNotification + 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 RateCardSubscription fetchRelatedObject() throws StripeException { + return (RateCardSubscription) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardSubscriptionServicingPausedEvent fetchEvent() throws StripeException { + return (V2BillingRateCardSubscriptionServicingPausedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardUpdatedEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardUpdatedEvent.java index cc766ee3663..4afebef8adf 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardUpdatedEvent.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.RateCard; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardUpdatedEventNotification.java new file mode 100644 index 00000000000..4072332e187 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardUpdatedEventNotification.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.RateCard; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardUpdatedEventNotification 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 RateCard fetchRelatedObject() throws StripeException { + return (RateCard) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardUpdatedEvent fetchEvent() throws StripeException { + return (V2BillingRateCardUpdatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2BillingRateCardVersionCreatedEvent.java b/src/main/java/com/stripe/events/V2BillingRateCardVersionCreatedEvent.java index 5af0e84b5c2..453597430ac 100644 --- a/src/main/java/com/stripe/events/V2BillingRateCardVersionCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2BillingRateCardVersionCreatedEvent.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.RateCardVersion; import lombok.Getter; import lombok.Setter; diff --git a/src/main/java/com/stripe/events/V2BillingRateCardVersionCreatedEventNotification.java b/src/main/java/com/stripe/events/V2BillingRateCardVersionCreatedEventNotification.java new file mode 100644 index 00000000000..48d4d289ac5 --- /dev/null +++ b/src/main/java/com/stripe/events/V2BillingRateCardVersionCreatedEventNotification.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.RateCardVersion; +import lombok.Getter; + +@Getter +public final class V2BillingRateCardVersionCreatedEventNotification 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 RateCardVersion fetchRelatedObject() throws StripeException { + return (RateCardVersion) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2BillingRateCardVersionCreatedEvent fetchEvent() throws StripeException { + return (V2BillingRateCardVersionCreatedEvent) 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 dfc1dfc0e56..26fb2a6db7a 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/V2CoreClaimableSandboxClaimedEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxClaimedEvent.java index a5cb009f834..5234309c80d 100644 --- a/src/main/java/com/stripe/events/V2CoreClaimableSandboxClaimedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxClaimedEvent.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.ClaimableSandbox; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxClaimedEventNotification.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxClaimedEventNotification.java new file mode 100644 index 00000000000..f1842418ec3 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxClaimedEventNotification.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.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxClaimedEventNotification 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreClaimableSandboxClaimedEvent fetchEvent() throws StripeException { + return (V2CoreClaimableSandboxClaimedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEvent.java index bf263803f1d..823f84448c6 100644 --- a/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEvent.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.ClaimableSandbox; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEventNotification.java new file mode 100644 index 00000000000..13d5553f452 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxCreatedEventNotification.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.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxCreatedEventNotification 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreClaimableSandboxCreatedEvent fetchEvent() throws StripeException { + return (V2CoreClaimableSandboxCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEvent.java index 77f27e489fd..ca388d7edfa 100644 --- a/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEvent.java +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEvent.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.ClaimableSandbox; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEventNotification.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEventNotification.java new file mode 100644 index 00000000000..eb03e4702c2 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiredEventNotification.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.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxExpiredEventNotification 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreClaimableSandboxExpiredEvent fetchEvent() throws StripeException { + return (V2CoreClaimableSandboxExpiredEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEvent.java index b93573eacc2..1fb51ebe8c4 100644 --- a/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEvent.java +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEvent.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.ClaimableSandbox; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEventNotification.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEventNotification.java new file mode 100644 index 00000000000..175ee2b0141 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxExpiringEventNotification.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.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxExpiringEventNotification 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreClaimableSandboxExpiringEvent fetchEvent() throws StripeException { + return (V2CoreClaimableSandboxExpiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.java index f0fb0a02fe9..1b73c46dcfb 100644 --- a/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent.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.ClaimableSandbox; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification.java new file mode 100644 index 00000000000..4ebdbf54338 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification.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.ClaimableSandbox; +import lombok.Getter; + +@Getter +public final class V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification + 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 ClaimableSandbox fetchRelatedObject() throws StripeException { + return (ClaimableSandbox) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent fetchEvent() + throws StripeException { + return (V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent) 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/V2CoreHealthApiErrorFiringEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthApiErrorFiringEventNotification.java new file mode 100644 index 00000000000..295f229997f --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthApiErrorFiringEventNotification.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 V2CoreHealthApiErrorFiringEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthApiErrorFiringEvent fetchEvent() throws StripeException { + return (V2CoreHealthApiErrorFiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthApiErrorResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthApiErrorResolvedEventNotification.java new file mode 100644 index 00000000000..19431a01904 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthApiErrorResolvedEventNotification.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 V2CoreHealthApiErrorResolvedEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthApiErrorResolvedEvent fetchEvent() throws StripeException { + return (V2CoreHealthApiErrorResolvedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthApiLatencyFiringEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthApiLatencyFiringEventNotification.java new file mode 100644 index 00000000000..c712ab21735 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthApiLatencyFiringEventNotification.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 V2CoreHealthApiLatencyFiringEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthApiLatencyFiringEvent fetchEvent() throws StripeException { + return (V2CoreHealthApiLatencyFiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthApiLatencyResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthApiLatencyResolvedEventNotification.java new file mode 100644 index 00000000000..e6a2ce17547 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthApiLatencyResolvedEventNotification.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 V2CoreHealthApiLatencyResolvedEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthApiLatencyResolvedEvent fetchEvent() throws StripeException { + return (V2CoreHealthApiLatencyResolvedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropFiringEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropFiringEventNotification.java new file mode 100644 index 00000000000..f11b4a2664f --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropFiringEventNotification.java @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreHealthAuthorizationRateDropFiringEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthAuthorizationRateDropFiringEvent fetchEvent() throws StripeException { + return (V2CoreHealthAuthorizationRateDropFiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEventNotification.java new file mode 100644 index 00000000000..039715ea350 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthAuthorizationRateDropResolvedEventNotification.java @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreHealthAuthorizationRateDropResolvedEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthAuthorizationRateDropResolvedEvent fetchEvent() throws StripeException { + return (V2CoreHealthAuthorizationRateDropResolvedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEventNotification.java new file mode 100644 index 00000000000..21db1fb27fc --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthEventGenerationFailureResolvedEventNotification.java @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreHealthEventGenerationFailureResolvedEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthEventGenerationFailureResolvedEvent fetchEvent() throws StripeException { + return (V2CoreHealthEventGenerationFailureResolvedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEventNotification.java new file mode 100644 index 00000000000..89b8c1c8abc --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthFraudRateIncreasedEventNotification.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 V2CoreHealthFraudRateIncreasedEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthFraudRateIncreasedEvent fetchEvent() throws StripeException { + return (V2CoreHealthFraudRateIncreasedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification.java new file mode 100644 index 00000000000..eeb1e995c11 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent fetchEvent() + throws StripeException { + return (V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification.java new file mode 100644 index 00000000000..ca9a97d8400 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent fetchEvent() + throws StripeException { + return (V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification.java new file mode 100644 index 00000000000..03825946361 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent fetchEvent() + throws StripeException { + return (V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification.java new file mode 100644 index 00000000000..65ba2685d28 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification.java @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent fetchEvent() + throws StripeException { + return (V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorFiringEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorFiringEventNotification.java new file mode 100644 index 00000000000..44d944ba080 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorFiringEventNotification.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 V2CoreHealthPaymentMethodErrorFiringEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthPaymentMethodErrorFiringEvent fetchEvent() throws StripeException { + return (V2CoreHealthPaymentMethodErrorFiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorResolvedEventNotification.java new file mode 100644 index 00000000000..0d9dadb9883 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthPaymentMethodErrorResolvedEventNotification.java @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreHealthPaymentMethodErrorResolvedEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthPaymentMethodErrorResolvedEvent fetchEvent() throws StripeException { + return (V2CoreHealthPaymentMethodErrorResolvedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropFiringEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropFiringEventNotification.java new file mode 100644 index 00000000000..3ce1136d3af --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropFiringEventNotification.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 V2CoreHealthTrafficVolumeDropFiringEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthTrafficVolumeDropFiringEvent fetchEvent() throws StripeException { + return (V2CoreHealthTrafficVolumeDropFiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropResolvedEventNotification.java new file mode 100644 index 00000000000..9f82aa0c711 --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthTrafficVolumeDropResolvedEventNotification.java @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +package com.stripe.events; + +import com.stripe.exception.StripeException; +import com.stripe.model.v2.EventNotification; + +public final class V2CoreHealthTrafficVolumeDropResolvedEventNotification + extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthTrafficVolumeDropResolvedEvent fetchEvent() throws StripeException { + return (V2CoreHealthTrafficVolumeDropResolvedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyFiringEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyFiringEventNotification.java new file mode 100644 index 00000000000..c59b62eca5d --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyFiringEventNotification.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 V2CoreHealthWebhookLatencyFiringEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthWebhookLatencyFiringEvent fetchEvent() throws StripeException { + return (V2CoreHealthWebhookLatencyFiringEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyResolvedEventNotification.java b/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyResolvedEventNotification.java new file mode 100644 index 00000000000..fd08a1efe4a --- /dev/null +++ b/src/main/java/com/stripe/events/V2CoreHealthWebhookLatencyResolvedEventNotification.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 V2CoreHealthWebhookLatencyResolvedEventNotification extends EventNotification { + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2CoreHealthWebhookLatencyResolvedEvent fetchEvent() throws StripeException { + return (V2CoreHealthWebhookLatencyResolvedEvent) 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/V2MoneyManagementRecipientVerificationCreatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEvent.java index ecede5bd966..069d6ac5fe0 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEvent.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.RecipientVerification; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEventNotification.java new file mode 100644 index 00000000000..8a5f68db05f --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationCreatedEventNotification.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.RecipientVerification; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementRecipientVerificationCreatedEventNotification + 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 RecipientVerification fetchRelatedObject() throws StripeException { + return (RecipientVerification) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementRecipientVerificationCreatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementRecipientVerificationCreatedEvent) super.fetchEvent(); + } +} diff --git a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.java index ff0a3e08ab9..d4e60a537bc 100644 --- a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.java +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEvent.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.RecipientVerification; import lombok.Getter; diff --git a/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEventNotification.java b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEventNotification.java new file mode 100644 index 00000000000..788b998fd5b --- /dev/null +++ b/src/main/java/com/stripe/events/V2MoneyManagementRecipientVerificationUpdatedEventNotification.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.RecipientVerification; +import lombok.Getter; + +@Getter +public final class V2MoneyManagementRecipientVerificationUpdatedEventNotification + 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 RecipientVerification fetchRelatedObject() throws StripeException { + return (RecipientVerification) super.fetchRelatedObject(this.relatedObject); + } + /** Retrieve the corresponding full event from the Stripe API. */ + @Override + public V2MoneyManagementRecipientVerificationUpdatedEvent fetchEvent() throws StripeException { + return (V2MoneyManagementRecipientVerificationUpdatedEvent) 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..df8f0b2773e --- /dev/null +++ b/src/main/java/com/stripe/model/v2/EventNotificationClassLookup.java @@ -0,0 +1,890 @@ +// 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