From a116b3cd1fc0a2f1f3da58abb92062f73795cfdd Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 04:43:57 +0000 Subject: [PATCH 1/4] Update generated code for v2121 and --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/Stripe.net/Entities/Discounts/Discount.cs | 10 +++ .../InvoiceItems/InvoiceItemParent.cs | 11 ++- .../InvoiceItemParentScheduleDetails.cs | 20 +++++ .../InvoiceLineItems/InvoiceLineItemParent.cs | 12 ++- .../InvoiceLineItemParentScheduleDetails.cs | 20 +++++ .../Entities/Invoices/InvoiceParent.cs | 13 +++- .../Invoices/InvoiceParentScheduleDetails.cs | 20 +++++ .../QuotePreviewInvoiceParent.cs | 13 +++- ...uotePreviewInvoiceParentScheduleDetails.cs | 20 +++++ .../QuotePreviewSubscriptionSchedule.cs | 50 ++++++++++++ ...viewSubscriptionScheduleBillingSchedule.cs | 48 ++++++++++++ ...riptionScheduleBillingScheduleAppliesTo.cs | 65 ++++++++++++++++ ...criptionScheduleBillingScheduleBillFrom.cs | 77 +++++++++++++++++++ ...leBillingScheduleBillFromAmendmentStart.cs | 20 +++++ ...duleBillingScheduleBillFromLineStartsAt.cs | 20 +++++ ...ScheduleBillingScheduleBillFromRelative.cs | 31 ++++++++ ...riptionScheduleBillingScheduleBillUntil.cs | 74 ++++++++++++++++++ ...uleBillingScheduleBillUntilAmendmentEnd.cs | 20 +++++ ...cheduleBillingScheduleBillUntilDuration.cs | 30 ++++++++ ...eduleBillingScheduleBillUntilLineEndsAt.cs | 20 +++++ ...viewSubscriptionScheduleDefaultSettings.cs | 15 ++++ .../SubscriptionSchedule.cs | 50 ++++++++++++ .../SubscriptionScheduleBillingSchedule.cs | 48 ++++++++++++ ...riptionScheduleBillingScheduleAppliesTo.cs | 65 ++++++++++++++++ ...criptionScheduleBillingScheduleBillFrom.cs | 77 +++++++++++++++++++ ...leBillingScheduleBillFromAmendmentStart.cs | 20 +++++ ...duleBillingScheduleBillFromLineStartsAt.cs | 20 +++++ ...ScheduleBillingScheduleBillFromRelative.cs | 31 ++++++++ ...riptionScheduleBillingScheduleBillUntil.cs | 74 ++++++++++++++++++ ...uleBillingScheduleBillUntilAmendmentEnd.cs | 20 +++++ ...cheduleBillingScheduleBillUntilDuration.cs | 30 ++++++++ ...eduleBillingScheduleBillUntilLineEndsAt.cs | 20 +++++ .../SubscriptionScheduleDefaultSettings.cs | 15 ++++ ...eDetailsBillingScheduleAppliesToOptions.cs | 29 +++++++ ...BillingScheduleBillUntilDurationOptions.cs | 30 ++++++++ ...eDetailsBillingScheduleBillUntilOptions.cs | 45 +++++++++++ ...ceScheduleDetailsBillingScheduleOptions.cs | 40 ++++++++++ .../Invoices/InvoiceScheduleDetailsOptions.cs | 9 +++ ...ScheduleBillingScheduleAppliesToOptions.cs | 29 +++++++ ...BillingScheduleBillUntilDurationOptions.cs | 30 ++++++++ ...ScheduleBillingScheduleBillUntilOptions.cs | 45 +++++++++++ ...scriptionScheduleBillingScheduleOptions.cs | 40 ++++++++++ .../SubscriptionScheduleCreateOptions.cs | 9 +++ ...scriptionScheduleDefaultSettingsOptions.cs | 15 ++++ .../SubscriptionScheduleUpdateOptions.cs | 9 +++ 47 files changed, 1405 insertions(+), 8 deletions(-) create mode 100644 src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentScheduleDetails.cs create mode 100644 src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentScheduleDetails.cs create mode 100644 src/Stripe.net/Entities/Invoices/InvoiceParentScheduleDetails.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParentScheduleDetails.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingSchedule.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleAppliesTo.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFrom.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromAmendmentStart.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromLineStartsAt.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromRelative.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntil.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilAmendmentEnd.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilDuration.cs create mode 100644 src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilLineEndsAt.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingSchedule.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleAppliesTo.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFrom.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromAmendmentStart.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromLineStartsAt.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromRelative.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntil.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilAmendmentEnd.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilDuration.cs create mode 100644 src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilLineEndsAt.cs create mode 100644 src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleAppliesToOptions.cs create mode 100644 src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleBillUntilDurationOptions.cs create mode 100644 src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleBillUntilOptions.cs create mode 100644 src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleOptions.cs create mode 100644 src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleAppliesToOptions.cs create mode 100644 src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilDurationOptions.cs create mode 100644 src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilOptions.cs create mode 100644 src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleOptions.cs diff --git a/API_VERSION b/API_VERSION index fe61ec239f..63559170c4 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -7b6ef1a028c0ea3233cd7acd5dd1496acc8da61e \ No newline at end of file +ece18a988c812df07ae8223d214b27932ebc20ab \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 5c5ab64e18..559abffe4b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2119 \ No newline at end of file +v2121 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Discounts/Discount.cs b/src/Stripe.net/Entities/Discounts/Discount.cs index 9997d00126..5e6891a68e 100644 --- a/src/Stripe.net/Entities/Discounts/Discount.cs +++ b/src/Stripe.net/Entities/Discounts/Discount.cs @@ -187,6 +187,16 @@ public PromotionCode PromotionCode internal ExpandableField InternalPromotionCode { get; set; } #endregion + /// + /// The subscription schedule that this coupon is applied to, if it is applied to a + /// particular subscription schedule. + /// + [JsonProperty("schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] +#endif + public string Schedule { get; set; } + [JsonProperty("source")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("source")] diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs index 9ecb956792..1863ef3628 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParent.cs @@ -38,12 +38,21 @@ public class InvoiceItemParent : StripeEntity /// /// The type of parent that generated this invoice item. /// One of: license_fee_subscription_details, rate_card_subscription_details, - /// or subscription_details. + /// schedule_details, or subscription_details. /// [JsonProperty("type")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("type")] #endif public string Type { get; set; } + + /// + /// Details about the subscription schedule that generated this invoice item. + /// + [JsonProperty("schedule_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule_details")] +#endif + public InvoiceItemParentScheduleDetails ScheduleDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentScheduleDetails.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentScheduleDetails.cs new file mode 100644 index 0000000000..58e9356a09 --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItemParentScheduleDetails.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class InvoiceItemParentScheduleDetails : StripeEntity + { + /// + /// The subscription schedule that generated this invoice item. + /// + [JsonProperty("schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] +#endif + public string Schedule { get; set; } + } +} diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs index fddce64f6a..4aea150fd3 100644 --- a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParent.cs @@ -47,12 +47,22 @@ public class InvoiceLineItemParent : StripeEntity /// /// The type of parent that generated this line item. /// One of: invoice_item_details, license_fee_subscription_details, - /// rate_card_subscription_details, or subscription_item_details. + /// rate_card_subscription_details, schedule_details, or + /// subscription_item_details. /// [JsonProperty("type")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("type")] #endif public string Type { get; set; } + + /// + /// Details about the subscription schedule that generated this line item. + /// + [JsonProperty("schedule_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule_details")] +#endif + public InvoiceLineItemParentScheduleDetails ScheduleDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentScheduleDetails.cs b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentScheduleDetails.cs new file mode 100644 index 0000000000..e93000ea9c --- /dev/null +++ b/src/Stripe.net/Entities/InvoiceLineItems/InvoiceLineItemParentScheduleDetails.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class InvoiceLineItemParentScheduleDetails : StripeEntity + { + /// + /// The subscription schedule that generated this line item. + /// + [JsonProperty("schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] +#endif + public string Schedule { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Invoices/InvoiceParent.cs b/src/Stripe.net/Entities/Invoices/InvoiceParent.cs index b9ebce74ed..b13a5fe7ad 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceParent.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceParent.cs @@ -37,13 +37,22 @@ public class InvoiceParent : StripeEntity /// /// The type of parent that generated this invoice. - /// One of: billing_cadence_details, quote_details, or - /// subscription_details. + /// One of: billing_cadence_details, quote_details, schedule_details, + /// or subscription_details. /// [JsonProperty("type")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("type")] #endif public string Type { get; set; } + + /// + /// Details about the schedule that generated this invoice. + /// + [JsonProperty("schedule_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule_details")] +#endif + public InvoiceParentScheduleDetails ScheduleDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceParentScheduleDetails.cs b/src/Stripe.net/Entities/Invoices/InvoiceParentScheduleDetails.cs new file mode 100644 index 0000000000..0396cf5831 --- /dev/null +++ b/src/Stripe.net/Entities/Invoices/InvoiceParentScheduleDetails.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class InvoiceParentScheduleDetails : StripeEntity + { + /// + /// The schedule that generated this invoice. + /// + [JsonProperty("schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] +#endif + public string Schedule { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParent.cs b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParent.cs index c7ab048e3b..9dcbc2f557 100644 --- a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParent.cs +++ b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParent.cs @@ -37,13 +37,22 @@ public class QuotePreviewInvoiceParent : StripeEntity /// /// The type of parent that generated this invoice. - /// One of: billing_cadence_details, quote_details, or - /// subscription_details. + /// One of: billing_cadence_details, quote_details, schedule_details, + /// or subscription_details. /// [JsonProperty("type")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("type")] #endif public string Type { get; set; } + + /// + /// Details about the schedule that generated this invoice. + /// + [JsonProperty("schedule_details")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule_details")] +#endif + public QuotePreviewInvoiceParentScheduleDetails ScheduleDetails { get; set; } } } diff --git a/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParentScheduleDetails.cs b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParentScheduleDetails.cs new file mode 100644 index 0000000000..05123512b3 --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewInvoices/QuotePreviewInvoiceParentScheduleDetails.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewInvoiceParentScheduleDetails : StripeEntity + { + /// + /// The schedule that generated this invoice. + /// + [JsonProperty("schedule")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("schedule")] +#endif + public string Schedule { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedule.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedule.cs index a053ce67c8..a8f74ff61f 100644 --- a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedule.cs +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionSchedule.cs @@ -102,6 +102,15 @@ public Application Application #endif public QuotePreviewSubscriptionScheduleBillingMode BillingMode { get; set; } + /// + /// Billing schedules for this subscription schedule. + /// + [JsonProperty("billing_schedules")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_schedules")] +#endif + public List BillingSchedules { get; set; } + /// /// Time at which the subscription schedule was canceled. Measured in seconds since the Unix /// epoch. @@ -226,6 +235,47 @@ public Customer Customer #endif public QuotePreviewSubscriptionScheduleLastPriceMigrationError LastPriceMigrationError { get; set; } + #region Expandable LatestInvoice + + /// + /// (ID of the Invoice) + /// The most recent invoice this subscription schedule has generated. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string LatestInvoiceId + { + get => this.InternalLatestInvoice?.Id; + set => this.InternalLatestInvoice = SetExpandableFieldId(value, this.InternalLatestInvoice); + } + + /// + /// (Expanded) + /// The most recent invoice this subscription schedule has generated. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Invoice LatestInvoice + { + get => this.InternalLatestInvoice?.ExpandedObject; + set => this.InternalLatestInvoice = SetExpandableFieldObject(value, this.InternalLatestInvoice); + } + + [JsonProperty("latest_invoice")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latest_invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalLatestInvoice { get; set; } + #endregion + /// /// Has the value true if the object exists in live mode or the value false if /// the object exists in test mode. diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingSchedule.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingSchedule.cs new file mode 100644 index 0000000000..bfedc5810e --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingSchedule.cs @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewSubscriptionScheduleBillingSchedule : StripeEntity + { + /// + /// Specifies which subscription items the billing schedule applies to. + /// + [JsonProperty("applies_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applies_to")] +#endif + public List AppliesTo { get; set; } + + /// + /// Specifies the billing period. + /// + [JsonProperty("bill_until")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bill_until")] +#endif + public QuotePreviewSubscriptionScheduleBillingScheduleBillUntil BillUntil { get; set; } + + /// + /// Unique identifier for the billing schedule. + /// + [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif + public string Key { get; set; } + + /// + /// Specifies the start of the billing period. + /// + [JsonProperty("bill_from")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bill_from")] +#endif + public QuotePreviewSubscriptionScheduleBillingScheduleBillFrom BillFrom { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleAppliesTo.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleAppliesTo.cs new file mode 100644 index 0000000000..c52903cc56 --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleAppliesTo.cs @@ -0,0 +1,65 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif + public class QuotePreviewSubscriptionScheduleBillingScheduleAppliesTo : StripeEntity + { + #region Expandable Price + + /// + /// (ID of the Price) + /// The billing schedule will apply to the subscription item with the given price ID. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string PriceId + { + get => this.InternalPrice?.Id; + set => this.InternalPrice = SetExpandableFieldId(value, this.InternalPrice); + } + + /// + /// (Expanded) + /// The billing schedule will apply to the subscription item with the given price ID. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Price Price + { + get => this.InternalPrice?.ExpandedObject; + set => this.InternalPrice = SetExpandableFieldObject(value, this.InternalPrice); + } + + [JsonProperty("price")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalPrice { get; set; } + #endregion + + /// + /// Controls which subscription items the billing schedule applies to. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFrom.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFrom.cs new file mode 100644 index 0000000000..adaccd3b04 --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFrom.cs @@ -0,0 +1,77 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewSubscriptionScheduleBillingScheduleBillFrom : StripeEntity + { + /// + /// Use an index to specify the position of an amendment to start prebilling with. + /// + [JsonProperty("amendment_start")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amendment_start")] +#endif + public QuotePreviewSubscriptionScheduleBillingScheduleBillFromAmendmentStart AmendmentStart { get; set; } + + /// + /// The time the billing schedule applies from. + /// + [JsonProperty("computed_timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("computed_timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? ComputedTimestamp { get; set; } + + /// + /// Lets you bill the period starting from a particular Quote line. + /// + [JsonProperty("line_starts_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_starts_at")] +#endif + public QuotePreviewSubscriptionScheduleBillingScheduleBillFromLineStartsAt LineStartsAt { get; set; } + + /// + /// Timestamp is calculated from the request time. + /// + [JsonProperty("relative")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("relative")] +#endif + public QuotePreviewSubscriptionScheduleBillingScheduleBillFromRelative Relative { get; set; } + + /// + /// Use a precise Unix timestamp for prebilling to start. Must be earlier than + /// bill_until. + /// + [JsonProperty("timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? Timestamp { get; set; } + + /// + /// Describes how the billing schedule determines the start date. Possible values are + /// timestamp, relative, amendment_start, now, + /// quote_acceptance_date, line_starts_at, or pause_collection_start. + /// One of: amendment_start, line_starts_at, now, + /// pause_collection_start, quote_acceptance_date, relative, or + /// timestamp. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromAmendmentStart.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromAmendmentStart.cs new file mode 100644 index 0000000000..e10c260c4c --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromAmendmentStart.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewSubscriptionScheduleBillingScheduleBillFromAmendmentStart : StripeEntity + { + /// + /// Use an index to specify the position of an amendment to start prebilling with. + /// + [JsonProperty("index")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("index")] +#endif + public long Index { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromLineStartsAt.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromLineStartsAt.cs new file mode 100644 index 0000000000..83e6f62529 --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromLineStartsAt.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewSubscriptionScheduleBillingScheduleBillFromLineStartsAt : StripeEntity, IHasId + { + /// + /// Unique identifier for the object. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromRelative.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromRelative.cs new file mode 100644 index 0000000000..e17e7d655c --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillFromRelative.cs @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewSubscriptionScheduleBillingScheduleBillFromRelative : StripeEntity + { + /// + /// Specifies billing duration. Possible values are day, week, month, + /// or year. + /// One of: day, month, week, or year. + /// + [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif + public string Interval { get; set; } + + /// + /// The multiplier applied to the interval. + /// + [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif + public long? IntervalCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntil.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntil.cs new file mode 100644 index 0000000000..41f1fb2e4d --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntil.cs @@ -0,0 +1,74 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewSubscriptionScheduleBillingScheduleBillUntil : StripeEntity + { + /// + /// The timestamp the billing schedule will apply until. + /// + [JsonProperty("computed_timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("computed_timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime ComputedTimestamp { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Specifies the billing period. + /// + [JsonProperty("duration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duration")] +#endif + public QuotePreviewSubscriptionScheduleBillingScheduleBillUntilDuration Duration { get; set; } + + /// + /// If specified, the billing schedule will apply until the specified timestamp. + /// + [JsonProperty("timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? Timestamp { get; set; } + + /// + /// Describes how the billing schedule will determine the end date. Either duration + /// or timestamp. + /// One of: amendment_end, duration, line_ends_at, schedule_end, + /// timestamp, or upcoming_invoice. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + + /// + /// Use an index to specify the position of an amendment to end prebilling with. + /// + [JsonProperty("amendment_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amendment_end")] +#endif + public QuotePreviewSubscriptionScheduleBillingScheduleBillUntilAmendmentEnd AmendmentEnd { get; set; } + + /// + /// Lets you bill the period ending at a particular Quote line. + /// + [JsonProperty("line_ends_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_ends_at")] +#endif + public QuotePreviewSubscriptionScheduleBillingScheduleBillUntilLineEndsAt LineEndsAt { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilAmendmentEnd.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilAmendmentEnd.cs new file mode 100644 index 0000000000..e8fdee351e --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilAmendmentEnd.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewSubscriptionScheduleBillingScheduleBillUntilAmendmentEnd : StripeEntity + { + /// + /// Use an index to specify the position of an amendment to end prebilling with. + /// + [JsonProperty("index")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("index")] +#endif + public long Index { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilDuration.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilDuration.cs new file mode 100644 index 0000000000..58f8935d88 --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilDuration.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewSubscriptionScheduleBillingScheduleBillUntilDuration : StripeEntity + { + /// + /// Specifies billing duration. Either day, week, month or year. + /// One of: day, month, week, or year. + /// + [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif + public string Interval { get; set; } + + /// + /// The multiplier applied to the interval. + /// + [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif + public long? IntervalCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilLineEndsAt.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilLineEndsAt.cs new file mode 100644 index 0000000000..f61749ef2c --- /dev/null +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleBillingScheduleBillUntilLineEndsAt.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class QuotePreviewSubscriptionScheduleBillingScheduleBillUntilLineEndsAt : StripeEntity, IHasId + { + /// + /// Unique identifier for the object. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + } +} diff --git a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettings.cs b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettings.cs index a86020187e..21c8c8fb2d 100644 --- a/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettings.cs +++ b/src/Stripe.net/Entities/QuotePreviewSubscriptionSchedules/QuotePreviewSubscriptionScheduleDefaultSettings.cs @@ -180,5 +180,20 @@ public Account OnBehalfOf [STJS.JsonPropertyName("transfer_data")] #endif public QuotePreviewSubscriptionScheduleDefaultSettingsTransferData TransferData { get; set; } + + /// + /// Configures how the subscription schedule handles billing for phase transitions. Possible + /// values are phase_start (default) or billing_period_start. + /// phase_start bills based on the current state of the subscription, ignoring + /// changes scheduled in future phases. billing_period_start bills predictively for + /// upcoming phase transitions within the current billing cycle, including pricing changes + /// and service period adjustments that will occur before the next invoice. + /// One of: billing_period_start, or phase_start. + /// + [JsonProperty("phase_effective_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phase_effective_at")] +#endif + public string PhaseEffectiveAt { get; set; } } } diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedule.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedule.cs index b67b6f7453..d39a615f54 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedule.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionSchedule.cs @@ -104,6 +104,15 @@ public Application Application #endif public SubscriptionScheduleBillingMode BillingMode { get; set; } + /// + /// Billing schedules for this subscription schedule. + /// + [JsonProperty("billing_schedules")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_schedules")] +#endif + public List BillingSchedules { get; set; } + /// /// Time at which the subscription schedule was canceled. Measured in seconds since the Unix /// epoch. @@ -228,6 +237,47 @@ public Customer Customer #endif public SubscriptionScheduleLastPriceMigrationError LastPriceMigrationError { get; set; } + #region Expandable LatestInvoice + + /// + /// (ID of the Invoice) + /// The most recent invoice this subscription schedule has generated. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string LatestInvoiceId + { + get => this.InternalLatestInvoice?.Id; + set => this.InternalLatestInvoice = SetExpandableFieldId(value, this.InternalLatestInvoice); + } + + /// + /// (Expanded) + /// The most recent invoice this subscription schedule has generated. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Invoice LatestInvoice + { + get => this.InternalLatestInvoice?.ExpandedObject; + set => this.InternalLatestInvoice = SetExpandableFieldObject(value, this.InternalLatestInvoice); + } + + [JsonProperty("latest_invoice")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latest_invoice")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalLatestInvoice { get; set; } + #endregion + /// /// Has the value true if the object exists in live mode or the value false if /// the object exists in test mode. diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingSchedule.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingSchedule.cs new file mode 100644 index 0000000000..0744e6689c --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingSchedule.cs @@ -0,0 +1,48 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingSchedule : StripeEntity + { + /// + /// Specifies which subscription items the billing schedule applies to. + /// + [JsonProperty("applies_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applies_to")] +#endif + public List AppliesTo { get; set; } + + /// + /// Specifies the billing period. + /// + [JsonProperty("bill_until")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bill_until")] +#endif + public SubscriptionScheduleBillingScheduleBillUntil BillUntil { get; set; } + + /// + /// Unique identifier for the billing schedule. + /// + [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif + public string Key { get; set; } + + /// + /// Specifies the start of the billing period. + /// + [JsonProperty("bill_from")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bill_from")] +#endif + public SubscriptionScheduleBillingScheduleBillFrom BillFrom { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleAppliesTo.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleAppliesTo.cs new file mode 100644 index 0000000000..7febd8df81 --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleAppliesTo.cs @@ -0,0 +1,65 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + +#if NET6_0_OR_GREATER + [STJS.JsonConverter(typeof(STJMemberSerializationOptIn))] +#endif + public class SubscriptionScheduleBillingScheduleAppliesTo : StripeEntity + { + #region Expandable Price + + /// + /// (ID of the Price) + /// The billing schedule will apply to the subscription item with the given price ID. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public string PriceId + { + get => this.InternalPrice?.Id; + set => this.InternalPrice = SetExpandableFieldId(value, this.InternalPrice); + } + + /// + /// (Expanded) + /// The billing schedule will apply to the subscription item with the given price ID. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] +#if NET6_0_OR_GREATER + [STJS.JsonIgnore] +#endif + public Price Price + { + get => this.InternalPrice?.ExpandedObject; + set => this.InternalPrice = SetExpandableFieldObject(value, this.InternalPrice); + } + + [JsonProperty("price")] + [JsonConverter(typeof(ExpandableFieldConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] + [STJS.JsonConverter(typeof(STJExpandableFieldConverter))] +#endif + internal ExpandableField InternalPrice { get; set; } + #endregion + + /// + /// Controls which subscription items the billing schedule applies to. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFrom.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFrom.cs new file mode 100644 index 0000000000..6add0adbe4 --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFrom.cs @@ -0,0 +1,77 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillFrom : StripeEntity + { + /// + /// Use an index to specify the position of an amendment to start prebilling with. + /// + [JsonProperty("amendment_start")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amendment_start")] +#endif + public SubscriptionScheduleBillingScheduleBillFromAmendmentStart AmendmentStart { get; set; } + + /// + /// The time the billing schedule applies from. + /// + [JsonProperty("computed_timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("computed_timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? ComputedTimestamp { get; set; } + + /// + /// Lets you bill the period starting from a particular Quote line. + /// + [JsonProperty("line_starts_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_starts_at")] +#endif + public SubscriptionScheduleBillingScheduleBillFromLineStartsAt LineStartsAt { get; set; } + + /// + /// Timestamp is calculated from the request time. + /// + [JsonProperty("relative")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("relative")] +#endif + public SubscriptionScheduleBillingScheduleBillFromRelative Relative { get; set; } + + /// + /// Use a precise Unix timestamp for prebilling to start. Must be earlier than + /// bill_until. + /// + [JsonProperty("timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? Timestamp { get; set; } + + /// + /// Describes how the billing schedule determines the start date. Possible values are + /// timestamp, relative, amendment_start, now, + /// quote_acceptance_date, line_starts_at, or pause_collection_start. + /// One of: amendment_start, line_starts_at, now, + /// pause_collection_start, quote_acceptance_date, relative, or + /// timestamp. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromAmendmentStart.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromAmendmentStart.cs new file mode 100644 index 0000000000..e31bbab50c --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromAmendmentStart.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillFromAmendmentStart : StripeEntity + { + /// + /// Use an index to specify the position of an amendment to start prebilling with. + /// + [JsonProperty("index")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("index")] +#endif + public long Index { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromLineStartsAt.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromLineStartsAt.cs new file mode 100644 index 0000000000..cc96c7e40f --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromLineStartsAt.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillFromLineStartsAt : StripeEntity, IHasId + { + /// + /// Unique identifier for the object. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromRelative.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromRelative.cs new file mode 100644 index 0000000000..a9a566f73d --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillFromRelative.cs @@ -0,0 +1,31 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillFromRelative : StripeEntity + { + /// + /// Specifies billing duration. Possible values are day, week, month, + /// or year. + /// One of: day, month, week, or year. + /// + [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif + public string Interval { get; set; } + + /// + /// The multiplier applied to the interval. + /// + [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif + public long? IntervalCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntil.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntil.cs new file mode 100644 index 0000000000..705897b9a7 --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntil.cs @@ -0,0 +1,74 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillUntil : StripeEntity + { + /// + /// The timestamp the billing schedule will apply until. + /// + [JsonProperty("computed_timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("computed_timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime ComputedTimestamp { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Specifies the billing period. + /// + [JsonProperty("duration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duration")] +#endif + public SubscriptionScheduleBillingScheduleBillUntilDuration Duration { get; set; } + + /// + /// If specified, the billing schedule will apply until the specified timestamp. + /// + [JsonProperty("timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? Timestamp { get; set; } + + /// + /// Describes how the billing schedule will determine the end date. Either duration + /// or timestamp. + /// One of: amendment_end, duration, line_ends_at, schedule_end, + /// timestamp, or upcoming_invoice. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + + /// + /// Use an index to specify the position of an amendment to end prebilling with. + /// + [JsonProperty("amendment_end")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("amendment_end")] +#endif + public SubscriptionScheduleBillingScheduleBillUntilAmendmentEnd AmendmentEnd { get; set; } + + /// + /// Lets you bill the period ending at a particular Quote line. + /// + [JsonProperty("line_ends_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("line_ends_at")] +#endif + public SubscriptionScheduleBillingScheduleBillUntilLineEndsAt LineEndsAt { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilAmendmentEnd.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilAmendmentEnd.cs new file mode 100644 index 0000000000..25464d816c --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilAmendmentEnd.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillUntilAmendmentEnd : StripeEntity + { + /// + /// Use an index to specify the position of an amendment to end prebilling with. + /// + [JsonProperty("index")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("index")] +#endif + public long Index { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilDuration.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilDuration.cs new file mode 100644 index 0000000000..f56a662329 --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilDuration.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillUntilDuration : StripeEntity + { + /// + /// Specifies billing duration. Either day, week, month or year. + /// One of: day, month, week, or year. + /// + [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif + public string Interval { get; set; } + + /// + /// The multiplier applied to the interval. + /// + [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif + public long? IntervalCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilLineEndsAt.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilLineEndsAt.cs new file mode 100644 index 0000000000..01323870cc --- /dev/null +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilLineEndsAt.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillUntilLineEndsAt : StripeEntity, IHasId + { + /// + /// Unique identifier for the object. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + } +} diff --git a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs index 35459e069a..93c4581efa 100644 --- a/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs +++ b/src/Stripe.net/Entities/SubscriptionSchedules/SubscriptionScheduleDefaultSettings.cs @@ -180,5 +180,20 @@ public Account OnBehalfOf [STJS.JsonPropertyName("transfer_data")] #endif public SubscriptionScheduleDefaultSettingsTransferData TransferData { get; set; } + + /// + /// Configures how the subscription schedule handles billing for phase transitions. Possible + /// values are phase_start (default) or billing_period_start. + /// phase_start bills based on the current state of the subscription, ignoring + /// changes scheduled in future phases. billing_period_start bills predictively for + /// upcoming phase transitions within the current billing cycle, including pricing changes + /// and service period adjustments that will occur before the next invoice. + /// One of: billing_period_start, or phase_start. + /// + [JsonProperty("phase_effective_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phase_effective_at")] +#endif + public string PhaseEffectiveAt { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleAppliesToOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleAppliesToOptions.cs new file mode 100644 index 0000000000..28e0a10964 --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleAppliesToOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class InvoiceScheduleDetailsBillingScheduleAppliesToOptions : INestedOptions + { + /// + /// The ID of the price object. + /// + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + + /// + /// Controls which subscription items the billing schedule applies to. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleBillUntilDurationOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleBillUntilDurationOptions.cs new file mode 100644 index 0000000000..251755236e --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleBillUntilDurationOptions.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class InvoiceScheduleDetailsBillingScheduleBillUntilDurationOptions : INestedOptions + { + /// + /// Specifies billing duration. Either day, week, month or year. + /// One of: day, month, week, or year. + /// + [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif + public string Interval { get; set; } + + /// + /// The multiplier applied to the interval. + /// + [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif + public long? IntervalCount { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleBillUntilOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleBillUntilOptions.cs new file mode 100644 index 0000000000..058d699e38 --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleBillUntilOptions.cs @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class InvoiceScheduleDetailsBillingScheduleBillUntilOptions : INestedOptions + { + /// + /// Specifies the billing period. + /// + [JsonProperty("duration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duration")] +#endif + public InvoiceScheduleDetailsBillingScheduleBillUntilDurationOptions Duration { get; set; } + + /// + /// The end date of the billing schedule. + /// + [JsonProperty("timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? Timestamp { get; set; } + + /// + /// Describes how the billing schedule will determine the end date. Either duration + /// or timestamp. + /// One of: amendment_end, duration, line_ends_at, schedule_end, + /// timestamp, or upcoming_invoice. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleOptions.cs new file mode 100644 index 0000000000..43ecac77c3 --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsBillingScheduleOptions.cs @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class InvoiceScheduleDetailsBillingScheduleOptions : INestedOptions + { + /// + /// Configure billing schedule differently for individual subscription items. + /// + [JsonProperty("applies_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applies_to")] +#endif + public List AppliesTo { get; set; } + + /// + /// The end date for the billing schedule. + /// + [JsonProperty("bill_until")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bill_until")] +#endif + public InvoiceScheduleDetailsBillingScheduleBillUntilOptions BillUntil { get; set; } + + /// + /// Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and + /// up to 200 characters. If not provided, a unique key will be generated. + /// + [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif + public string Key { get; set; } + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs index e691b88988..77569185fb 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceScheduleDetailsOptions.cs @@ -85,5 +85,14 @@ public class InvoiceScheduleDetailsOptions : INestedOptions [STJS.JsonPropertyName("proration_behavior")] #endif public string ProrationBehavior { get; set; } + + /// + /// Sets the billing schedules for the subscription schedule. + /// + [JsonProperty("billing_schedules")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_schedules")] +#endif + public List BillingSchedules { get; set; } } } diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleAppliesToOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleAppliesToOptions.cs new file mode 100644 index 0000000000..aa77a25e52 --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleAppliesToOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleAppliesToOptions : INestedOptions + { + /// + /// The ID of the price object. + /// + [JsonProperty("price")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("price")] +#endif + public string Price { get; set; } + + /// + /// Controls which subscription items the billing schedule applies to. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilDurationOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilDurationOptions.cs new file mode 100644 index 0000000000..fd3fea88f7 --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilDurationOptions.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillUntilDurationOptions : INestedOptions + { + /// + /// Specifies billing duration. Either day, week, month or year. + /// One of: day, month, week, or year. + /// + [JsonProperty("interval")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval")] +#endif + public string Interval { get; set; } + + /// + /// The multiplier applied to the interval. + /// + [JsonProperty("interval_count")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("interval_count")] +#endif + public long? IntervalCount { get; set; } + } +} diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilOptions.cs new file mode 100644 index 0000000000..e9c83d4b2e --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleBillUntilOptions.cs @@ -0,0 +1,45 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleBillUntilOptions : INestedOptions + { + /// + /// Specifies the billing period. + /// + [JsonProperty("duration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("duration")] +#endif + public SubscriptionScheduleBillingScheduleBillUntilDurationOptions Duration { get; set; } + + /// + /// The end date of the billing schedule. + /// + [JsonProperty("timestamp")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("timestamp")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? Timestamp { get; set; } + + /// + /// Describes how the billing schedule will determine the end date. Either duration + /// or timestamp. + /// One of: amendment_end, duration, line_ends_at, schedule_end, + /// timestamp, or upcoming_invoice. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleOptions.cs new file mode 100644 index 0000000000..8ba4a374a8 --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleBillingScheduleOptions.cs @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class SubscriptionScheduleBillingScheduleOptions : INestedOptions + { + /// + /// Configure billing schedule differently for individual subscription items. + /// + [JsonProperty("applies_to")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("applies_to")] +#endif + public List AppliesTo { get; set; } + + /// + /// The end date for the billing schedule. + /// + [JsonProperty("bill_until")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("bill_until")] +#endif + public SubscriptionScheduleBillingScheduleBillUntilOptions BillUntil { get; set; } + + /// + /// Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and + /// up to 200 characters. If not provided, a unique key will be generated. + /// + [JsonProperty("key")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("key")] +#endif + public string Key { get; set; } + } +} diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs index 053011ae68..11506907ca 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleCreateOptions.cs @@ -34,6 +34,15 @@ public class SubscriptionScheduleCreateOptions : BaseOptions, IHasMetadata #endif public SubscriptionScheduleBillingModeOptions BillingMode { get; set; } + /// + /// Sets the billing schedules for the subscription schedule. + /// + [JsonProperty("billing_schedules")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_schedules")] +#endif + public List BillingSchedules { get; set; } + /// /// The identifier of the customer to create the subscription schedule for. /// diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs index 5f2fb642dc..98c0e16659 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleDefaultSettingsOptions.cs @@ -110,6 +110,21 @@ public class SubscriptionScheduleDefaultSettingsOptions : INestedOptions #endif public string OnBehalfOf { get; set; } + /// + /// Configures how the subscription schedule handles billing for phase transitions. Possible + /// values are phase_start (default) or billing_period_start. + /// phase_start bills based on the current state of the subscription, ignoring + /// changes scheduled in future phases. billing_period_start bills predictively for + /// upcoming phase transitions within the current billing cycle, including pricing changes + /// and service period adjustments that will occur before the next invoice. + /// One of: billing_period_start, or phase_start. + /// + [JsonProperty("phase_effective_at")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("phase_effective_at")] +#endif + public string PhaseEffectiveAt { get; set; } + /// /// The data with which to automatically create a Transfer for each of the associated /// subscription's invoices. diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs index e2fdc3b889..c06c8524e5 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleUpdateOptions.cs @@ -23,6 +23,15 @@ public class SubscriptionScheduleUpdateOptions : BaseOptions, IHasMetadata #endif public string BillingBehavior { get; set; } + /// + /// Sets the billing schedules for the subscription schedule. + /// + [JsonProperty("billing_schedules")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("billing_schedules")] +#endif + public List BillingSchedules { get; set; } + /// /// Object representing the subscription schedule's default settings. /// From 4d596ca212e2c8acd962bc5901657becbef231e3 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Sat, 15 Nov 2025 00:29:33 +0000 Subject: [PATCH 2/4] Update generated code (#3246) * Update generated code for v2113 and * Update generated code for v2114 and * Update generated code for v2117 and * Update generated code for v2121 and --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- src/Stripe.net/Constants/ApiVersion.cs | 2 +- src/Stripe.net/Constants/EventTypes.cs | 10 +++ .../Entities/BankAccounts/BankAccount.cs | 32 +++++----- ...onfigurationFeaturesPaymentMethodUpdate.cs | 12 ++++ .../ChargePaymentMethodDetailsIdeal.cs | 24 ++++--- ...firmationTokenPaymentMethodPreviewIdeal.cs | 15 ++--- ...reviewUsBankAccountStatusDetailsBlocked.cs | 3 +- src/Stripe.net/Entities/Events/Event.cs | 2 + .../FinancialConnections/Accounts/Account.cs | 9 +++ .../Accounts/AccountAccountNumber.cs | 54 ++++++++++++++++ src/Stripe.net/Entities/Issuing/Cards/Card.cs | 10 +++ .../Issuing/Cards/CardLatestFraudWarning.cs | 37 +++++++++++ ...aymentAttemptRecordPaymentMethodDetails.cs | 3 - ...tAttemptRecordPaymentMethodDetailsIdeal.cs | 24 ++++--- ...RecordPaymentMethodDetailsUsBankAccount.cs | 6 +- .../Entities/PaymentIntents/PaymentIntent.cs | 6 ++ .../PaymentIntents/PaymentIntentHooks.cs | 17 +++++ .../PaymentIntentHooksInputs.cs | 17 +++++ .../PaymentIntentHooksInputsTax.cs | 20 ++++++ .../PaymentMethods/PaymentMethodIdeal.cs | 15 ++--- ...MethodUsBankAccountStatusDetailsBlocked.cs | 3 +- .../PaymentRecordPaymentMethodDetails.cs | 3 - .../PaymentRecordPaymentMethodDetailsIdeal.cs | 24 ++++--- ...RecordPaymentMethodDetailsUsBankAccount.cs | 6 +- .../Refunds/RefundDestinationDetails.cs | 12 ++++ .../Refunds/RefundDestinationDetailsMbWay.cs | 30 +++++++++ .../Refunds/RefundDestinationDetailsTwint.cs | 7 +++ .../SetupAttemptPaymentMethodDetailsIdeal.cs | 15 ++--- .../Entities/Tax/Associations/Association.cs | 63 +++++++++++++++++++ .../AssociationTaxTransactionAttempt.cs | 41 ++++++++++++ ...sociationTaxTransactionAttemptCommitted.cs | 20 ++++++ ...AssociationTaxTransactionAttemptErrored.cs | 23 +++++++ .../OnboardingLinks/OnboardingLink.cs | 56 +++++++++++++++++ .../OnboardingLinkLinkOptions.cs | 20 ++++++ ...gLinkLinkOptionsAppleTermsAndConditions.cs | 29 +++++++++ .../Entities/V2/Core/Events/Event.cs | 10 +++ .../Public/StripeTypeRegistry.cs | 2 + .../CustomerBalanceTransactionListOptions.cs | 18 ++++++ .../InvoicePaymentListOptions.cs | 13 ++++ .../PaymentIntentCaptureOptions.cs | 9 +++ .../PaymentIntentConfirmOptions.cs | 9 +++ .../PaymentIntentCreateOptions.cs | 9 +++ .../PaymentIntentHooksInputsOptions.cs | 20 ++++++ .../PaymentIntentHooksInputsTaxOptions.cs | 20 ++++++ .../PaymentIntentHooksOptions.cs | 20 ++++++ ...mentIntentIncrementAuthorizationOptions.cs | 9 +++ ...mentIntentPaymentMethodDataIdealOptions.cs | 2 +- .../PaymentIntentUpdateOptions.cs | 9 +++ .../PaymentMethodIdealOptions.cs | 2 +- ...etupIntentPaymentMethodDataIdealOptions.cs | 2 +- .../Associations/AssociationFindOptions.cs | 20 ++++++ .../Tax/Associations/AssociationService.cs | 41 ++++++++++++ ...ountryOptionsUsLocalAmusementTaxOptions.cs | 6 +- src/Stripe.net/Services/TaxService.cs | 4 ++ .../OnboardingLinkCreateOptions.cs | 38 +++++++++++ ...nkOptionsAppleTermsAndConditionsOptions.cs | 29 +++++++++ .../OnboardingLinkLinkOptionsOptions.cs | 20 ++++++ .../OnboardingLinks/OnboardingLinkService.cs | 44 +++++++++++++ src/Stripe.net/Services/TerminalService.cs | 4 ++ ...ationTokenPaymentMethodDataIdealOptions.cs | 2 +- ...orizationRiskAssessmentFraudRiskOptions.cs | 33 ++++++++++ .../AuthorizationRiskAssessmentOptions.cs | 9 +++ .../WebhookEndpointCreateOptions.cs | 4 +- .../WebhookEndpointUpdateOptions.cs | 2 + .../Services/GeneratedExamplesTest.cs | 2 +- 67 files changed, 1006 insertions(+), 80 deletions(-) create mode 100644 src/Stripe.net/Entities/FinancialConnections/Accounts/AccountAccountNumber.cs create mode 100644 src/Stripe.net/Entities/Issuing/Cards/CardLatestFraudWarning.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooks.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputs.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputsTax.cs create mode 100644 src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMbWay.cs create mode 100644 src/Stripe.net/Entities/Refunds/RefundDestinationDetailsTwint.cs create mode 100644 src/Stripe.net/Entities/Tax/Associations/Association.cs create mode 100644 src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttempt.cs create mode 100644 src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptCommitted.cs create mode 100644 src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptErrored.cs create mode 100644 src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLink.cs create mode 100644 src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLinkLinkOptions.cs create mode 100644 src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsAppleTermsAndConditions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksOptions.cs create mode 100644 src/Stripe.net/Services/Tax/Associations/AssociationFindOptions.cs create mode 100644 src/Stripe.net/Services/Tax/Associations/AssociationService.cs create mode 100644 src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkCreateOptions.cs create mode 100644 src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsAppleTermsAndConditionsOptions.cs create mode 100644 src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsOptions.cs create mode 100644 src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkService.cs create mode 100644 src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRiskAssessmentFraudRiskOptions.cs diff --git a/API_VERSION b/API_VERSION index dffa3a76a2..e0ecaaa28e 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -6d15a7f20cb77c2c22091a30e499cb89d7e3248c \ No newline at end of file +f587035a62fe3323ed42077a0526158e57a8260b \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dfd2783f16..559abffe4b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2111 \ No newline at end of file +v2121 \ No newline at end of file diff --git a/src/Stripe.net/Constants/ApiVersion.cs b/src/Stripe.net/Constants/ApiVersion.cs index 3fd1388ce4..fe194fbea8 100644 --- a/src/Stripe.net/Constants/ApiVersion.cs +++ b/src/Stripe.net/Constants/ApiVersion.cs @@ -3,7 +3,7 @@ namespace Stripe { internal class ApiVersion { - public const string Current = "2025-10-29.clover"; + public const string Current = "2025-11-17.clover"; public const string CurrentMajor = "clover"; } } \ No newline at end of file diff --git a/src/Stripe.net/Constants/EventTypes.cs b/src/Stripe.net/Constants/EventTypes.cs index c5488baa38..203816bac0 100644 --- a/src/Stripe.net/Constants/EventTypes.cs +++ b/src/Stripe.net/Constants/EventTypes.cs @@ -423,6 +423,11 @@ public static class EventTypes /// public const string FileCreated = "file.created"; + /// + /// Occurs when a Financial Connections account's account numbers are updated. + /// + public const string FinancialConnectionsAccountAccountNumbersUpdated = "financial_connections.account.account_numbers_updated"; + /// /// Occurs when a new Financial Connections account is created. /// @@ -463,6 +468,11 @@ public static class EventTypes /// public const string FinancialConnectionsAccountRefreshedTransactions = "financial_connections.account.refreshed_transactions"; + /// + /// Occurs when an Account’s tokenized account number is about to expire. + /// + public const string FinancialConnectionsAccountUpcomingAccountNumberExpiry = "financial_connections.account.upcoming_account_number_expiry"; + /// /// Occurs whenever a VerificationSession is canceled. /// diff --git a/src/Stripe.net/Entities/BankAccounts/BankAccount.cs b/src/Stripe.net/Entities/BankAccounts/BankAccount.cs index e96dff8d61..27bb0dec24 100644 --- a/src/Stripe.net/Entities/BankAccounts/BankAccount.cs +++ b/src/Stripe.net/Entities/BankAccounts/BankAccount.cs @@ -283,21 +283,25 @@ public Customer Customer /// /// For bank accounts, possible values are new, validated, verified, - /// verification_failed, or errored. A bank account that hasn't had any - /// activity or validation performed is new. If Stripe can determine that the bank - /// account exists, its status will be validated. Note that there often isn’t enough - /// information to know (e.g., for smaller credit unions), and the validation is not always - /// run. If customer bank account verification has succeeded, the bank account status will - /// be verified. If the verification failed for any reason, such as microdeposit - /// failure, the status will be verification_failed. If a payout sent to this bank - /// account fails, we'll set the status to errored and will not continue to send scheduled payouts until the - /// bank details are updated. + /// verification_failed, tokenized_account_number_deactivated or + /// errored. A bank account that hasn't had any activity or validation performed is + /// new. If Stripe can determine that the bank account exists, its status will be + /// validated. Note that there often isn’t enough information to know (e.g., for + /// smaller credit unions), and the validation is not always run. If customer bank account + /// verification has succeeded, the bank account status will be verified. If the + /// verification failed for any reason, such as microdeposit failure, the status will be + /// verification_failed. If the status is + /// tokenized_account_number_deactivated, the account utilizes a tokenized account + /// number which has been deactivated due to expiration or revocation. This account will + /// need to be reverified to continue using it for money movement. If a payout sent to this + /// bank account fails, we'll set the status to errored and will not continue to send + /// scheduled payouts until + /// the bank details are updated. /// - /// For external accounts, possible values are new, errored and - /// verification_failed. If a payout fails, the status is set to errored and - /// scheduled payouts are stopped until account details are updated. In the US and India, if - /// we can't new, errored, + /// verification_failed, and tokenized_account_number_deactivated. If a payout + /// fails, the status is set to errored and scheduled payouts are stopped until + /// account details are updated. In the US and India, if we can't verify /// the owner of the bank account, we'll set the status to verification_failed. /// Other validations aren't run against external accounts because they're only used for diff --git a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdate.cs b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdate.cs index e0954104d7..1e00668a5f 100644 --- a/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdate.cs +++ b/src/Stripe.net/Entities/BillingPortal/Configurations/ConfigurationFeaturesPaymentMethodUpdate.cs @@ -16,5 +16,17 @@ public class ConfigurationFeaturesPaymentMethodUpdate : StripeEntity + /// The Payment Method + /// Configuration to use for this portal session. When specified, customers will be able + /// to update their payment method to one of the options specified by the payment method + /// configuration. If not set, the default payment method configuration is used. + /// + [JsonProperty("payment_method_configuration")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_method_configuration")] +#endif + public string PaymentMethodConfiguration { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsIdeal.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsIdeal.cs index a18217a5d6..dc76ae31fa 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsIdeal.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetailsIdeal.cs @@ -14,10 +14,11 @@ public class ChargePaymentMethodDetailsIdeal : StripeEntity /// The customer's bank. Can be one of abn_amro, asn_bank, bunq, - /// buut, handelsbanken, ing, knab, moneyou, n26, - /// nn, rabobank, regiobank, revolut, sns_bank, - /// triodos_bank, van_lanschot, or yoursafe. - /// One of: abn_amro, asn_bank, bunq, buut, + /// buut, finom, handelsbanken, ing, knab, + /// moneyou, n26, nn, rabobank, regiobank, + /// revolut, sns_bank, triodos_bank, van_lanschot, or + /// yoursafe. + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. @@ -31,9 +32,9 @@ public class ChargePaymentMethodDetailsIdeal : StripeEntity /// The Bank Identifier Code of the customer's bank. /// One of: ABNANL2A, ASNBNL21, BITSNL2A, BUNQNL2A, - /// BUUTNL2A, FVLBNL22, HANDNL2A, INGBNL2A, KNABNL2H, - /// MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, RBRBNL21, - /// REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. + /// BUUTNL2A, FNOMNL22, FVLBNL22, HANDNL2A, INGBNL2A, + /// KNABNL2H, MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, + /// RBRBNL21, REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] #if NET6_0_OR_GREATER @@ -132,6 +133,15 @@ public Mandate GeneratedSepaDebitMandate #endif public string IbanLast4 { get; set; } + /// + /// Unique transaction ID generated by iDEAL. + /// + [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif + public string TransactionId { get; set; } + /// /// Owner's verified full name. Values are verified or provided by iDEAL directly (if /// supported) at the time of authorization or settlement. They cannot be set or mutated. diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewIdeal.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewIdeal.cs index cd6e5f6a51..91c51b0965 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewIdeal.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewIdeal.cs @@ -10,10 +10,11 @@ public class ConfirmationTokenPaymentMethodPreviewIdeal : StripeEntity /// The customer's bank, if provided. Can be one of abn_amro, asn_bank, - /// bunq, buut, handelsbanken, ing, knab, moneyou, - /// n26, nn, rabobank, regiobank, revolut, - /// sns_bank, triodos_bank, van_lanschot, or yoursafe. - /// One of: abn_amro, asn_bank, bunq, buut, + /// bunq, buut, finom, handelsbanken, ing, knab, + /// moneyou, n26, nn, rabobank, regiobank, + /// revolut, sns_bank, triodos_bank, van_lanschot, or + /// yoursafe. + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. @@ -27,9 +28,9 @@ public class ConfirmationTokenPaymentMethodPreviewIdeal : StripeEntity /// The Bank Identifier Code of the customer's bank, if the bank was provided. /// One of: ABNANL2A, ASNBNL21, BITSNL2A, BUNQNL2A, - /// BUUTNL2A, FVLBNL22, HANDNL2A, INGBNL2A, KNABNL2H, - /// MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, RBRBNL21, - /// REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. + /// BUUTNL2A, FNOMNL22, FVLBNL22, HANDNL2A, INGBNL2A, + /// KNABNL2H, MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, + /// RBRBNL21, REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked.cs b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked.cs index 59e33cfa27..05c33bc59a 100644 --- a/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked.cs +++ b/src/Stripe.net/Entities/ConfirmationTokens/ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBlocked.cs @@ -23,7 +23,8 @@ public class ConfirmationTokenPaymentMethodPreviewUsBankAccountStatusDetailsBloc /// The reason why this PaymentMethod's fingerprint has been blocked. /// One of: bank_account_closed, bank_account_frozen, /// bank_account_invalid_details, bank_account_restricted, - /// bank_account_unusable, or debit_not_authorized. + /// bank_account_unusable, debit_not_authorized, or + /// tokenized_account_number_deactivated. /// [JsonProperty("reason")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Events/Event.cs b/src/Stripe.net/Entities/Events/Event.cs index 4bd3e41c81..0d16de57bd 100644 --- a/src/Stripe.net/Entities/Events/Event.cs +++ b/src/Stripe.net/Entities/Events/Event.cs @@ -168,6 +168,7 @@ public class Event : StripeEntity, IHasId, IHasObject /// customer.tax_id.deleted, customer.tax_id.updated, customer.updated, /// customer_cash_balance_transaction.created, /// entitlements.active_entitlement_summary.updated, file.created, + /// financial_connections.account.account_numbers_updated, /// financial_connections.account.created, /// financial_connections.account.deactivated, /// financial_connections.account.disconnected, @@ -175,6 +176,7 @@ public class Event : StripeEntity, IHasId, IHasObject /// financial_connections.account.refreshed_balance, /// financial_connections.account.refreshed_ownership, /// financial_connections.account.refreshed_transactions, + /// financial_connections.account.upcoming_account_number_expiry, /// identity.verification_session.canceled, /// identity.verification_session.created, /// identity.verification_session.processing, diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs index 591ddc6366..d629637502 100644 --- a/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/Account.cs @@ -45,6 +45,15 @@ public class Account : StripeEntity, IHasId, IHasObject #endif public AccountAccountHolder AccountHolder { get; set; } + /// + /// Details about the account numbers. + /// + [JsonProperty("account_numbers")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("account_numbers")] +#endif + public List AccountNumbers { get; set; } + /// /// The most recent information about the account's balance. /// diff --git a/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountAccountNumber.cs b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountAccountNumber.cs new file mode 100644 index 0000000000..6541dc1650 --- /dev/null +++ b/src/Stripe.net/Entities/FinancialConnections/Accounts/AccountAccountNumber.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.FinancialConnections +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AccountAccountNumber : StripeEntity + { + /// + /// When the account number is expected to expire, if applicable. + /// + [JsonProperty("expected_expiry_date")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("expected_expiry_date")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? ExpectedExpiryDate { get; set; } + + /// + /// The type of account number associated with the account. + /// One of: account_number, or tokenized_account_number. + /// + [JsonProperty("identifier_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("identifier_type")] +#endif + public string IdentifierType { get; set; } + + /// + /// Whether the account number is currently active and usable for transactions. + /// One of: deactivated, or transactable. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + + /// + /// The payment networks that the account number can be used for. + /// + [JsonProperty("supported_networks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("supported_networks")] +#endif + public List SupportedNetworks { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Issuing/Cards/Card.cs b/src/Stripe.net/Entities/Issuing/Cards/Card.cs index 5aeb83b440..25226abd10 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/Card.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/Card.cs @@ -141,6 +141,16 @@ public class Card : StripeEntity, IHasId, IHasMetadata, IHasObject #endif public string Last4 { get; set; } + /// + /// Stripe’s assessment of whether this card’s details have been compromised. If this + /// property isn't null, cancel and reissue the card to prevent fraudulent activity risk. + /// + [JsonProperty("latest_fraud_warning")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("latest_fraud_warning")] +#endif + public CardLatestFraudWarning LatestFraudWarning { get; set; } + /// /// Has the value true if the object exists in live mode or the value false if /// the object exists in test mode. diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardLatestFraudWarning.cs b/src/Stripe.net/Entities/Issuing/Cards/CardLatestFraudWarning.cs new file mode 100644 index 0000000000..220d92ba10 --- /dev/null +++ b/src/Stripe.net/Entities/Issuing/Cards/CardLatestFraudWarning.cs @@ -0,0 +1,37 @@ +// File generated from our OpenAPI spec +namespace Stripe.Issuing +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class CardLatestFraudWarning : StripeEntity + { + /// + /// Timestamp of the most recent fraud warning. + /// + [JsonProperty("started_at")] + [JsonConverter(typeof(UnixDateTimeConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("started_at")] + [STJS.JsonConverter(typeof(STJUnixDateTimeConverter))] +#endif + public DateTime? StartedAt { get; set; } + + /// + /// The type of fraud warning that most recently took place on this card. This field updates + /// with every new fraud warning, so the value changes over time. If populated, cancel and + /// reissue the card. + /// One of: card_testing_exposure, fraud_dispute_filed, + /// third_party_reported, or user_indicated_fraud. + /// + [JsonProperty("type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("type")] +#endif + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs index 2cf4480a6b..a1e6bf232f 100644 --- a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetails.cs @@ -366,9 +366,6 @@ public class PaymentAttemptRecordPaymentMethodDetails : StripeEntity - /// Details of the US Bank Account used for this payment attempt. - /// [JsonProperty("us_bank_account")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("us_bank_account")] diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsIdeal.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsIdeal.cs index dd241bc1a2..05d09359df 100644 --- a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsIdeal.cs +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsIdeal.cs @@ -14,10 +14,11 @@ public class PaymentAttemptRecordPaymentMethodDetailsIdeal : StripeEntity /// The customer's bank. Can be one of abn_amro, asn_bank, bunq, - /// buut, handelsbanken, ing, knab, moneyou, n26, - /// nn, rabobank, regiobank, revolut, sns_bank, - /// triodos_bank, van_lanschot, or yoursafe. - /// One of: abn_amro, asn_bank, bunq, buut, + /// buut, finom, handelsbanken, ing, knab, + /// moneyou, n26, nn, rabobank, regiobank, + /// revolut, sns_bank, triodos_bank, van_lanschot, or + /// yoursafe. + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. @@ -31,9 +32,9 @@ public class PaymentAttemptRecordPaymentMethodDetailsIdeal : StripeEntity /// The Bank Identifier Code of the customer's bank. /// One of: ABNANL2A, ASNBNL21, BITSNL2A, BUNQNL2A, - /// BUUTNL2A, FVLBNL22, HANDNL2A, INGBNL2A, KNABNL2H, - /// MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, RBRBNL21, - /// REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. + /// BUUTNL2A, FNOMNL22, FVLBNL22, HANDNL2A, INGBNL2A, + /// KNABNL2H, MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, + /// RBRBNL21, REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] #if NET6_0_OR_GREATER @@ -132,6 +133,15 @@ public Mandate GeneratedSepaDebitMandate #endif public string IbanLast4 { get; set; } + /// + /// Unique transaction ID generated by iDEAL. + /// + [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif + public string TransactionId { get; set; } + /// /// Owner's verified full name. Values are verified or provided by iDEAL directly (if /// supported) at the time of authorization or settlement. They cannot be set or mutated. diff --git a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsUsBankAccount.cs b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsUsBankAccount.cs index 5d64c89d8d..acdecb8120 100644 --- a/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsUsBankAccount.cs +++ b/src/Stripe.net/Entities/PaymentAttemptRecords/PaymentAttemptRecordPaymentMethodDetailsUsBankAccount.cs @@ -13,6 +13,7 @@ namespace Stripe public class PaymentAttemptRecordPaymentMethodDetailsUsBankAccount : StripeEntity { /// + /// The type of entity that holds the account. This can be either 'individual' or 'company'. /// One of: company, or individual. /// [JsonProperty("account_holder_type")] @@ -22,6 +23,7 @@ public class PaymentAttemptRecordPaymentMethodDetailsUsBankAccount : StripeEntit public string AccountHolderType { get; set; } /// + /// The type of the bank account. This can be either 'checking' or 'savings'. /// One of: checking, or savings. /// [JsonProperty("account_type")] @@ -100,7 +102,7 @@ public Mandate Mandate #endregion /// - /// Reference number to locate ACH payments with customer’s bank. + /// The ACH payment reference for this transaction. /// [JsonProperty("payment_reference")] #if NET6_0_OR_GREATER @@ -109,7 +111,7 @@ public Mandate Mandate public string PaymentReference { get; set; } /// - /// Routing number of the bank account. + /// The routing number for the bank account. /// [JsonProperty("routing_number")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs index 209931ce23..dbba48065d 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -331,6 +331,12 @@ public Customer Customer #endif public List ExcludedPaymentMethodTypes { get; set; } + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooks Hooks { get; set; } + /// /// The payment error encountered in the previous PaymentIntent confirmation. It will be /// cleared if the PaymentIntent is later updated for any reason. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooks.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooks.cs new file mode 100644 index 0000000000..cae1e0a191 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooks.cs @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentHooks : StripeEntity + { + [JsonProperty("inputs")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inputs")] +#endif + public PaymentIntentHooksInputs Inputs { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputs.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputs.cs new file mode 100644 index 0000000000..be6b015d94 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputs.cs @@ -0,0 +1,17 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentHooksInputs : StripeEntity + { + [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif + public PaymentIntentHooksInputsTax Tax { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputsTax.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputsTax.cs new file mode 100644 index 0000000000..d955964187 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentHooksInputsTax.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentHooksInputsTax : StripeEntity + { + /// + /// The TaxCalculation id. + /// + [JsonProperty("calculation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("calculation")] +#endif + public string Calculation { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodIdeal.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodIdeal.cs index a122f28ec3..c4f5ec8957 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodIdeal.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodIdeal.cs @@ -10,10 +10,11 @@ public class PaymentMethodIdeal : StripeEntity { /// /// The customer's bank, if provided. Can be one of abn_amro, asn_bank, - /// bunq, buut, handelsbanken, ing, knab, moneyou, - /// n26, nn, rabobank, regiobank, revolut, - /// sns_bank, triodos_bank, van_lanschot, or yoursafe. - /// One of: abn_amro, asn_bank, bunq, buut, + /// bunq, buut, finom, handelsbanken, ing, knab, + /// moneyou, n26, nn, rabobank, regiobank, + /// revolut, sns_bank, triodos_bank, van_lanschot, or + /// yoursafe. + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. @@ -27,9 +28,9 @@ public class PaymentMethodIdeal : StripeEntity /// /// The Bank Identifier Code of the customer's bank, if the bank was provided. /// One of: ABNANL2A, ASNBNL21, BITSNL2A, BUNQNL2A, - /// BUUTNL2A, FVLBNL22, HANDNL2A, INGBNL2A, KNABNL2H, - /// MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, RBRBNL21, - /// REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. + /// BUUTNL2A, FNOMNL22, FVLBNL22, HANDNL2A, INGBNL2A, + /// KNABNL2H, MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, + /// RBRBNL21, REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetailsBlocked.cs b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetailsBlocked.cs index c575943be0..a9ead620a9 100644 --- a/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetailsBlocked.cs +++ b/src/Stripe.net/Entities/PaymentMethods/PaymentMethodUsBankAccountStatusDetailsBlocked.cs @@ -23,7 +23,8 @@ public class PaymentMethodUsBankAccountStatusDetailsBlocked : StripeEntitybank_account_closed, bank_account_frozen, /// bank_account_invalid_details, bank_account_restricted, - /// bank_account_unusable, or debit_not_authorized. + /// bank_account_unusable, debit_not_authorized, or + /// tokenized_account_number_deactivated. /// [JsonProperty("reason")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs index 62057a1416..3364ea16ea 100644 --- a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetails.cs @@ -366,9 +366,6 @@ public class PaymentRecordPaymentMethodDetails : StripeEntity - /// Details of the US Bank Account used for this payment attempt. - /// [JsonProperty("us_bank_account")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("us_bank_account")] diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsIdeal.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsIdeal.cs index a5a16582b6..419184c93d 100644 --- a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsIdeal.cs +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsIdeal.cs @@ -14,10 +14,11 @@ public class PaymentRecordPaymentMethodDetailsIdeal : StripeEntity /// The customer's bank. Can be one of abn_amro, asn_bank, bunq, - /// buut, handelsbanken, ing, knab, moneyou, n26, - /// nn, rabobank, regiobank, revolut, sns_bank, - /// triodos_bank, van_lanschot, or yoursafe. - /// One of: abn_amro, asn_bank, bunq, buut, + /// buut, finom, handelsbanken, ing, knab, + /// moneyou, n26, nn, rabobank, regiobank, + /// revolut, sns_bank, triodos_bank, van_lanschot, or + /// yoursafe. + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. @@ -31,9 +32,9 @@ public class PaymentRecordPaymentMethodDetailsIdeal : StripeEntity /// The Bank Identifier Code of the customer's bank. /// One of: ABNANL2A, ASNBNL21, BITSNL2A, BUNQNL2A, - /// BUUTNL2A, FVLBNL22, HANDNL2A, INGBNL2A, KNABNL2H, - /// MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, RBRBNL21, - /// REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. + /// BUUTNL2A, FNOMNL22, FVLBNL22, HANDNL2A, INGBNL2A, + /// KNABNL2H, MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, + /// RBRBNL21, REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] #if NET6_0_OR_GREATER @@ -132,6 +133,15 @@ public Mandate GeneratedSepaDebitMandate #endif public string IbanLast4 { get; set; } + /// + /// Unique transaction ID generated by iDEAL. + /// + [JsonProperty("transaction_id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction_id")] +#endif + public string TransactionId { get; set; } + /// /// Owner's verified full name. Values are verified or provided by iDEAL directly (if /// supported) at the time of authorization or settlement. They cannot be set or mutated. diff --git a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsUsBankAccount.cs b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsUsBankAccount.cs index 40823c3e48..a26ba93bf8 100644 --- a/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsUsBankAccount.cs +++ b/src/Stripe.net/Entities/PaymentRecords/PaymentRecordPaymentMethodDetailsUsBankAccount.cs @@ -13,6 +13,7 @@ namespace Stripe public class PaymentRecordPaymentMethodDetailsUsBankAccount : StripeEntity { /// + /// The type of entity that holds the account. This can be either 'individual' or 'company'. /// One of: company, or individual. /// [JsonProperty("account_holder_type")] @@ -22,6 +23,7 @@ public class PaymentRecordPaymentMethodDetailsUsBankAccount : StripeEntity + /// The type of the bank account. This can be either 'checking' or 'savings'. /// One of: checking, or savings. /// [JsonProperty("account_type")] @@ -100,7 +102,7 @@ public Mandate Mandate #endregion /// - /// Reference number to locate ACH payments with customer’s bank. + /// The ACH payment reference for this transaction. /// [JsonProperty("payment_reference")] #if NET6_0_OR_GREATER @@ -109,7 +111,7 @@ public Mandate Mandate public string PaymentReference { get; set; } /// - /// Routing number of the bank account. + /// The routing number for the bank account. /// [JsonProperty("routing_number")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs index 44987e7c86..1b2adf9ea4 100644 --- a/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetails.cs @@ -122,6 +122,12 @@ public class RefundDestinationDetails : StripeEntity #endif public RefundDestinationDetailsKlarna Klarna { get; set; } + [JsonProperty("mb_way")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("mb_way")] +#endif + public RefundDestinationDetailsMbWay MbWay { get; set; } + [JsonProperty("multibanco")] #if NET6_0_OR_GREATER [STJS.JsonPropertyName("multibanco")] @@ -188,6 +194,12 @@ public class RefundDestinationDetails : StripeEntity #endif public RefundDestinationDetailsThBankTransfer ThBankTransfer { get; set; } + [JsonProperty("twint")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("twint")] +#endif + public RefundDestinationDetailsTwint Twint { get; set; } + /// /// The type of transaction-specific details of the payment method used in the refund (e.g., /// card). An additional hash is included on destination_details with a name diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMbWay.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMbWay.cs new file mode 100644 index 0000000000..a9282384b3 --- /dev/null +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsMbWay.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class RefundDestinationDetailsMbWay : StripeEntity + { + /// + /// The reference assigned to the refund. + /// + [JsonProperty("reference")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference")] +#endif + public string Reference { get; set; } + + /// + /// Status of the reference on the refund. This can be pending, available or + /// unavailable. + /// + [JsonProperty("reference_status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reference_status")] +#endif + public string ReferenceStatus { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsTwint.cs b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsTwint.cs new file mode 100644 index 0000000000..add2b7acf9 --- /dev/null +++ b/src/Stripe.net/Entities/Refunds/RefundDestinationDetailsTwint.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class RefundDestinationDetailsTwint : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsIdeal.cs b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsIdeal.cs index 1f63ba87ce..d4671d8dfa 100644 --- a/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsIdeal.cs +++ b/src/Stripe.net/Entities/SetupAttempts/SetupAttemptPaymentMethodDetailsIdeal.cs @@ -14,10 +14,11 @@ public class SetupAttemptPaymentMethodDetailsIdeal : StripeEntity /// The customer's bank. Can be one of abn_amro, asn_bank, bunq, - /// buut, handelsbanken, ing, knab, moneyou, n26, - /// nn, rabobank, regiobank, revolut, sns_bank, - /// triodos_bank, van_lanschot, or yoursafe. - /// One of: abn_amro, asn_bank, bunq, buut, + /// buut, finom, handelsbanken, ing, knab, + /// moneyou, n26, nn, rabobank, regiobank, + /// revolut, sns_bank, triodos_bank, van_lanschot, or + /// yoursafe. + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. @@ -31,9 +32,9 @@ public class SetupAttemptPaymentMethodDetailsIdeal : StripeEntity /// The Bank Identifier Code of the customer's bank. /// One of: ABNANL2A, ASNBNL21, BITSNL2A, BUNQNL2A, - /// BUUTNL2A, FVLBNL22, HANDNL2A, INGBNL2A, KNABNL2H, - /// MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, RBRBNL21, - /// REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. + /// BUUTNL2A, FNOMNL22, FVLBNL22, HANDNL2A, INGBNL2A, + /// KNABNL2H, MOYONL21, NNBANL2G, NTSBDEB1, RABONL2U, + /// RBRBNL21, REVOIE23, REVOLT21, SNSBNL2A, or TRIONL2U. /// [JsonProperty("bic")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Entities/Tax/Associations/Association.cs b/src/Stripe.net/Entities/Tax/Associations/Association.cs new file mode 100644 index 0000000000..090e2f3767 --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Associations/Association.cs @@ -0,0 +1,63 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using System.Collections.Generic; + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// A Tax Association exposes the Tax Transactions that Stripe attempted to create on your + /// behalf based on the PaymentIntent input. + /// + public class Association : StripeEntity, IHasId, IHasObject + { + /// + /// Unique identifier for the object. + /// + [JsonProperty("id")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("id")] +#endif + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value. + /// + [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif + public string Object { get; set; } + + /// + /// The Tax Calculation + /// that was included in PaymentIntent. + /// + [JsonProperty("calculation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("calculation")] +#endif + public string Calculation { get; set; } + + /// + /// The PaymentIntent that + /// this Tax Association is tracking. + /// + [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif + public string PaymentIntent { get; set; } + + /// + /// Information about the tax transactions linked to this payment intent. + /// + [JsonProperty("tax_transaction_attempts")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax_transaction_attempts")] +#endif + public List TaxTransactionAttempts { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttempt.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttempt.cs new file mode 100644 index 0000000000..25dbc2667a --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttempt.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AssociationTaxTransactionAttempt : StripeEntity + { + [JsonProperty("committed")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("committed")] +#endif + public AssociationTaxTransactionAttemptCommitted Committed { get; set; } + + [JsonProperty("errored")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("errored")] +#endif + public AssociationTaxTransactionAttemptErrored Errored { get; set; } + + /// + /// The source of the tax transaction attempt. This is either a refund or a payment intent. + /// + [JsonProperty("source")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("source")] +#endif + public string Source { get; set; } + + /// + /// The status of the transaction attempt. This can be errored or committed. + /// + [JsonProperty("status")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("status")] +#endif + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptCommitted.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptCommitted.cs new file mode 100644 index 0000000000..93cbf366fd --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptCommitted.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AssociationTaxTransactionAttemptCommitted : StripeEntity + { + /// + /// The Tax Transaction. + /// + [JsonProperty("transaction")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("transaction")] +#endif + public string Transaction { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptErrored.cs b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptErrored.cs new file mode 100644 index 0000000000..906fe0cdea --- /dev/null +++ b/src/Stripe.net/Entities/Tax/Associations/AssociationTaxTransactionAttemptErrored.cs @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AssociationTaxTransactionAttemptErrored : StripeEntity + { + /// + /// Details on why we couldn't commit the tax transaction. + /// One of: another_payment_associated_with_calculation, calculation_expired, + /// currency_mismatch, original_transaction_voided, or + /// unique_reference_violation. + /// + [JsonProperty("reason")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("reason")] +#endif + public string Reason { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLink.cs b/src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLink.cs new file mode 100644 index 0000000000..33fbd45dca --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLink.cs @@ -0,0 +1,56 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + /// + /// Returns redirect links used for onboarding onto Tap to Pay on iPhone. + /// + public class OnboardingLink : StripeEntity, IHasObject + { + [JsonProperty("object")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("object")] +#endif + public string Object { get; set; } + + /// + /// Link type options associated with the current onboarding link object. + /// + [JsonProperty("link_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link_options")] +#endif + public OnboardingLinkLinkOptions LinkOptions { get; set; } + + /// + /// The type of link being generated. + /// + [JsonProperty("link_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link_type")] +#endif + public string LinkType { get; set; } + + /// + /// Stripe account ID to generate the link for. + /// + [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif + public string OnBehalfOf { get; set; } + + /// + /// The link passed back to the user for their onboarding. + /// + [JsonProperty("redirect_url")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("redirect_url")] +#endif + public string RedirectUrl { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLinkLinkOptions.cs b/src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLinkLinkOptions.cs new file mode 100644 index 0000000000..24bcc24a03 --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLinkLinkOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OnboardingLinkLinkOptions : StripeEntity + { + /// + /// The options associated with the Apple Terms and Conditions link type. + /// + [JsonProperty("apple_terms_and_conditions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_terms_and_conditions")] +#endif + public OnboardingLinkLinkOptionsAppleTermsAndConditions AppleTermsAndConditions { get; set; } + } +} diff --git a/src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsAppleTermsAndConditions.cs b/src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsAppleTermsAndConditions.cs new file mode 100644 index 0000000000..8b971ab7af --- /dev/null +++ b/src/Stripe.net/Entities/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsAppleTermsAndConditions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OnboardingLinkLinkOptionsAppleTermsAndConditions : StripeEntity + { + /// + /// Whether the link should also support users relinking their Apple account. + /// + [JsonProperty("allow_relinking")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_relinking")] +#endif + public bool? AllowRelinking { get; set; } + + /// + /// The business name of the merchant accepting Apple's Terms and Conditions. + /// + [JsonProperty("merchant_display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_display_name")] +#endif + public string MerchantDisplayName { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Events/Event.cs b/src/Stripe.net/Entities/V2/Core/Events/Event.cs index 93f2c9ad39..090774f6d3 100644 --- a/src/Stripe.net/Entities/V2/Core/Events/Event.cs +++ b/src/Stripe.net/Entities/V2/Core/Events/Event.cs @@ -2,6 +2,7 @@ namespace Stripe.V2.Core { using System; + using System.Collections.Generic; using Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -31,6 +32,15 @@ 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/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index fd02dfbe35..f52099db7d 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -142,6 +142,7 @@ public static class StripeTypeRegistry { "subscription", typeof(Subscription) }, { "subscription_item", typeof(SubscriptionItem) }, { "subscription_schedule", typeof(SubscriptionSchedule) }, + { "tax.association", typeof(Tax.Association) }, { "tax.calculation", typeof(Tax.Calculation) }, { "tax.calculation_line_item", typeof(Tax.CalculationLineItem) }, { "tax.registration", typeof(Tax.Registration) }, @@ -155,6 +156,7 @@ public static class StripeTypeRegistry { "terminal.configuration", typeof(Terminal.Configuration) }, { "terminal.connection_token", typeof(Terminal.ConnectionToken) }, { "terminal.location", typeof(Terminal.Location) }, + { "terminal.onboarding_link", typeof(Terminal.OnboardingLink) }, { "terminal.reader", typeof(Terminal.Reader) }, { "test_helpers.test_clock", typeof(TestHelpers.TestClock) }, { "token", typeof(Token) }, diff --git a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionListOptions.cs b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionListOptions.cs index 94d00ca0ad..0251ef05b3 100644 --- a/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionListOptions.cs +++ b/src/Stripe.net/Services/CustomerBalanceTransactions/CustomerBalanceTransactionListOptions.cs @@ -1,7 +1,25 @@ // File generated from our OpenAPI spec namespace Stripe { + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + public class CustomerBalanceTransactionListOptions : ListOptions { + /// + /// Only return customer balance transactions that were created during the given date + /// interval. + /// + [JsonProperty("created")] + [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif + public AnyOf Created { get; set; } } } diff --git a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs index 7b6066f04e..a190b3b7e7 100644 --- a/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs +++ b/src/Stripe.net/Services/InvoicePayments/InvoicePaymentListOptions.cs @@ -1,13 +1,26 @@ // File generated from our OpenAPI spec namespace Stripe { + using System; using Newtonsoft.Json; + using Stripe.Infrastructure; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; #endif public class InvoicePaymentListOptions : ListOptions { + /// + /// Only return invoice payments that were created during the given date interval. + /// + [JsonProperty("created")] + [JsonConverter(typeof(AnyOfConverter))] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created")] + [STJS.JsonConverter(typeof(STJAnyOfConverter))] +#endif + public AnyOf Created { get; set; } + /// /// The identifier of the invoice whose payments to return. /// diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs index 792bba1100..7aa958add7 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs @@ -55,6 +55,15 @@ public class PaymentIntentCaptureOptions : BaseOptions, IHasMetadata #endif public bool? FinalCapture { get; set; } + /// + /// Automations to be run during the PaymentIntent lifecycle. + /// + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooksOptions Hooks { get; set; } + /// /// Set of key-value pairs that you can /// attach to an object. This can be useful for storing additional information about the diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs index 17f92d1600..2650df98f8 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentConfirmOptions.cs @@ -80,6 +80,15 @@ public class PaymentIntentConfirmOptions : BaseOptions #endif public List ExcludedPaymentMethodTypes { get; set; } + /// + /// Automations to be run during the PaymentIntent lifecycle. + /// + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooksOptions Hooks { get; set; } + /// /// ID of the mandate that's used for this payment. /// diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs index ee097e3af5..6b5d104cfc 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCreateOptions.cs @@ -181,6 +181,15 @@ public class PaymentIntentCreateOptions : BaseOptions, IHasMetadata #endif public List ExcludedPaymentMethodTypes { get; set; } + /// + /// Automations to be run during the PaymentIntent lifecycle. + /// + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooksOptions Hooks { get; set; } + /// /// ID of the mandate that's used for this payment. This parameter can only be used with confirm=true. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsOptions.cs new file mode 100644 index 0000000000..34b9144fef --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentHooksInputsOptions : INestedOptions + { + /// + /// Tax arguments for automations. + /// + [JsonProperty("tax")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("tax")] +#endif + public PaymentIntentHooksInputsTaxOptions Tax { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs new file mode 100644 index 0000000000..da581e6405 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksInputsTaxOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentHooksInputsTaxOptions : INestedOptions + { + /// + /// The TaxCalculation id. + /// + [JsonProperty("calculation")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("calculation")] +#endif + public string Calculation { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksOptions.cs new file mode 100644 index 0000000000..18e0b5e669 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentHooksOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class PaymentIntentHooksOptions : INestedOptions + { + /// + /// Arguments passed in automations. + /// + [JsonProperty("inputs")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("inputs")] +#endif + public PaymentIntentHooksInputsOptions Inputs { get; set; } + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs index ad30bfc65a..77ce6e7e42 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentIncrementAuthorizationOptions.cs @@ -51,6 +51,15 @@ public class PaymentIntentIncrementAuthorizationOptions : BaseOptions, IHasMetad #endif public string Description { get; set; } + /// + /// Automations to be run during the PaymentIntent lifecycle. + /// + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooksOptions Hooks { get; set; } + /// /// Set of key-value pairs that you can /// attach to an object. This can be useful for storing additional information about the diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataIdealOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataIdealOptions.cs index 2ad330c343..c0c3e0e8fe 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataIdealOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodDataIdealOptions.cs @@ -11,7 +11,7 @@ public class PaymentIntentPaymentMethodDataIdealOptions : INestedOptions /// /// The customer's bank. Only use this parameter for existing customers. Don't use it for /// new customers. - /// One of: abn_amro, asn_bank, bunq, buut, + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs index 46ba90145c..c703f0405a 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentUpdateOptions.cs @@ -118,6 +118,15 @@ public class PaymentIntentUpdateOptions : BaseOptions, IHasMetadata #endif public List ExcludedPaymentMethodTypes { get; set; } + /// + /// Automations to be run during the PaymentIntent lifecycle. + /// + [JsonProperty("hooks")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("hooks")] +#endif + public PaymentIntentHooksOptions Hooks { get; set; } + /// /// Set of key-value pairs that you can /// attach to an object. This can be useful for storing additional information about the diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodIdealOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodIdealOptions.cs index 31d1521a73..2b791deff2 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodIdealOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodIdealOptions.cs @@ -11,7 +11,7 @@ public class PaymentMethodIdealOptions : INestedOptions /// /// The customer's bank. Only use this parameter for existing customers. Don't use it for /// new customers. - /// One of: abn_amro, asn_bank, bunq, buut, + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataIdealOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataIdealOptions.cs index 2539be4b3d..c9c191a84a 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataIdealOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodDataIdealOptions.cs @@ -11,7 +11,7 @@ public class SetupIntentPaymentMethodDataIdealOptions : INestedOptions /// /// The customer's bank. Only use this parameter for existing customers. Don't use it for /// new customers. - /// One of: abn_amro, asn_bank, bunq, buut, + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. diff --git a/src/Stripe.net/Services/Tax/Associations/AssociationFindOptions.cs b/src/Stripe.net/Services/Tax/Associations/AssociationFindOptions.cs new file mode 100644 index 0000000000..82b32b756a --- /dev/null +++ b/src/Stripe.net/Services/Tax/Associations/AssociationFindOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AssociationFindOptions : BaseOptions + { + /// + /// Valid PaymentIntent id. + /// + [JsonProperty("payment_intent")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("payment_intent")] +#endif + public string PaymentIntent { get; set; } + } +} diff --git a/src/Stripe.net/Services/Tax/Associations/AssociationService.cs b/src/Stripe.net/Services/Tax/Associations/AssociationService.cs new file mode 100644 index 0000000000..fa40621ed7 --- /dev/null +++ b/src/Stripe.net/Services/Tax/Associations/AssociationService.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.Tax +{ + using System; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class AssociationService : Service + { + public AssociationService() + { + } + + internal AssociationService(ApiRequestor requestor) + : base(requestor) + { + } + + public AssociationService(IStripeClient client) + : base(client) + { + } + + /// + ///

Finds a tax association object by PaymentIntent id.

. + ///
+ public virtual Association Find(AssociationFindOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v1/tax/associations/find", options, requestOptions); + } + + /// + ///

Finds a tax association object by PaymentIntent id.

. + ///
+ public virtual Task FindAsync(AssociationFindOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v1/tax/associations/find", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs index 8c29521f04..7f9f086e23 100644 --- a/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs +++ b/src/Stripe.net/Services/Tax/Registrations/RegistrationCountryOptionsUsLocalAmusementTaxOptions.cs @@ -11,9 +11,9 @@ public class RegistrationCountryOptionsUsLocalAmusementTaxOptions : INestedOptio /// /// A FIPS code /// representing the local jurisdiction. Supported FIPS codes are: 14000 (Chicago), - /// 06613 (Bloomington), 21696 (East Dundee), 24582 (Evanston), - /// 45421 (Lynwood), 48892 (Midlothian), 64343 (River Grove), and - /// 68081 (Schiller Park). + /// 02154 (Arlington Heights), 06613 (Bloomington), 10906 (Campton + /// Hills), 21696 (East Dundee), 24582 (Evanston), 45421 (Lynwood), + /// 48892 (Midlothian), 64343 (River Grove), and 68081 (Schiller Park). /// [JsonProperty("jurisdiction")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/TaxService.cs b/src/Stripe.net/Services/TaxService.cs index 58753cd2d6..3f1c5ad18c 100644 --- a/src/Stripe.net/Services/TaxService.cs +++ b/src/Stripe.net/Services/TaxService.cs @@ -7,6 +7,7 @@ namespace Stripe public class TaxService : Service { + private Tax.AssociationService associations; private Tax.CalculationService calculations; private Tax.RegistrationService registrations; private Tax.SettingsService settings; @@ -22,6 +23,9 @@ internal TaxService(IStripeClient client) { } + public virtual Tax.AssociationService Associations => this.associations ??= new Tax.AssociationService( + this.Requestor); + public virtual Tax.CalculationService Calculations => this.calculations ??= new Tax.CalculationService( this.Requestor); diff --git a/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkCreateOptions.cs b/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkCreateOptions.cs new file mode 100644 index 0000000000..34172ef9e3 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkCreateOptions.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OnboardingLinkCreateOptions : BaseOptions + { + /// + /// Specific fields needed to generate the desired link type. + /// + [JsonProperty("link_options")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link_options")] +#endif + public OnboardingLinkLinkOptionsOptions LinkOptions { get; set; } + + /// + /// The type of link being generated. + /// + [JsonProperty("link_type")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("link_type")] +#endif + public string LinkType { get; set; } + + /// + /// Stripe account ID to generate the link for. + /// + [JsonProperty("on_behalf_of")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("on_behalf_of")] +#endif + public string OnBehalfOf { get; set; } + } +} diff --git a/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsAppleTermsAndConditionsOptions.cs b/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsAppleTermsAndConditionsOptions.cs new file mode 100644 index 0000000000..3330036ed0 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsAppleTermsAndConditionsOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OnboardingLinkLinkOptionsAppleTermsAndConditionsOptions : INestedOptions + { + /// + /// Whether the link should also support users relinking their Apple account. + /// + [JsonProperty("allow_relinking")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("allow_relinking")] +#endif + public bool? AllowRelinking { get; set; } + + /// + /// The business name of the merchant accepting Apple's Terms and Conditions. + /// + [JsonProperty("merchant_display_name")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("merchant_display_name")] +#endif + public string MerchantDisplayName { get; set; } + } +} diff --git a/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsOptions.cs b/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsOptions.cs new file mode 100644 index 0000000000..c9fa2f0570 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkLinkOptionsOptions.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class OnboardingLinkLinkOptionsOptions : INestedOptions + { + /// + /// The options associated with the Apple Terms and Conditions link type. + /// + [JsonProperty("apple_terms_and_conditions")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("apple_terms_and_conditions")] +#endif + public OnboardingLinkLinkOptionsAppleTermsAndConditionsOptions AppleTermsAndConditions { get; set; } + } +} diff --git a/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkService.cs b/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkService.cs new file mode 100644 index 0000000000..215043e282 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/OnboardingLinks/OnboardingLinkService.cs @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec +namespace Stripe.Terminal +{ + using System; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class OnboardingLinkService : Service, + ICreatable + { + public OnboardingLinkService() + { + } + + internal OnboardingLinkService(ApiRequestor requestor) + : base(requestor) + { + } + + public OnboardingLinkService(IStripeClient client) + : base(client) + { + } + + /// + ///

Creates a new OnboardingLink object that contains a redirect_url used for + /// onboarding onto Tap to Pay on iPhone.

. + ///
+ public virtual OnboardingLink Create(OnboardingLinkCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/terminal/onboarding_links", options, requestOptions); + } + + /// + ///

Creates a new OnboardingLink object that contains a redirect_url used for + /// onboarding onto Tap to Pay on iPhone.

. + ///
+ public virtual Task CreateAsync(OnboardingLinkCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/terminal/onboarding_links", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/TerminalService.cs b/src/Stripe.net/Services/TerminalService.cs index 76bcb5947c..9bf44e136d 100644 --- a/src/Stripe.net/Services/TerminalService.cs +++ b/src/Stripe.net/Services/TerminalService.cs @@ -10,6 +10,7 @@ public class TerminalService : Service private Terminal.ConfigurationService configurations; private Terminal.ConnectionTokenService connectionTokens; private Terminal.LocationService locations; + private Terminal.OnboardingLinkService onboardingLinks; private Terminal.ReaderService readers; internal TerminalService(ApiRequestor requestor) @@ -31,6 +32,9 @@ internal TerminalService(IStripeClient client) public virtual Terminal.LocationService Locations => this.locations ??= new Terminal.LocationService( this.Requestor); + public virtual Terminal.OnboardingLinkService OnboardingLinks => this.onboardingLinks ??= new Terminal.OnboardingLinkService( + this.Requestor); + public virtual Terminal.ReaderService Readers => this.readers ??= new Terminal.ReaderService( this.Requestor); } diff --git a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataIdealOptions.cs b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataIdealOptions.cs index b774cf9191..adcccbd3af 100644 --- a/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataIdealOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/ConfirmationTokens/ConfirmationTokenPaymentMethodDataIdealOptions.cs @@ -11,7 +11,7 @@ public class ConfirmationTokenPaymentMethodDataIdealOptions : INestedOptions /// /// The customer's bank. Only use this parameter for existing customers. Don't use it for /// new customers. - /// One of: abn_amro, asn_bank, bunq, buut, + /// One of: abn_amro, asn_bank, bunq, buut, finom, /// handelsbanken, ing, knab, moneyou, n26, nn, /// rabobank, regiobank, revolut, sns_bank, triodos_bank, /// van_lanschot, or yoursafe. diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRiskAssessmentFraudRiskOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRiskAssessmentFraudRiskOptions.cs new file mode 100644 index 0000000000..550360984b --- /dev/null +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRiskAssessmentFraudRiskOptions.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe.TestHelpers.Issuing +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class AuthorizationRiskAssessmentFraudRiskOptions : INestedOptions + { + /// + /// Stripe’s assessment of the likelihood of fraud on an authorization. + /// One of: elevated, highest, low, normal, not_assessed, + /// or unknown. + /// + [JsonProperty("level")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("level")] +#endif + public string Level { get; set; } + + /// + /// Stripe’s numerical model score assessing the likelihood of fraudulent activity. A higher + /// score means a higher likelihood of fraudulent activity, and anything above 25 is + /// considered high risk. + /// + [JsonProperty("score")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("score")] +#endif + public decimal? Score { get; set; } + } +} diff --git a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRiskAssessmentOptions.cs b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRiskAssessmentOptions.cs index c8cd01b975..93aa28a8d0 100644 --- a/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRiskAssessmentOptions.cs +++ b/src/Stripe.net/Services/TestHelpers/Issuing/Authorizations/AuthorizationRiskAssessmentOptions.cs @@ -17,6 +17,15 @@ public class AuthorizationRiskAssessmentOptions : INestedOptions #endif public AuthorizationRiskAssessmentCardTestingRiskOptions CardTestingRisk { get; set; } + /// + /// Stripe’s assessment of this authorization’s likelihood to be fraudulent. + /// + [JsonProperty("fraud_risk")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("fraud_risk")] +#endif + public AuthorizationRiskAssessmentFraudRiskOptions FraudRisk { get; set; } + /// /// The dispute risk of the merchant (the seller on a purchase) on an authorization based on /// all Stripe Issuing activity. diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index de5b267fbc..6f8da87d0c 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs @@ -42,7 +42,7 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// 2025-01-27.acacia, 2025-02-24.acacia, 2025-03-01.dashboard, /// 2025-03-31.basil, 2025-04-30.basil, 2025-05-28.basil, /// 2025-06-30.basil, 2025-07-30.basil, 2025-08-27.basil, - /// 2025-09-30.clover, or 2025-10-29.clover. + /// 2025-09-30.clover, 2025-10-29.clover, or 2025-11-17.clover. /// [JsonProperty("api_version")] #if NET6_0_OR_GREATER @@ -107,6 +107,7 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// customer.tax_id.deleted, customer.tax_id.updated, customer.updated, /// customer_cash_balance_transaction.created, /// entitlements.active_entitlement_summary.updated, file.created, + /// financial_connections.account.account_numbers_updated, /// financial_connections.account.created, /// financial_connections.account.deactivated, /// financial_connections.account.disconnected, @@ -114,6 +115,7 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// financial_connections.account.refreshed_balance, /// financial_connections.account.refreshed_ownership, /// financial_connections.account.refreshed_transactions, + /// financial_connections.account.upcoming_account_number_expiry, /// identity.verification_session.canceled, /// identity.verification_session.created, /// identity.verification_session.processing, diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs index 065ab55d4a..0502bec91c 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointUpdateOptions.cs @@ -65,6 +65,7 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// customer.tax_id.deleted, customer.tax_id.updated, customer.updated, /// customer_cash_balance_transaction.created, /// entitlements.active_entitlement_summary.updated, file.created, + /// financial_connections.account.account_numbers_updated, /// financial_connections.account.created, /// financial_connections.account.deactivated, /// financial_connections.account.disconnected, @@ -72,6 +73,7 @@ public class WebhookEndpointUpdateOptions : BaseOptions, IHasMetadata /// financial_connections.account.refreshed_balance, /// financial_connections.account.refreshed_ownership, /// financial_connections.account.refreshed_transactions, + /// financial_connections.account.upcoming_account_number_expiry, /// identity.verification_session.canceled, /// identity.verification_session.created, /// identity.verification_session.processing, diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 74d295d303..f6fcf6b10b 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\",\"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\",\"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\"}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Events; Stripe.V2.Core.Event result = service.Get("ll_123"); From af05af8b7a9c55f6ba1228d9974a01006f2411dc Mon Sep 17 00:00:00 2001 From: Michael Broshi <94012587+mbroshi-stripe@users.noreply.github.com> Date: Mon, 17 Nov 2025 09:40:16 -0800 Subject: [PATCH 3/4] Update v2 array parameter serialization to use indexed format (#3249) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change array parameter serialization for v2 endpoints to use indexed format (e.g., ?include[0]=foo&include[1]=bar) instead of the repeated parameter format (e.g., ?include=foo&include=bar). This aligns v2 behavior with v1 for consistency. Changes: - Modified ContentEncoder.cs to always use ArrayEncoding.Indexed - Updated tests to expect indexed format for v2 arrays 🤖 Generated with [Claude Code](https://claude.com/claude-code) Committed-By-Agent: claude Co-authored-by: Claude --- .../Infrastructure/FormEncoding/ContentEncoder.cs | 6 ++++-- .../Infrastructure/FormEncoding/ContentEncoderTest.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs b/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs index 32733e638c..b90011e0dd 100644 --- a/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs +++ b/src/Stripe.net/Infrastructure/FormEncoding/ContentEncoder.cs @@ -54,7 +54,8 @@ public static HttpContent CreateHttpContent(BaseOptions options, ApiMode apiMode return new FormUrlEncodedContent(new List>()); } - var arrayEncoding = apiMode == ApiMode.V1 ? ArrayEncoding.Indexed : ArrayEncoding.Repetition; + // Always use indexed array encoding for all API modes + var arrayEncoding = ArrayEncoding.Indexed; var flatParams = FlattenParamsValue(options, null, arrayEncoding); // If all parameters have been encoded as strings, then the content can be represented @@ -79,7 +80,8 @@ public static HttpContent CreateHttpContent(BaseOptions options, ApiMode apiMode /// The query string. public static string CreateQueryString(BaseOptions options, ApiMode apiMode = ApiMode.V1) { - var arrayEncoding = apiMode == ApiMode.V1 ? ArrayEncoding.Indexed : ArrayEncoding.Repetition; + // Always use indexed array encoding for all API modes + var arrayEncoding = ArrayEncoding.Indexed; var flatParams = FlattenParamsValue(options, null, arrayEncoding) .Where(kvp => kvp.Value is string) .Select(kvp => new KeyValuePair( diff --git a/src/StripeTests/Infrastructure/FormEncoding/ContentEncoderTest.cs b/src/StripeTests/Infrastructure/FormEncoding/ContentEncoderTest.cs index 2953e0eba0..a01697d566 100644 --- a/src/StripeTests/Infrastructure/FormEncoding/ContentEncoderTest.cs +++ b/src/StripeTests/Infrastructure/FormEncoding/ContentEncoderTest.cs @@ -194,7 +194,7 @@ public void CreateQueryString() { Array = new[] { "1", "2", "3" }, }, - Want = "array=1&array=2&array=3", + Want = "array[0]=1&array[1]=2&array[2]=3", Mode = ApiMode.V2, }, From d07bb5b02e20d4a465cc335ea9132c47eb563629 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 19:09:59 +0000 Subject: [PATCH 4/4] Update generated code (#3256) * Update generated code for v2123 and * Update generated code for v2124 and --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: Ramya Rao <100975018+ramya-stripe@users.noreply.github.com> --- API_VERSION | 2 +- OPENAPI_VERSION | 2 +- .../Entities/V2/Core/Events/Event.cs | 10 ---- .../V2/Core/Events/EventListCreatedOptions.cs | 48 +++++++++++++++++++ .../V2/Core/Events/EventListOptions.cs | 36 ++------------ .../Services/GeneratedExamplesTest.cs | 2 +- 6 files changed, 55 insertions(+), 45 deletions(-) create mode 100644 src/Stripe.net/Services/V2/Core/Events/EventListCreatedOptions.cs 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");