diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 10868909ef..f81ab4bba1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -4776797593c966ebe1494340934edf45a6764bf2 \ No newline at end of file +4776797593c966ebe1494340934edf45a6764bf2 diff --git a/justfile b/justfile index b891bed6de..5f72092048 100644 --- a/justfile +++ b/justfile @@ -8,12 +8,15 @@ _default: # base test command that other, more specific commands use [no-quiet] [no-exit-message] -_test no_build framework config: - dotnet test {{no_build}} {{framework}} src/StripeTests/StripeTests.csproj -c {{config}} +_test no_build framework config filter="": + dotnet test {{no_build}} {{framework}} src/StripeTests/StripeTests.csproj -c {{config}} {{ if filter == "" {""} else {"--filter " + filter} }} # ⭐ run tests in debug mode test: (_test "" "-f net8.0" "Debug") +# run a test matching a filter +test-one name: (_test "" "-f net8.0" "Debug" name) + # skip build and don't specify the dotnet framework ci-test: (_test "--no-build" "" "Release") diff --git a/src/Examples/V2/EventNotificationWebhookHandler.cs b/src/Examples/V2/EventNotificationWebhookHandler.cs new file mode 100644 index 0000000000..68dc2afab7 --- /dev/null +++ b/src/Examples/V2/EventNotificationWebhookHandler.cs @@ -0,0 +1,77 @@ +namespace Examples.V2 +{ +#pragma warning disable SA1101 // Prefix local calls with this + + using System; + using System.IO; + using System.Threading.Tasks; + using Microsoft.AspNetCore.Mvc; + using Stripe; + using Stripe.Events; + using Stripe.V2; + + /// + /// Receive and process EventNotifications like the v1.billing.meter.error_report_triggered event. + /// + /// In this example, we: + /// - use ParseEventNotification to parse the received event notification webhook body + /// - call StripeClient.v2.core.events.retrieve to retrieve the full event object + /// - if it is a V1BillingMeterErrorReportTriggeredEvent event type, call fetchRelatedObject + /// to retrieve the Billing Meter object associated with the event. + /// + [Route("api/[controller]")] + [ApiController] + public class EventNotificationWebhookHandler : ControllerBase + { + private readonly StripeClient client; + private readonly string webhookSecret; + + public EventNotificationWebhookHandler() + { + var apiKey = Environment.GetEnvironmentVariable("STRIPE_API_KEY"); + client = new StripeClient(apiKey); + + webhookSecret = Environment.GetEnvironmentVariable("WEBHOOK_SECRET"); + } + + [HttpPost] + public async Task Index() + { + var json = await new StreamReader(HttpContext.Request.Body).ReadToEndAsync(); + try + { + var eventNotification = client.ParseEventNotification(json, Request.Headers["Stripe-Signature"], webhookSecret); + + // match on the type of the class to determine what event you have + if (eventNotification is V1BillingMeterErrorReportTriggeredEventNotification evt) + { + // the related object is correctly typed + var meter = evt.FetchRelatedObject(); + Console.WriteLine($"Default aggregation: {meter.DefaultAggregation}"); + + // can also fetch the full event to get the event data + var eventObj = evt.FetchEvent(); + var eventData = eventObj.Data; + Console.WriteLine($"Err summary: {eventData.DeveloperMessageSummary}"); + } + + // check other types the SDK knows about + // for event types that were released after this SDK was generated, check type + else if (eventNotification is UnknownEventNotification unknownEvt) + { + // fall back to checking type + if (unknownEvt.Type == "some.other.event") + { + // handle the event + } + } + + return Ok(); + } + catch (StripeException e) + { + return BadRequest(e.Message); + } + } + } +} diff --git a/src/Examples/V2/ThinEventWebhookHandler.cs b/src/Examples/V2/ThinEventWebhookHandler.cs deleted file mode 100644 index dbec0d14dc..0000000000 --- a/src/Examples/V2/ThinEventWebhookHandler.cs +++ /dev/null @@ -1,63 +0,0 @@ -namespace Examples.V2 -{ -#pragma warning disable SA1101 // Prefix local calls with this - - using System; - using System.IO; - using System.Threading.Tasks; - using Microsoft.AspNetCore.Mvc; - using Stripe; - using Stripe.Events; - - /// - /// Receive and process thin events like the v1.billing.meter.error_report_triggered event. - /// - /// In this example, we: - /// - use parseThinEvent to parse the received thin event webhook body - /// - call StripeClient.v2.core.events.retrieve to retrieve the full event object - /// - if it is a V1BillingMeterErrorReportTriggeredEvent event type, call fetchRelatedObject - /// to retrieve the Billing Meter object associated with the event. - /// - [Route("api/[controller]")] - [ApiController] - public class ThinEventWebhookHandler : ControllerBase - { - private readonly StripeClient client; - private readonly string webhookSecret; - - public ThinEventWebhookHandler() - { - var apiKey = Environment.GetEnvironmentVariable("STRIPE_API_KEY"); - client = new StripeClient(apiKey); - - webhookSecret = Environment.GetEnvironmentVariable("WEBHOOK_SECRET"); - } - - [HttpPost] - public async Task Index() - { - var json = await new StreamReader(HttpContext.Request.Body).ReadToEndAsync(); - try - { - var thinEvent = client.ParseThinEvent(json, Request.Headers["Stripe-Signature"], webhookSecret); - - // Fetch the event data to understand the failure - var baseEvent = await client.V2.Core.Events.GetAsync(thinEvent.Id); - if (baseEvent is V1BillingMeterErrorReportTriggeredEvent fullEvent) - { - var meter = await fullEvent.FetchRelatedObjectAsync(); - var meterId = meter.Id; - - // Record the failures and alert your team - // Add your logic here - } - - return Ok(); - } - catch (StripeException e) - { - return BadRequest(e.Message); - } - } - } -} diff --git a/src/Stripe.net/Entities/V2/Events/Event.partial.cs b/src/Stripe.net/Entities/V2/Events/Event.partial.cs index 39aa703e4d..0cd8b95b74 100644 --- a/src/Stripe.net/Entities/V2/Events/Event.partial.cs +++ b/src/Stripe.net/Entities/V2/Events/Event.partial.cs @@ -13,7 +13,7 @@ namespace Stripe.V2 using Stripe.Infrastructure; /// - /// Manually-maintained convenience methods added to ThinEvent. + /// Manually-maintained convenience methods added to V2 Events. /// [JsonConverter(typeof(V2EventConverter))] #if NET6_0_OR_GREATER @@ -69,7 +69,7 @@ protected virtual Task FetchRelatedObjectAsync(EventRelatedObject relatedO RequestOptions opts = null; if (this.Context != null) { - opts = new RequestOptions { StripeAccount = this.Context }; + opts = new RequestOptions { StripeContext = this.Context }; } return this.Requestor.RequestAsync( diff --git a/src/Stripe.net/Events/V1AccountUpdatedEventNotification.cs b/src/Stripe.net/Events/V1AccountUpdatedEventNotification.cs new file mode 100644 index 0000000000..0b1206947e --- /dev/null +++ b/src/Stripe.net/Events/V1AccountUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an account status or property has changed. + /// + public class V1AccountUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1AccountUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ApplicationFeeCreatedEventNotification.cs b/src/Stripe.net/Events/V1ApplicationFeeCreatedEventNotification.cs new file mode 100644 index 0000000000..9f87782541 --- /dev/null +++ b/src/Stripe.net/Events/V1ApplicationFeeCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an application fee is created on a charge. + /// + public class V1ApplicationFeeCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public ApplicationFee FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ApplicationFeeCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ApplicationFeeRefundedEventNotification.cs b/src/Stripe.net/Events/V1ApplicationFeeRefundedEventNotification.cs new file mode 100644 index 0000000000..66d0fff4ff --- /dev/null +++ b/src/Stripe.net/Events/V1ApplicationFeeRefundedEventNotification.cs @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an application fee is refunded, whether from refunding a charge or from + /// refunding the application fee + /// directly. This includes partial refunds. + /// + public class V1ApplicationFeeRefundedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public ApplicationFee FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ApplicationFeeRefundedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventNotification.cs b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventNotification.cs new file mode 100644 index 0000000000..1c320e7d04 --- /dev/null +++ b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Meter has invalid async usage events. + /// + public class V1BillingMeterErrorReportTriggeredEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Billing.Meter FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1BillingMeterErrorReportTriggeredEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventNotification.cs b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventNotification.cs new file mode 100644 index 0000000000..314fbd6bfe --- /dev/null +++ b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when a Meter's id is missing or invalid in async usage events. + /// + public class V1BillingMeterNoMeterFoundEventNotification : V2.EventNotification + { + public V1BillingMeterNoMeterFoundEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1BillingPortalConfigurationCreatedEventNotification.cs b/src/Stripe.net/Events/V1BillingPortalConfigurationCreatedEventNotification.cs new file mode 100644 index 0000000000..e80f221045 --- /dev/null +++ b/src/Stripe.net/Events/V1BillingPortalConfigurationCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a portal configuration is created. + /// + public class V1BillingPortalConfigurationCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public BillingPortal.Configuration FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1BillingPortalConfigurationCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1BillingPortalConfigurationUpdatedEventNotification.cs b/src/Stripe.net/Events/V1BillingPortalConfigurationUpdatedEventNotification.cs new file mode 100644 index 0000000000..364bfafb28 --- /dev/null +++ b/src/Stripe.net/Events/V1BillingPortalConfigurationUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a portal configuration is updated. + /// + public class V1BillingPortalConfigurationUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public BillingPortal.Configuration FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1BillingPortalConfigurationUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CapabilityUpdatedEventNotification.cs b/src/Stripe.net/Events/V1CapabilityUpdatedEventNotification.cs new file mode 100644 index 0000000000..1f31eede86 --- /dev/null +++ b/src/Stripe.net/Events/V1CapabilityUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a capability has new requirements or a new status. + /// + public class V1CapabilityUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Capability FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CapabilityUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeCapturedEventNotification.cs b/src/Stripe.net/Events/V1ChargeCapturedEventNotification.cs new file mode 100644 index 0000000000..33eff03793 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeCapturedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a previously uncaptured charge is captured. + /// + public class V1ChargeCapturedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Charge FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeCapturedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeDisputeClosedEventNotification.cs b/src/Stripe.net/Events/V1ChargeDisputeClosedEventNotification.cs new file mode 100644 index 0000000000..131be70e75 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeDisputeClosedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a dispute is closed and the dispute status changes to lost, + /// warning_closed, or won. + /// + public class V1ChargeDisputeClosedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeDisputeClosedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeDisputeCreatedEventNotification.cs b/src/Stripe.net/Events/V1ChargeDisputeCreatedEventNotification.cs new file mode 100644 index 0000000000..8418858352 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeDisputeCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer disputes a charge with their bank. + /// + public class V1ChargeDisputeCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeDisputeCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeDisputeFundsReinstatedEventNotification.cs b/src/Stripe.net/Events/V1ChargeDisputeFundsReinstatedEventNotification.cs new file mode 100644 index 0000000000..d335108060 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeDisputeFundsReinstatedEventNotification.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when funds are reinstated to your account after a dispute is closed. This + /// includes partially + /// refunded payments. + /// + public class V1ChargeDisputeFundsReinstatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeDisputeFundsReinstatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeDisputeFundsWithdrawnEventNotification.cs b/src/Stripe.net/Events/V1ChargeDisputeFundsWithdrawnEventNotification.cs new file mode 100644 index 0000000000..d09f25d6d0 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeDisputeFundsWithdrawnEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when funds are removed from your account due to a dispute. + /// + public class V1ChargeDisputeFundsWithdrawnEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeDisputeFundsWithdrawnEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeDisputeUpdatedEventNotification.cs b/src/Stripe.net/Events/V1ChargeDisputeUpdatedEventNotification.cs new file mode 100644 index 0000000000..6278d04709 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeDisputeUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when the dispute is updated (usually with evidence). + /// + public class V1ChargeDisputeUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeDisputeUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeExpiredEventNotification.cs b/src/Stripe.net/Events/V1ChargeExpiredEventNotification.cs new file mode 100644 index 0000000000..d537cfe9c8 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeExpiredEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an uncaptured charge expires. + /// + public class V1ChargeExpiredEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Charge FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeExpiredEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeFailedEventNotification.cs b/src/Stripe.net/Events/V1ChargeFailedEventNotification.cs new file mode 100644 index 0000000000..5f439e6d5d --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a failed charge attempt occurs. + /// + public class V1ChargeFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Charge FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargePendingEventNotification.cs b/src/Stripe.net/Events/V1ChargePendingEventNotification.cs new file mode 100644 index 0000000000..8bc8f14b36 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargePendingEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a pending charge is created. + /// + public class V1ChargePendingEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Charge FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargePendingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeRefundUpdatedEventNotification.cs b/src/Stripe.net/Events/V1ChargeRefundUpdatedEventNotification.cs new file mode 100644 index 0000000000..91231b3a76 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeRefundUpdatedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a refund is updated on selected payment methods. For updates on all + /// refunds, listen to refund.updated instead. + /// + public class V1ChargeRefundUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Refund FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeRefundUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeRefundedEventNotification.cs b/src/Stripe.net/Events/V1ChargeRefundedEventNotification.cs new file mode 100644 index 0000000000..9756feec8b --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeRefundedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a charge is refunded, including partial refunds. Listen to + /// refund.created for information about the refund. + /// + public class V1ChargeRefundedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Charge FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeRefundedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeSucceededEventNotification.cs b/src/Stripe.net/Events/V1ChargeSucceededEventNotification.cs new file mode 100644 index 0000000000..184f4a6829 --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a charge is successful. + /// + public class V1ChargeSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Charge FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ChargeUpdatedEventNotification.cs b/src/Stripe.net/Events/V1ChargeUpdatedEventNotification.cs new file mode 100644 index 0000000000..31402c5adf --- /dev/null +++ b/src/Stripe.net/Events/V1ChargeUpdatedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a charge description or metadata is updated, or upon an asynchronous + /// capture. + /// + public class V1ChargeUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Charge FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ChargeUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CheckoutSessionAsyncPaymentFailedEventNotification.cs b/src/Stripe.net/Events/V1CheckoutSessionAsyncPaymentFailedEventNotification.cs new file mode 100644 index 0000000000..b7699e1785 --- /dev/null +++ b/src/Stripe.net/Events/V1CheckoutSessionAsyncPaymentFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a payment intent using a delayed payment method fails. + /// + public class V1CheckoutSessionAsyncPaymentFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Checkout.Session FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CheckoutSessionAsyncPaymentFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CheckoutSessionAsyncPaymentSucceededEventNotification.cs b/src/Stripe.net/Events/V1CheckoutSessionAsyncPaymentSucceededEventNotification.cs new file mode 100644 index 0000000000..f2304568e3 --- /dev/null +++ b/src/Stripe.net/Events/V1CheckoutSessionAsyncPaymentSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a payment intent using a delayed payment method finally succeeds. + /// + public class V1CheckoutSessionAsyncPaymentSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Checkout.Session FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CheckoutSessionAsyncPaymentSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CheckoutSessionCompletedEventNotification.cs b/src/Stripe.net/Events/V1CheckoutSessionCompletedEventNotification.cs new file mode 100644 index 0000000000..ccc3373b24 --- /dev/null +++ b/src/Stripe.net/Events/V1CheckoutSessionCompletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Checkout Session has been successfully completed. + /// + public class V1CheckoutSessionCompletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Checkout.Session FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CheckoutSessionCompletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CheckoutSessionExpiredEventNotification.cs b/src/Stripe.net/Events/V1CheckoutSessionExpiredEventNotification.cs new file mode 100644 index 0000000000..543a89a68d --- /dev/null +++ b/src/Stripe.net/Events/V1CheckoutSessionExpiredEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Checkout Session is expired. + /// + public class V1CheckoutSessionExpiredEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Checkout.Session FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CheckoutSessionExpiredEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ClimateOrderCanceledEventNotification.cs b/src/Stripe.net/Events/V1ClimateOrderCanceledEventNotification.cs new file mode 100644 index 0000000000..2b4d91055f --- /dev/null +++ b/src/Stripe.net/Events/V1ClimateOrderCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Climate order is canceled. + /// + public class V1ClimateOrderCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Climate.Order FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ClimateOrderCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ClimateOrderCreatedEventNotification.cs b/src/Stripe.net/Events/V1ClimateOrderCreatedEventNotification.cs new file mode 100644 index 0000000000..2db79f451c --- /dev/null +++ b/src/Stripe.net/Events/V1ClimateOrderCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Climate order is created. + /// + public class V1ClimateOrderCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Climate.Order FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ClimateOrderCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ClimateOrderDelayedEventNotification.cs b/src/Stripe.net/Events/V1ClimateOrderDelayedEventNotification.cs new file mode 100644 index 0000000000..0ffcc7f3b5 --- /dev/null +++ b/src/Stripe.net/Events/V1ClimateOrderDelayedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Climate order is delayed. + /// + public class V1ClimateOrderDelayedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Climate.Order FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ClimateOrderDelayedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ClimateOrderDeliveredEventNotification.cs b/src/Stripe.net/Events/V1ClimateOrderDeliveredEventNotification.cs new file mode 100644 index 0000000000..ed4145e03a --- /dev/null +++ b/src/Stripe.net/Events/V1ClimateOrderDeliveredEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Climate order is delivered. + /// + public class V1ClimateOrderDeliveredEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Climate.Order FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ClimateOrderDeliveredEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ClimateOrderProductSubstitutedEventNotification.cs b/src/Stripe.net/Events/V1ClimateOrderProductSubstitutedEventNotification.cs new file mode 100644 index 0000000000..5316a39bf0 --- /dev/null +++ b/src/Stripe.net/Events/V1ClimateOrderProductSubstitutedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Climate order's product is substituted for another. + /// + public class V1ClimateOrderProductSubstitutedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Climate.Order FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ClimateOrderProductSubstitutedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ClimateProductCreatedEventNotification.cs b/src/Stripe.net/Events/V1ClimateProductCreatedEventNotification.cs new file mode 100644 index 0000000000..d4ee46dc14 --- /dev/null +++ b/src/Stripe.net/Events/V1ClimateProductCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Climate product is created. + /// + public class V1ClimateProductCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Climate.Product FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ClimateProductCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ClimateProductPricingUpdatedEventNotification.cs b/src/Stripe.net/Events/V1ClimateProductPricingUpdatedEventNotification.cs new file mode 100644 index 0000000000..5eb656bfcf --- /dev/null +++ b/src/Stripe.net/Events/V1ClimateProductPricingUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Climate product is updated. + /// + public class V1ClimateProductPricingUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Climate.Product FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ClimateProductPricingUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CouponCreatedEventNotification.cs b/src/Stripe.net/Events/V1CouponCreatedEventNotification.cs new file mode 100644 index 0000000000..39a6dc4985 --- /dev/null +++ b/src/Stripe.net/Events/V1CouponCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a coupon is created. + /// + public class V1CouponCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Coupon FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CouponCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CouponDeletedEventNotification.cs b/src/Stripe.net/Events/V1CouponDeletedEventNotification.cs new file mode 100644 index 0000000000..c2b80a27c3 --- /dev/null +++ b/src/Stripe.net/Events/V1CouponDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a coupon is deleted. + /// + public class V1CouponDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Coupon FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CouponDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CouponUpdatedEventNotification.cs b/src/Stripe.net/Events/V1CouponUpdatedEventNotification.cs new file mode 100644 index 0000000000..3a039b77d7 --- /dev/null +++ b/src/Stripe.net/Events/V1CouponUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a coupon is updated. + /// + public class V1CouponUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Coupon FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CouponUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CreditNoteCreatedEventNotification.cs b/src/Stripe.net/Events/V1CreditNoteCreatedEventNotification.cs new file mode 100644 index 0000000000..e75f8175e6 --- /dev/null +++ b/src/Stripe.net/Events/V1CreditNoteCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a credit note is created. + /// + public class V1CreditNoteCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public CreditNote FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CreditNoteCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CreditNoteUpdatedEventNotification.cs b/src/Stripe.net/Events/V1CreditNoteUpdatedEventNotification.cs new file mode 100644 index 0000000000..7b9a8c2615 --- /dev/null +++ b/src/Stripe.net/Events/V1CreditNoteUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a credit note is updated. + /// + public class V1CreditNoteUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public CreditNote FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CreditNoteUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CreditNoteVoidedEventNotification.cs b/src/Stripe.net/Events/V1CreditNoteVoidedEventNotification.cs new file mode 100644 index 0000000000..8539fe5c27 --- /dev/null +++ b/src/Stripe.net/Events/V1CreditNoteVoidedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a credit note is voided. + /// + public class V1CreditNoteVoidedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public CreditNote FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CreditNoteVoidedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerCreatedEventNotification.cs b/src/Stripe.net/Events/V1CustomerCreatedEventNotification.cs new file mode 100644 index 0000000000..862d023a1e --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a new customer is created. + /// + public class V1CustomerCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Customer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerDeletedEventNotification.cs b/src/Stripe.net/Events/V1CustomerDeletedEventNotification.cs new file mode 100644 index 0000000000..879e6bd4d0 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer is deleted. + /// + public class V1CustomerDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Customer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerDiscountCreatedEventNotification.cs b/src/Stripe.net/Events/V1CustomerDiscountCreatedEventNotification.cs new file mode 100644 index 0000000000..228f5b1204 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerDiscountCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a coupon is attached to a customer. + /// + public class V1CustomerDiscountCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Discount FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerDiscountCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerDiscountDeletedEventNotification.cs b/src/Stripe.net/Events/V1CustomerDiscountDeletedEventNotification.cs new file mode 100644 index 0000000000..9161191d22 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerDiscountDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a coupon is removed from a customer. + /// + public class V1CustomerDiscountDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Discount FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerDiscountDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerDiscountUpdatedEventNotification.cs b/src/Stripe.net/Events/V1CustomerDiscountUpdatedEventNotification.cs new file mode 100644 index 0000000000..b217f1caf6 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerDiscountUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer is switched from one coupon to another. + /// + public class V1CustomerDiscountUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Discount FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerDiscountUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerSubscriptionCreatedEventNotification.cs b/src/Stripe.net/Events/V1CustomerSubscriptionCreatedEventNotification.cs new file mode 100644 index 0000000000..a66a3a1281 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerSubscriptionCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer is signed up for a new plan. + /// + public class V1CustomerSubscriptionCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Subscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerSubscriptionCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerSubscriptionDeletedEventNotification.cs b/src/Stripe.net/Events/V1CustomerSubscriptionDeletedEventNotification.cs new file mode 100644 index 0000000000..686c12bb11 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerSubscriptionDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer's subscription ends. + /// + public class V1CustomerSubscriptionDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Subscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerSubscriptionDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerSubscriptionPausedEventNotification.cs b/src/Stripe.net/Events/V1CustomerSubscriptionPausedEventNotification.cs new file mode 100644 index 0000000000..0baf239f1d --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerSubscriptionPausedEventNotification.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer's subscription is paused. Only applies when subscriptions + /// enter status=paused, not when payment collection is + /// paused. + /// + public class V1CustomerSubscriptionPausedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Subscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerSubscriptionPausedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerSubscriptionPendingUpdateAppliedEventNotification.cs b/src/Stripe.net/Events/V1CustomerSubscriptionPendingUpdateAppliedEventNotification.cs new file mode 100644 index 0000000000..4e9f080fd8 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerSubscriptionPendingUpdateAppliedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer's subscription's pending update is applied, and the + /// subscription is updated. + /// + public class V1CustomerSubscriptionPendingUpdateAppliedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Subscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerSubscriptionPendingUpdateAppliedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerSubscriptionPendingUpdateExpiredEventNotification.cs b/src/Stripe.net/Events/V1CustomerSubscriptionPendingUpdateExpiredEventNotification.cs new file mode 100644 index 0000000000..5471ff296a --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerSubscriptionPendingUpdateExpiredEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer's subscription's pending update expires before the related + /// invoice is paid. + /// + public class V1CustomerSubscriptionPendingUpdateExpiredEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Subscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerSubscriptionPendingUpdateExpiredEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerSubscriptionResumedEventNotification.cs b/src/Stripe.net/Events/V1CustomerSubscriptionResumedEventNotification.cs new file mode 100644 index 0000000000..4ed8fb83e4 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerSubscriptionResumedEventNotification.cs @@ -0,0 +1,57 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer's subscription is no longer paused. Only applies when a + /// status=paused subscription is resumed, not when payment collection is + /// resumed. + /// + public class V1CustomerSubscriptionResumedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Subscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerSubscriptionResumedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerSubscriptionTrialWillEndEventNotification.cs b/src/Stripe.net/Events/V1CustomerSubscriptionTrialWillEndEventNotification.cs new file mode 100644 index 0000000000..41d90a6114 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerSubscriptionTrialWillEndEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs three days before a subscription's trial period is scheduled to end, or when a + /// trial is ended immediately (using trial_end=now). + /// + public class V1CustomerSubscriptionTrialWillEndEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Subscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerSubscriptionTrialWillEndEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerSubscriptionUpdatedEventNotification.cs b/src/Stripe.net/Events/V1CustomerSubscriptionUpdatedEventNotification.cs new file mode 100644 index 0000000000..4843003a50 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerSubscriptionUpdatedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a subscription changes (e.g., switching from one plan to another, or + /// changing the status from trial to active). + /// + public class V1CustomerSubscriptionUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Subscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerSubscriptionUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerTaxIdCreatedEventNotification.cs b/src/Stripe.net/Events/V1CustomerTaxIdCreatedEventNotification.cs new file mode 100644 index 0000000000..e9946b7cb8 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerTaxIdCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a tax ID is created for a customer. + /// + public class V1CustomerTaxIdCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TaxId FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerTaxIdCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerTaxIdDeletedEventNotification.cs b/src/Stripe.net/Events/V1CustomerTaxIdDeletedEventNotification.cs new file mode 100644 index 0000000000..7d1d8b1c7a --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerTaxIdDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a tax ID is deleted from a customer. + /// + public class V1CustomerTaxIdDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TaxId FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerTaxIdDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerTaxIdUpdatedEventNotification.cs b/src/Stripe.net/Events/V1CustomerTaxIdUpdatedEventNotification.cs new file mode 100644 index 0000000000..954e6a5f57 --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerTaxIdUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a customer's tax ID is updated. + /// + public class V1CustomerTaxIdUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TaxId FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerTaxIdUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1CustomerUpdatedEventNotification.cs b/src/Stripe.net/Events/V1CustomerUpdatedEventNotification.cs new file mode 100644 index 0000000000..e6765760db --- /dev/null +++ b/src/Stripe.net/Events/V1CustomerUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever any property of a customer changes. + /// + public class V1CustomerUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Customer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1CustomerUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1FileCreatedEventNotification.cs b/src/Stripe.net/Events/V1FileCreatedEventNotification.cs new file mode 100644 index 0000000000..a2dcb597fc --- /dev/null +++ b/src/Stripe.net/Events/V1FileCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a new Stripe-generated file is available for your account. + /// + public class V1FileCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public File FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1FileCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1FinancialConnectionsAccountCreatedEventNotification.cs b/src/Stripe.net/Events/V1FinancialConnectionsAccountCreatedEventNotification.cs new file mode 100644 index 0000000000..2e4948daee --- /dev/null +++ b/src/Stripe.net/Events/V1FinancialConnectionsAccountCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a new Financial Connections account is created. + /// + public class V1FinancialConnectionsAccountCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public FinancialConnections.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1FinancialConnectionsAccountCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1FinancialConnectionsAccountDeactivatedEventNotification.cs b/src/Stripe.net/Events/V1FinancialConnectionsAccountDeactivatedEventNotification.cs new file mode 100644 index 0000000000..a93ebc9ff4 --- /dev/null +++ b/src/Stripe.net/Events/V1FinancialConnectionsAccountDeactivatedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Financial Connections account's status is updated from active to + /// inactive. + /// + public class V1FinancialConnectionsAccountDeactivatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public FinancialConnections.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1FinancialConnectionsAccountDeactivatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1FinancialConnectionsAccountDisconnectedEventNotification.cs b/src/Stripe.net/Events/V1FinancialConnectionsAccountDisconnectedEventNotification.cs new file mode 100644 index 0000000000..05b4fd08fb --- /dev/null +++ b/src/Stripe.net/Events/V1FinancialConnectionsAccountDisconnectedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Financial Connections account is disconnected. + /// + public class V1FinancialConnectionsAccountDisconnectedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public FinancialConnections.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1FinancialConnectionsAccountDisconnectedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1FinancialConnectionsAccountReactivatedEventNotification.cs b/src/Stripe.net/Events/V1FinancialConnectionsAccountReactivatedEventNotification.cs new file mode 100644 index 0000000000..fe684ee6df --- /dev/null +++ b/src/Stripe.net/Events/V1FinancialConnectionsAccountReactivatedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Financial Connections account's status is updated from inactive to + /// active. + /// + public class V1FinancialConnectionsAccountReactivatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public FinancialConnections.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1FinancialConnectionsAccountReactivatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1FinancialConnectionsAccountRefreshedBalanceEventNotification.cs b/src/Stripe.net/Events/V1FinancialConnectionsAccountRefreshedBalanceEventNotification.cs new file mode 100644 index 0000000000..9897ec9024 --- /dev/null +++ b/src/Stripe.net/Events/V1FinancialConnectionsAccountRefreshedBalanceEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Account’s balance_refresh status transitions from pending + /// to either succeeded or failed. + /// + public class V1FinancialConnectionsAccountRefreshedBalanceEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public FinancialConnections.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1FinancialConnectionsAccountRefreshedBalanceEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1FinancialConnectionsAccountRefreshedOwnershipEventNotification.cs b/src/Stripe.net/Events/V1FinancialConnectionsAccountRefreshedOwnershipEventNotification.cs new file mode 100644 index 0000000000..cce951c272 --- /dev/null +++ b/src/Stripe.net/Events/V1FinancialConnectionsAccountRefreshedOwnershipEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Account’s ownership_refresh status transitions from pending + /// to either succeeded or failed. + /// + public class V1FinancialConnectionsAccountRefreshedOwnershipEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public FinancialConnections.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1FinancialConnectionsAccountRefreshedOwnershipEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1FinancialConnectionsAccountRefreshedTransactionsEventNotification.cs b/src/Stripe.net/Events/V1FinancialConnectionsAccountRefreshedTransactionsEventNotification.cs new file mode 100644 index 0000000000..9afbbf95e4 --- /dev/null +++ b/src/Stripe.net/Events/V1FinancialConnectionsAccountRefreshedTransactionsEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Account’s transaction_refresh status transitions from + /// pending to either succeeded or failed. + /// + public class V1FinancialConnectionsAccountRefreshedTransactionsEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public FinancialConnections.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1FinancialConnectionsAccountRefreshedTransactionsEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IdentityVerificationSessionCanceledEventNotification.cs b/src/Stripe.net/Events/V1IdentityVerificationSessionCanceledEventNotification.cs new file mode 100644 index 0000000000..e5fff402f2 --- /dev/null +++ b/src/Stripe.net/Events/V1IdentityVerificationSessionCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a VerificationSession is canceled. + /// + public class V1IdentityVerificationSessionCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Identity.VerificationSession FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IdentityVerificationSessionCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IdentityVerificationSessionCreatedEventNotification.cs b/src/Stripe.net/Events/V1IdentityVerificationSessionCreatedEventNotification.cs new file mode 100644 index 0000000000..48bc06c551 --- /dev/null +++ b/src/Stripe.net/Events/V1IdentityVerificationSessionCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a VerificationSession is created. + /// + public class V1IdentityVerificationSessionCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Identity.VerificationSession FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IdentityVerificationSessionCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IdentityVerificationSessionProcessingEventNotification.cs b/src/Stripe.net/Events/V1IdentityVerificationSessionProcessingEventNotification.cs new file mode 100644 index 0000000000..05c2e9c0d8 --- /dev/null +++ b/src/Stripe.net/Events/V1IdentityVerificationSessionProcessingEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a VerificationSession transitions to processing. + /// + public class V1IdentityVerificationSessionProcessingEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Identity.VerificationSession FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IdentityVerificationSessionProcessingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IdentityVerificationSessionRedactedEventNotification.cs b/src/Stripe.net/Events/V1IdentityVerificationSessionRedactedEventNotification.cs new file mode 100644 index 0000000000..e04150f94a --- /dev/null +++ b/src/Stripe.net/Events/V1IdentityVerificationSessionRedactedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a VerificationSession is redacted. + /// + public class V1IdentityVerificationSessionRedactedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Identity.VerificationSession FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IdentityVerificationSessionRedactedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IdentityVerificationSessionRequiresInputEventNotification.cs b/src/Stripe.net/Events/V1IdentityVerificationSessionRequiresInputEventNotification.cs new file mode 100644 index 0000000000..a3554daa37 --- /dev/null +++ b/src/Stripe.net/Events/V1IdentityVerificationSessionRequiresInputEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a VerificationSession transitions to require user input. + /// + public class V1IdentityVerificationSessionRequiresInputEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Identity.VerificationSession FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IdentityVerificationSessionRequiresInputEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IdentityVerificationSessionVerifiedEventNotification.cs b/src/Stripe.net/Events/V1IdentityVerificationSessionVerifiedEventNotification.cs new file mode 100644 index 0000000000..5a46169602 --- /dev/null +++ b/src/Stripe.net/Events/V1IdentityVerificationSessionVerifiedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a VerificationSession transitions to verified. + /// + public class V1IdentityVerificationSessionVerifiedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Identity.VerificationSession FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IdentityVerificationSessionVerifiedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceCreatedEventNotification.cs b/src/Stripe.net/Events/V1InvoiceCreatedEventNotification.cs new file mode 100644 index 0000000000..b720f89dc3 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceCreatedEventNotification.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a new invoice is created. To learn how webhooks can be used with this + /// event, and how they can affect it, see Using Webhooks with + /// Subscriptions. + /// + public class V1InvoiceCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceDeletedEventNotification.cs b/src/Stripe.net/Events/V1InvoiceDeletedEventNotification.cs new file mode 100644 index 0000000000..38bd40b873 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceDeletedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a draft invoice is deleted. Note: This event is not sent for invoice previews. + /// + public class V1InvoiceDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceFinalizationFailedEventNotification.cs b/src/Stripe.net/Events/V1InvoiceFinalizationFailedEventNotification.cs new file mode 100644 index 0000000000..68faaa85ae --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceFinalizationFailedEventNotification.cs @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a draft invoice cannot be finalized. See the invoice’s last + /// finalization error for details. + /// + public class V1InvoiceFinalizationFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceFinalizationFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceFinalizedEventNotification.cs b/src/Stripe.net/Events/V1InvoiceFinalizedEventNotification.cs new file mode 100644 index 0000000000..a24a57424b --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceFinalizedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a draft invoice is finalized and updated to be an open invoice. + /// + public class V1InvoiceFinalizedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceFinalizedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceMarkedUncollectibleEventNotification.cs b/src/Stripe.net/Events/V1InvoiceMarkedUncollectibleEventNotification.cs new file mode 100644 index 0000000000..4f455e0c5e --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceMarkedUncollectibleEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice is marked uncollectible. + /// + public class V1InvoiceMarkedUncollectibleEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceMarkedUncollectibleEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceOverdueEventNotification.cs b/src/Stripe.net/Events/V1InvoiceOverdueEventNotification.cs new file mode 100644 index 0000000000..5d12152c28 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceOverdueEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs X number of days after an invoice becomes due—where X is determined by + /// Automations. + /// + public class V1InvoiceOverdueEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceOverdueEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceOverpaidEventNotification.cs b/src/Stripe.net/Events/V1InvoiceOverpaidEventNotification.cs new file mode 100644 index 0000000000..ae7aa38cce --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceOverpaidEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an invoice transitions to paid with a non-zero amount_overpaid. + /// + public class V1InvoiceOverpaidEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceOverpaidEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoicePaidEventNotification.cs b/src/Stripe.net/Events/V1InvoicePaidEventNotification.cs new file mode 100644 index 0000000000..f9384f30c2 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoicePaidEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid + /// out-of-band. + /// + public class V1InvoicePaidEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoicePaidEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoicePaymentActionRequiredEventNotification.cs b/src/Stripe.net/Events/V1InvoicePaymentActionRequiredEventNotification.cs new file mode 100644 index 0000000000..6298ffda77 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoicePaymentActionRequiredEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice payment attempt requires further user action to complete. + /// + public class V1InvoicePaymentActionRequiredEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoicePaymentActionRequiredEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoicePaymentFailedEventNotification.cs b/src/Stripe.net/Events/V1InvoicePaymentFailedEventNotification.cs new file mode 100644 index 0000000000..0d63119d0b --- /dev/null +++ b/src/Stripe.net/Events/V1InvoicePaymentFailedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice payment attempt fails, due to either a declined payment, + /// including soft decline, or to the lack of a stored payment method. + /// + public class V1InvoicePaymentFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoicePaymentFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoicePaymentPaidEventNotification.cs b/src/Stripe.net/Events/V1InvoicePaymentPaidEventNotification.cs new file mode 100644 index 0000000000..00d5803314 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoicePaymentPaidEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an InvoicePayment is successfully paid. + /// + public class V1InvoicePaymentPaidEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public InvoicePayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoicePaymentPaidEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoicePaymentSucceededEventNotification.cs b/src/Stripe.net/Events/V1InvoicePaymentSucceededEventNotification.cs new file mode 100644 index 0000000000..3dce88cd51 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoicePaymentSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice payment attempt succeeds. + /// + public class V1InvoicePaymentSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoicePaymentSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceSentEventNotification.cs b/src/Stripe.net/Events/V1InvoiceSentEventNotification.cs new file mode 100644 index 0000000000..0f3a5710a3 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceSentEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice email is sent out. + /// + public class V1InvoiceSentEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceSentEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceUpcomingEventNotification.cs b/src/Stripe.net/Events/V1InvoiceUpcomingEventNotification.cs new file mode 100644 index 0000000000..f74089a980 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceUpcomingEventNotification.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs X number of days before a subscription is scheduled to create an invoice that is + /// automatically charged—where X is determined by your subscriptions + /// settings. Note: The received Invoice object will not have an invoice ID. + /// + public class V1InvoiceUpcomingEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceUpcomingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceUpdatedEventNotification.cs b/src/Stripe.net/Events/V1InvoiceUpdatedEventNotification.cs new file mode 100644 index 0000000000..0294a0b553 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice changes (e.g., the invoice amount). + /// + public class V1InvoiceUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceVoidedEventNotification.cs b/src/Stripe.net/Events/V1InvoiceVoidedEventNotification.cs new file mode 100644 index 0000000000..cfc6c6fe5f --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceVoidedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice is voided. + /// + public class V1InvoiceVoidedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceVoidedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceWillBeDueEventNotification.cs b/src/Stripe.net/Events/V1InvoiceWillBeDueEventNotification.cs new file mode 100644 index 0000000000..c3d29e1197 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceWillBeDueEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs X number of days before an invoice becomes due—where X is determined by + /// Automations. + /// + public class V1InvoiceWillBeDueEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Invoice FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceWillBeDueEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceitemCreatedEventNotification.cs b/src/Stripe.net/Events/V1InvoiceitemCreatedEventNotification.cs new file mode 100644 index 0000000000..e7947606aa --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceitemCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice item is created. + /// + public class V1InvoiceitemCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public InvoiceItem FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceitemCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1InvoiceitemDeletedEventNotification.cs b/src/Stripe.net/Events/V1InvoiceitemDeletedEventNotification.cs new file mode 100644 index 0000000000..2f65cf2f34 --- /dev/null +++ b/src/Stripe.net/Events/V1InvoiceitemDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an invoice item is deleted. + /// + public class V1InvoiceitemDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public InvoiceItem FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1InvoiceitemDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingAuthorizationCreatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingAuthorizationCreatedEventNotification.cs new file mode 100644 index 0000000000..4bd60ab21e --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingAuthorizationCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an authorization is created. + /// + public class V1IssuingAuthorizationCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Authorization FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingAuthorizationCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingAuthorizationRequestEventNotification.cs b/src/Stripe.net/Events/V1IssuingAuthorizationRequestEventNotification.cs new file mode 100644 index 0000000000..f94d89b438 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingAuthorizationRequestEventNotification.cs @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Represents a synchronous request for authorization, see Using + /// your integration to handle authorization requests. + /// + public class V1IssuingAuthorizationRequestEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Authorization FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingAuthorizationRequestEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingAuthorizationUpdatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingAuthorizationUpdatedEventNotification.cs new file mode 100644 index 0000000000..67efe6ad1f --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingAuthorizationUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an authorization is updated. + /// + public class V1IssuingAuthorizationUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Authorization FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingAuthorizationUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingCardCreatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingCardCreatedEventNotification.cs new file mode 100644 index 0000000000..0c24f862f6 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingCardCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a card is created. + /// + public class V1IssuingCardCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Card FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingCardCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingCardUpdatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingCardUpdatedEventNotification.cs new file mode 100644 index 0000000000..2da7ffa95f --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingCardUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a card is updated. + /// + public class V1IssuingCardUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Card FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingCardUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingCardholderCreatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingCardholderCreatedEventNotification.cs new file mode 100644 index 0000000000..03a1c1bde8 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingCardholderCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a cardholder is created. + /// + public class V1IssuingCardholderCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Cardholder FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingCardholderCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingCardholderUpdatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingCardholderUpdatedEventNotification.cs new file mode 100644 index 0000000000..fd85255a2f --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingCardholderUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a cardholder is updated. + /// + public class V1IssuingCardholderUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Cardholder FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingCardholderUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingDisputeClosedEventNotification.cs b/src/Stripe.net/Events/V1IssuingDisputeClosedEventNotification.cs new file mode 100644 index 0000000000..bf493e5a19 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingDisputeClosedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a dispute is won, lost or expired. + /// + public class V1IssuingDisputeClosedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingDisputeClosedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingDisputeCreatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingDisputeCreatedEventNotification.cs new file mode 100644 index 0000000000..cc43b741ee --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingDisputeCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a dispute is created. + /// + public class V1IssuingDisputeCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingDisputeCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingDisputeFundsReinstatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingDisputeFundsReinstatedEventNotification.cs new file mode 100644 index 0000000000..98ca33d379 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingDisputeFundsReinstatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever funds are reinstated to your account for an Issuing dispute. + /// + public class V1IssuingDisputeFundsReinstatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingDisputeFundsReinstatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingDisputeFundsRescindedEventNotification.cs b/src/Stripe.net/Events/V1IssuingDisputeFundsRescindedEventNotification.cs new file mode 100644 index 0000000000..5b1e8b03d9 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingDisputeFundsRescindedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever funds are deducted from your account for an Issuing dispute. + /// + public class V1IssuingDisputeFundsRescindedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingDisputeFundsRescindedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingDisputeSubmittedEventNotification.cs b/src/Stripe.net/Events/V1IssuingDisputeSubmittedEventNotification.cs new file mode 100644 index 0000000000..f874ea4647 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingDisputeSubmittedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a dispute is submitted. + /// + public class V1IssuingDisputeSubmittedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingDisputeSubmittedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingDisputeUpdatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingDisputeUpdatedEventNotification.cs new file mode 100644 index 0000000000..74023fc4bb --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingDisputeUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a dispute is updated. + /// + public class V1IssuingDisputeUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Dispute FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingDisputeUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingPersonalizationDesignActivatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingPersonalizationDesignActivatedEventNotification.cs new file mode 100644 index 0000000000..a66c0decca --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingPersonalizationDesignActivatedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a personalization design is activated following the activation of the + /// physical bundle that belongs to it. + /// + public class V1IssuingPersonalizationDesignActivatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.PersonalizationDesign FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingPersonalizationDesignActivatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingPersonalizationDesignDeactivatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingPersonalizationDesignDeactivatedEventNotification.cs new file mode 100644 index 0000000000..dbdd196346 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingPersonalizationDesignDeactivatedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a personalization design is deactivated following the deactivation of + /// the physical bundle that belongs to it. + /// + public class V1IssuingPersonalizationDesignDeactivatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.PersonalizationDesign FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingPersonalizationDesignDeactivatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingPersonalizationDesignRejectedEventNotification.cs b/src/Stripe.net/Events/V1IssuingPersonalizationDesignRejectedEventNotification.cs new file mode 100644 index 0000000000..087045c64c --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingPersonalizationDesignRejectedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a personalization design is rejected by design review. + /// + public class V1IssuingPersonalizationDesignRejectedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.PersonalizationDesign FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingPersonalizationDesignRejectedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingPersonalizationDesignUpdatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingPersonalizationDesignUpdatedEventNotification.cs new file mode 100644 index 0000000000..27dfdb7b88 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingPersonalizationDesignUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a personalization design is updated. + /// + public class V1IssuingPersonalizationDesignUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.PersonalizationDesign FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingPersonalizationDesignUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingTokenCreatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingTokenCreatedEventNotification.cs new file mode 100644 index 0000000000..1c9bacb30f --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingTokenCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an issuing digital wallet token is created. + /// + public class V1IssuingTokenCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Token FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingTokenCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingTokenUpdatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingTokenUpdatedEventNotification.cs new file mode 100644 index 0000000000..a8071c2552 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingTokenUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an issuing digital wallet token is updated. + /// + public class V1IssuingTokenUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Token FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingTokenUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingTransactionCreatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingTransactionCreatedEventNotification.cs new file mode 100644 index 0000000000..23f769c08a --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingTransactionCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an issuing transaction is created. + /// + public class V1IssuingTransactionCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Transaction FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingTransactionCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification.cs new file mode 100644 index 0000000000..3ee1b1b29d --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an issuing transaction is updated with receipt data. + /// + public class V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Transaction FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingTransactionPurchaseDetailsReceiptUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1IssuingTransactionUpdatedEventNotification.cs b/src/Stripe.net/Events/V1IssuingTransactionUpdatedEventNotification.cs new file mode 100644 index 0000000000..658dc75ff4 --- /dev/null +++ b/src/Stripe.net/Events/V1IssuingTransactionUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an issuing transaction is updated. + /// + public class V1IssuingTransactionUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Issuing.Transaction FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1IssuingTransactionUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1MandateUpdatedEventNotification.cs b/src/Stripe.net/Events/V1MandateUpdatedEventNotification.cs new file mode 100644 index 0000000000..3d98114122 --- /dev/null +++ b/src/Stripe.net/Events/V1MandateUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a Mandate is updated. + /// + public class V1MandateUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Mandate FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1MandateUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentIntentAmountCapturableUpdatedEventNotification.cs b/src/Stripe.net/Events/V1PaymentIntentAmountCapturableUpdatedEventNotification.cs new file mode 100644 index 0000000000..c2827d9e50 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentIntentAmountCapturableUpdatedEventNotification.cs @@ -0,0 +1,57 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PaymentIntent has funds to be captured. Check the amount_capturable + /// property on the PaymentIntent to determine the amount that can be captured. You may + /// capture the PaymentIntent with an amount_to_capture value up to the specified + /// amount. Learn more about + /// capturing PaymentIntents.. + /// + public class V1PaymentIntentAmountCapturableUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentIntentAmountCapturableUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentIntentCanceledEventNotification.cs b/src/Stripe.net/Events/V1PaymentIntentCanceledEventNotification.cs new file mode 100644 index 0000000000..2f23b1e22c --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentIntentCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PaymentIntent is canceled. + /// + public class V1PaymentIntentCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentIntentCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentIntentCreatedEventNotification.cs b/src/Stripe.net/Events/V1PaymentIntentCreatedEventNotification.cs new file mode 100644 index 0000000000..ce1cbf408f --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentIntentCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a new PaymentIntent is created. + /// + public class V1PaymentIntentCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentIntentCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentIntentPartiallyFundedEventNotification.cs b/src/Stripe.net/Events/V1PaymentIntentPartiallyFundedEventNotification.cs new file mode 100644 index 0000000000..b280521436 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentIntentPartiallyFundedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when funds are applied to a customer_balance PaymentIntent and the + /// 'amount_remaining' changes. + /// + public class V1PaymentIntentPartiallyFundedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentIntentPartiallyFundedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentIntentPaymentFailedEventNotification.cs b/src/Stripe.net/Events/V1PaymentIntentPaymentFailedEventNotification.cs new file mode 100644 index 0000000000..4765858075 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentIntentPaymentFailedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PaymentIntent has failed the attempt to create a payment method or a + /// payment. + /// + public class V1PaymentIntentPaymentFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentIntentPaymentFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentIntentProcessingEventNotification.cs b/src/Stripe.net/Events/V1PaymentIntentProcessingEventNotification.cs new file mode 100644 index 0000000000..4184ee9f31 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentIntentProcessingEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PaymentIntent has started processing. + /// + public class V1PaymentIntentProcessingEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentIntentProcessingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentIntentRequiresActionEventNotification.cs b/src/Stripe.net/Events/V1PaymentIntentRequiresActionEventNotification.cs new file mode 100644 index 0000000000..0b67390dd5 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentIntentRequiresActionEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PaymentIntent transitions to requires_action state. + /// + public class V1PaymentIntentRequiresActionEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentIntentRequiresActionEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentIntentSucceededEventNotification.cs b/src/Stripe.net/Events/V1PaymentIntentSucceededEventNotification.cs new file mode 100644 index 0000000000..5feaddc734 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentIntentSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PaymentIntent has successfully completed payment. + /// + public class V1PaymentIntentSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentIntentSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentLinkCreatedEventNotification.cs b/src/Stripe.net/Events/V1PaymentLinkCreatedEventNotification.cs new file mode 100644 index 0000000000..313ce0aca6 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentLinkCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a payment link is created. + /// + public class V1PaymentLinkCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentLink FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentLinkCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentLinkUpdatedEventNotification.cs b/src/Stripe.net/Events/V1PaymentLinkUpdatedEventNotification.cs new file mode 100644 index 0000000000..8869d6eac4 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentLinkUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a payment link is updated. + /// + public class V1PaymentLinkUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentLink FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentLinkUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentMethodAttachedEventNotification.cs b/src/Stripe.net/Events/V1PaymentMethodAttachedEventNotification.cs new file mode 100644 index 0000000000..11b736265e --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentMethodAttachedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a new payment method is attached to a customer. + /// + public class V1PaymentMethodAttachedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentMethod FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentMethodAttachedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentMethodAutomaticallyUpdatedEventNotification.cs b/src/Stripe.net/Events/V1PaymentMethodAutomaticallyUpdatedEventNotification.cs new file mode 100644 index 0000000000..0f66661f09 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentMethodAutomaticallyUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a payment method's details are automatically updated by the network. + /// + public class V1PaymentMethodAutomaticallyUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentMethod FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentMethodAutomaticallyUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentMethodDetachedEventNotification.cs b/src/Stripe.net/Events/V1PaymentMethodDetachedEventNotification.cs new file mode 100644 index 0000000000..5829f5b332 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentMethodDetachedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a payment method is detached from a customer. + /// + public class V1PaymentMethodDetachedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentMethod FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentMethodDetachedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PaymentMethodUpdatedEventNotification.cs b/src/Stripe.net/Events/V1PaymentMethodUpdatedEventNotification.cs new file mode 100644 index 0000000000..790bedf054 --- /dev/null +++ b/src/Stripe.net/Events/V1PaymentMethodUpdatedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a payment method is updated via the PaymentMethod update API. + /// + public class V1PaymentMethodUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PaymentMethod FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PaymentMethodUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PayoutCanceledEventNotification.cs b/src/Stripe.net/Events/V1PayoutCanceledEventNotification.cs new file mode 100644 index 0000000000..53aab00d60 --- /dev/null +++ b/src/Stripe.net/Events/V1PayoutCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a payout is canceled. + /// + public class V1PayoutCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Payout FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PayoutCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PayoutCreatedEventNotification.cs b/src/Stripe.net/Events/V1PayoutCreatedEventNotification.cs new file mode 100644 index 0000000000..4acf0c6c32 --- /dev/null +++ b/src/Stripe.net/Events/V1PayoutCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a payout is created. + /// + public class V1PayoutCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Payout FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PayoutCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PayoutFailedEventNotification.cs b/src/Stripe.net/Events/V1PayoutFailedEventNotification.cs new file mode 100644 index 0000000000..b4a0c83b0a --- /dev/null +++ b/src/Stripe.net/Events/V1PayoutFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a payout attempt fails. + /// + public class V1PayoutFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Payout FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PayoutFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PayoutPaidEventNotification.cs b/src/Stripe.net/Events/V1PayoutPaidEventNotification.cs new file mode 100644 index 0000000000..cc2a323874 --- /dev/null +++ b/src/Stripe.net/Events/V1PayoutPaidEventNotification.cs @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a payout is expected to be available in the destination + /// account. If the payout fails, a payout.failed notification is also sent, at a + /// later time. + /// + public class V1PayoutPaidEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Payout FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PayoutPaidEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PayoutReconciliationCompletedEventNotification.cs b/src/Stripe.net/Events/V1PayoutReconciliationCompletedEventNotification.cs new file mode 100644 index 0000000000..ed190043c4 --- /dev/null +++ b/src/Stripe.net/Events/V1PayoutReconciliationCompletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever balance transactions paid out in an automatic payout can be queried. + /// + public class V1PayoutReconciliationCompletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Payout FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PayoutReconciliationCompletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PayoutUpdatedEventNotification.cs b/src/Stripe.net/Events/V1PayoutUpdatedEventNotification.cs new file mode 100644 index 0000000000..0ff574239d --- /dev/null +++ b/src/Stripe.net/Events/V1PayoutUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a payout is updated. + /// + public class V1PayoutUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Payout FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PayoutUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PersonCreatedEventNotification.cs b/src/Stripe.net/Events/V1PersonCreatedEventNotification.cs new file mode 100644 index 0000000000..632b736d50 --- /dev/null +++ b/src/Stripe.net/Events/V1PersonCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a person associated with an account is created. + /// + public class V1PersonCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Person FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PersonCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PersonDeletedEventNotification.cs b/src/Stripe.net/Events/V1PersonDeletedEventNotification.cs new file mode 100644 index 0000000000..fd603a1a80 --- /dev/null +++ b/src/Stripe.net/Events/V1PersonDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a person associated with an account is deleted. + /// + public class V1PersonDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Person FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PersonDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PersonUpdatedEventNotification.cs b/src/Stripe.net/Events/V1PersonUpdatedEventNotification.cs new file mode 100644 index 0000000000..eb4c8c2ec3 --- /dev/null +++ b/src/Stripe.net/Events/V1PersonUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a person associated with an account is updated. + /// + public class V1PersonUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Person FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PersonUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PlanCreatedEventNotification.cs b/src/Stripe.net/Events/V1PlanCreatedEventNotification.cs new file mode 100644 index 0000000000..452a178ffc --- /dev/null +++ b/src/Stripe.net/Events/V1PlanCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a plan is created. + /// + public class V1PlanCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Plan FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PlanCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PlanDeletedEventNotification.cs b/src/Stripe.net/Events/V1PlanDeletedEventNotification.cs new file mode 100644 index 0000000000..1b4ae28ffc --- /dev/null +++ b/src/Stripe.net/Events/V1PlanDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a plan is deleted. + /// + public class V1PlanDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Plan FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PlanDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PlanUpdatedEventNotification.cs b/src/Stripe.net/Events/V1PlanUpdatedEventNotification.cs new file mode 100644 index 0000000000..213f1b2e0f --- /dev/null +++ b/src/Stripe.net/Events/V1PlanUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a plan is updated. + /// + public class V1PlanUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Plan FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PlanUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PriceCreatedEventNotification.cs b/src/Stripe.net/Events/V1PriceCreatedEventNotification.cs new file mode 100644 index 0000000000..86913991b3 --- /dev/null +++ b/src/Stripe.net/Events/V1PriceCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a price is created. + /// + public class V1PriceCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Price FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PriceCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PriceDeletedEventNotification.cs b/src/Stripe.net/Events/V1PriceDeletedEventNotification.cs new file mode 100644 index 0000000000..094f83cbbf --- /dev/null +++ b/src/Stripe.net/Events/V1PriceDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a price is deleted. + /// + public class V1PriceDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Price FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PriceDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PriceUpdatedEventNotification.cs b/src/Stripe.net/Events/V1PriceUpdatedEventNotification.cs new file mode 100644 index 0000000000..bd9eb6d3e2 --- /dev/null +++ b/src/Stripe.net/Events/V1PriceUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a price is updated. + /// + public class V1PriceUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Price FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PriceUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ProductCreatedEventNotification.cs b/src/Stripe.net/Events/V1ProductCreatedEventNotification.cs new file mode 100644 index 0000000000..d105daac33 --- /dev/null +++ b/src/Stripe.net/Events/V1ProductCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a product is created. + /// + public class V1ProductCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Product FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ProductCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ProductDeletedEventNotification.cs b/src/Stripe.net/Events/V1ProductDeletedEventNotification.cs new file mode 100644 index 0000000000..950fd06a98 --- /dev/null +++ b/src/Stripe.net/Events/V1ProductDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a product is deleted. + /// + public class V1ProductDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Product FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ProductDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ProductUpdatedEventNotification.cs b/src/Stripe.net/Events/V1ProductUpdatedEventNotification.cs new file mode 100644 index 0000000000..b947f97741 --- /dev/null +++ b/src/Stripe.net/Events/V1ProductUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a product is updated. + /// + public class V1ProductUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Product FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ProductUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PromotionCodeCreatedEventNotification.cs b/src/Stripe.net/Events/V1PromotionCodeCreatedEventNotification.cs new file mode 100644 index 0000000000..e35d9a956c --- /dev/null +++ b/src/Stripe.net/Events/V1PromotionCodeCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a promotion code is created. + /// + public class V1PromotionCodeCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PromotionCode FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PromotionCodeCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1PromotionCodeUpdatedEventNotification.cs b/src/Stripe.net/Events/V1PromotionCodeUpdatedEventNotification.cs new file mode 100644 index 0000000000..a60a488b1d --- /dev/null +++ b/src/Stripe.net/Events/V1PromotionCodeUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a promotion code is updated. + /// + public class V1PromotionCodeUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public PromotionCode FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1PromotionCodeUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1QuoteAcceptedEventNotification.cs b/src/Stripe.net/Events/V1QuoteAcceptedEventNotification.cs new file mode 100644 index 0000000000..e16ca76d23 --- /dev/null +++ b/src/Stripe.net/Events/V1QuoteAcceptedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a quote is accepted. + /// + public class V1QuoteAcceptedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Quote FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1QuoteAcceptedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1QuoteCanceledEventNotification.cs b/src/Stripe.net/Events/V1QuoteCanceledEventNotification.cs new file mode 100644 index 0000000000..cb65d8ea24 --- /dev/null +++ b/src/Stripe.net/Events/V1QuoteCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a quote is canceled. + /// + public class V1QuoteCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Quote FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1QuoteCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1QuoteCreatedEventNotification.cs b/src/Stripe.net/Events/V1QuoteCreatedEventNotification.cs new file mode 100644 index 0000000000..1c651e6e01 --- /dev/null +++ b/src/Stripe.net/Events/V1QuoteCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a quote is created. + /// + public class V1QuoteCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Quote FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1QuoteCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1QuoteFinalizedEventNotification.cs b/src/Stripe.net/Events/V1QuoteFinalizedEventNotification.cs new file mode 100644 index 0000000000..d119570cb0 --- /dev/null +++ b/src/Stripe.net/Events/V1QuoteFinalizedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a quote is finalized. + /// + public class V1QuoteFinalizedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Quote FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1QuoteFinalizedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1RadarEarlyFraudWarningCreatedEventNotification.cs b/src/Stripe.net/Events/V1RadarEarlyFraudWarningCreatedEventNotification.cs new file mode 100644 index 0000000000..421495eb0f --- /dev/null +++ b/src/Stripe.net/Events/V1RadarEarlyFraudWarningCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an early fraud warning is created. + /// + public class V1RadarEarlyFraudWarningCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Radar.EarlyFraudWarning FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1RadarEarlyFraudWarningCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1RadarEarlyFraudWarningUpdatedEventNotification.cs b/src/Stripe.net/Events/V1RadarEarlyFraudWarningUpdatedEventNotification.cs new file mode 100644 index 0000000000..c4f16e12e8 --- /dev/null +++ b/src/Stripe.net/Events/V1RadarEarlyFraudWarningUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an early fraud warning is updated. + /// + public class V1RadarEarlyFraudWarningUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Radar.EarlyFraudWarning FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1RadarEarlyFraudWarningUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1RefundCreatedEventNotification.cs b/src/Stripe.net/Events/V1RefundCreatedEventNotification.cs new file mode 100644 index 0000000000..da39b8bda3 --- /dev/null +++ b/src/Stripe.net/Events/V1RefundCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a refund is created. + /// + public class V1RefundCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Refund FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1RefundCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1RefundFailedEventNotification.cs b/src/Stripe.net/Events/V1RefundFailedEventNotification.cs new file mode 100644 index 0000000000..07f0e402dc --- /dev/null +++ b/src/Stripe.net/Events/V1RefundFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a refund has failed. + /// + public class V1RefundFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Refund FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1RefundFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1RefundUpdatedEventNotification.cs b/src/Stripe.net/Events/V1RefundUpdatedEventNotification.cs new file mode 100644 index 0000000000..497ee0c1bc --- /dev/null +++ b/src/Stripe.net/Events/V1RefundUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a refund is updated. + /// + public class V1RefundUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Refund FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1RefundUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ReviewClosedEventNotification.cs b/src/Stripe.net/Events/V1ReviewClosedEventNotification.cs new file mode 100644 index 0000000000..04d33d23e5 --- /dev/null +++ b/src/Stripe.net/Events/V1ReviewClosedEventNotification.cs @@ -0,0 +1,55 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a review is closed. The review's reason field indicates why: + /// approved, disputed, refunded, refunded_as_fraud, or + /// canceled. + /// + public class V1ReviewClosedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Review FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ReviewClosedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1ReviewOpenedEventNotification.cs b/src/Stripe.net/Events/V1ReviewOpenedEventNotification.cs new file mode 100644 index 0000000000..c3b6edcfef --- /dev/null +++ b/src/Stripe.net/Events/V1ReviewOpenedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a review is opened. + /// + public class V1ReviewOpenedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Review FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1ReviewOpenedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SetupIntentCanceledEventNotification.cs b/src/Stripe.net/Events/V1SetupIntentCanceledEventNotification.cs new file mode 100644 index 0000000000..9aed89b120 --- /dev/null +++ b/src/Stripe.net/Events/V1SetupIntentCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a SetupIntent is canceled. + /// + public class V1SetupIntentCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SetupIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SetupIntentCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SetupIntentCreatedEventNotification.cs b/src/Stripe.net/Events/V1SetupIntentCreatedEventNotification.cs new file mode 100644 index 0000000000..5033934610 --- /dev/null +++ b/src/Stripe.net/Events/V1SetupIntentCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a new SetupIntent is created. + /// + public class V1SetupIntentCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SetupIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SetupIntentCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SetupIntentRequiresActionEventNotification.cs b/src/Stripe.net/Events/V1SetupIntentRequiresActionEventNotification.cs new file mode 100644 index 0000000000..1bb7f6d438 --- /dev/null +++ b/src/Stripe.net/Events/V1SetupIntentRequiresActionEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a SetupIntent is in requires_action state. + /// + public class V1SetupIntentRequiresActionEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SetupIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SetupIntentRequiresActionEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SetupIntentSetupFailedEventNotification.cs b/src/Stripe.net/Events/V1SetupIntentSetupFailedEventNotification.cs new file mode 100644 index 0000000000..154d17b236 --- /dev/null +++ b/src/Stripe.net/Events/V1SetupIntentSetupFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a SetupIntent has failed the attempt to setup a payment method. + /// + public class V1SetupIntentSetupFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SetupIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SetupIntentSetupFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SetupIntentSucceededEventNotification.cs b/src/Stripe.net/Events/V1SetupIntentSucceededEventNotification.cs new file mode 100644 index 0000000000..48312f218c --- /dev/null +++ b/src/Stripe.net/Events/V1SetupIntentSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an SetupIntent has successfully setup a payment method. + /// + public class V1SetupIntentSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SetupIntent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SetupIntentSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SigmaScheduledQueryRunCreatedEventNotification.cs b/src/Stripe.net/Events/V1SigmaScheduledQueryRunCreatedEventNotification.cs new file mode 100644 index 0000000000..50d0830c1c --- /dev/null +++ b/src/Stripe.net/Events/V1SigmaScheduledQueryRunCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a Sigma scheduled query run finishes. + /// + public class V1SigmaScheduledQueryRunCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Sigma.ScheduledQueryRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SigmaScheduledQueryRunCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SourceCanceledEventNotification.cs b/src/Stripe.net/Events/V1SourceCanceledEventNotification.cs new file mode 100644 index 0000000000..e5d83a9790 --- /dev/null +++ b/src/Stripe.net/Events/V1SourceCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a source is canceled. + /// + public class V1SourceCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Source FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SourceCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SourceChargeableEventNotification.cs b/src/Stripe.net/Events/V1SourceChargeableEventNotification.cs new file mode 100644 index 0000000000..bffff70a97 --- /dev/null +++ b/src/Stripe.net/Events/V1SourceChargeableEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a source transitions to chargeable. + /// + public class V1SourceChargeableEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Source FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SourceChargeableEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SourceFailedEventNotification.cs b/src/Stripe.net/Events/V1SourceFailedEventNotification.cs new file mode 100644 index 0000000000..e18597f2da --- /dev/null +++ b/src/Stripe.net/Events/V1SourceFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a source fails. + /// + public class V1SourceFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Source FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SourceFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SourceRefundAttributesRequiredEventNotification.cs b/src/Stripe.net/Events/V1SourceRefundAttributesRequiredEventNotification.cs new file mode 100644 index 0000000000..515acab58a --- /dev/null +++ b/src/Stripe.net/Events/V1SourceRefundAttributesRequiredEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever the refund attributes are required on a receiver source to process a + /// refund or a mispayment. + /// + public class V1SourceRefundAttributesRequiredEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Source FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SourceRefundAttributesRequiredEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SubscriptionScheduleAbortedEventNotification.cs b/src/Stripe.net/Events/V1SubscriptionScheduleAbortedEventNotification.cs new file mode 100644 index 0000000000..d17b1a3a85 --- /dev/null +++ b/src/Stripe.net/Events/V1SubscriptionScheduleAbortedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a subscription schedule is canceled due to the underlying subscription + /// being canceled because of delinquency. + /// + public class V1SubscriptionScheduleAbortedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SubscriptionSchedule FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SubscriptionScheduleAbortedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SubscriptionScheduleCanceledEventNotification.cs b/src/Stripe.net/Events/V1SubscriptionScheduleCanceledEventNotification.cs new file mode 100644 index 0000000000..e6765dbb9e --- /dev/null +++ b/src/Stripe.net/Events/V1SubscriptionScheduleCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a subscription schedule is canceled. + /// + public class V1SubscriptionScheduleCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SubscriptionSchedule FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SubscriptionScheduleCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SubscriptionScheduleCompletedEventNotification.cs b/src/Stripe.net/Events/V1SubscriptionScheduleCompletedEventNotification.cs new file mode 100644 index 0000000000..97ce688cec --- /dev/null +++ b/src/Stripe.net/Events/V1SubscriptionScheduleCompletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a new subscription schedule is completed. + /// + public class V1SubscriptionScheduleCompletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SubscriptionSchedule FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SubscriptionScheduleCompletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SubscriptionScheduleCreatedEventNotification.cs b/src/Stripe.net/Events/V1SubscriptionScheduleCreatedEventNotification.cs new file mode 100644 index 0000000000..2311cdccc1 --- /dev/null +++ b/src/Stripe.net/Events/V1SubscriptionScheduleCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a new subscription schedule is created. + /// + public class V1SubscriptionScheduleCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SubscriptionSchedule FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SubscriptionScheduleCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SubscriptionScheduleExpiringEventNotification.cs b/src/Stripe.net/Events/V1SubscriptionScheduleExpiringEventNotification.cs new file mode 100644 index 0000000000..281420f2e7 --- /dev/null +++ b/src/Stripe.net/Events/V1SubscriptionScheduleExpiringEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs 7 days before a subscription schedule will expire. + /// + public class V1SubscriptionScheduleExpiringEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SubscriptionSchedule FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SubscriptionScheduleExpiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SubscriptionScheduleReleasedEventNotification.cs b/src/Stripe.net/Events/V1SubscriptionScheduleReleasedEventNotification.cs new file mode 100644 index 0000000000..1f866e2da0 --- /dev/null +++ b/src/Stripe.net/Events/V1SubscriptionScheduleReleasedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a new subscription schedule is released. + /// + public class V1SubscriptionScheduleReleasedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SubscriptionSchedule FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SubscriptionScheduleReleasedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1SubscriptionScheduleUpdatedEventNotification.cs b/src/Stripe.net/Events/V1SubscriptionScheduleUpdatedEventNotification.cs new file mode 100644 index 0000000000..6401b2b6f9 --- /dev/null +++ b/src/Stripe.net/Events/V1SubscriptionScheduleUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a subscription schedule is updated. + /// + public class V1SubscriptionScheduleUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public SubscriptionSchedule FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1SubscriptionScheduleUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TaxRateCreatedEventNotification.cs b/src/Stripe.net/Events/V1TaxRateCreatedEventNotification.cs new file mode 100644 index 0000000000..2b305e5168 --- /dev/null +++ b/src/Stripe.net/Events/V1TaxRateCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a new tax rate is created. + /// + public class V1TaxRateCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TaxRate FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TaxRateCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TaxRateUpdatedEventNotification.cs b/src/Stripe.net/Events/V1TaxRateUpdatedEventNotification.cs new file mode 100644 index 0000000000..0cc246cc23 --- /dev/null +++ b/src/Stripe.net/Events/V1TaxRateUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a tax rate is updated. + /// + public class V1TaxRateUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TaxRate FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TaxRateUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TerminalReaderActionFailedEventNotification.cs b/src/Stripe.net/Events/V1TerminalReaderActionFailedEventNotification.cs new file mode 100644 index 0000000000..5fb1c51c1f --- /dev/null +++ b/src/Stripe.net/Events/V1TerminalReaderActionFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an action sent to a Terminal reader failed. + /// + public class V1TerminalReaderActionFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Terminal.Reader FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TerminalReaderActionFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TerminalReaderActionSucceededEventNotification.cs b/src/Stripe.net/Events/V1TerminalReaderActionSucceededEventNotification.cs new file mode 100644 index 0000000000..cbfe7a98d4 --- /dev/null +++ b/src/Stripe.net/Events/V1TerminalReaderActionSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an action sent to a Terminal reader was successful. + /// + public class V1TerminalReaderActionSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Terminal.Reader FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TerminalReaderActionSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TerminalReaderActionUpdatedEventNotification.cs b/src/Stripe.net/Events/V1TerminalReaderActionUpdatedEventNotification.cs new file mode 100644 index 0000000000..9ee15580e0 --- /dev/null +++ b/src/Stripe.net/Events/V1TerminalReaderActionUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever an action sent to a Terminal reader is updated. + /// + public class V1TerminalReaderActionUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Terminal.Reader FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TerminalReaderActionUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TestHelpersTestClockAdvancingEventNotification.cs b/src/Stripe.net/Events/V1TestHelpersTestClockAdvancingEventNotification.cs new file mode 100644 index 0000000000..06ffdf8ce2 --- /dev/null +++ b/src/Stripe.net/Events/V1TestHelpersTestClockAdvancingEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a test clock starts advancing. + /// + public class V1TestHelpersTestClockAdvancingEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TestHelpers.TestClock FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TestHelpersTestClockAdvancingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TestHelpersTestClockCreatedEventNotification.cs b/src/Stripe.net/Events/V1TestHelpersTestClockCreatedEventNotification.cs new file mode 100644 index 0000000000..a20b55bd46 --- /dev/null +++ b/src/Stripe.net/Events/V1TestHelpersTestClockCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a test clock is created. + /// + public class V1TestHelpersTestClockCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TestHelpers.TestClock FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TestHelpersTestClockCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TestHelpersTestClockDeletedEventNotification.cs b/src/Stripe.net/Events/V1TestHelpersTestClockDeletedEventNotification.cs new file mode 100644 index 0000000000..2615558a9f --- /dev/null +++ b/src/Stripe.net/Events/V1TestHelpersTestClockDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a test clock is deleted. + /// + public class V1TestHelpersTestClockDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TestHelpers.TestClock FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TestHelpersTestClockDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TestHelpersTestClockInternalFailureEventNotification.cs b/src/Stripe.net/Events/V1TestHelpersTestClockInternalFailureEventNotification.cs new file mode 100644 index 0000000000..6ee85fceaa --- /dev/null +++ b/src/Stripe.net/Events/V1TestHelpersTestClockInternalFailureEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a test clock fails to advance its frozen time. + /// + public class V1TestHelpersTestClockInternalFailureEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TestHelpers.TestClock FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TestHelpersTestClockInternalFailureEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TestHelpersTestClockReadyEventNotification.cs b/src/Stripe.net/Events/V1TestHelpersTestClockReadyEventNotification.cs new file mode 100644 index 0000000000..2af7c1eb2d --- /dev/null +++ b/src/Stripe.net/Events/V1TestHelpersTestClockReadyEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a test clock transitions to a ready status. + /// + public class V1TestHelpersTestClockReadyEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public TestHelpers.TestClock FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TestHelpersTestClockReadyEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TopupCanceledEventNotification.cs b/src/Stripe.net/Events/V1TopupCanceledEventNotification.cs new file mode 100644 index 0000000000..5ffedf682e --- /dev/null +++ b/src/Stripe.net/Events/V1TopupCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a top-up is canceled. + /// + public class V1TopupCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Topup FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TopupCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TopupCreatedEventNotification.cs b/src/Stripe.net/Events/V1TopupCreatedEventNotification.cs new file mode 100644 index 0000000000..afb6d5b4bb --- /dev/null +++ b/src/Stripe.net/Events/V1TopupCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a top-up is created. + /// + public class V1TopupCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Topup FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TopupCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TopupFailedEventNotification.cs b/src/Stripe.net/Events/V1TopupFailedEventNotification.cs new file mode 100644 index 0000000000..448f4f16a0 --- /dev/null +++ b/src/Stripe.net/Events/V1TopupFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a top-up fails. + /// + public class V1TopupFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Topup FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TopupFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TopupReversedEventNotification.cs b/src/Stripe.net/Events/V1TopupReversedEventNotification.cs new file mode 100644 index 0000000000..cc838667bf --- /dev/null +++ b/src/Stripe.net/Events/V1TopupReversedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a top-up is reversed. + /// + public class V1TopupReversedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Topup FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TopupReversedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TopupSucceededEventNotification.cs b/src/Stripe.net/Events/V1TopupSucceededEventNotification.cs new file mode 100644 index 0000000000..2d0710f532 --- /dev/null +++ b/src/Stripe.net/Events/V1TopupSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a top-up succeeds. + /// + public class V1TopupSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Topup FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TopupSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TransferCreatedEventNotification.cs b/src/Stripe.net/Events/V1TransferCreatedEventNotification.cs new file mode 100644 index 0000000000..e4c426d738 --- /dev/null +++ b/src/Stripe.net/Events/V1TransferCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a transfer is created. + /// + public class V1TransferCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Transfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TransferCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TransferReversedEventNotification.cs b/src/Stripe.net/Events/V1TransferReversedEventNotification.cs new file mode 100644 index 0000000000..151a2affea --- /dev/null +++ b/src/Stripe.net/Events/V1TransferReversedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a transfer is reversed, including partial reversals. + /// + public class V1TransferReversedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Transfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TransferReversedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V1TransferUpdatedEventNotification.cs b/src/Stripe.net/Events/V1TransferUpdatedEventNotification.cs new file mode 100644 index 0000000000..0210dfcc3e --- /dev/null +++ b/src/Stripe.net/Events/V1TransferUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs whenever a transfer's description or metadata is updated. + /// + public class V1TransferUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public Transfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V1TransferUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingBillSettingUpdatedEventNotification.cs b/src/Stripe.net/Events/V2BillingBillSettingUpdatedEventNotification.cs new file mode 100644 index 0000000000..360789508e --- /dev/null +++ b/src/Stripe.net/Events/V2BillingBillSettingUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// This event occurs when a bill setting is updated. + /// + public class V2BillingBillSettingUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.BillSetting FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingBillSettingUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingCadenceBilledEventNotification.cs b/src/Stripe.net/Events/V2BillingCadenceBilledEventNotification.cs new file mode 100644 index 0000000000..c6c216ba5e --- /dev/null +++ b/src/Stripe.net/Events/V2BillingCadenceBilledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a billing Cadence generates an invoice. + /// + public class V2BillingCadenceBilledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.Cadence FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingCadenceBilledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingCadenceCanceledEventNotification.cs b/src/Stripe.net/Events/V2BillingCadenceCanceledEventNotification.cs new file mode 100644 index 0000000000..eb5c4a33b2 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingCadenceCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a billing Cadence is canceled. + /// + public class V2BillingCadenceCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.Cadence FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingCadenceCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingCadenceCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingCadenceCreatedEventNotification.cs new file mode 100644 index 0000000000..729c9c2358 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingCadenceCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a billing Cadence is created. + /// + public class V2BillingCadenceCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.Cadence FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingCadenceCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingLicenseFeeCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingLicenseFeeCreatedEventNotification.cs new file mode 100644 index 0000000000..e6a66c3751 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingLicenseFeeCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a LicenseFee is created. + /// + public class V2BillingLicenseFeeCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.LicenseFee FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingLicenseFeeCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingLicenseFeeUpdatedEventNotification.cs b/src/Stripe.net/Events/V2BillingLicenseFeeUpdatedEventNotification.cs new file mode 100644 index 0000000000..dc47705f4f --- /dev/null +++ b/src/Stripe.net/Events/V2BillingLicenseFeeUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a LicenseFee is updated. + /// + public class V2BillingLicenseFeeUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.LicenseFee FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingLicenseFeeUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingLicenseFeeVersionCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingLicenseFeeVersionCreatedEventNotification.cs new file mode 100644 index 0000000000..f18d25d3d7 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingLicenseFeeVersionCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a LicenseFeeVersion is created. + /// + public class V2BillingLicenseFeeVersionCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.LicenseFeeVersion FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingLicenseFeeVersionCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingLicensedItemCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingLicensedItemCreatedEventNotification.cs new file mode 100644 index 0000000000..9c4982ccdd --- /dev/null +++ b/src/Stripe.net/Events/V2BillingLicensedItemCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a LicensedItem is created. + /// + public class V2BillingLicensedItemCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.LicensedItem FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingLicensedItemCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingLicensedItemUpdatedEventNotification.cs b/src/Stripe.net/Events/V2BillingLicensedItemUpdatedEventNotification.cs new file mode 100644 index 0000000000..8b6a656a47 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingLicensedItemUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a LicensedItem is updated. + /// + public class V2BillingLicensedItemUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.LicensedItem FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingLicensedItemUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingMeteredItemCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingMeteredItemCreatedEventNotification.cs new file mode 100644 index 0000000000..522860309b --- /dev/null +++ b/src/Stripe.net/Events/V2BillingMeteredItemCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a MeteredItem is created. + /// + public class V2BillingMeteredItemCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.MeteredItem FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingMeteredItemCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingMeteredItemUpdatedEventNotification.cs b/src/Stripe.net/Events/V2BillingMeteredItemUpdatedEventNotification.cs new file mode 100644 index 0000000000..bdf7876879 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingMeteredItemUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a MeteredItem is updated. + /// + public class V2BillingMeteredItemUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.MeteredItem FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingMeteredItemUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanComponentCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanComponentCreatedEventNotification.cs new file mode 100644 index 0000000000..c116ebddd9 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanComponentCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlanComponent is created. + /// + public class V2BillingPricingPlanComponentCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanComponent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanComponentCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanComponentUpdatedEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanComponentUpdatedEventNotification.cs new file mode 100644 index 0000000000..a9dd44d3ba --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanComponentUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlanComponent is updated. + /// + public class V2BillingPricingPlanComponentUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanComponent FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanComponentUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanCreatedEventNotification.cs new file mode 100644 index 0000000000..f82983712f --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlan is created. + /// + public class V2BillingPricingPlanCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlan FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification.cs new file mode 100644 index 0000000000..155d183982 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlanSubscription's collection is awaiting customer action. + /// + public class V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification.cs new file mode 100644 index 0000000000..61a45c33c9 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlanSubscription's collection is current. + /// + public class V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanSubscriptionCollectionCurrentEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification.cs new file mode 100644 index 0000000000..f10edfc3c9 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlanSubscription's collection is past due. + /// + public class V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanSubscriptionCollectionPastDueEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionPausedEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionPausedEventNotification.cs new file mode 100644 index 0000000000..b74a2443e1 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionPausedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlanSubscription's collection is paused. + /// + public class V2BillingPricingPlanSubscriptionCollectionPausedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanSubscriptionCollectionPausedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification.cs new file mode 100644 index 0000000000..b6b43a1b15 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlanSubscription's collection is unpaid. + /// + public class V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanSubscriptionCollectionUnpaidEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionServicingActivatedEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionServicingActivatedEventNotification.cs new file mode 100644 index 0000000000..6d6114371d --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionServicingActivatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when PricingPlanSubscription servicing is activated. + /// + public class V2BillingPricingPlanSubscriptionServicingActivatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanSubscriptionServicingActivatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionServicingCanceledEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionServicingCanceledEventNotification.cs new file mode 100644 index 0000000000..7e4159dd8e --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionServicingCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when PricingPlanSubscription servicing is canceled. + /// + public class V2BillingPricingPlanSubscriptionServicingCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanSubscriptionServicingCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionServicingPausedEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionServicingPausedEventNotification.cs new file mode 100644 index 0000000000..2c30e007bb --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanSubscriptionServicingPausedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when PricingPlanSubscription servicing is paused. + /// + public class V2BillingPricingPlanSubscriptionServicingPausedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanSubscriptionServicingPausedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanUpdatedEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanUpdatedEventNotification.cs new file mode 100644 index 0000000000..e5018cbb11 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlan is updated. + /// + public class V2BillingPricingPlanUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlan FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingPricingPlanVersionCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingPricingPlanVersionCreatedEventNotification.cs new file mode 100644 index 0000000000..06491eb554 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingPricingPlanVersionCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PricingPlanVersion is created. + /// + public class V2BillingPricingPlanVersionCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.PricingPlanVersion FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingPricingPlanVersionCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardCreatedEventNotification.cs new file mode 100644 index 0000000000..ec04efaa20 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCard is created. + /// + public class V2BillingRateCardCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCard FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardRateCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardRateCreatedEventNotification.cs new file mode 100644 index 0000000000..74e43be380 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardRateCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCardRate is created. + /// + public class V2BillingRateCardRateCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardRate FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardRateCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionActivatedEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionActivatedEventNotification.cs new file mode 100644 index 0000000000..b83873e91d --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionActivatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCardSubscription is activated. + /// + public class V2BillingRateCardSubscriptionActivatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionActivatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionCanceledEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCanceledEventNotification.cs new file mode 100644 index 0000000000..3e099017ea --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCardSubscription is canceled. + /// + public class V2BillingRateCardSubscriptionCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification.cs new file mode 100644 index 0000000000..e4fc528a38 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCardSubscription's collection is awaiting customer action. + /// + public class V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionCurrentEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionCurrentEventNotification.cs new file mode 100644 index 0000000000..196f57bafc --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionCurrentEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCardSubscription's collection is current. + /// + public class V2BillingRateCardSubscriptionCollectionCurrentEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionCollectionCurrentEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionPastDueEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionPastDueEventNotification.cs new file mode 100644 index 0000000000..ded6d168f7 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionPastDueEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCardSubscription's collection is past due. + /// + public class V2BillingRateCardSubscriptionCollectionPastDueEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionCollectionPastDueEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionPausedEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionPausedEventNotification.cs new file mode 100644 index 0000000000..7a897aa339 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionPausedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCardSubscription's collection is paused. + /// + public class V2BillingRateCardSubscriptionCollectionPausedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionCollectionPausedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionUnpaidEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionUnpaidEventNotification.cs new file mode 100644 index 0000000000..8479d14413 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionCollectionUnpaidEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCardSubscription's collection is unpaid. + /// + public class V2BillingRateCardSubscriptionCollectionUnpaidEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionCollectionUnpaidEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionServicingActivatedEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionServicingActivatedEventNotification.cs new file mode 100644 index 0000000000..06bb663cbd --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionServicingActivatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when RateCardSubscription servicing is activated. + /// + public class V2BillingRateCardSubscriptionServicingActivatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionServicingActivatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionServicingCanceledEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionServicingCanceledEventNotification.cs new file mode 100644 index 0000000000..d1743b6951 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionServicingCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when RateCardSubscription servicing is canceled. + /// + public class V2BillingRateCardSubscriptionServicingCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionServicingCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardSubscriptionServicingPausedEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardSubscriptionServicingPausedEventNotification.cs new file mode 100644 index 0000000000..5a57cc7364 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardSubscriptionServicingPausedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when RateCardSubscription servicing is paused. + /// + public class V2BillingRateCardSubscriptionServicingPausedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardSubscription FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardSubscriptionServicingPausedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardUpdatedEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardUpdatedEventNotification.cs new file mode 100644 index 0000000000..85ff213969 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCard is updated. + /// + public class V2BillingRateCardUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCard FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2BillingRateCardVersionCreatedEventNotification.cs b/src/Stripe.net/Events/V2BillingRateCardVersionCreatedEventNotification.cs new file mode 100644 index 0000000000..4d2c117219 --- /dev/null +++ b/src/Stripe.net/Events/V2BillingRateCardVersionCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RateCardVersion is created. + /// + public class V2BillingRateCardVersionCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Billing.RateCardVersion FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2BillingRateCardVersionCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountClosedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountClosedEventNotification.cs new file mode 100644 index 0000000000..fc5ff9bbd6 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountClosedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// This event occurs when an account is closed. + /// + public class V2CoreAccountClosedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountClosedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountCreatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountCreatedEventNotification.cs new file mode 100644 index 0000000000..e1264e88b2 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Account is created. + /// + public class V2CoreAccountCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.cs new file mode 100644 index 0000000000..b064b77eb4 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when the status of an Account's customer configuration capability is updated. + /// + public class V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.cs new file mode 100644 index 0000000000..5156d776d1 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Account's customer configuration is updated. + /// + public class V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingConfigurationCustomerUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.cs new file mode 100644 index 0000000000..93c83d6f32 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when the status of an Account's merchant configuration capability is updated. + /// + public class V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.cs new file mode 100644 index 0000000000..c0e691b485 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Account's merchant configuration is updated. + /// + public class V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingConfigurationMerchantUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.cs new file mode 100644 index 0000000000..a3e7cb9a57 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when the status of an Account's recipient configuration capability is updated. + /// + public class V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.cs new file mode 100644 index 0000000000..6fd7e9e9f2 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Recipient's configuration is updated. + /// + public class V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingConfigurationRecipientUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification.cs new file mode 100644 index 0000000000..e3bd3593ee --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when the status of an Account's storer configuration capability is updated. + /// + public class V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification.cs new file mode 100644 index 0000000000..7e60463ec8 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Storer's configuration is updated. + /// + public class V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingConfigurationStorerUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.cs new file mode 100644 index 0000000000..2e09398fa0 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingDefaultsUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// This event occurs when account defaults are created or updated. + /// + public class V2CoreAccountIncludingDefaultsUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingDefaultsUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingIdentityUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingIdentityUpdatedEventNotification.cs new file mode 100644 index 0000000000..bb58a5aee6 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingIdentityUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Identity is updated. + /// + public class V2CoreAccountIncludingIdentityUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingIdentityUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.cs new file mode 100644 index 0000000000..aa7cc1149a --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountIncludingRequirementsUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Account's requirements are updated. + /// + public class V2CoreAccountIncludingRequirementsUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountIncludingRequirementsUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountLinkReturnedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountLinkReturnedEventNotification.cs new file mode 100644 index 0000000000..8aad383488 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountLinkReturnedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when the generated AccountLink is completed. + /// + public class V2CoreAccountLinkReturnedEventNotification : V2.EventNotification + { + public V2CoreAccountLinkReturnedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountPersonCreatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountPersonCreatedEventNotification.cs new file mode 100644 index 0000000000..dbd4962c73 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountPersonCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Person is created. + /// + public class V2CoreAccountPersonCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.AccountPerson FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountPersonCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountPersonDeletedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountPersonDeletedEventNotification.cs new file mode 100644 index 0000000000..6ef3f41be0 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountPersonDeletedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Person is deleted. + /// + public class V2CoreAccountPersonDeletedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.AccountPerson FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountPersonDeletedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountPersonUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountPersonUpdatedEventNotification.cs new file mode 100644 index 0000000000..e16512b424 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountPersonUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Person is updated. + /// + public class V2CoreAccountPersonUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.AccountPerson FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountPersonUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreAccountUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreAccountUpdatedEventNotification.cs new file mode 100644 index 0000000000..2826d782c4 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreAccountUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Account is updated. + /// + public class V2CoreAccountUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.Account FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreAccountUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreClaimableSandboxClaimedEventNotification.cs b/src/Stripe.net/Events/V2CoreClaimableSandboxClaimedEventNotification.cs new file mode 100644 index 0000000000..329d6bd26c --- /dev/null +++ b/src/Stripe.net/Events/V2CoreClaimableSandboxClaimedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a claimable sandbox is claimed. + /// + public class V2CoreClaimableSandboxClaimedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.ClaimableSandbox FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreClaimableSandboxClaimedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreClaimableSandboxCreatedEventNotification.cs b/src/Stripe.net/Events/V2CoreClaimableSandboxCreatedEventNotification.cs new file mode 100644 index 0000000000..d433bf7f13 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreClaimableSandboxCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a claimable sandbox is created. + /// + public class V2CoreClaimableSandboxCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.ClaimableSandbox FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreClaimableSandboxCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreClaimableSandboxExpiredEventNotification.cs b/src/Stripe.net/Events/V2CoreClaimableSandboxExpiredEventNotification.cs new file mode 100644 index 0000000000..e16db6a74e --- /dev/null +++ b/src/Stripe.net/Events/V2CoreClaimableSandboxExpiredEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a claimable sandbox expires. + /// + public class V2CoreClaimableSandboxExpiredEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.ClaimableSandbox FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreClaimableSandboxExpiredEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreClaimableSandboxExpiringEventNotification.cs b/src/Stripe.net/Events/V2CoreClaimableSandboxExpiringEventNotification.cs new file mode 100644 index 0000000000..0e947df9ad --- /dev/null +++ b/src/Stripe.net/Events/V2CoreClaimableSandboxExpiringEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a claimable sandbox is expiring in 7 days. + /// + public class V2CoreClaimableSandboxExpiringEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.ClaimableSandbox FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreClaimableSandboxExpiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification.cs b/src/Stripe.net/Events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification.cs new file mode 100644 index 0000000000..c3ad1b2340 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a claimable sandbox is activated by the user with the intention to go live + /// and your Stripe app is installed on the live account. + /// + public class V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Core.ClaimableSandbox FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreEventDestinationPingEventNotification.cs b/src/Stripe.net/Events/V2CoreEventDestinationPingEventNotification.cs new file mode 100644 index 0000000000..92f8bb4a76 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreEventDestinationPingEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// A ping event used to test the connection to an EventDestination. + /// + public class V2CoreEventDestinationPingEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.EventDestination FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CoreEventDestinationPingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthApiErrorFiringEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthApiErrorFiringEventNotification.cs new file mode 100644 index 0000000000..e3fc033158 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthApiErrorFiringEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an API error alert is firing. + /// + public class V2CoreHealthApiErrorFiringEventNotification : V2.EventNotification + { + public V2CoreHealthApiErrorFiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthApiErrorResolvedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthApiErrorResolvedEventNotification.cs new file mode 100644 index 0000000000..27da8071c5 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthApiErrorResolvedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an API error alert is resolved. + /// + public class V2CoreHealthApiErrorResolvedEventNotification : V2.EventNotification + { + public V2CoreHealthApiErrorResolvedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthApiLatencyFiringEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthApiLatencyFiringEventNotification.cs new file mode 100644 index 0000000000..660d987fb5 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthApiLatencyFiringEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an API latency alert is firing. + /// + public class V2CoreHealthApiLatencyFiringEventNotification : V2.EventNotification + { + public V2CoreHealthApiLatencyFiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthApiLatencyResolvedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthApiLatencyResolvedEventNotification.cs new file mode 100644 index 0000000000..2844c95107 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthApiLatencyResolvedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an API latency alert is resolved. + /// + public class V2CoreHealthApiLatencyResolvedEventNotification : V2.EventNotification + { + public V2CoreHealthApiLatencyResolvedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventNotification.cs new file mode 100644 index 0000000000..6ea1e0417f --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropFiringEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an authorization rate drop alert is firing. + /// + public class V2CoreHealthAuthorizationRateDropFiringEventNotification : V2.EventNotification + { + public V2CoreHealthAuthorizationRateDropFiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventNotification.cs new file mode 100644 index 0000000000..4332775cc8 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthAuthorizationRateDropResolvedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an authorization rate drop alert is resolved. + /// + public class V2CoreHealthAuthorizationRateDropResolvedEventNotification : V2.EventNotification + { + public V2CoreHealthAuthorizationRateDropResolvedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthEventGenerationFailureResolvedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthEventGenerationFailureResolvedEventNotification.cs new file mode 100644 index 0000000000..9584076f66 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthEventGenerationFailureResolvedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an event generation failure alert is resolved. + /// + public class V2CoreHealthEventGenerationFailureResolvedEventNotification : V2.EventNotification + { + public V2CoreHealthEventGenerationFailureResolvedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthFraudRateIncreasedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthFraudRateIncreasedEventNotification.cs new file mode 100644 index 0000000000..6ea68b86f2 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthFraudRateIncreasedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when the fraud rate has increased. + /// + public class V2CoreHealthFraudRateIncreasedEventNotification : V2.EventNotification + { + public V2CoreHealthFraudRateIncreasedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification.cs new file mode 100644 index 0000000000..fa5129a3bd --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an issuing authorization request errors alert is firing. + /// + public class V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification : V2.EventNotification + { + public V2CoreHealthIssuingAuthorizationRequestErrorsFiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification.cs new file mode 100644 index 0000000000..6e306c7094 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an issuing authorization request errors alert is resolved. + /// + public class V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification : V2.EventNotification + { + public V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification.cs new file mode 100644 index 0000000000..4368c8fc96 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an issuing authorization request timeout alert is firing. + /// + public class V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification : V2.EventNotification + { + public V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification.cs new file mode 100644 index 0000000000..c7326a4267 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when an issuing authorization request timeout alert is resolved. + /// + public class V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification : V2.EventNotification + { + public V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorFiringEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorFiringEventNotification.cs new file mode 100644 index 0000000000..0dc24b7314 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorFiringEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when a payment method error alert is firing. + /// + public class V2CoreHealthPaymentMethodErrorFiringEventNotification : V2.EventNotification + { + public V2CoreHealthPaymentMethodErrorFiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorResolvedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorResolvedEventNotification.cs new file mode 100644 index 0000000000..90412ad8fb --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthPaymentMethodErrorResolvedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when a payment method error alert is resolved. + /// + public class V2CoreHealthPaymentMethodErrorResolvedEventNotification : V2.EventNotification + { + public V2CoreHealthPaymentMethodErrorResolvedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropFiringEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropFiringEventNotification.cs new file mode 100644 index 0000000000..e342ef2f3f --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropFiringEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when a traffic volume drop alert is firing. + /// + public class V2CoreHealthTrafficVolumeDropFiringEventNotification : V2.EventNotification + { + public V2CoreHealthTrafficVolumeDropFiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropResolvedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropResolvedEventNotification.cs new file mode 100644 index 0000000000..696e294e25 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthTrafficVolumeDropResolvedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when a traffic volume drop alert is resolved. + /// + public class V2CoreHealthTrafficVolumeDropResolvedEventNotification : V2.EventNotification + { + public V2CoreHealthTrafficVolumeDropResolvedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthWebhookLatencyFiringEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthWebhookLatencyFiringEventNotification.cs new file mode 100644 index 0000000000..cbd7cce85b --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthWebhookLatencyFiringEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when a webhook latency alert is firing. + /// + public class V2CoreHealthWebhookLatencyFiringEventNotification : V2.EventNotification + { + public V2CoreHealthWebhookLatencyFiringEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CoreHealthWebhookLatencyResolvedEventNotification.cs b/src/Stripe.net/Events/V2CoreHealthWebhookLatencyResolvedEventNotification.cs new file mode 100644 index 0000000000..72b5dcf372 --- /dev/null +++ b/src/Stripe.net/Events/V2CoreHealthWebhookLatencyResolvedEventNotification.cs @@ -0,0 +1,22 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Stripe.V2; + + /// + /// Occurs when a webhook latency alert is resolved. + /// + public class V2CoreHealthWebhookLatencyResolvedEventNotification : V2.EventNotification + { + public V2CoreHealthWebhookLatencyResolvedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementAdjustmentCreatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementAdjustmentCreatedEventNotification.cs new file mode 100644 index 0000000000..8ef0c539ed --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementAdjustmentCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an Adjustment is created. + /// + public class V2MoneyManagementAdjustmentCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.Adjustment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementAdjustmentCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementFinancialAccountCreatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementFinancialAccountCreatedEventNotification.cs new file mode 100644 index 0000000000..0285317f8e --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementFinancialAccountCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a FinancialAccount is created. + /// + public class V2MoneyManagementFinancialAccountCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.FinancialAccount FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementFinancialAccountCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementFinancialAccountUpdatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementFinancialAccountUpdatedEventNotification.cs new file mode 100644 index 0000000000..477b386185 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementFinancialAccountUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a FinancialAccount is updated. + /// + public class V2MoneyManagementFinancialAccountUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.FinancialAccount FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementFinancialAccountUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementFinancialAddressActivatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementFinancialAddressActivatedEventNotification.cs new file mode 100644 index 0000000000..947b9d3ac2 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementFinancialAddressActivatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a FinancialAddress is activated and is ready to receive funds. + /// + public class V2MoneyManagementFinancialAddressActivatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.FinancialAddress FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementFinancialAddressActivatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementFinancialAddressFailedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementFinancialAddressFailedEventNotification.cs new file mode 100644 index 0000000000..7707109264 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementFinancialAddressFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a FinancialAddress fails to activate and can not receive funds. + /// + public class V2MoneyManagementFinancialAddressFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.FinancialAddress FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementFinancialAddressFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferAvailableEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferAvailableEventNotification.cs new file mode 100644 index 0000000000..cbf48a82d2 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferAvailableEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an InboundTransfer's funds are made available. + /// + public class V2MoneyManagementInboundTransferAvailableEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.InboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementInboundTransferAvailableEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitFailedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitFailedEventNotification.cs new file mode 100644 index 0000000000..9c2d20e6ad --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an InboundTransfer fails. + /// + public class V2MoneyManagementInboundTransferBankDebitFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.InboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementInboundTransferBankDebitFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitProcessingEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitProcessingEventNotification.cs new file mode 100644 index 0000000000..8798d3e95b --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitProcessingEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an InboundTransfer starts processing. + /// + public class V2MoneyManagementInboundTransferBankDebitProcessingEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.InboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementInboundTransferBankDebitProcessingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.cs new file mode 100644 index 0000000000..27dbcad2ae --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitQueuedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an InboundTransfer is queued. + /// + public class V2MoneyManagementInboundTransferBankDebitQueuedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.InboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementInboundTransferBankDebitQueuedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.cs new file mode 100644 index 0000000000..9eb00733b9 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitReturnedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an InboundTransfer is returned. + /// + public class V2MoneyManagementInboundTransferBankDebitReturnedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.InboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementInboundTransferBankDebitReturnedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.cs new file mode 100644 index 0000000000..31e076fb8b --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementInboundTransferBankDebitSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an InboundTransfer succeeds. + /// + public class V2MoneyManagementInboundTransferBankDebitSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.InboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementInboundTransferBankDebitSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCanceledEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCanceledEventNotification.cs new file mode 100644 index 0000000000..c6456adf1c --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundPayment transitions into the canceled state. + /// + public class V2MoneyManagementOutboundPaymentCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundPaymentCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCreatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCreatedEventNotification.cs new file mode 100644 index 0000000000..2e0435b8a5 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundPayment is created. + /// + public class V2MoneyManagementOutboundPaymentCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundPaymentCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentFailedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentFailedEventNotification.cs new file mode 100644 index 0000000000..f11d70be44 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundPayment transitions into the failed state. + /// + public class V2MoneyManagementOutboundPaymentFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundPaymentFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentPostedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentPostedEventNotification.cs new file mode 100644 index 0000000000..6fc298883f --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentPostedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundPayment transitions into the posted state. + /// + public class V2MoneyManagementOutboundPaymentPostedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundPaymentPostedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentReturnedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentReturnedEventNotification.cs new file mode 100644 index 0000000000..41051123fb --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentReturnedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundPayment transitions into the returned state. + /// + public class V2MoneyManagementOutboundPaymentReturnedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundPaymentReturnedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.cs new file mode 100644 index 0000000000..c8d800076f --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundPaymentUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundPayment is updated. + /// + public class V2MoneyManagementOutboundPaymentUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundPaymentUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundTransferCanceledEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferCanceledEventNotification.cs new file mode 100644 index 0000000000..76a0dacb29 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundTransfer transitions into the canceled state. + /// + public class V2MoneyManagementOutboundTransferCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundTransferCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundTransferCreatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferCreatedEventNotification.cs new file mode 100644 index 0000000000..403856bdd2 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundTransfer is created. + /// + public class V2MoneyManagementOutboundTransferCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundTransferCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundTransferFailedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferFailedEventNotification.cs new file mode 100644 index 0000000000..cc3f0c09f4 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundTransfer transitions into the failed state. + /// + public class V2MoneyManagementOutboundTransferFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundTransferFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundTransferPostedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferPostedEventNotification.cs new file mode 100644 index 0000000000..247f907102 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferPostedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundTransfer transitions into the posted state. + /// + public class V2MoneyManagementOutboundTransferPostedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundTransferPostedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundTransferReturnedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferReturnedEventNotification.cs new file mode 100644 index 0000000000..2f2a6a6bbd --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferReturnedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when an OutboundTransfer transitions into the returned state. + /// + public class V2MoneyManagementOutboundTransferReturnedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundTransferReturnedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementOutboundTransferUpdatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferUpdatedEventNotification.cs new file mode 100644 index 0000000000..fd296339f2 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementOutboundTransferUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Event that is emitted every time an Outbound Transfer is updated. + /// + public class V2MoneyManagementOutboundTransferUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.OutboundTransfer FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementOutboundTransferUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementPayoutMethodUpdatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementPayoutMethodUpdatedEventNotification.cs new file mode 100644 index 0000000000..76849d6496 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementPayoutMethodUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a PayoutMethod is updated. + /// + public class V2MoneyManagementPayoutMethodUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.PayoutMethod FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementPayoutMethodUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementReceivedCreditAvailableEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementReceivedCreditAvailableEventNotification.cs new file mode 100644 index 0000000000..08b4625e9a --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementReceivedCreditAvailableEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a ReceivedCredit's funds are received and are available in your balance. + /// + public class V2MoneyManagementReceivedCreditAvailableEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.ReceivedCredit FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementReceivedCreditAvailableEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementReceivedCreditFailedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementReceivedCreditFailedEventNotification.cs new file mode 100644 index 0000000000..43ad26a351 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementReceivedCreditFailedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a ReceivedCredit is attempted to your balance and fails. See the + /// status_details for more information. + /// + public class V2MoneyManagementReceivedCreditFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.ReceivedCredit FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementReceivedCreditFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementReceivedCreditReturnedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementReceivedCreditReturnedEventNotification.cs new file mode 100644 index 0000000000..d099eabbfd --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementReceivedCreditReturnedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a ReceivedCredit is reversed, returned to the originator, and deducted from + /// your balance. + /// + public class V2MoneyManagementReceivedCreditReturnedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.ReceivedCredit FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementReceivedCreditReturnedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementReceivedCreditSucceededEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementReceivedCreditSucceededEventNotification.cs new file mode 100644 index 0000000000..35fd575f78 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementReceivedCreditSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a ReceivedCredit succeeds. + /// + public class V2MoneyManagementReceivedCreditSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.ReceivedCredit FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementReceivedCreditSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementReceivedDebitCanceledEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitCanceledEventNotification.cs new file mode 100644 index 0000000000..affe7fc5a6 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a ReceivedDebit is canceled. + /// + public class V2MoneyManagementReceivedDebitCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.ReceivedDebit FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementReceivedDebitCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementReceivedDebitFailedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitFailedEventNotification.cs new file mode 100644 index 0000000000..419b6d01db --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitFailedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a ReceivedDebit fails. + /// + public class V2MoneyManagementReceivedDebitFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.ReceivedDebit FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementReceivedDebitFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementReceivedDebitPendingEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitPendingEventNotification.cs new file mode 100644 index 0000000000..4ec9cb4342 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitPendingEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a ReceivedDebit is set to pending. + /// + public class V2MoneyManagementReceivedDebitPendingEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.ReceivedDebit FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementReceivedDebitPendingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementReceivedDebitSucceededEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitSucceededEventNotification.cs new file mode 100644 index 0000000000..662455b4e5 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a ReceivedDebit succeeds. + /// + public class V2MoneyManagementReceivedDebitSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.ReceivedDebit FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementReceivedDebitSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementReceivedDebitUpdatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitUpdatedEventNotification.cs new file mode 100644 index 0000000000..ceefc1218e --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementReceivedDebitUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a ReceivedDebit is updated. + /// + public class V2MoneyManagementReceivedDebitUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.ReceivedDebit FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementReceivedDebitUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementRecipientVerificationCreatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementRecipientVerificationCreatedEventNotification.cs new file mode 100644 index 0000000000..15f081ca14 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementRecipientVerificationCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RecipientVerification is created. + /// + public class V2MoneyManagementRecipientVerificationCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.RecipientVerification FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementRecipientVerificationCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementRecipientVerificationUpdatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementRecipientVerificationUpdatedEventNotification.cs new file mode 100644 index 0000000000..43e7a217f6 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementRecipientVerificationUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a RecipientVerification is updated. + /// + public class V2MoneyManagementRecipientVerificationUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.RecipientVerification FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementRecipientVerificationUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventNotification.cs new file mode 100644 index 0000000000..abd7fbda32 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Transaction is created. + /// + public class V2MoneyManagementTransactionCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.Transaction FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementTransactionCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementTransactionUpdatedEventNotification.cs b/src/Stripe.net/Events/V2MoneyManagementTransactionUpdatedEventNotification.cs new file mode 100644 index 0000000000..77b55ffac9 --- /dev/null +++ b/src/Stripe.net/Events/V2MoneyManagementTransactionUpdatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Occurs when a Transaction is updated. + /// + public class V2MoneyManagementTransactionUpdatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.MoneyManagement.Transaction FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2MoneyManagementTransactionUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.cs new file mode 100644 index 0000000000..847fa322ca --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Sent after a failed authorization if there are still retries available on the + /// OffSessionPayment. + /// + public class V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.cs new file mode 100644 index 0000000000..7ac123da84 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Sent when our internal scheduling system kicks off an attempt at authorization, whether + /// it's a retry or an initial authorization. + /// + public class V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCanceledEventNotification.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCanceledEventNotification.cs new file mode 100644 index 0000000000..c77ba010a7 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCanceledEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Sent immediately following a user's call to the Off-Session Payments cancel endpoint. + /// + public class V2PaymentsOffSessionPaymentCanceledEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2PaymentsOffSessionPaymentCanceledEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCreatedEventNotification.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCreatedEventNotification.cs new file mode 100644 index 0000000000..f8ee31fd98 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentCreatedEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Sent immediately following a user's call to the Off-Session Payments create endpoint. + /// + public class V2PaymentsOffSessionPaymentCreatedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2PaymentsOffSessionPaymentCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentFailedEventNotification.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentFailedEventNotification.cs new file mode 100644 index 0000000000..1bdba07e49 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentFailedEventNotification.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Sent after a failed authorization if there are no retries remaining, or if the failure + /// is unretryable. + /// + public class V2PaymentsOffSessionPaymentFailedEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2PaymentsOffSessionPaymentFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2PaymentsOffSessionPaymentSucceededEventNotification.cs b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentSucceededEventNotification.cs new file mode 100644 index 0000000000..cac1da80b6 --- /dev/null +++ b/src/Stripe.net/Events/V2PaymentsOffSessionPaymentSucceededEventNotification.cs @@ -0,0 +1,53 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Sent immediately after a successful authorization. + /// + public class V2PaymentsOffSessionPaymentSucceededEventNotification : V2.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + + public V2.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Payments.OffSessionPayment FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2PaymentsOffSessionPaymentSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Infrastructure/JsonConverters/STJV2EventNotificationConverter.cs b/src/Stripe.net/Infrastructure/JsonConverters/STJV2EventNotificationConverter.cs new file mode 100644 index 0000000000..1ac0a31b62 --- /dev/null +++ b/src/Stripe.net/Infrastructure/JsonConverters/STJV2EventNotificationConverter.cs @@ -0,0 +1,41 @@ +#if NET6_0_OR_GREATER +namespace Stripe.Infrastructure +{ + using System; + using System.Reflection; + using System.Text.Json; + using System.Text.Json.Serialization; + using static Stripe.Infrastructure.SerializablePropertyCache; + + /// + /// Converts a to JSON, including any fields + /// in derived classes. + /// + internal class STJV2EventNotificationConverter : STJDefaultConverter + { + /// + /// Reads the JSON representation of the object. + /// + /// The to read from. + /// Type of the object. + /// The calling serializer's options. + /// The object value. + public override V2.EventNotification Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + throw new NotSupportedException("STJV2EventConverter should only be used while serializing."); + } + + /// + /// Determines whether this instance can convert the specified object type. + /// + /// Type of the object. + /// + /// true if this instance can convert the specified object type; otherwise, false. + /// + public override bool CanConvert(Type objectType) + { + return typeof(Stripe.V2.EventNotification).GetTypeInfo().IsAssignableFrom(objectType.GetTypeInfo()); + } + } +} +#endif diff --git a/src/Stripe.net/Infrastructure/JsonConverters/V2EventConverter.cs b/src/Stripe.net/Infrastructure/JsonConverters/V2EventConverter.cs index 44ef81aa67..4e617a80dc 100644 --- a/src/Stripe.net/Infrastructure/JsonConverters/V2EventConverter.cs +++ b/src/Stripe.net/Infrastructure/JsonConverters/V2EventConverter.cs @@ -6,7 +6,7 @@ namespace Stripe.Infrastructure using Newtonsoft.Json.Linq; /// - /// This converter deserializes Stripe thin events, which are polymorphic and discriminated by the value + /// This converter deserializes Stripe's V2 Events, which are polymorphic and discriminated by the value /// of a property named "type". /// internal class V2EventConverter : JsonConverter @@ -31,7 +31,7 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist // class to deserialize into. var typeValue = (string)jsonObject["type"]; - Type concreteType = StripeTypeRegistry.GetConcreteThinEventType(typeValue); + Type concreteType = StripeTypeRegistry.GetConcreteV2EventType(typeValue); if (concreteType == null) { // If "type" is unknown by this SDK, default to the generic ThinEvent type. diff --git a/src/Stripe.net/Infrastructure/JsonConverters/V2EventNotificationConverter.cs b/src/Stripe.net/Infrastructure/JsonConverters/V2EventNotificationConverter.cs new file mode 100644 index 0000000000..70d0125db0 --- /dev/null +++ b/src/Stripe.net/Infrastructure/JsonConverters/V2EventNotificationConverter.cs @@ -0,0 +1,48 @@ +namespace Stripe.Infrastructure +{ + using System; + using System.Reflection; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + + /// + /// This converter deserializes Stripe Event Notifications, which are polymorphic and discriminated by the value + /// of a property named "type". + /// + internal class V2EventNotificationConverter : V2EventConverter + { + // mostly copied from the parent, but with different types + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) + { + return null; + } + + var jsonObject = JObject.Load(reader); + + // For V2 events, the "type" property is the discriminant that determines the specific + // class to deserialize into. + var typeValue = (string)jsonObject["type"]; + + Type concreteType = StripeTypeRegistry.GetConcreteV2EventNotificationType(typeValue) ?? typeof(V2.UnknownEventNotification); + + using var subReader = jsonObject.CreateReader(); + var e = Activator.CreateInstance(concreteType); + serializer.Populate(subReader, e); + return e; + } + + /// + /// Determines whether this instance can convert the specified object type. + /// + /// Type of the object. + /// + /// true if this instance can convert the specified object type; otherwise, false. + /// + public override bool CanConvert(Type objectType) + { + return objectType.GetTypeInfo() == typeof(V2.EventNotification); + } + } +} diff --git a/src/Stripe.net/Infrastructure/Public/EventNotification.cs b/src/Stripe.net/Infrastructure/Public/EventNotification.cs new file mode 100644 index 0000000000..5c4a0e10e7 --- /dev/null +++ b/src/Stripe.net/Infrastructure/Public/EventNotification.cs @@ -0,0 +1,150 @@ +namespace Stripe.V2 +{ + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// An EventNotification, which is delivered to an Event Destination to tell you that an Event has happened. + /// + [JsonConverter(typeof(V2EventNotificationConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJV2EventNotificationConverter))] +#endif + public class EventNotification + { + /// + /// Unique identifier for the event. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; internal set; } + + /// + /// The type of the event. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; internal set; } + + /// + /// Time at which the object was created. + /// + [JsonProperty("created")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] +#endif + public DateTime Created { get; internal set; } + + /// + /// Livemode indicates if the event is from a production(true) or test(false) account. + /// + [JsonProperty("livemode")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("livemode")] +#endif + public bool Livemode { get; internal set; } + +#nullable enable + /// + /// [Optional] Reason for the event. + /// + [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif + public EventNotificationReason? Reason { get; internal set; } + + /// + /// [Optional] Authentication context needed to fetch the event or related object. + /// + [JsonProperty("context")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("context")] +#endif + public string? Context { get; internal set; } + + protected StripeClient? Client { get; set; } + + /// + /// Helper for constructing an Event Notification. Doesn't perform signature validation, so you + /// should use instead for + /// initial handling. This is useful in unit tests and working with EventNotifications that you've + /// already validated the authenticity of. + /// + /// JSON body for an EventNotification. + /// A StripeClient instance that will be used to make requests. + /// + public static EventNotification FromJson(string payload, StripeClient client) + { + var en = JsonUtils.DeserializeObject(payload, client.GetJsonSerializationSettings()); + + en.Client = client; + + return en; + } + + protected internal T FetchEvent() + where T : V2.Event + { + return this.FetchEventAsync().ConfigureAwait(false).GetAwaiter().GetResult(); + } + + protected async Task FetchEventAsync(CancellationToken cancellationToken = default) + where T : V2.Event + { + if (this.Client == null) + { + throw new Exception("EventNotification is trying to make a request with no client."); + } + + return (T)await this.Client.V2.Core.Events.GetAsync( + this.Id, + requestOptions: new RequestOptions + { + Usage = new List { "fetch_event" }, + StripeContext = this.Context, + }, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + + protected virtual T FetchRelatedObject(EventNotificationRelatedObject relatedObject) + where T : IStripeEntity + { + return this.FetchRelatedObjectAsync(relatedObject).ConfigureAwait(false).GetAwaiter().GetResult(); + } + + protected virtual async Task FetchRelatedObjectAsync(EventNotificationRelatedObject relatedObject, CancellationToken cancellationToken = default) + where T : IStripeEntity + { + if (this.Client == null) + { + throw new Exception("EventNotification is trying to make a request with no client."); + } + + var res = await this.Client.RawRequestAsync( + HttpMethod.Get, + relatedObject.Url, + requestOptions: new RawRequestOptions + { + Usage = new List { "fetch_related_object" }, + StripeContext = this.Context, + }, + cancellationToken: cancellationToken) + .ConfigureAwait(false); + + return this.Client.Deserialize(res.Content); + } + } +} diff --git a/src/Stripe.net/Infrastructure/Public/EventNotificationReason.cs b/src/Stripe.net/Infrastructure/Public/EventNotificationReason.cs new file mode 100644 index 0000000000..9c72290d7f --- /dev/null +++ b/src/Stripe.net/Infrastructure/Public/EventNotificationReason.cs @@ -0,0 +1,31 @@ +namespace Stripe.V2 +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// The non-StripeEntity version of a Reason. + /// + public class EventNotificationReason + { + /// + /// Event reason type. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + + /// + /// Information on the API request that instigated the event. + /// + [JsonProperty("request")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("request")] +#endif + public EventNotificationReasonRequest Request { get; set; } + } +} diff --git a/src/Stripe.net/Infrastructure/Public/EventNotificationReasonRequest.cs b/src/Stripe.net/Infrastructure/Public/EventNotificationReasonRequest.cs new file mode 100644 index 0000000000..050ff8a154 --- /dev/null +++ b/src/Stripe.net/Infrastructure/Public/EventNotificationReasonRequest.cs @@ -0,0 +1,31 @@ +namespace Stripe.V2 +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// The non-StripeEntity version of a ReasonRequest. + /// + public class EventNotificationReasonRequest + { + /// + /// ID of the API request that caused the event. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + + /// + /// The idempotency key transmitted during the request. + /// + [JsonProperty("idempotency_key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("idempotency_key")] +#endif + public string IdempotencyKey { get; set; } + } +} diff --git a/src/Stripe.net/Infrastructure/Public/ThinEventRelatedObject.cs b/src/Stripe.net/Infrastructure/Public/EventNotificationRelatedObject.cs similarity index 89% rename from src/Stripe.net/Infrastructure/Public/ThinEventRelatedObject.cs rename to src/Stripe.net/Infrastructure/Public/EventNotificationRelatedObject.cs index c60391743c..39f9155369 100644 --- a/src/Stripe.net/Infrastructure/Public/ThinEventRelatedObject.cs +++ b/src/Stripe.net/Infrastructure/Public/EventNotificationRelatedObject.cs @@ -1,13 +1,13 @@ #nullable disable -namespace Stripe +namespace Stripe.V2 { using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif - public class ThinEventRelatedObject + public class EventNotificationRelatedObject { [JsonProperty("id")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Infrastructure/Public/StripeClient.cs b/src/Stripe.net/Infrastructure/Public/StripeClient.cs index 9919800c8f..1c499f594e 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeClient.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeClient.cs @@ -8,6 +8,7 @@ namespace Stripe using System.Threading.Tasks; using Newtonsoft.Json; using Stripe.Infrastructure; + using Stripe.V2; /// /// A Stripe client, used to issue requests to Stripe's API and deserialize responses. @@ -203,7 +204,7 @@ public async Task RawRequestAsync( } /// - /// Parses a JSON string from a Stripe webhook into a object, while + /// Parses a JSON string from a Stripe webhook into a object, while /// verifying the webhook's /// signature. /// @@ -213,12 +214,12 @@ public async Task RawRequestAsync( /// /// The webhook endpoint's signing secret. /// The time tolerance, in seconds (default 300). - /// The deserialized . + /// The deserialized . /// /// Thrown if the signature verification fails for any reason, of if the API version of the /// event doesn't match Stripe.net's default API version. /// - public ThinEvent ParseThinEvent( + public EventNotification ParseEventNotification( string json, string stripeSignatureHeader, string secret, @@ -226,9 +227,12 @@ public ThinEvent ParseThinEvent( { EventUtility.ValidateSignature(json, stripeSignatureHeader, secret, tolerance, DateTimeOffset.UtcNow.ToUnixTimeSeconds()); - var thinEvent = JsonUtils.DeserializeObject(json, this.jsonSerializerSettings); + return EventNotification.FromJson(json, this); + } - return thinEvent; + internal JsonSerializerSettings GetJsonSerializationSettings() + { + return this.jsonSerializerSettings; } } } diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index 8c0c5dfad4..b683ebe316 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -331,10 +331,10 @@ public static class StripeTypeRegistry // V2ObjectsToTypes: The end of the section generated from our OpenAPI spec }); - internal static readonly IReadOnlyDictionary V2TypesToEventTypes = new ReadOnlyDictionary( + internal static readonly IReadOnlyDictionary V2EventsToTypes = new ReadOnlyDictionary( new Dictionary { - // ThinTypesToEventTypes: The beginning of the section generated from our OpenAPI spec + // V2EventsToTypes: The beginning of the section generated from our OpenAPI spec { "v1.account.updated", typeof(Events.V1AccountUpdatedEvent) }, { "v1.application_fee.created", typeof(Events.V1ApplicationFeeCreatedEvent) }, { "v1.application_fee.refunded", typeof(Events.V1ApplicationFeeRefundedEvent) }, @@ -1238,7 +1238,1067 @@ public static class StripeTypeRegistry Events.V2PaymentsOffSessionPaymentSucceededEvent) }, - // ThinTypesToEventTypes: The end of the section generated from our OpenAPI spec + // V2EventsToTypes: The end of the section generated from our OpenAPI spec + }); + + internal static readonly IReadOnlyDictionary V2EventNotificationsToTypes = new ReadOnlyDictionary( + new Dictionary + { + // V2EventNotificationsToTypes: The beginning of the section generated from our OpenAPI spec + { "v1.account.updated", typeof(Events.V1AccountUpdatedEventNotification) }, + { + "v1.application_fee.created", typeof( + Events.V1ApplicationFeeCreatedEventNotification) + }, + { + "v1.application_fee.refunded", typeof( + Events.V1ApplicationFeeRefundedEventNotification) + }, + { + "v1.billing.meter.error_report_triggered", typeof( + Events.V1BillingMeterErrorReportTriggeredEventNotification) + }, + { + "v1.billing.meter.no_meter_found", typeof( + Events.V1BillingMeterNoMeterFoundEventNotification) + }, + { + "v1.billing_portal.configuration.created", typeof( + Events.V1BillingPortalConfigurationCreatedEventNotification) + }, + { + "v1.billing_portal.configuration.updated", typeof( + Events.V1BillingPortalConfigurationUpdatedEventNotification) + }, + { "v1.capability.updated", typeof(Events.V1CapabilityUpdatedEventNotification) }, + { "v1.charge.captured", typeof(Events.V1ChargeCapturedEventNotification) }, + { + "v1.charge.dispute.closed", typeof( + Events.V1ChargeDisputeClosedEventNotification) + }, + { + "v1.charge.dispute.created", typeof( + Events.V1ChargeDisputeCreatedEventNotification) + }, + { + "v1.charge.dispute.funds_reinstated", typeof( + Events.V1ChargeDisputeFundsReinstatedEventNotification) + }, + { + "v1.charge.dispute.funds_withdrawn", typeof( + Events.V1ChargeDisputeFundsWithdrawnEventNotification) + }, + { + "v1.charge.dispute.updated", typeof( + Events.V1ChargeDisputeUpdatedEventNotification) + }, + { "v1.charge.expired", typeof(Events.V1ChargeExpiredEventNotification) }, + { "v1.charge.failed", typeof(Events.V1ChargeFailedEventNotification) }, + { "v1.charge.pending", typeof(Events.V1ChargePendingEventNotification) }, + { + "v1.charge.refund.updated", typeof( + Events.V1ChargeRefundUpdatedEventNotification) + }, + { "v1.charge.refunded", typeof(Events.V1ChargeRefundedEventNotification) }, + { "v1.charge.succeeded", typeof(Events.V1ChargeSucceededEventNotification) }, + { "v1.charge.updated", typeof(Events.V1ChargeUpdatedEventNotification) }, + { + "v1.checkout.session.async_payment_failed", typeof( + Events.V1CheckoutSessionAsyncPaymentFailedEventNotification) + }, + { + "v1.checkout.session.async_payment_succeeded", typeof( + Events.V1CheckoutSessionAsyncPaymentSucceededEventNotification) + }, + { + "v1.checkout.session.completed", typeof( + Events.V1CheckoutSessionCompletedEventNotification) + }, + { + "v1.checkout.session.expired", typeof( + Events.V1CheckoutSessionExpiredEventNotification) + }, + { + "v1.climate.order.canceled", typeof( + Events.V1ClimateOrderCanceledEventNotification) + }, + { + "v1.climate.order.created", typeof( + Events.V1ClimateOrderCreatedEventNotification) + }, + { + "v1.climate.order.delayed", typeof( + Events.V1ClimateOrderDelayedEventNotification) + }, + { + "v1.climate.order.delivered", typeof( + Events.V1ClimateOrderDeliveredEventNotification) + }, + { + "v1.climate.order.product_substituted", typeof( + Events.V1ClimateOrderProductSubstitutedEventNotification) + }, + { + "v1.climate.product.created", typeof( + Events.V1ClimateProductCreatedEventNotification) + }, + { + "v1.climate.product.pricing_updated", typeof( + Events.V1ClimateProductPricingUpdatedEventNotification) + }, + { "v1.coupon.created", typeof(Events.V1CouponCreatedEventNotification) }, + { "v1.coupon.deleted", typeof(Events.V1CouponDeletedEventNotification) }, + { "v1.coupon.updated", typeof(Events.V1CouponUpdatedEventNotification) }, + { + "v1.credit_note.created", typeof( + Events.V1CreditNoteCreatedEventNotification) + }, + { + "v1.credit_note.updated", typeof( + Events.V1CreditNoteUpdatedEventNotification) + }, + { "v1.credit_note.voided", typeof(Events.V1CreditNoteVoidedEventNotification) }, + { "v1.customer.created", typeof(Events.V1CustomerCreatedEventNotification) }, + { "v1.customer.deleted", typeof(Events.V1CustomerDeletedEventNotification) }, + { + "v1.customer.discount.created", typeof( + Events.V1CustomerDiscountCreatedEventNotification) + }, + { + "v1.customer.discount.deleted", typeof( + Events.V1CustomerDiscountDeletedEventNotification) + }, + { + "v1.customer.discount.updated", typeof( + Events.V1CustomerDiscountUpdatedEventNotification) + }, + { + "v1.customer.subscription.created", typeof( + Events.V1CustomerSubscriptionCreatedEventNotification) + }, + { + "v1.customer.subscription.deleted", typeof( + Events.V1CustomerSubscriptionDeletedEventNotification) + }, + { + "v1.customer.subscription.paused", typeof( + Events.V1CustomerSubscriptionPausedEventNotification) + }, + { + "v1.customer.subscription.pending_update_applied", typeof( + Events.V1CustomerSubscriptionPendingUpdateAppliedEventNotification) + }, + { + "v1.customer.subscription.pending_update_expired", typeof( + Events.V1CustomerSubscriptionPendingUpdateExpiredEventNotification) + }, + { + "v1.customer.subscription.resumed", typeof( + Events.V1CustomerSubscriptionResumedEventNotification) + }, + { + "v1.customer.subscription.trial_will_end", typeof( + Events.V1CustomerSubscriptionTrialWillEndEventNotification) + }, + { + "v1.customer.subscription.updated", typeof( + Events.V1CustomerSubscriptionUpdatedEventNotification) + }, + { + "v1.customer.tax_id.created", typeof( + Events.V1CustomerTaxIdCreatedEventNotification) + }, + { + "v1.customer.tax_id.deleted", typeof( + Events.V1CustomerTaxIdDeletedEventNotification) + }, + { + "v1.customer.tax_id.updated", typeof( + Events.V1CustomerTaxIdUpdatedEventNotification) + }, + { "v1.customer.updated", typeof(Events.V1CustomerUpdatedEventNotification) }, + { "v1.file.created", typeof(Events.V1FileCreatedEventNotification) }, + { + "v1.financial_connections.account.created", typeof( + Events.V1FinancialConnectionsAccountCreatedEventNotification) + }, + { + "v1.financial_connections.account.deactivated", typeof( + Events.V1FinancialConnectionsAccountDeactivatedEventNotification) + }, + { + "v1.financial_connections.account.disconnected", typeof( + Events.V1FinancialConnectionsAccountDisconnectedEventNotification) + }, + { + "v1.financial_connections.account.reactivated", typeof( + Events.V1FinancialConnectionsAccountReactivatedEventNotification) + }, + { + "v1.financial_connections.account.refreshed_balance", typeof( + Events.V1FinancialConnectionsAccountRefreshedBalanceEventNotification) + }, + { + "v1.financial_connections.account.refreshed_ownership", typeof( + Events.V1FinancialConnectionsAccountRefreshedOwnershipEventNotification) + }, + { + "v1.financial_connections.account.refreshed_transactions", typeof( + Events.V1FinancialConnectionsAccountRefreshedTransactionsEventNotification) + }, + { + "v1.identity.verification_session.canceled", typeof( + Events.V1IdentityVerificationSessionCanceledEventNotification) + }, + { + "v1.identity.verification_session.created", typeof( + Events.V1IdentityVerificationSessionCreatedEventNotification) + }, + { + "v1.identity.verification_session.processing", typeof( + Events.V1IdentityVerificationSessionProcessingEventNotification) + }, + { + "v1.identity.verification_session.redacted", typeof( + Events.V1IdentityVerificationSessionRedactedEventNotification) + }, + { + "v1.identity.verification_session.requires_input", typeof( + Events.V1IdentityVerificationSessionRequiresInputEventNotification) + }, + { + "v1.identity.verification_session.verified", typeof( + Events.V1IdentityVerificationSessionVerifiedEventNotification) + }, + { "v1.invoice.created", typeof(Events.V1InvoiceCreatedEventNotification) }, + { "v1.invoice.deleted", typeof(Events.V1InvoiceDeletedEventNotification) }, + { + "v1.invoice.finalization_failed", typeof( + Events.V1InvoiceFinalizationFailedEventNotification) + }, + { "v1.invoice.finalized", typeof(Events.V1InvoiceFinalizedEventNotification) }, + { + "v1.invoice.marked_uncollectible", typeof( + Events.V1InvoiceMarkedUncollectibleEventNotification) + }, + { "v1.invoice.overdue", typeof(Events.V1InvoiceOverdueEventNotification) }, + { "v1.invoice.overpaid", typeof(Events.V1InvoiceOverpaidEventNotification) }, + { "v1.invoice.paid", typeof(Events.V1InvoicePaidEventNotification) }, + { + "v1.invoice.payment_action_required", typeof( + Events.V1InvoicePaymentActionRequiredEventNotification) + }, + { + "v1.invoice.payment_failed", typeof( + Events.V1InvoicePaymentFailedEventNotification) + }, + { + "v1.invoice.payment_succeeded", typeof( + Events.V1InvoicePaymentSucceededEventNotification) + }, + { "v1.invoice.sent", typeof(Events.V1InvoiceSentEventNotification) }, + { "v1.invoice.upcoming", typeof(Events.V1InvoiceUpcomingEventNotification) }, + { "v1.invoice.updated", typeof(Events.V1InvoiceUpdatedEventNotification) }, + { "v1.invoice.voided", typeof(Events.V1InvoiceVoidedEventNotification) }, + { "v1.invoice.will_be_due", typeof(Events.V1InvoiceWillBeDueEventNotification) }, + { + "v1.invoice_payment.paid", typeof( + Events.V1InvoicePaymentPaidEventNotification) + }, + { + "v1.invoiceitem.created", typeof( + Events.V1InvoiceitemCreatedEventNotification) + }, + { + "v1.invoiceitem.deleted", typeof( + Events.V1InvoiceitemDeletedEventNotification) + }, + { + "v1.issuing_authorization.created", typeof( + Events.V1IssuingAuthorizationCreatedEventNotification) + }, + { + "v1.issuing_authorization.request", typeof( + Events.V1IssuingAuthorizationRequestEventNotification) + }, + { + "v1.issuing_authorization.updated", typeof( + Events.V1IssuingAuthorizationUpdatedEventNotification) + }, + { + "v1.issuing_card.created", typeof( + Events.V1IssuingCardCreatedEventNotification) + }, + { + "v1.issuing_card.updated", typeof( + Events.V1IssuingCardUpdatedEventNotification) + }, + { + "v1.issuing_cardholder.created", typeof( + Events.V1IssuingCardholderCreatedEventNotification) + }, + { + "v1.issuing_cardholder.updated", typeof( + Events.V1IssuingCardholderUpdatedEventNotification) + }, + { + "v1.issuing_dispute.closed", typeof( + Events.V1IssuingDisputeClosedEventNotification) + }, + { + "v1.issuing_dispute.created", typeof( + Events.V1IssuingDisputeCreatedEventNotification) + }, + { + "v1.issuing_dispute.funds_reinstated", typeof( + Events.V1IssuingDisputeFundsReinstatedEventNotification) + }, + { + "v1.issuing_dispute.funds_rescinded", typeof( + Events.V1IssuingDisputeFundsRescindedEventNotification) + }, + { + "v1.issuing_dispute.submitted", typeof( + Events.V1IssuingDisputeSubmittedEventNotification) + }, + { + "v1.issuing_dispute.updated", typeof( + Events.V1IssuingDisputeUpdatedEventNotification) + }, + { + "v1.issuing_personalization_design.activated", typeof( + Events.V1IssuingPersonalizationDesignActivatedEventNotification) + }, + { + "v1.issuing_personalization_design.deactivated", typeof( + Events.V1IssuingPersonalizationDesignDeactivatedEventNotification) + }, + { + "v1.issuing_personalization_design.rejected", typeof( + Events.V1IssuingPersonalizationDesignRejectedEventNotification) + }, + { + "v1.issuing_personalization_design.updated", typeof( + Events.V1IssuingPersonalizationDesignUpdatedEventNotification) + }, + { + "v1.issuing_token.created", typeof( + Events.V1IssuingTokenCreatedEventNotification) + }, + { + "v1.issuing_token.updated", typeof( + Events.V1IssuingTokenUpdatedEventNotification) + }, + { + "v1.issuing_transaction.created", typeof( + Events.V1IssuingTransactionCreatedEventNotification) + }, + { + "v1.issuing_transaction.purchase_details_receipt_updated", typeof( + Events.V1IssuingTransactionPurchaseDetailsReceiptUpdatedEventNotification) + }, + { + "v1.issuing_transaction.updated", typeof( + Events.V1IssuingTransactionUpdatedEventNotification) + }, + { "v1.mandate.updated", typeof(Events.V1MandateUpdatedEventNotification) }, + { + "v1.payment_intent.amount_capturable_updated", typeof( + Events.V1PaymentIntentAmountCapturableUpdatedEventNotification) + }, + { + "v1.payment_intent.canceled", typeof( + Events.V1PaymentIntentCanceledEventNotification) + }, + { + "v1.payment_intent.created", typeof( + Events.V1PaymentIntentCreatedEventNotification) + }, + { + "v1.payment_intent.partially_funded", typeof( + Events.V1PaymentIntentPartiallyFundedEventNotification) + }, + { + "v1.payment_intent.payment_failed", typeof( + Events.V1PaymentIntentPaymentFailedEventNotification) + }, + { + "v1.payment_intent.processing", typeof( + Events.V1PaymentIntentProcessingEventNotification) + }, + { + "v1.payment_intent.requires_action", typeof( + Events.V1PaymentIntentRequiresActionEventNotification) + }, + { + "v1.payment_intent.succeeded", typeof( + Events.V1PaymentIntentSucceededEventNotification) + }, + { + "v1.payment_link.created", typeof( + Events.V1PaymentLinkCreatedEventNotification) + }, + { + "v1.payment_link.updated", typeof( + Events.V1PaymentLinkUpdatedEventNotification) + }, + { + "v1.payment_method.attached", typeof( + Events.V1PaymentMethodAttachedEventNotification) + }, + { + "v1.payment_method.automatically_updated", typeof( + Events.V1PaymentMethodAutomaticallyUpdatedEventNotification) + }, + { + "v1.payment_method.detached", typeof( + Events.V1PaymentMethodDetachedEventNotification) + }, + { + "v1.payment_method.updated", typeof( + Events.V1PaymentMethodUpdatedEventNotification) + }, + { "v1.payout.canceled", typeof(Events.V1PayoutCanceledEventNotification) }, + { "v1.payout.created", typeof(Events.V1PayoutCreatedEventNotification) }, + { "v1.payout.failed", typeof(Events.V1PayoutFailedEventNotification) }, + { "v1.payout.paid", typeof(Events.V1PayoutPaidEventNotification) }, + { + "v1.payout.reconciliation_completed", typeof( + Events.V1PayoutReconciliationCompletedEventNotification) + }, + { "v1.payout.updated", typeof(Events.V1PayoutUpdatedEventNotification) }, + { "v1.person.created", typeof(Events.V1PersonCreatedEventNotification) }, + { "v1.person.deleted", typeof(Events.V1PersonDeletedEventNotification) }, + { "v1.person.updated", typeof(Events.V1PersonUpdatedEventNotification) }, + { "v1.plan.created", typeof(Events.V1PlanCreatedEventNotification) }, + { "v1.plan.deleted", typeof(Events.V1PlanDeletedEventNotification) }, + { "v1.plan.updated", typeof(Events.V1PlanUpdatedEventNotification) }, + { "v1.price.created", typeof(Events.V1PriceCreatedEventNotification) }, + { "v1.price.deleted", typeof(Events.V1PriceDeletedEventNotification) }, + { "v1.price.updated", typeof(Events.V1PriceUpdatedEventNotification) }, + { "v1.product.created", typeof(Events.V1ProductCreatedEventNotification) }, + { "v1.product.deleted", typeof(Events.V1ProductDeletedEventNotification) }, + { "v1.product.updated", typeof(Events.V1ProductUpdatedEventNotification) }, + { + "v1.promotion_code.created", typeof( + Events.V1PromotionCodeCreatedEventNotification) + }, + { + "v1.promotion_code.updated", typeof( + Events.V1PromotionCodeUpdatedEventNotification) + }, + { "v1.quote.accepted", typeof(Events.V1QuoteAcceptedEventNotification) }, + { "v1.quote.canceled", typeof(Events.V1QuoteCanceledEventNotification) }, + { "v1.quote.created", typeof(Events.V1QuoteCreatedEventNotification) }, + { "v1.quote.finalized", typeof(Events.V1QuoteFinalizedEventNotification) }, + { + "v1.radar.early_fraud_warning.created", typeof( + Events.V1RadarEarlyFraudWarningCreatedEventNotification) + }, + { + "v1.radar.early_fraud_warning.updated", typeof( + Events.V1RadarEarlyFraudWarningUpdatedEventNotification) + }, + { "v1.refund.created", typeof(Events.V1RefundCreatedEventNotification) }, + { "v1.refund.failed", typeof(Events.V1RefundFailedEventNotification) }, + { "v1.refund.updated", typeof(Events.V1RefundUpdatedEventNotification) }, + { "v1.review.closed", typeof(Events.V1ReviewClosedEventNotification) }, + { "v1.review.opened", typeof(Events.V1ReviewOpenedEventNotification) }, + { + "v1.setup_intent.canceled", typeof( + Events.V1SetupIntentCanceledEventNotification) + }, + { + "v1.setup_intent.created", typeof( + Events.V1SetupIntentCreatedEventNotification) + }, + { + "v1.setup_intent.requires_action", typeof( + Events.V1SetupIntentRequiresActionEventNotification) + }, + { + "v1.setup_intent.setup_failed", typeof( + Events.V1SetupIntentSetupFailedEventNotification) + }, + { + "v1.setup_intent.succeeded", typeof( + Events.V1SetupIntentSucceededEventNotification) + }, + { + "v1.sigma.scheduled_query_run.created", typeof( + Events.V1SigmaScheduledQueryRunCreatedEventNotification) + }, + { "v1.source.canceled", typeof(Events.V1SourceCanceledEventNotification) }, + { "v1.source.chargeable", typeof(Events.V1SourceChargeableEventNotification) }, + { "v1.source.failed", typeof(Events.V1SourceFailedEventNotification) }, + { + "v1.source.refund_attributes_required", typeof( + Events.V1SourceRefundAttributesRequiredEventNotification) + }, + { + "v1.subscription_schedule.aborted", typeof( + Events.V1SubscriptionScheduleAbortedEventNotification) + }, + { + "v1.subscription_schedule.canceled", typeof( + Events.V1SubscriptionScheduleCanceledEventNotification) + }, + { + "v1.subscription_schedule.completed", typeof( + Events.V1SubscriptionScheduleCompletedEventNotification) + }, + { + "v1.subscription_schedule.created", typeof( + Events.V1SubscriptionScheduleCreatedEventNotification) + }, + { + "v1.subscription_schedule.expiring", typeof( + Events.V1SubscriptionScheduleExpiringEventNotification) + }, + { + "v1.subscription_schedule.released", typeof( + Events.V1SubscriptionScheduleReleasedEventNotification) + }, + { + "v1.subscription_schedule.updated", typeof( + Events.V1SubscriptionScheduleUpdatedEventNotification) + }, + { "v1.tax_rate.created", typeof(Events.V1TaxRateCreatedEventNotification) }, + { "v1.tax_rate.updated", typeof(Events.V1TaxRateUpdatedEventNotification) }, + { + "v1.terminal.reader.action_failed", typeof( + Events.V1TerminalReaderActionFailedEventNotification) + }, + { + "v1.terminal.reader.action_succeeded", typeof( + Events.V1TerminalReaderActionSucceededEventNotification) + }, + { + "v1.terminal.reader.action_updated", typeof( + Events.V1TerminalReaderActionUpdatedEventNotification) + }, + { + "v1.test_helpers.test_clock.advancing", typeof( + Events.V1TestHelpersTestClockAdvancingEventNotification) + }, + { + "v1.test_helpers.test_clock.created", typeof( + Events.V1TestHelpersTestClockCreatedEventNotification) + }, + { + "v1.test_helpers.test_clock.deleted", typeof( + Events.V1TestHelpersTestClockDeletedEventNotification) + }, + { + "v1.test_helpers.test_clock.internal_failure", typeof( + Events.V1TestHelpersTestClockInternalFailureEventNotification) + }, + { + "v1.test_helpers.test_clock.ready", typeof( + Events.V1TestHelpersTestClockReadyEventNotification) + }, + { "v1.topup.canceled", typeof(Events.V1TopupCanceledEventNotification) }, + { "v1.topup.created", typeof(Events.V1TopupCreatedEventNotification) }, + { "v1.topup.failed", typeof(Events.V1TopupFailedEventNotification) }, + { "v1.topup.reversed", typeof(Events.V1TopupReversedEventNotification) }, + { "v1.topup.succeeded", typeof(Events.V1TopupSucceededEventNotification) }, + { "v1.transfer.created", typeof(Events.V1TransferCreatedEventNotification) }, + { "v1.transfer.reversed", typeof(Events.V1TransferReversedEventNotification) }, + { "v1.transfer.updated", typeof(Events.V1TransferUpdatedEventNotification) }, + { + "v2.billing.bill_setting.updated", typeof( + Events.V2BillingBillSettingUpdatedEventNotification) + }, + { + "v2.billing.cadence.billed", typeof( + Events.V2BillingCadenceBilledEventNotification) + }, + { + "v2.billing.cadence.canceled", typeof( + Events.V2BillingCadenceCanceledEventNotification) + }, + { + "v2.billing.cadence.created", typeof( + Events.V2BillingCadenceCreatedEventNotification) + }, + { + "v2.billing.license_fee.created", typeof( + Events.V2BillingLicenseFeeCreatedEventNotification) + }, + { + "v2.billing.license_fee.updated", typeof( + Events.V2BillingLicenseFeeUpdatedEventNotification) + }, + { + "v2.billing.license_fee_version.created", typeof( + Events.V2BillingLicenseFeeVersionCreatedEventNotification) + }, + { + "v2.billing.licensed_item.created", typeof( + Events.V2BillingLicensedItemCreatedEventNotification) + }, + { + "v2.billing.licensed_item.updated", typeof( + Events.V2BillingLicensedItemUpdatedEventNotification) + }, + { + "v2.billing.metered_item.created", typeof( + Events.V2BillingMeteredItemCreatedEventNotification) + }, + { + "v2.billing.metered_item.updated", typeof( + Events.V2BillingMeteredItemUpdatedEventNotification) + }, + { + "v2.billing.pricing_plan.created", typeof( + Events.V2BillingPricingPlanCreatedEventNotification) + }, + { + "v2.billing.pricing_plan.updated", typeof( + Events.V2BillingPricingPlanUpdatedEventNotification) + }, + { + "v2.billing.pricing_plan_component.created", typeof( + Events.V2BillingPricingPlanComponentCreatedEventNotification) + }, + { + "v2.billing.pricing_plan_component.updated", typeof( + Events.V2BillingPricingPlanComponentUpdatedEventNotification) + }, + { + "v2.billing.pricing_plan_subscription.collection_awaiting_customer_action", typeof( + Events.V2BillingPricingPlanSubscriptionCollectionAwaitingCustomerActionEventNotification) + }, + { + "v2.billing.pricing_plan_subscription.collection_current", typeof( + Events.V2BillingPricingPlanSubscriptionCollectionCurrentEventNotification) + }, + { + "v2.billing.pricing_plan_subscription.collection_past_due", typeof( + Events.V2BillingPricingPlanSubscriptionCollectionPastDueEventNotification) + }, + { + "v2.billing.pricing_plan_subscription.collection_paused", typeof( + Events.V2BillingPricingPlanSubscriptionCollectionPausedEventNotification) + }, + { + "v2.billing.pricing_plan_subscription.collection_unpaid", typeof( + Events.V2BillingPricingPlanSubscriptionCollectionUnpaidEventNotification) + }, + { + "v2.billing.pricing_plan_subscription.servicing_activated", typeof( + Events.V2BillingPricingPlanSubscriptionServicingActivatedEventNotification) + }, + { + "v2.billing.pricing_plan_subscription.servicing_canceled", typeof( + Events.V2BillingPricingPlanSubscriptionServicingCanceledEventNotification) + }, + { + "v2.billing.pricing_plan_subscription.servicing_paused", typeof( + Events.V2BillingPricingPlanSubscriptionServicingPausedEventNotification) + }, + { + "v2.billing.pricing_plan_version.created", typeof( + Events.V2BillingPricingPlanVersionCreatedEventNotification) + }, + { + "v2.billing.rate_card.created", typeof( + Events.V2BillingRateCardCreatedEventNotification) + }, + { + "v2.billing.rate_card.updated", typeof( + Events.V2BillingRateCardUpdatedEventNotification) + }, + { + "v2.billing.rate_card_rate.created", typeof( + Events.V2BillingRateCardRateCreatedEventNotification) + }, + { + "v2.billing.rate_card_subscription.activated", typeof( + Events.V2BillingRateCardSubscriptionActivatedEventNotification) + }, + { + "v2.billing.rate_card_subscription.canceled", typeof( + Events.V2BillingRateCardSubscriptionCanceledEventNotification) + }, + { + "v2.billing.rate_card_subscription.collection_awaiting_customer_action", typeof( + Events.V2BillingRateCardSubscriptionCollectionAwaitingCustomerActionEventNotification) + }, + { + "v2.billing.rate_card_subscription.collection_current", typeof( + Events.V2BillingRateCardSubscriptionCollectionCurrentEventNotification) + }, + { + "v2.billing.rate_card_subscription.collection_past_due", typeof( + Events.V2BillingRateCardSubscriptionCollectionPastDueEventNotification) + }, + { + "v2.billing.rate_card_subscription.collection_paused", typeof( + Events.V2BillingRateCardSubscriptionCollectionPausedEventNotification) + }, + { + "v2.billing.rate_card_subscription.collection_unpaid", typeof( + Events.V2BillingRateCardSubscriptionCollectionUnpaidEventNotification) + }, + { + "v2.billing.rate_card_subscription.servicing_activated", typeof( + Events.V2BillingRateCardSubscriptionServicingActivatedEventNotification) + }, + { + "v2.billing.rate_card_subscription.servicing_canceled", typeof( + Events.V2BillingRateCardSubscriptionServicingCanceledEventNotification) + }, + { + "v2.billing.rate_card_subscription.servicing_paused", typeof( + Events.V2BillingRateCardSubscriptionServicingPausedEventNotification) + }, + { + "v2.billing.rate_card_version.created", typeof( + Events.V2BillingRateCardVersionCreatedEventNotification) + }, + { + "v2.core.account.closed", typeof( + Events.V2CoreAccountClosedEventNotification) + }, + { + "v2.core.account.created", typeof( + Events.V2CoreAccountCreatedEventNotification) + }, + { + "v2.core.account.updated", typeof( + Events.V2CoreAccountUpdatedEventNotification) + }, + { + "v2.core.account[configuration.customer].capability_status_updated", typeof( + Events.V2CoreAccountIncludingConfigurationCustomerCapabilityStatusUpdatedEventNotification) + }, + { + "v2.core.account[configuration.customer].updated", typeof( + Events.V2CoreAccountIncludingConfigurationCustomerUpdatedEventNotification) + }, + { + "v2.core.account[configuration.merchant].capability_status_updated", typeof( + Events.V2CoreAccountIncludingConfigurationMerchantCapabilityStatusUpdatedEventNotification) + }, + { + "v2.core.account[configuration.merchant].updated", typeof( + Events.V2CoreAccountIncludingConfigurationMerchantUpdatedEventNotification) + }, + { + "v2.core.account[configuration.recipient].capability_status_updated", typeof( + Events.V2CoreAccountIncludingConfigurationRecipientCapabilityStatusUpdatedEventNotification) + }, + { + "v2.core.account[configuration.recipient].updated", typeof( + Events.V2CoreAccountIncludingConfigurationRecipientUpdatedEventNotification) + }, + { + "v2.core.account[configuration.storer].capability_status_updated", typeof( + Events.V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification) + }, + { + "v2.core.account[configuration.storer].updated", typeof( + Events.V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification) + }, + { + "v2.core.account[defaults].updated", typeof( + Events.V2CoreAccountIncludingDefaultsUpdatedEventNotification) + }, + { + "v2.core.account[identity].updated", typeof( + Events.V2CoreAccountIncludingIdentityUpdatedEventNotification) + }, + { + "v2.core.account[requirements].updated", typeof( + Events.V2CoreAccountIncludingRequirementsUpdatedEventNotification) + }, + { + "v2.core.account_link.returned", typeof( + Events.V2CoreAccountLinkReturnedEventNotification) + }, + { + "v2.core.account_person.created", typeof( + Events.V2CoreAccountPersonCreatedEventNotification) + }, + { + "v2.core.account_person.deleted", typeof( + Events.V2CoreAccountPersonDeletedEventNotification) + }, + { + "v2.core.account_person.updated", typeof( + Events.V2CoreAccountPersonUpdatedEventNotification) + }, + { + "v2.core.claimable_sandbox.claimed", typeof( + Events.V2CoreClaimableSandboxClaimedEventNotification) + }, + { + "v2.core.claimable_sandbox.created", typeof( + Events.V2CoreClaimableSandboxCreatedEventNotification) + }, + { + "v2.core.claimable_sandbox.expired", typeof( + Events.V2CoreClaimableSandboxExpiredEventNotification) + }, + { + "v2.core.claimable_sandbox.expiring", typeof( + Events.V2CoreClaimableSandboxExpiringEventNotification) + }, + { + "v2.core.claimable_sandbox.sandbox_details_owner_account_updated", typeof( + Events.V2CoreClaimableSandboxSandboxDetailsOwnerAccountUpdatedEventNotification) + }, + { + "v2.core.event_destination.ping", typeof( + Events.V2CoreEventDestinationPingEventNotification) + }, + { + "v2.core.health.api_error.firing", typeof( + Events.V2CoreHealthApiErrorFiringEventNotification) + }, + { + "v2.core.health.api_error.resolved", typeof( + Events.V2CoreHealthApiErrorResolvedEventNotification) + }, + { + "v2.core.health.api_latency.firing", typeof( + Events.V2CoreHealthApiLatencyFiringEventNotification) + }, + { + "v2.core.health.api_latency.resolved", typeof( + Events.V2CoreHealthApiLatencyResolvedEventNotification) + }, + { + "v2.core.health.authorization_rate_drop.firing", typeof( + Events.V2CoreHealthAuthorizationRateDropFiringEventNotification) + }, + { + "v2.core.health.authorization_rate_drop.resolved", typeof( + Events.V2CoreHealthAuthorizationRateDropResolvedEventNotification) + }, + { + "v2.core.health.event_generation_failure.resolved", typeof( + Events.V2CoreHealthEventGenerationFailureResolvedEventNotification) + }, + { + "v2.core.health.fraud_rate.increased", typeof( + Events.V2CoreHealthFraudRateIncreasedEventNotification) + }, + { + "v2.core.health.issuing_authorization_request_errors.firing", typeof( + Events.V2CoreHealthIssuingAuthorizationRequestErrorsFiringEventNotification) + }, + { + "v2.core.health.issuing_authorization_request_errors.resolved", typeof( + Events.V2CoreHealthIssuingAuthorizationRequestErrorsResolvedEventNotification) + }, + { + "v2.core.health.issuing_authorization_request_timeout.firing", typeof( + Events.V2CoreHealthIssuingAuthorizationRequestTimeoutFiringEventNotification) + }, + { + "v2.core.health.issuing_authorization_request_timeout.resolved", typeof( + Events.V2CoreHealthIssuingAuthorizationRequestTimeoutResolvedEventNotification) + }, + { + "v2.core.health.payment_method_error.firing", typeof( + Events.V2CoreHealthPaymentMethodErrorFiringEventNotification) + }, + { + "v2.core.health.payment_method_error.resolved", typeof( + Events.V2CoreHealthPaymentMethodErrorResolvedEventNotification) + }, + { + "v2.core.health.traffic_volume_drop.firing", typeof( + Events.V2CoreHealthTrafficVolumeDropFiringEventNotification) + }, + { + "v2.core.health.traffic_volume_drop.resolved", typeof( + Events.V2CoreHealthTrafficVolumeDropResolvedEventNotification) + }, + { + "v2.core.health.webhook_latency.firing", typeof( + Events.V2CoreHealthWebhookLatencyFiringEventNotification) + }, + { + "v2.core.health.webhook_latency.resolved", typeof( + Events.V2CoreHealthWebhookLatencyResolvedEventNotification) + }, + { + "v2.money_management.adjustment.created", typeof( + Events.V2MoneyManagementAdjustmentCreatedEventNotification) + }, + { + "v2.money_management.financial_account.created", typeof( + Events.V2MoneyManagementFinancialAccountCreatedEventNotification) + }, + { + "v2.money_management.financial_account.updated", typeof( + Events.V2MoneyManagementFinancialAccountUpdatedEventNotification) + }, + { + "v2.money_management.financial_address.activated", typeof( + Events.V2MoneyManagementFinancialAddressActivatedEventNotification) + }, + { + "v2.money_management.financial_address.failed", typeof( + Events.V2MoneyManagementFinancialAddressFailedEventNotification) + }, + { + "v2.money_management.inbound_transfer.available", typeof( + Events.V2MoneyManagementInboundTransferAvailableEventNotification) + }, + { + "v2.money_management.inbound_transfer.bank_debit_failed", typeof( + Events.V2MoneyManagementInboundTransferBankDebitFailedEventNotification) + }, + { + "v2.money_management.inbound_transfer.bank_debit_processing", typeof( + Events.V2MoneyManagementInboundTransferBankDebitProcessingEventNotification) + }, + { + "v2.money_management.inbound_transfer.bank_debit_queued", typeof( + Events.V2MoneyManagementInboundTransferBankDebitQueuedEventNotification) + }, + { + "v2.money_management.inbound_transfer.bank_debit_returned", typeof( + Events.V2MoneyManagementInboundTransferBankDebitReturnedEventNotification) + }, + { + "v2.money_management.inbound_transfer.bank_debit_succeeded", typeof( + Events.V2MoneyManagementInboundTransferBankDebitSucceededEventNotification) + }, + { + "v2.money_management.outbound_payment.canceled", typeof( + Events.V2MoneyManagementOutboundPaymentCanceledEventNotification) + }, + { + "v2.money_management.outbound_payment.created", typeof( + Events.V2MoneyManagementOutboundPaymentCreatedEventNotification) + }, + { + "v2.money_management.outbound_payment.failed", typeof( + Events.V2MoneyManagementOutboundPaymentFailedEventNotification) + }, + { + "v2.money_management.outbound_payment.posted", typeof( + Events.V2MoneyManagementOutboundPaymentPostedEventNotification) + }, + { + "v2.money_management.outbound_payment.returned", typeof( + Events.V2MoneyManagementOutboundPaymentReturnedEventNotification) + }, + { + "v2.money_management.outbound_payment.updated", typeof( + Events.V2MoneyManagementOutboundPaymentUpdatedEventNotification) + }, + { + "v2.money_management.outbound_transfer.canceled", typeof( + Events.V2MoneyManagementOutboundTransferCanceledEventNotification) + }, + { + "v2.money_management.outbound_transfer.created", typeof( + Events.V2MoneyManagementOutboundTransferCreatedEventNotification) + }, + { + "v2.money_management.outbound_transfer.failed", typeof( + Events.V2MoneyManagementOutboundTransferFailedEventNotification) + }, + { + "v2.money_management.outbound_transfer.posted", typeof( + Events.V2MoneyManagementOutboundTransferPostedEventNotification) + }, + { + "v2.money_management.outbound_transfer.returned", typeof( + Events.V2MoneyManagementOutboundTransferReturnedEventNotification) + }, + { + "v2.money_management.outbound_transfer.updated", typeof( + Events.V2MoneyManagementOutboundTransferUpdatedEventNotification) + }, + { + "v2.money_management.payout_method.updated", typeof( + Events.V2MoneyManagementPayoutMethodUpdatedEventNotification) + }, + { + "v2.money_management.received_credit.available", typeof( + Events.V2MoneyManagementReceivedCreditAvailableEventNotification) + }, + { + "v2.money_management.received_credit.failed", typeof( + Events.V2MoneyManagementReceivedCreditFailedEventNotification) + }, + { + "v2.money_management.received_credit.returned", typeof( + Events.V2MoneyManagementReceivedCreditReturnedEventNotification) + }, + { + "v2.money_management.received_credit.succeeded", typeof( + Events.V2MoneyManagementReceivedCreditSucceededEventNotification) + }, + { + "v2.money_management.received_debit.canceled", typeof( + Events.V2MoneyManagementReceivedDebitCanceledEventNotification) + }, + { + "v2.money_management.received_debit.failed", typeof( + Events.V2MoneyManagementReceivedDebitFailedEventNotification) + }, + { + "v2.money_management.received_debit.pending", typeof( + Events.V2MoneyManagementReceivedDebitPendingEventNotification) + }, + { + "v2.money_management.received_debit.succeeded", typeof( + Events.V2MoneyManagementReceivedDebitSucceededEventNotification) + }, + { + "v2.money_management.received_debit.updated", typeof( + Events.V2MoneyManagementReceivedDebitUpdatedEventNotification) + }, + { + "v2.money_management.recipient_verification.created", typeof( + Events.V2MoneyManagementRecipientVerificationCreatedEventNotification) + }, + { + "v2.money_management.recipient_verification.updated", typeof( + Events.V2MoneyManagementRecipientVerificationUpdatedEventNotification) + }, + { + "v2.money_management.transaction.created", typeof( + Events.V2MoneyManagementTransactionCreatedEventNotification) + }, + { + "v2.money_management.transaction.updated", typeof( + Events.V2MoneyManagementTransactionUpdatedEventNotification) + }, + { + "v2.payments.off_session_payment.authorization_attempt_failed", typeof( + Events.V2PaymentsOffSessionPaymentAuthorizationAttemptFailedEventNotification) + }, + { + "v2.payments.off_session_payment.authorization_attempt_started", typeof( + Events.V2PaymentsOffSessionPaymentAuthorizationAttemptStartedEventNotification) + }, + { + "v2.payments.off_session_payment.canceled", typeof( + Events.V2PaymentsOffSessionPaymentCanceledEventNotification) + }, + { + "v2.payments.off_session_payment.created", typeof( + Events.V2PaymentsOffSessionPaymentCreatedEventNotification) + }, + { + "v2.payments.off_session_payment.failed", typeof( + Events.V2PaymentsOffSessionPaymentFailedEventNotification) + }, + { + "v2.payments.off_session_payment.succeeded", typeof( + Events.V2PaymentsOffSessionPaymentSucceededEventNotification) + }, + + // V2EventNotificationsToTypes: The end of the section generated from our OpenAPI spec }); /// @@ -1272,12 +2332,23 @@ public static Type GetConcreteType(Type potentialType, string objectValue) return null; } - public static Type GetConcreteThinEventType(string typeValue) + public static Type GetConcreteV2EventType(string typeValue) + { + Type concreteType = null; + if (!string.IsNullOrEmpty(typeValue)) + { + V2EventsToTypes.TryGetValue(typeValue, out concreteType); + } + + return concreteType; + } + + public static Type GetConcreteV2EventNotificationType(string typeValue) { Type concreteType = null; if (!string.IsNullOrEmpty(typeValue)) { - V2TypesToEventTypes.TryGetValue(typeValue, out concreteType); + V2EventNotificationsToTypes.TryGetValue(typeValue, out concreteType); } return concreteType; diff --git a/src/Stripe.net/Infrastructure/Public/ThinEvent.cs b/src/Stripe.net/Infrastructure/Public/ThinEvent.cs deleted file mode 100644 index 6bf764de48..0000000000 --- a/src/Stripe.net/Infrastructure/Public/ThinEvent.cs +++ /dev/null @@ -1,81 +0,0 @@ -namespace Stripe -{ - using System; - using Newtonsoft.Json; -#if NET6_0_OR_GREATER - using STJS = System.Text.Json.Serialization; -#endif - - using Stripe.V2; - - /// - /// A pushed thin event. Use this the Id with the - /// exposed via to fetch the full event. - /// - public class ThinEvent - { - /// - /// Unique identifier for the event. - /// - [JsonProperty("id")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("id")] -#endif - public string Id { get; internal set; } - - /// - /// The type of the event. - /// - [JsonProperty("type")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("type")] -#endif - public string Type { get; internal set; } - - /// - /// Time at which the object was created. - /// - [JsonProperty("created")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created")] -#endif - public DateTime Created { get; internal set; } - - /// - /// Livemode indicates if the event is from a production(true) or test(false) account. - /// - [JsonProperty("livemode")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("livemode")] -#endif - public bool Livemode { get; internal set; } - -#nullable enable - /// - /// [Optional] Reason for the event. - /// - [JsonProperty("reason")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("reason")] -#endif - public EventReason? Reason { get; internal set; } - - /// - /// [Optional] Authentication context needed to fetch the event or related object. - /// - [JsonProperty("context")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("context")] -#endif - public string? Context { get; internal set; } - - /// - /// [Optional] Object containing the reference to API resource relevant to the event. - /// - [JsonProperty("related_object")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("related_object")] -#endif - public ThinEventRelatedObject? RelatedObject { get; internal set; } - } -} diff --git a/src/Stripe.net/Infrastructure/Public/UnknownEventNotification.cs b/src/Stripe.net/Infrastructure/Public/UnknownEventNotification.cs new file mode 100644 index 0000000000..482e8090e7 --- /dev/null +++ b/src/Stripe.net/Infrastructure/Public/UnknownEventNotification.cs @@ -0,0 +1,57 @@ +namespace Stripe.V2 +{ + using System; + using System.Diagnostics.CodeAnalysis; + using System.Threading; + using System.Threading.Tasks; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Represents an EventNotification that is valid, but that the SDK doesn't have types for. May have a RelatedObject and can be used to fetch the corresponding full event. + /// + public class UnknownEventNotification : EventNotification + { +#nullable enable + /// + /// [Optional] Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("related_object")] +#endif + public EventNotificationRelatedObject? RelatedObject { get; internal set; } + + public V2.Event FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync(CancellationToken cancellationToken = default) + { + return this.FetchEventAsync(cancellationToken); + } + + public StripeEntity FetchRelatedObject() + { + if (this.RelatedObject == null) + { + throw new Exception("there's no relatedObject to fetch."); + } + + return this.FetchRelatedObject(this.RelatedObject); + } + + public Task FetchRelatedObjectAsync() + { + if (this.RelatedObject == null) + { + throw new Exception("there's no relatedObject to fetch."); + } + + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + } +} diff --git a/src/StripeTests/Events/V2/EventTest.cs b/src/StripeTests/Events/V2/EventTest.cs index 126f0ee0ba..0df98de0a0 100644 --- a/src/StripeTests/Events/V2/EventTest.cs +++ b/src/StripeTests/Events/V2/EventTest.cs @@ -9,7 +9,10 @@ namespace StripeTests.V2 using Moq; using Moq.Protected; using Stripe; + using Stripe.Billing; + using Stripe.Events; using Stripe.Infrastructure; + using Stripe.V2; using Xunit; public class EventTest : BaseStripeTest @@ -157,13 +160,12 @@ public static string GenerateSigHeader(string payload) } /// - /// Parse a ThinEvent object. This uses StripeClient.ParseThinEvent to - /// parse a ThinEvent and then uses the EventService - /// to retrieve the Stripe.V2.Event. + /// Parse a EventNotification payload. This uses StripeClient.ParseEventNotification to + /// parse a EventNotification and then uses the method to retrieve the full Event. /// /// The json payload to parse. - /// A ThinEvent derived class. - private Stripe.V2.Event DoParseSignedEvent(string payload) + /// A V2.Event derived class. + private Stripe.V2.Event DoParseSignedEventAndFetch(string payload) { this.MockHttpClientFixture.MockHandler.Protected() .Setup>( @@ -175,89 +177,114 @@ private Stripe.V2.Event DoParseSignedEvent(string payload) Content = new StringContent(payload), }); - var bte = this.stripeClient.ParseThinEvent(payload, GenerateSigHeader(payload), WebhookSecret); + var bte = this.DoParseSignedEventNotification(payload); + + // fetch full event + return bte.FetchEvent(); + } + + /// + /// Parse a EventNotification payload. This uses StripeClient.ParseEventNotification to + /// parse a EventNotification and then uses the EventService. + /// + /// The json payload to parse. + /// An EventNotification derived class. + private Stripe.V2.EventNotification DoParseSignedEventNotification(string payload) + { + var notif = this.stripeClient.ParseEventNotification(payload, GenerateSigHeader(payload), WebhookSecret); // Check to make sure this parsed the payload correctly - Assert.NotNull(bte.Id); - var v2EventService = new Stripe.V2.Core.EventService(this.stripeClient); - return v2EventService.Get(bte.Id); + Assert.NotNull(notif.Id); + return notif; + } + + /// + /// Helper for asserting an object is of a type and casting to that type, all in one go. + /// + /// The type your object should be. + /// Your object. + /// The input object, cast to type T. + private T AssertAndCast(object o) + { + Assert.IsType(o); + return (T)o; } [Fact] - public void ParseThinEventWithoutRelatedObject() + public void ParseEventNotificationWithoutRelatedObject() { - var baseThinEvent = this.stripeClient.ParseThinEvent(v2KnownEventNoRelatedObjectPayload, GenerateSigHeader(v2KnownEventNoRelatedObjectPayload), WebhookSecret); - Assert.NotNull(baseThinEvent); - Assert.Equal("evt_234", baseThinEvent.Id); - Assert.Equal("v1.billing.meter.no_meter_found", baseThinEvent.Type); - Assert.Equal(new DateTime(2022, 2, 15, 0, 27, 45, 330, DateTimeKind.Utc), baseThinEvent.Created); - Assert.True(baseThinEvent.Livemode); - Assert.Null(baseThinEvent.Context); - Assert.Null(baseThinEvent.RelatedObject); + var eventNotif = this.stripeClient.ParseEventNotification(v2KnownEventNoRelatedObjectPayload, GenerateSigHeader(v2KnownEventNoRelatedObjectPayload), WebhookSecret); + Assert.NotNull(eventNotif); + Assert.Equal("evt_234", eventNotif.Id); + Assert.Equal("v1.billing.meter.no_meter_found", eventNotif.Type); + Assert.Equal(new DateTime(2022, 2, 15, 0, 27, 45, 330, DateTimeKind.Utc), eventNotif.Created); + Assert.True(eventNotif.Livemode); + Assert.Null(eventNotif.Context); } [Fact] - public void ParseThinEventWithRelatedObject() + public void ParseEventNotificationWithRelatedObject() { - var baseThinEvent = this.stripeClient.ParseThinEvent(v2KnownEventPayload, GenerateSigHeader(v2KnownEventPayload), WebhookSecret); - Assert.NotNull(baseThinEvent); - Assert.Equal("evt_234", baseThinEvent.Id); - Assert.Equal("v1.billing.meter.error_report_triggered", baseThinEvent.Type); - Assert.Equal(new DateTime(2022, 2, 15, 0, 27, 45, 330, DateTimeKind.Utc), baseThinEvent.Created); - Assert.True(baseThinEvent.Livemode); - Assert.Equal("context 123", baseThinEvent.Context); - Assert.NotNull(baseThinEvent.RelatedObject); - Assert.Equal("me_123", baseThinEvent.RelatedObject.Id); - Assert.Equal("billing.meter", baseThinEvent.RelatedObject.Type); - Assert.Equal("/v1/billing/meters/me_123", baseThinEvent.RelatedObject.Url); + var eventNotif = this.stripeClient.ParseEventNotification(v2KnownEventPayload, GenerateSigHeader(v2KnownEventPayload), WebhookSecret); + Assert.NotNull(eventNotif); + Assert.Equal("evt_234", eventNotif.Id); + Assert.Equal("v1.billing.meter.error_report_triggered", eventNotif.Type); + Assert.Equal(new DateTime(2022, 2, 15, 0, 27, 45, 330, DateTimeKind.Utc), eventNotif.Created); + Assert.True(eventNotif.Livemode); + Assert.Equal("context 123", eventNotif.Context); + var evt = this.AssertAndCast(eventNotif); + + Assert.NotNull(evt.RelatedObject); + Assert.Equal("me_123", evt.RelatedObject.Id); + Assert.Equal("billing.meter", evt.RelatedObject.Type); + Assert.Equal("/v1/billing/meters/me_123", evt.RelatedObject.Url); } [Fact] public void ParseUnknownEvent() { - var stripeEvent = this.DoParseSignedEvent(v2UnknownEventPayload); + var notif = this.DoParseSignedEventNotification(v2UnknownEventPayload); + var stripeEvent = this.AssertAndCast(notif); + Assert.NotNull(stripeEvent); Assert.Equal("evt_234", stripeEvent.Id); - Assert.Equal("event", stripeEvent.Object); Assert.Equal("this.event.doesnt.exist", stripeEvent.Type); Assert.Equal(new DateTime(2022, 2, 15, 0, 27, 45, 330, DateTimeKind.Utc), stripeEvent.Created); - Assert.Equal(this.stripeClient.Requestor, stripeEvent.Requestor); } [Fact] - public void ParseThinEventWithLivemodeFalse() + public void ParseEventNotificationWithLivemodeFalse() { - var baseThinEvent = this.stripeClient.ParseThinEvent(v2KnownEventLivemodeFalsePayload, GenerateSigHeader(v2KnownEventLivemodeFalsePayload), WebhookSecret); - Assert.NotNull(baseThinEvent); - Assert.Equal("evt_234", baseThinEvent.Id); - Assert.Equal("v1.billing.meter.no_meter_found", baseThinEvent.Type); - Assert.Equal(new DateTime(2022, 2, 15, 0, 27, 45, 330, DateTimeKind.Utc), baseThinEvent.Created); - Assert.False(baseThinEvent.Livemode); - Assert.Null(baseThinEvent.Context); - Assert.Null(baseThinEvent.RelatedObject); + var eventNotif = this.stripeClient.ParseEventNotification(v2KnownEventLivemodeFalsePayload, GenerateSigHeader(v2KnownEventLivemodeFalsePayload), WebhookSecret); + Assert.NotNull(eventNotif); + Assert.Equal("evt_234", eventNotif.Id); + Assert.Equal("v1.billing.meter.no_meter_found", eventNotif.Type); + Assert.Equal(new DateTime(2022, 2, 15, 0, 27, 45, 330, DateTimeKind.Utc), eventNotif.Created); + Assert.False(eventNotif.Livemode); + Assert.Null(eventNotif.Context); } [Fact] - public void ParseThinEventWithReason() + public void ParseEventNotificationWithReason() { - var baseThinEvent = this.stripeClient.ParseThinEvent(v2KnownEventWithReasonPayload, GenerateSigHeader(v2KnownEventWithReasonPayload), WebhookSecret); - Assert.NotNull(baseThinEvent); - Assert.Equal("evt_234", baseThinEvent.Id); - Assert.Equal("v1.billing.meter.no_meter_found", baseThinEvent.Type); - Assert.Equal(new DateTime(2022, 2, 15, 0, 27, 45, 330, DateTimeKind.Utc), baseThinEvent.Created); - Assert.True(baseThinEvent.Livemode); - Assert.Null(baseThinEvent.Context); - Assert.Null(baseThinEvent.RelatedObject); - Assert.NotNull(baseThinEvent.Reason); - Assert.Equal("a.b.c", baseThinEvent.Reason.Type); - Assert.Equal("r_123", baseThinEvent.Reason.Request.Id); - Assert.Equal("key", baseThinEvent.Reason.Request.IdempotencyKey); + var eventNotif = this.stripeClient.ParseEventNotification(v2KnownEventWithReasonPayload, GenerateSigHeader(v2KnownEventWithReasonPayload), WebhookSecret); + Assert.NotNull(eventNotif); + Assert.Equal("evt_234", eventNotif.Id); + Assert.Equal("v1.billing.meter.no_meter_found", eventNotif.Type); + Assert.Equal(new DateTime(2022, 2, 15, 0, 27, 45, 330, DateTimeKind.Utc), eventNotif.Created); + Assert.True(eventNotif.Livemode); + Assert.Null(eventNotif.Context); + + Assert.NotNull(eventNotif.Reason); + Assert.Equal("a.b.c", eventNotif.Reason.Type); + Assert.Equal("r_123", eventNotif.Reason.Request.Id); + Assert.Equal("key", eventNotif.Reason.Request.IdempotencyKey); } [Fact] - public void ParseThinEventWithInvalidSignature() + public void ParseEventNotificationWithInvalidSignature() { - var exception = Assert.Throws(() => this.stripeClient.ParseThinEvent(v2UnknownEventPayload, "invalid signature", WebhookSecret)); + var exception = Assert.Throws(() => this.stripeClient.ParseEventNotification(v2UnknownEventPayload, "invalid signature", WebhookSecret)); Assert.Matches("header format is unexpected", exception.Message); } @@ -277,18 +304,17 @@ public void ParseUnknownEventDirectly() [Fact] public void ParseKnownEvent() { - var stripeEvent = this.DoParseSignedEvent(v2KnownEventPayload); + var stripeEvent = this.DoParseSignedEventAndFetch(v2KnownEventPayload); Assert.NotNull(stripeEvent); - Assert.True(stripeEvent is Stripe.Events.V1BillingMeterErrorReportTriggeredEvent); + Assert.True(stripeEvent is V1BillingMeterErrorReportTriggeredEvent); Assert.Equal(this.stripeClient.Requestor, stripeEvent.Requestor); } [Fact] public void ParseEventData() { - var parsed = this.DoParseSignedEvent(v2KnownEventWithDataPayload); - Assert.True(parsed is Stripe.Events.V1BillingMeterErrorReportTriggeredEvent); - var stripeEvent = parsed as Stripe.Events.V1BillingMeterErrorReportTriggeredEvent; + var parsed = this.DoParseSignedEventAndFetch(v2KnownEventWithDataPayload); + var stripeEvent = this.AssertAndCast(parsed); var eventData = stripeEvent.Data; Assert.NotNull(eventData); @@ -308,14 +334,13 @@ public void ParseEventData() [Fact] public void FetchRelatedObject() { - var parsed = this.DoParseSignedEvent(v2KnownEventPayload); - Assert.True(parsed is Stripe.Events.V1BillingMeterErrorReportTriggeredEvent); - var stripeEvent = this.DoParseSignedEvent(v2KnownEventPayload) as Stripe.Events.V1BillingMeterErrorReportTriggeredEvent; + var parsed = this.DoParseSignedEventAndFetch(v2KnownEventPayload); + var stripeEvent = this.AssertAndCast(parsed); var relatedObjectPayload = @" { - ""id"": ""fa_123"", - ""object"": ""financial_account"" + ""id"": ""meter_123"", + ""object"": ""billing.meter"" }"; this.MockHttpClientFixture.MockHandler.Protected() .Setup>( @@ -327,18 +352,44 @@ public void FetchRelatedObject() Content = new StringContent(relatedObjectPayload), }); var relatedObject = stripeEvent.FetchRelatedObject(); - Assert.Equal("fa_123", relatedObject.Id); - Assert.Equal("financial_account", relatedObject.Object); + Assert.Equal("meter_123", relatedObject.Id); + Assert.Equal("billing.meter", relatedObject.Object); + } + + [Fact] + public void FetchRelatedObjectFromNotif() + { + var notif = this.DoParseSignedEventNotification(v2KnownEventPayload); + var evt = this.AssertAndCast(notif); + + var relatedObjectPayload = @" + { + ""id"": ""meter_123"", + ""object"": ""billing.meter"" + }"; + this.MockHttpClientFixture.MockHandler.Protected() + .Setup>( + "SendAsync", + ItExpr.IsAny(), + ItExpr.IsAny()) + .ReturnsAsync(new HttpResponseMessage + { + Content = new StringContent(relatedObjectPayload), + }); + var relatedObject = evt.FetchRelatedObject(); + Assert.IsType(relatedObject); + + Assert.Equal("meter_123", relatedObject.Id); + Assert.Equal("billing.meter", relatedObject.Object); } [Fact] public void FetchObjectNoRelatedObject() { - var parsed = this.DoParseSignedEvent(v2KnownEventNoRelatedObjectPayload); - Assert.True(parsed is Stripe.Events.V1BillingMeterNoMeterFoundEvent); - var stripeEvent = this.DoParseSignedEvent(v2KnownEventNoRelatedObjectPayload) as Stripe.Events.V1BillingMeterNoMeterFoundEvent; + var parsed = this.DoParseSignedEventNotification(v2KnownEventNoRelatedObjectPayload); + Assert.IsType(parsed); - var eventType = typeof(Stripe.Events.V1BillingMeterNoMeterFoundEvent); + var eventType = typeof(V1BillingMeterNoMeterFoundEventNotification); Assert.Null(eventType.GetMethod("FetchRelatedObject")); Assert.Null(eventType.GetMethod("FetchRelatedObjectAsync")); Assert.Null(eventType.GetProperty("RelatedObject")); @@ -347,14 +398,13 @@ public void FetchObjectNoRelatedObject() [Fact] public async void FetchRelatedObjectAsync() { - var parsed = this.DoParseSignedEvent(v2KnownEventPayload); - Assert.True(parsed is Stripe.Events.V1BillingMeterErrorReportTriggeredEvent); - var stripeEvent = this.DoParseSignedEvent(v2KnownEventPayload) as Stripe.Events.V1BillingMeterErrorReportTriggeredEvent; + var parsed = this.DoParseSignedEventNotification(v2KnownEventPayload); + var stripeEvent = this.AssertAndCast(parsed); var relatedObjectPayload = @" { - ""id"": ""fa_123"", - ""object"": ""financial_account"" + ""id"": ""meter_123"", + ""object"": ""billing.meter"" }"; this.MockHttpClientFixture.MockHandler.Protected() .Setup>( @@ -366,8 +416,8 @@ public async void FetchRelatedObjectAsync() Content = new StringContent(relatedObjectPayload), }); var relatedObject = await stripeEvent.FetchRelatedObjectAsync(); - Assert.Equal("fa_123", relatedObject.Id); - Assert.Equal("financial_account", relatedObject.Object); + Assert.Equal("meter_123", relatedObject.Id); + Assert.Equal("billing.meter", relatedObject.Object); } [Fact] diff --git a/src/StripeTests/Infrastructure/Public/LiveApiRequestorTest.cs b/src/StripeTests/Infrastructure/Public/LiveApiRequestorTest.cs index 593be66d92..97e4d72963 100644 --- a/src/StripeTests/Infrastructure/Public/LiveApiRequestorTest.cs +++ b/src/StripeTests/Infrastructure/Public/LiveApiRequestorTest.cs @@ -536,6 +536,27 @@ public void RawRequest_StripeContext() Assert.Equal("ctx_123", lastRequest.StripeHeaders["Stripe-Context"]); } + [Fact] + public void RawRequest_StripeContextIsNull() + { + var content = "{\"id\": \"ch_123\", \"object\": \"charge\"}"; + var response = new StripeResponse(HttpStatusCode.OK, null, content); + this.httpClient.Response = response; + + this.apiRequestor.RawRequest( + HttpMethod.Post, + "/v1/charges", + "{\"foo\":\"bar\"}", + new RawRequestOptions + { + StripeContext = null, + }); + + var lastRequest = this.httpClient.LastRequest; + + Assert.False(lastRequest.StripeHeaders.ContainsKey("Stripe-Context")); + } + [Fact] public async Task RawRequest_GetAsync_Json() { diff --git a/src/StripeTests/Infrastructure/Public/StripeClientTest.cs b/src/StripeTests/Infrastructure/Public/StripeClientTest.cs index 91a4d5e55d..8583bfcd5f 100644 --- a/src/StripeTests/Infrastructure/Public/StripeClientTest.cs +++ b/src/StripeTests/Infrastructure/Public/StripeClientTest.cs @@ -11,6 +11,7 @@ namespace StripeTests using Moq.Protected; using Newtonsoft.Json; using Stripe; + using Stripe.V2; using Xunit; using static TelemetryTestUtils; @@ -233,7 +234,7 @@ await this.stripeClient.RawRequestAsync( } [Fact] - public void ConstructThinEvent() + public void ConstructEventNotification() { string payload = @"{ ""object"": ""event"", @@ -245,7 +246,7 @@ public void ConstructThinEvent() ""url"": ""/v2/accounts"" } }"; - var evt = this.stripeClient.ParseThinEvent( + var evt = this.stripeClient.ParseEventNotification( payload, V2.EventTest.GenerateSigHeader(payload), V2.EventTest.WebhookSecret);