diff --git a/API_VERSION b/API_VERSION index e0ecaaa28e..3304332752 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -f587035a62fe3323ed42077a0526158e57a8260b \ No newline at end of file +e62524b587909bee231a15ce0dc618f1d04f69a4 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 559abffe4b..ea1ecdee17 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2121 \ No newline at end of file +v2124 \ No newline at end of file diff --git a/src/Stripe.net/Entities/V2/Core/Events/Event.cs b/src/Stripe.net/Entities/V2/Core/Events/Event.cs index 090774f6d3..93f2c9ad39 100644 --- a/src/Stripe.net/Entities/V2/Core/Events/Event.cs +++ b/src/Stripe.net/Entities/V2/Core/Events/Event.cs @@ -2,7 +2,6 @@ namespace Stripe.V2.Core { using System; - using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -32,15 +31,6 @@ public partial class Event : StripeEntity, IHasId, IHasObject #endif public string Object { get; set; } - /// - /// Before and after changes for the primary related object. - /// - [JsonProperty("changes")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("changes")] -#endif - public Dictionary Changes { get; set; } - /// /// Authentication context needed to fetch the event or related object. /// diff --git a/src/Stripe.net/Services/V2/Core/Events/EventListCreatedOptions.cs b/src/Stripe.net/Services/V2/Core/Events/EventListCreatedOptions.cs new file mode 100644 index 0000000000..bd3357f0f1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Core/Events/EventListCreatedOptions.cs @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Core +{ + using System; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class EventListCreatedOptions : INestedOptions + { + /// + /// Filter for events created after the specified timestamp. + /// + [JsonProperty("gt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gt")] +#endif + public DateTime? Gt { get; set; } + + /// + /// Filter for events created at or after the specified timestamp. + /// + [JsonProperty("gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("gte")] +#endif + public DateTime? Gte { get; set; } + + /// + /// Filter for events created before the specified timestamp. + /// + [JsonProperty("lt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lt")] +#endif + public DateTime? Lt { get; set; } + + /// + /// Filter for events created at or before the specified timestamp. + /// + [JsonProperty("lte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("lte")] +#endif + public DateTime? Lte { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs index db38556e8c..1a280076a2 100644 --- a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Core { - using System; using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER @@ -11,40 +10,13 @@ namespace Stripe.V2.Core public class EventListOptions : V2.ListOptions { /// - /// Filter for events created after the specified timestamp. + /// Set of filters to query events within a range of created timestamps. /// - [JsonProperty("gt")] + [JsonProperty("created")] #if NET6_0_OR_GREATER - [STJS.JsonPropertyName("gt")] + [STJS.JsonPropertyName("created")] #endif - public DateTime? Gt { get; set; } - - /// - /// Filter for events created at or after the specified timestamp. - /// - [JsonProperty("gte")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("gte")] -#endif - public DateTime? Gte { get; set; } - - /// - /// Filter for events created before the specified timestamp. - /// - [JsonProperty("lt")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("lt")] -#endif - public DateTime? Lt { get; set; } - - /// - /// Filter for events created at or before the specified timestamp. - /// - [JsonProperty("lte")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("lte")] -#endif - public DateTime? Lte { get; set; } + public EventListCreatedOptions Created { get; set; } /// /// Primary object ID used to retrieve related events. diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index f6fcf6b10b..74d295d303 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -723,7 +723,7 @@ public void TestCoreEventsGet() HttpMethod.Get, "/v2/core/events/ll_123", HttpStatusCode.OK, - "{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"changes\":{\"int_key\":123,\"string_key\":\"value\",\"boolean_key\":true,\"object_key\":{\"object_int_key\":123,\"object_string_key\":\"value\",\"object_boolean_key\":true},\"array_key\":[1,2,3]},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); + "{\"id\":\"obj_123\",\"object\":\"v2.core.event\",\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"livemode\":true,\"reason\":{\"type\":\"request\",\"request\":{\"id\":\"obj_123\",\"idempotency_key\":\"idempotency_key\"}},\"type\":\"type\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; Stripe.V2.Core.Event result = service.Get("ll_123");