From ff1e4ceea993c28f0117b70e14cc63e92eacfdae Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 22:30:02 +0000 Subject: [PATCH 01/19] Update generated code for v1473 --- OPENAPI_VERSION | 2 +- .../Entities/Charges/ChargePaymentMethodDetails.cs | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 130232bf35..1c140afccd 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1472 \ No newline at end of file +v1473 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs index b15336a930..b9dd7f87ec 100644 --- a/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs +++ b/src/Stripe.net/Entities/Charges/ChargePaymentMethodDetails.cs @@ -327,13 +327,12 @@ public class ChargePaymentMethodDetails : StripeEntity - /// The type of transaction-specific details of the payment method used in the payment, one - /// of ach_credit_transfer, ach_debit, acss_debit, alipay, - /// au_becs_debit, bancontact, card, card_present, eps, - /// giropay, ideal, klarna, multibanco, p24, - /// sepa_debit, sofort, stripe_account, or wechat. An additional - /// hash is included on payment_method_details with a name matching this value. It - /// contains information specific to the payment method. + /// The type of transaction-specific details of the payment method used in the payment. See + /// PaymentMethod.type + /// for the full list of possible types. An additional hash is included on + /// payment_method_details with a name matching this value. It contains information + /// specific to the payment method. /// [JsonProperty("type")] #if NET6_0_OR_GREATER From a7d98a7f1932f6e8c454b23eaf64df3bd05e5060 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 22:08:37 +0000 Subject: [PATCH 02/19] Update generated code for v1479 --- OPENAPI_VERSION | 2 +- .../Entities/Billing/CreditGrants/CreditGrant.cs | 10 ++++++++++ .../Billing/CreditGrants/CreditGrantCreateOptions.cs | 10 ++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1c140afccd..00ad8bdb8b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1473 \ No newline at end of file +v1479 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs index 505a492918..1b95837bad 100644 --- a/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs +++ b/src/Stripe.net/Entities/Billing/CreditGrants/CreditGrant.cs @@ -168,6 +168,16 @@ public Customer Customer #endif public string Name { get; set; } + /// + /// The priority for applying this credit grant. The highest priority is 0 and the lowest is + /// 100. + /// + [JsonProperty("priority")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("priority")] +#endif + public long? Priority { get; set; } + #region Expandable TestClock /// diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs index 716e0d19b5..2c8e741d03 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs @@ -91,5 +91,15 @@ public class CreditGrantCreateOptions : BaseOptions, IHasMetadata [STJS.JsonPropertyName("name")] #endif public string Name { get; set; } + + /// + /// The desired priority for applying this credit grant. If not specified, it will be set to + /// the default value of 50. The highest priority is 0 and the lowest is 100. + /// + [JsonProperty("priority")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("priority")] +#endif + public long? Priority { get; set; } } } From 89cfd26724115fe420c394541c4725d640a034d8 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 19:06:47 +0000 Subject: [PATCH 03/19] Update generated code for v1481 --- OPENAPI_VERSION | 2 +- .../Sessions/SessionPaymentMethodOptionsAcssDebit.cs | 11 +++++++++++ .../SessionPaymentMethodOptionsAuBecsDebit.cs | 11 +++++++++++ .../Sessions/SessionPaymentMethodOptionsBacsDebit.cs | 11 +++++++++++ .../Sessions/SessionPaymentMethodOptionsSepaDebit.cs | 11 +++++++++++ .../SessionPaymentMethodOptionsUsBankAccount.cs | 11 +++++++++++ ...derPaymentSettingsPaymentMethodOptionsAcssDebit.cs | 11 +++++++++++ ...derPaymentSettingsPaymentMethodOptionsSepaDebit.cs | 11 +++++++++++ .../PaymentIntentPaymentMethodOptionsAcssDebit.cs | 11 +++++++++++ .../PaymentIntentPaymentMethodOptionsAuBecsDebit.cs | 11 +++++++++++ .../PaymentIntentPaymentMethodOptionsBacsDebit.cs | 11 +++++++++++ .../PaymentIntentPaymentMethodOptionsSepaDebit.cs | 11 +++++++++++ .../PaymentIntentPaymentMethodOptionsUsBankAccount.cs | 11 +++++++++++ .../SessionPaymentMethodOptionsAcssDebitOptions.cs | 11 +++++++++++ .../SessionPaymentMethodOptionsAuBecsDebitOptions.cs | 11 +++++++++++ .../SessionPaymentMethodOptionsBacsDebitOptions.cs | 11 +++++++++++ .../SessionPaymentMethodOptionsSepaDebitOptions.cs | 11 +++++++++++ ...SessionPaymentMethodOptionsUsBankAccountOptions.cs | 11 +++++++++++ ...entSettingsPaymentMethodOptionsAcssDebitOptions.cs | 11 +++++++++++ ...entSettingsPaymentMethodOptionsSepaDebitOptions.cs | 11 +++++++++++ ...ymentIntentPaymentMethodOptionsAcssDebitOptions.cs | 11 +++++++++++ ...entIntentPaymentMethodOptionsAuBecsDebitOptions.cs | 11 +++++++++++ ...ymentIntentPaymentMethodOptionsBacsDebitOptions.cs | 11 +++++++++++ ...ymentIntentPaymentMethodOptionsSepaDebitOptions.cs | 11 +++++++++++ ...tIntentPaymentMethodOptionsUsBankAccountOptions.cs | 11 +++++++++++ 25 files changed, 265 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 00ad8bdb8b..75ad4e96a0 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1479 \ No newline at end of file +v1481 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebit.cs index 905c65f764..8f75495db3 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebit.cs @@ -52,6 +52,17 @@ public class SessionPaymentMethodOptionsAcssDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Bank account verification method. /// One of: automatic, instant, or microdeposits. diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebit.cs index 4f3826fd1c..f45df5aecc 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebit.cs @@ -33,5 +33,16 @@ public class SessionPaymentMethodOptionsAuBecsDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebit.cs index 173d1a4d14..3b3f7dd6f5 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebit.cs @@ -40,5 +40,16 @@ public class SessionPaymentMethodOptionsBacsDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebit.cs index ddc2eae400..bb1e543017 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebit.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebit.cs @@ -40,5 +40,16 @@ public class SessionPaymentMethodOptionsSepaDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccount.cs b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccount.cs index 43c9ebd63b..b5cead8e2f 100644 --- a/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccount.cs +++ b/src/Stripe.net/Entities/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccount.cs @@ -41,6 +41,17 @@ public class SessionPaymentMethodOptionsUsBankAccount : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Bank account verification method. /// One of: automatic, or instant. diff --git a/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsAcssDebit.cs b/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsAcssDebit.cs index bc366cdf7d..e4ba8de483 100644 --- a/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsAcssDebit.cs +++ b/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsAcssDebit.cs @@ -41,6 +41,17 @@ public class OrderPaymentSettingsPaymentMethodOptionsAcssDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Bank account verification method. /// One of: automatic, instant, or microdeposits. diff --git a/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsSepaDebit.cs index 40badb3d17..8fb130cbe4 100644 --- a/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsSepaDebit.cs +++ b/src/Stripe.net/Entities/Orders/OrderPaymentSettingsPaymentMethodOptionsSepaDebit.cs @@ -40,5 +40,16 @@ public class OrderPaymentSettingsPaymentMethodOptionsSepaDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebit.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebit.cs index 5132b801e9..f60f6eb12f 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebit.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebit.cs @@ -41,6 +41,17 @@ public class PaymentIntentPaymentMethodOptionsAcssDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Bank account verification method. /// One of: automatic, instant, or microdeposits. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebit.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebit.cs index e3a6f14b63..6863294bd8 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebit.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebit.cs @@ -34,5 +34,16 @@ public class PaymentIntentPaymentMethodOptionsAuBecsDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebit.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebit.cs index a09db51018..0249af4fc1 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebit.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebit.cs @@ -40,5 +40,16 @@ public class PaymentIntentPaymentMethodOptionsBacsDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebit.cs index e0ed94ef54..010367054d 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebit.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebit.cs @@ -40,5 +40,16 @@ public class PaymentIntentPaymentMethodOptionsSepaDebit : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccount.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccount.cs index 3dca7eba77..63e56fdf6e 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccount.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccount.cs @@ -57,6 +57,17 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccount : StripeEntity + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Bank account verification method. /// One of: automatic, instant, or microdeposits. diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitOptions.cs index c6cbc10570..2985b4afbe 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAcssDebitOptions.cs @@ -56,6 +56,17 @@ public class SessionPaymentMethodOptionsAcssDebitOptions : INestedOptions #endif public string SetupFutureUsage { get; set; } + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Verification method for the intent. /// One of: automatic, instant, or microdeposits. diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebitOptions.cs index a6089718d6..c27eedda7f 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsAuBecsDebitOptions.cs @@ -33,5 +33,16 @@ public class SessionPaymentMethodOptionsAuBecsDebitOptions : INestedOptions [STJS.JsonPropertyName("setup_future_usage")] #endif public string SetupFutureUsage { get; set; } + + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitOptions.cs index 4dc1f9bb5e..a8a85949d3 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsBacsDebitOptions.cs @@ -43,5 +43,16 @@ public class SessionPaymentMethodOptionsBacsDebitOptions : INestedOptions [STJS.JsonPropertyName("setup_future_usage")] #endif public string SetupFutureUsage { get; set; } + + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitOptions.cs index 5bdda86d3e..882efdcf19 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsSepaDebitOptions.cs @@ -43,5 +43,16 @@ public class SessionPaymentMethodOptionsSepaDebitOptions : INestedOptions [STJS.JsonPropertyName("setup_future_usage")] #endif public string SetupFutureUsage { get; set; } + + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountOptions.cs index 2623b2fd39..de9c42bc8a 100644 --- a/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/Checkout/Sessions/SessionPaymentMethodOptionsUsBankAccountOptions.cs @@ -44,6 +44,17 @@ public class SessionPaymentMethodOptionsUsBankAccountOptions : INestedOptions #endif public string SetupFutureUsage { get; set; } + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Verification method for the intent. /// One of: automatic, or instant. diff --git a/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs b/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs index a000f1c3d9..a851497983 100644 --- a/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs +++ b/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsAcssDebitOptions.cs @@ -48,6 +48,17 @@ public class OrderPaymentSettingsPaymentMethodOptionsAcssDebitOptions : INestedO #endif public string SetupFutureUsage { get; set; } + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Bank account verification method. /// One of: automatic, instant, or microdeposits. diff --git a/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsSepaDebitOptions.cs index 789c2f1c59..b47f108e48 100644 --- a/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsSepaDebitOptions.cs +++ b/src/Stripe.net/Services/Orders/OrderPaymentSettingsPaymentMethodOptionsSepaDebitOptions.cs @@ -47,5 +47,16 @@ public class OrderPaymentSettingsPaymentMethodOptionsSepaDebitOptions : INestedO [STJS.JsonPropertyName("setup_future_usage")] #endif public string SetupFutureUsage { get; set; } + + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs index 4ce2c634ea..90b2162fc0 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAcssDebitOptions.cs @@ -48,6 +48,17 @@ public class PaymentIntentPaymentMethodOptionsAcssDebitOptions : INestedOptions #endif public string SetupFutureUsage { get; set; } + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Bank account verification method. /// One of: automatic, instant, or microdeposits. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs index 3966536581..3d4d4e4322 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsAuBecsDebitOptions.cs @@ -38,5 +38,16 @@ public class PaymentIntentPaymentMethodOptionsAuBecsDebitOptions : INestedOption [STJS.JsonPropertyName("setup_future_usage")] #endif public string SetupFutureUsage { get; set; } + + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs index 5ce9ba8204..be22fc6e18 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsBacsDebitOptions.cs @@ -47,5 +47,16 @@ public class PaymentIntentPaymentMethodOptionsBacsDebitOptions : INestedOptions [STJS.JsonPropertyName("setup_future_usage")] #endif public string SetupFutureUsage { get; set; } + + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs index dd496dcea9..247b3d4ba2 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs @@ -47,5 +47,16 @@ public class PaymentIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions [STJS.JsonPropertyName("setup_future_usage")] #endif public string SetupFutureUsage { get; set; } + + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } } } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs index ba26d7741a..7dc575a6de 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsUsBankAccountOptions.cs @@ -76,6 +76,17 @@ public class PaymentIntentPaymentMethodOptionsUsBankAccountOptions : INestedOpti #endif public string SetupFutureUsage { get; set; } + /// + /// Controls when Stripe will attempt to debit the funds from the customer's account. The + /// date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 + /// and 15 calendar days from now. + /// + [JsonProperty("target_date")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("target_date")] +#endif + public string TargetDate { get; set; } + /// /// Bank account verification method. /// One of: automatic, instant, or microdeposits. From 8c7d011875779c5d14e8aa74cbe39f6a601848ed Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 20:40:50 +0000 Subject: [PATCH 04/19] Update generated code for v1483 --- OPENAPI_VERSION | 2 +- .../PaymentIntents/PaymentIntentTransferData.cs | 15 +++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 75ad4e96a0..0dd08f6166 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1481 \ No newline at end of file +v1483 \ No newline at end of file diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs index 17d33ae8cb..35615d83e2 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs @@ -13,14 +13,13 @@ namespace Stripe public class PaymentIntentTransferData : StripeEntity { /// - /// Amount intended to be collected by this PaymentIntent. A positive integer representing - /// how much to charge in the smallest currency unit (e.g., - /// 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum - /// amount is $0.50 US or equivalent - /// in charge currency. The amount value supports up to eight digits (e.g., a value of - /// 99999999 for a USD charge of $999,999.99). + /// The amount transferred to the destination account. This transfer will occur + /// automatically after the payment succeeds. If no amount is specified, by default the + /// entire payment amount is transferred to the destination account. The amount must be less + /// than or equal to the amount, + /// and must be a positive integer representing how much to transfer in the smallest + /// currency unit (e.g., 100 cents to charge $1.00). /// [JsonProperty("amount")] #if NET6_0_OR_GREATER From 34fc8184b50f45c212eb676a391446e9d4c33e48 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 20:52:04 +0000 Subject: [PATCH 05/19] Update generated code for v1486 --- OPENAPI_VERSION | 2 +- .../Services/Billing/CreditGrants/CreditGrantCreateOptions.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0dd08f6166..0234066a51 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1483 \ No newline at end of file +v1486 \ No newline at end of file diff --git a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs index 2c8e741d03..1299460dc3 100644 --- a/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs +++ b/src/Stripe.net/Services/Billing/CreditGrants/CreditGrantCreateOptions.cs @@ -21,7 +21,9 @@ public class CreditGrantCreateOptions : BaseOptions, IHasMetadata public CreditGrantAmountOptions Amount { get; set; } /// - /// Configuration specifying what this credit grant applies to. + /// Configuration specifying what this credit grant applies to. We currently only support + /// metered prices that have a Billing Meter attached to them. /// [JsonProperty("applicability_config")] #if NET6_0_OR_GREATER From d938c00ff2e11e247063c64aff7749e6fb35686a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 21:48:39 +0000 Subject: [PATCH 06/19] Update generated code for v1487 --- OPENAPI_VERSION | 2 +- .../Products/ProductDefaultPriceDataOptions.cs | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0234066a51..73182b6b37 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1486 \ No newline at end of file +v1487 \ No newline at end of file diff --git a/src/Stripe.net/Services/Products/ProductDefaultPriceDataOptions.cs b/src/Stripe.net/Services/Products/ProductDefaultPriceDataOptions.cs index 5bd97c6eff..98a5b9993d 100644 --- a/src/Stripe.net/Services/Products/ProductDefaultPriceDataOptions.cs +++ b/src/Stripe.net/Services/Products/ProductDefaultPriceDataOptions.cs @@ -7,7 +7,7 @@ namespace Stripe using STJS = System.Text.Json.Serialization; #endif - public class ProductDefaultPriceDataOptions : INestedOptions + public class ProductDefaultPriceDataOptions : INestedOptions, IHasMetadata { /// /// Three-letter ISO currency @@ -41,6 +41,18 @@ public class ProductDefaultPriceDataOptions : INestedOptions #endif public ProductDefaultPriceDataCustomUnitAmountOptions CustomUnitAmount { get; set; } + /// + /// Set of key-value pairs that you can + /// attach to an object. This can be useful for storing additional information about the + /// object in a structured format. Individual keys can be unset by posting an empty value to + /// them. All keys can be unset by posting an empty value to metadata. + /// + [JsonProperty("metadata")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("metadata")] +#endif + public Dictionary Metadata { get; set; } + /// /// The recurring components of a price such as interval and interval_count. /// From c9a9dc155c88dbbbd4dead7096de385e3ffc70b6 Mon Sep 17 00:00:00 2001 From: David Brownman <109395161+xavdid-stripe@users.noreply.github.com> Date: Wed, 12 Feb 2025 16:51:48 -0800 Subject: [PATCH 07/19] add codeowners file (#3055) --- .github/CODEOWNERS | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000..8844b15a88 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# All files should be reviewed by a member of the SDKs team +* @stripe/api-library-reviewers From 299be2587e31ad212dbd12c8526d2a519bc9a144 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 15:52:32 +0000 Subject: [PATCH 08/19] Merge upstream and update generated code for v1490 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Constants/ApiVersion.cs | 2 +- .../Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 73182b6b37..a752d73210 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1487 \ No newline at end of file +v1490 \ No newline at end of file diff --git a/src/Stripe.net/Constants/ApiVersion.cs b/src/Stripe.net/Constants/ApiVersion.cs index 93384759fa..aac2243ecb 100644 --- a/src/Stripe.net/Constants/ApiVersion.cs +++ b/src/Stripe.net/Constants/ApiVersion.cs @@ -3,6 +3,6 @@ namespace Stripe { internal class ApiVersion { - public const string Current = "2025-01-27.acacia"; + public const string Current = "2025-02-24.acacia"; } } \ No newline at end of file diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs index fe5e4b17e8..671cee9cd8 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointCreateOptions.cs @@ -38,8 +38,8 @@ public class WebhookEndpointCreateOptions : BaseOptions, IHasMetadata /// 2019-11-05, 2019-12-03, 2020-03-02, 2020-08-27, /// 2022-08-01, 2022-11-15, 2023-08-16, 2023-10-16, /// 2024-04-10, 2024-06-20, 2024-09-30.acacia, - /// 2024-10-28.acacia, 2024-11-20.acacia, 2024-12-18.acacia, or - /// 2025-01-27.acacia. + /// 2024-10-28.acacia, 2024-11-20.acacia, 2024-12-18.acacia, + /// 2025-01-27.acacia, or 2025-02-24.acacia. /// [JsonProperty("api_version")] #if NET6_0_OR_GREATER From 906a3957aee17a8ff6bd5a05082c84d9eea28c64 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 14 Feb 2025 23:52:10 +0000 Subject: [PATCH 09/19] Update generated code for v1495 --- OPENAPI_VERSION | 2 +- .../V2/EventDestinations/EventDestination.cs | 8 ++++ .../V2/Core/Events/EventListOptions.cs | 48 +++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a752d73210..6043724bfe 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1490 \ No newline at end of file +v1495 \ No newline at end of file diff --git a/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs b/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs index b530c5e1d8..95d60b03f9 100644 --- a/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs +++ b/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs @@ -8,6 +8,14 @@ namespace Stripe.V2 using STJS = System.Text.Json.Serialization; #endif + /// + /// Set up an event destination to receive events from Stripe across multiple destination + /// types, including webhook endpoints and Amazon EventBridge. + /// Event destinations support receiving thin events and snapshot events. + /// public class EventDestination : StripeEntity, IHasId, IHasMetadata, IHasObject { /// diff --git a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs index e6102286fa..294b2d93af 100644 --- a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs @@ -1,6 +1,7 @@ // 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; @@ -8,6 +9,53 @@ namespace Stripe.V2.Core public class EventListOptions : V2.ListOptions { + /// + /// Filter for events created after the specified timestamp. + /// + [JsonProperty("created_gt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created_gt")] +#endif + public DateTime? CreatedGt { get; set; } + + /// + /// Filter for events created at or after the specified timestamp. + /// + [JsonProperty("created_gte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created_gte")] +#endif + public DateTime? CreatedGte { get; set; } + + /// + /// Filter for events created before the specified timestamp. + /// + [JsonProperty("created_lt")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created_lt")] +#endif + public DateTime? CreatedLt { get; set; } + + /// + /// Filter for events created at or before the specified timestamp. + /// + [JsonProperty("created_lte")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("created_lte")] +#endif + public DateTime? CreatedLte { get; set; } + + /// + /// Filter events based on whether they were successfully delivered to all subscribed event + /// destinations. If false, events which are still pending or have failed all delivery + /// attempts to a event destination will be returned. + /// + [JsonProperty("delivery_success")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("delivery_success")] +#endif + public bool? DeliverySuccess { get; set; } + /// /// Primary object ID used to retrieve related events. /// From 3bdd64c90faf802d097a37fc05cb34edcea4b011 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:05:46 +0000 Subject: [PATCH 10/19] Update generated code for v1496 --- OPENAPI_VERSION | 2 +- .../Terminal/Readers/ReaderService.cs | 18 ++++++++++++++++ .../ReaderSucceedInputCollectionOptions.cs | 21 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderSucceedInputCollectionOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6043724bfe..c67d79cdf1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1495 \ No newline at end of file +v1496 \ No newline at end of file diff --git a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderService.cs b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderService.cs index 3c649d8355..61f7e868a0 100644 --- a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderService.cs +++ b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderService.cs @@ -41,5 +41,23 @@ public virtual Stripe.Terminal.Reader PresentPaymentMethod(string id, ReaderPres { return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/terminal/readers/{WebUtility.UrlEncode(id)}/present_payment_method", options, requestOptions, cancellationToken); } + + /// + ///

Succeeds an input collection on a simulated reader. Can be used to simulate + /// collecting inputs.

. + ///
+ public virtual Stripe.Terminal.Reader SucceedInputCollection(string id, ReaderSucceedInputCollectionOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/terminal/readers/{WebUtility.UrlEncode(id)}/succeed_input_collection", options, requestOptions); + } + + /// + ///

Succeeds an input collection on a simulated reader. Can be used to simulate + /// collecting inputs.

. + ///
+ public virtual Task SucceedInputCollectionAsync(string id, ReaderSucceedInputCollectionOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/terminal/readers/{WebUtility.UrlEncode(id)}/succeed_input_collection", options, requestOptions, cancellationToken); + } } } diff --git a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderSucceedInputCollectionOptions.cs b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderSucceedInputCollectionOptions.cs new file mode 100644 index 0000000000..3852ffe515 --- /dev/null +++ b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderSucceedInputCollectionOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.TestHelpers.Terminal +{ + using Newtonsoft.Json; +#if NET6_0_OR_GREATER + using STJS = System.Text.Json.Serialization; +#endif + + public class ReaderSucceedInputCollectionOptions : BaseOptions + { + /// + /// Skip behavior for input collection. + /// One of: all, or none. + /// + [JsonProperty("skip_non_required_inputs")] +#if NET6_0_OR_GREATER + [STJS.JsonPropertyName("skip_non_required_inputs")] +#endif + public string SkipNonRequiredInputs { get; set; } + } +} From 61a585d5d29ebdc603be787f84e016ddf7ab6a54 Mon Sep 17 00:00:00 2001 From: jar-stripe Date: Thu, 20 Feb 2025 14:57:42 -0800 Subject: [PATCH 11/19] Improved examples (#3054) * changed Program to accept a command line argument with the name (relative to Examples namespace) of the example to run * updated existing examples * added usage instructions * added just recipe --- justfile | 4 + src/Examples/ExampleTemplate.cs | 9 +- src/Examples/Program.cs | 61 +++++++++-- src/Examples/V2/MeterEventStream.cs | 113 +++++++++++---------- src/Examples/V2/ThinEventWebhookHandler.cs | 99 +++++++++--------- 5 files changed, 172 insertions(+), 114 deletions(-) diff --git a/justfile b/justfile index 50a0dcbfe5..871aa51e5a 100644 --- a/justfile +++ b/justfile @@ -31,3 +31,7 @@ update-version version: echo "{{ version }}" > VERSION perl -pi -e 's|[.\-\d\w]+|{{ version }}|' src/Stripe.net/Stripe.net.csproj perl -pi -e 's|Current = "[.\-\d\w]+";|Current = "{{ version }}";|' src/Stripe.net/Constants/Version.cs + +[working-directory("src/Examples/")] +run-example example: + dotnet run --project Examples.csproj {{ example }} diff --git a/src/Examples/ExampleTemplate.cs b/src/Examples/ExampleTemplate.cs index aa38a0e08e..dd03bde9c1 100644 --- a/src/Examples/ExampleTemplate.cs +++ b/src/Examples/ExampleTemplate.cs @@ -2,6 +2,7 @@ namespace Examples { using System; using System.Threading.Tasks; + using Stripe; /// /// @@ -21,14 +22,12 @@ public class ExampleTemplate { public static async Task Run() { - var apiKey = "{{API_KEY}}"; + var apiKey = Environment.GetEnvironmentVariable("STRIPE_API_KEY"); try { - Console.WriteLine("Hello World"); - - // var client = new StripeClient(apiKey); - // client.V1... + var client = new StripeClient(apiKey); + Console.WriteLine(await client.V1.Customers.ListAsync()); } catch (Exception ex) { diff --git a/src/Examples/Program.cs b/src/Examples/Program.cs index 31579e23ce..4d0ac5f52d 100644 --- a/src/Examples/Program.cs +++ b/src/Examples/Program.cs @@ -1,6 +1,7 @@ namespace Examples { using System; + using System.Reflection; using System.Threading.Tasks; public class Program @@ -9,14 +10,62 @@ public Program() { } + /// + /// To create an example, clone ExampleTemplate.cs, implement the example + /// copy this line and replace the class name with your new class. + /// + /// To run an example from this folder, execute: + /// dotnet run --project Examples.csproj NameOfExample + /// + /// The name of the example should include any namespace parts other than "Examples" + /// which is prepended when looking up the type, for example" + /// dotnet run --project Examples.csproj + /// or + /// dotnet run --project Examples.csproj . + /// + /// Examples accept configuration via environment variables, so ensure all environment vars + /// are set before running the example. + /// + /// + /// command line args + /// public static async Task Main(string[] args) { - // To create an example, clone NewExample.cs, implement the example - // copy this line and replace the class name with your new class. - // await NewExample.Run(); - // e.g. - // await MeterEventExample.Run(); - // then build the project and run bin/Debug/net8.0/Examples + if (args.Length != 1) + { + Console.WriteLine("Usage: dotnet run --project Examples "); + Environment.Exit(1); + return; + } + + var type = Assembly.GetExecutingAssembly().GetType($"Examples.{args[0]}"); + + if (type == null) + { + Console.WriteLine($"Unable to find example class {args[0]}"); + Environment.Exit(1); + return; + } + + var runMethod = type.GetMethod( + "Run", + BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy); + if (runMethod == null) + { + Console.WriteLine($"Example class {args[0]} is missing Run method"); + Environment.Exit(1); + return; + } + + Task? result = (Task?)runMethod.Invoke(null, null); + if (result == null) + { + Console.WriteLine($"Unable to invoke Run method on {args[0]}"); + Environment.Exit(1); + return; + } + + await result; } } } diff --git a/src/Examples/V2/MeterEventStream.cs b/src/Examples/V2/MeterEventStream.cs index 4949e92671..85154b8ed8 100644 --- a/src/Examples/V2/MeterEventStream.cs +++ b/src/Examples/V2/MeterEventStream.cs @@ -1,68 +1,70 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Stripe; -using Stripe.V2.Billing; - -/// -/// Use the high-throughput MeterEventStream to report create billing meter events. -/// -/// In this example, we: -/// - create a meter event session and store the session's authentication token -/// - define an event with a payload -/// - use the meterEventStream service to create an event stream that reports this event -/// -/// This example expects a billing meter with an event_name of 'alpaca_ai_tokens'. If you have -/// a different meter event name, you can change it before running this example. -/// -public class MeterEventStream +namespace Examples.V2 { - private static MeterEventSession? meterEventSession; + using System; + using System.Collections.Generic; + using System.Threading.Tasks; + using Stripe; + using Stripe.V2.Billing; - public static async Task Run() + /// + /// Use the high-throughput MeterEventStream to report create billing meter events. + /// + /// In this example, we: + /// - create a meter event session and store the session's authentication token + /// - define an event with a payload + /// - use the meterEventStream service to create an event stream that reports this event + /// + /// This example expects a billing meter with an event_name of 'alpaca_ai_tokens'. If you have + /// a different meter event name, you can change it before running this example. + /// + public class MeterEventStream { - var apiKey = "{{API_KEY}}"; - var customerId = "{{CUSTOMER_ID}}"; // Replace with actual customer ID + private static MeterEventSession? meterEventSession; - try - { - await SendMeterEvent(apiKey, "alpaca_ai_tokens", customerId, "25"); - Console.WriteLine("Meter event sent successfully!"); - } - catch (Exception ex) + public static async Task Run() { - Console.WriteLine($"Error sending meter event: {ex.Message}"); - } - } + var apiKey = Environment.GetEnvironmentVariable("STRIPE_API_KEY"); + var customerId = Environment.GetEnvironmentVariable("CUSTOMER_ID"); - private static async Task RefreshMeterEventSession(string apiKey) - { - // Check if session is null or expired - if (meterEventSession == null || meterEventSession.ExpiresAt <= DateTime.UtcNow) - { - // Create a new meter event session in case the existing session expired - var client = new StripeClient(apiKey); - meterEventSession = await client.V2.Billing.MeterEventSession.CreateAsync(new MeterEventSessionCreateOptions()); + try + { + await SendMeterEvent(apiKey, "alpaca_ai_tokens", customerId, "25"); + Console.WriteLine("Meter event sent successfully!"); + } + catch (Exception ex) + { + Console.WriteLine($"Error sending meter event: {ex.Message}"); + } } - } - - private static async Task SendMeterEvent(string apiKey, string eventName, string stripeCustomerId, string value) - { - // Refresh the meter event session if necessary - await RefreshMeterEventSession(apiKey); - if (meterEventSession == null) + private static async Task RefreshMeterEventSession(string apiKey) { - throw new Exception("Unable to refresh meter event session"); + // Check if session is null or expired + if (meterEventSession == null || meterEventSession.ExpiresAt <= DateTime.UtcNow) + { + // Create a new meter event session in case the existing session expired + var client = new StripeClient(apiKey); + meterEventSession = await client.V2.Billing.MeterEventSession.CreateAsync(new MeterEventSessionCreateOptions()); + } } - // Create a meter event - var client = new StripeClient(meterEventSession.AuthenticationToken); - var options = new MeterEventStreamCreateOptions + private static async Task SendMeterEvent(string apiKey, string eventName, string stripeCustomerId, string value) { - Events = - [ - new MeterEventStreamCreateEventOptions + // Refresh the meter event session if necessary + await RefreshMeterEventSession(apiKey); + + if (meterEventSession == null) + { + throw new Exception("Unable to refresh meter event session"); + } + + // Create a meter event + var client = new StripeClient(meterEventSession.AuthenticationToken); + var options = new MeterEventStreamCreateOptions + { + Events = + [ + new MeterEventStreamCreateEventOptions { EventName = eventName, Payload = new Dictionary @@ -72,7 +74,8 @@ private static async Task SendMeterEvent(string apiKey, string eventName, string }, }, ], - }; - client.V2.Billing.MeterEventStream.Create(options); + }; + client.V2.Billing.MeterEventStream.Create(options); + } } } diff --git a/src/Examples/V2/ThinEventWebhookHandler.cs b/src/Examples/V2/ThinEventWebhookHandler.cs index bf717d287a..dd4e53f889 100644 --- a/src/Examples/V2/ThinEventWebhookHandler.cs +++ b/src/Examples/V2/ThinEventWebhookHandler.cs @@ -1,60 +1,63 @@ -#pragma warning disable SA1101 // Prefix local calls with this - -using System; -using System.IO; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Stripe; -using Stripe.Events; - -/// -/// Receive and process thin events like the v1.billing.meter.error_report_triggered event. -/// -/// In this example, we: -/// - use parseThinEvent to parse the received thin event webhook body -/// - call StripeClient.v2.core.events.retrieve to retrieve the full event object -/// - if it is a V1BillingMeterErrorReportTriggeredEvent event type, call fetchRelatedObject -/// to retrieve the Billing Meter object associated with the event. -/// -[Route("api/[controller]")] -[ApiController] -public class ThinEventWebhookHandler : ControllerBase +namespace Examples.V2 { - private readonly StripeClient _client; - private readonly string _webhookSecret; +#pragma warning disable SA1101 // Prefix local calls with this - public ThinEventWebhookHandler() + using System; + using System.IO; + using System.Threading.Tasks; + using Microsoft.AspNetCore.Mvc; + using Stripe; + using Stripe.Events; + + /// + /// Receive and process thin events like the v1.billing.meter.error_report_triggered event. + /// + /// In this example, we: + /// - use parseThinEvent to parse the received thin event webhook body + /// - call StripeClient.v2.core.events.retrieve to retrieve the full event object + /// - if it is a V1BillingMeterErrorReportTriggeredEvent event type, call fetchRelatedObject + /// to retrieve the Billing Meter object associated with the event. + /// + [Route("api/[controller]")] + [ApiController] + public class ThinEventWebhookHandler : ControllerBase { - var apiKey = Environment.GetEnvironmentVariable("STRIPE_API_KEY"); - _client = new StripeClient(apiKey); - - _webhookSecret = Environment.GetEnvironmentVariable("WEBHOOK_SECRET"); - } + private readonly StripeClient _client; + private readonly string _webhookSecret; - [HttpPost] - public async Task Index() - { - var json = await new StreamReader(HttpContext.Request.Body).ReadToEndAsync(); - try + public ThinEventWebhookHandler() { - var thinEvent = _client.ParseThinEvent(json, Request.Headers["Stripe-Signature"], _webhookSecret); + var apiKey = Environment.GetEnvironmentVariable("STRIPE_API_KEY"); + _client = new StripeClient(apiKey); + + _webhookSecret = Environment.GetEnvironmentVariable("WEBHOOK_SECRET"); + } - // Fetch the event data to understand the failure - var baseEvent = await _client.V2.Core.Events.GetAsync(thinEvent.Id); - if (baseEvent is V1BillingMeterErrorReportTriggeredEvent fullEvent) + [HttpPost] + public async Task Index() + { + var json = await new StreamReader(HttpContext.Request.Body).ReadToEndAsync(); + try { - var meter = await fullEvent.FetchRelatedObjectAsync(); - var meterId = meter.Id; + var thinEvent = _client.ParseThinEvent(json, Request.Headers["Stripe-Signature"], _webhookSecret); - // Record the failures and alert your team - // Add your logic here - } + // Fetch the event data to understand the failure + var baseEvent = await _client.V2.Core.Events.GetAsync(thinEvent.Id); + if (baseEvent is V1BillingMeterErrorReportTriggeredEvent fullEvent) + { + var meter = await fullEvent.FetchRelatedObjectAsync(); + var meterId = meter.Id; - return Ok(); - } - catch (StripeException e) - { - return BadRequest(e.Message); + // Record the failures and alert your team + // Add your logic here + } + + return Ok(); + } + catch (StripeException e) + { + return BadRequest(e.Message); + } } } } From a5c82e34d4d06b89c5708879c5de48fcbc191774 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 23:54:47 +0000 Subject: [PATCH 12/19] Merge upstream and update generated code for v1501 --- OPENAPI_VERSION | 2 +- src/Stripe.net/Constants/EventTypes.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c67d79cdf1..b8101af09d 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1496 \ No newline at end of file +v1501 \ No newline at end of file diff --git a/src/Stripe.net/Constants/EventTypes.cs b/src/Stripe.net/Constants/EventTypes.cs index 84a496f00b..d5cbf0870d 100644 --- a/src/Stripe.net/Constants/EventTypes.cs +++ b/src/Stripe.net/Constants/EventTypes.cs @@ -612,8 +612,8 @@ public static class EventTypes public const string InvoicePaymentAttemptRequired = "invoice.payment_attempt_required"; /// - /// Occurs whenever an invoice payment attempt fails, due either to a declined payment or to - /// the lack of a stored payment method. + /// Occurs whenever an invoice payment attempt fails, due to either a declined payment, + /// including soft decline, or to the lack of a stored payment method. /// public const string InvoicePaymentFailed = "invoice.payment_failed"; From 6d27fbbfe1589810d723012a67153d71851de927 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:19:15 +0000 Subject: [PATCH 13/19] Update generated code for v1501 --- .../Services/AccountPersons/AccountPersonCreateOptions.cs | 1 - .../Services/AccountPersons/AccountPersonUpdateOptions.cs | 1 - src/Stripe.net/Services/Tokens/TokenPersonOptions.cs | 1 - 3 files changed, 3 deletions(-) diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs index 150558a54b..6a22347540 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonCreateOptions.cs @@ -226,7 +226,6 @@ public class AccountPersonCreateOptions : BaseOptions, IHasMetadata /// Indicates if the person or any of their representatives, family members, or other /// closely related persons, declares that they hold or have held an important public job or /// function, in any jurisdiction. - /// One of: existing, or none. /// [JsonProperty("political_exposure")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs b/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs index b6186fe25d..a5deee9118 100644 --- a/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs +++ b/src/Stripe.net/Services/AccountPersons/AccountPersonUpdateOptions.cs @@ -226,7 +226,6 @@ public class AccountPersonUpdateOptions : BaseOptions, IHasMetadata /// Indicates if the person or any of their representatives, family members, or other /// closely related persons, declares that they hold or have held an important public job or /// function, in any jurisdiction. - /// One of: existing, or none. ///
[JsonProperty("political_exposure")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs b/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs index d63ce08870..f0dc130029 100644 --- a/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs +++ b/src/Stripe.net/Services/Tokens/TokenPersonOptions.cs @@ -216,7 +216,6 @@ public class TokenPersonOptions : INestedOptions, IHasMetadata /// Indicates if the person or any of their representatives, family members, or other /// closely related persons, declares that they hold or have held an important public job or /// function, in any jurisdiction. - /// One of: existing, or none. ///
[JsonProperty("political_exposure")] #if NET6_0_OR_GREATER From b297aac259e12fcc038811b22ab2b8170f639c92 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:56:26 +0000 Subject: [PATCH 14/19] Update generated code for v1502 --- OPENAPI_VERSION | 2 +- .../Identity/VerificationSessions/VerificationSession.cs | 2 +- .../VerificationSessions/VerificationSessionCreateOptions.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b8101af09d..4ffe7a94b2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1501 \ No newline at end of file +v1502 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs index 9139b15120..c0db507aaa 100644 --- a/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs +++ b/src/Stripe.net/Entities/Identity/VerificationSessions/VerificationSession.cs @@ -190,7 +190,7 @@ public VerificationReport LastVerificationReport public VerificationSessionRedaction Redaction { get; set; } /// - /// Token referencing a Customer resource. + /// Customer ID. /// [JsonProperty("related_customer")] #if NET6_0_OR_GREATER diff --git a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs index 8cf5cea8fa..362edd2054 100644 --- a/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs +++ b/src/Stripe.net/Services/Identity/VerificationSessions/VerificationSessionCreateOptions.cs @@ -50,7 +50,7 @@ public class VerificationSessionCreateOptions : BaseOptions, IHasMetadata public VerificationSessionProvidedDetailsOptions ProvidedDetails { get; set; } /// - /// Token referencing a Customer resource. + /// Customer ID. /// [JsonProperty("related_customer")] #if NET6_0_OR_GREATER From 5e43c2ec1f13f706e558943f0a8bdd92c21de599 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 16:56:10 +0000 Subject: [PATCH 15/19] Update generated code for v1504 --- OPENAPI_VERSION | 2 +- .../Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs | 3 ++- src/Stripe.net/Entities/TaxRates/TaxRate.cs | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 4ffe7a94b2..aae3b62720 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1502 \ No newline at end of file +v1504 \ No newline at end of file diff --git a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs index 7435f93864..db0714078a 100644 --- a/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs +++ b/src/Stripe.net/Entities/Tax/Calculations/CalculationTaxBreakdownTaxRateDetails.cs @@ -41,7 +41,8 @@ public class CalculationTaxBreakdownTaxRateDetails : StripeEntity /// Indicates the type of tax rate applied to the taxable amount. This value can be - /// null when no tax applies to the location. + /// null when no tax applies to the location. This field is only present for TaxRates + /// created by Stripe Tax. /// One of: flat_amount, or percentage. ///
[JsonProperty("rate_type")] diff --git a/src/Stripe.net/Entities/TaxRates/TaxRate.cs b/src/Stripe.net/Entities/TaxRates/TaxRate.cs index e8c58bacc2..40c5abd7aa 100644 --- a/src/Stripe.net/Entities/TaxRates/TaxRate.cs +++ b/src/Stripe.net/Entities/TaxRates/TaxRate.cs @@ -178,7 +178,8 @@ public class TaxRate : StripeEntity, IHasId, IHasMetadata, IHasObject /// /// Indicates the type of tax rate applied to the taxable amount. This value can be - /// null when no tax applies to the location. + /// null when no tax applies to the location. This field is only present for TaxRates + /// created by Stripe Tax. /// One of: flat_amount, or percentage. /// [JsonProperty("rate_type")] From 8aa3761278a53e8206fd9f00257216828462d2ea Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 17:11:09 +0000 Subject: [PATCH 16/19] Update generated code for v1505 --- OPENAPI_VERSION | 2 +- .../Terminal/Readers/ReaderService.cs | 16 ++++++++++++++++ .../ReaderTimeoutInputCollectionOptions.cs | 7 +++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderTimeoutInputCollectionOptions.cs diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index aae3b62720..ddf5ac5449 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1504 \ No newline at end of file +v1505 \ No newline at end of file diff --git a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderService.cs b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderService.cs index 61f7e868a0..abe93cfafc 100644 --- a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderService.cs +++ b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderService.cs @@ -59,5 +59,21 @@ public virtual Stripe.Terminal.Reader SucceedInputCollection(string id, ReaderSu { return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/terminal/readers/{WebUtility.UrlEncode(id)}/succeed_input_collection", options, requestOptions, cancellationToken); } + + /// + ///

Completes an input collection with a timeout error on a simulated reader.

. + ///
+ public virtual Stripe.Terminal.Reader TimeoutInputCollection(string id, ReaderTimeoutInputCollectionOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/terminal/readers/{WebUtility.UrlEncode(id)}/timeout_input_collection", options, requestOptions); + } + + /// + ///

Completes an input collection with a timeout error on a simulated reader.

. + ///
+ public virtual Task TimeoutInputCollectionAsync(string id, ReaderTimeoutInputCollectionOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v1/test_helpers/terminal/readers/{WebUtility.UrlEncode(id)}/timeout_input_collection", options, requestOptions, cancellationToken); + } } } diff --git a/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderTimeoutInputCollectionOptions.cs b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderTimeoutInputCollectionOptions.cs new file mode 100644 index 0000000000..da7ef88cf8 --- /dev/null +++ b/src/Stripe.net/Services/TestHelpers/Terminal/Readers/ReaderTimeoutInputCollectionOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe.TestHelpers.Terminal +{ + public class ReaderTimeoutInputCollectionOptions : BaseOptions + { + } +} From 0b32364c8609d99173461b2329722fbe0dd9881a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 19:27:23 +0000 Subject: [PATCH 17/19] Update generated code for v1505 --- .../V2/EventDestinations/EventDestination.cs | 8 ---- .../V2/Core/Events/EventListOptions.cs | 48 ------------------- 2 files changed, 56 deletions(-) diff --git a/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs b/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs index 95d60b03f9..b530c5e1d8 100644 --- a/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs +++ b/src/Stripe.net/Entities/V2/EventDestinations/EventDestination.cs @@ -8,14 +8,6 @@ namespace Stripe.V2 using STJS = System.Text.Json.Serialization; #endif - /// - /// Set up an event destination to receive events from Stripe across multiple destination - /// types, including webhook endpoints and Amazon EventBridge. - /// Event destinations support receiving thin events and snapshot events. - /// public class EventDestination : StripeEntity, IHasId, IHasMetadata, IHasObject { /// diff --git a/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs b/src/Stripe.net/Services/V2/Core/Events/EventListOptions.cs index 294b2d93af..e6102286fa 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 Newtonsoft.Json; #if NET6_0_OR_GREATER using STJS = System.Text.Json.Serialization; @@ -9,53 +8,6 @@ namespace Stripe.V2.Core public class EventListOptions : V2.ListOptions { - /// - /// Filter for events created after the specified timestamp. - /// - [JsonProperty("created_gt")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_gt")] -#endif - public DateTime? CreatedGt { get; set; } - - /// - /// Filter for events created at or after the specified timestamp. - /// - [JsonProperty("created_gte")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_gte")] -#endif - public DateTime? CreatedGte { get; set; } - - /// - /// Filter for events created before the specified timestamp. - /// - [JsonProperty("created_lt")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_lt")] -#endif - public DateTime? CreatedLt { get; set; } - - /// - /// Filter for events created at or before the specified timestamp. - /// - [JsonProperty("created_lte")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("created_lte")] -#endif - public DateTime? CreatedLte { get; set; } - - /// - /// Filter events based on whether they were successfully delivered to all subscribed event - /// destinations. If false, events which are still pending or have failed all delivery - /// attempts to a event destination will be returned. - /// - [JsonProperty("delivery_success")] -#if NET6_0_OR_GREATER - [STJS.JsonPropertyName("delivery_success")] -#endif - public bool? DeliverySuccess { get; set; } - /// /// Primary object ID used to retrieve related events. /// From bd692448d2f8aaf4e21775fdc01c0331efd6631c Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 22:32:11 +0000 Subject: [PATCH 18/19] Update generated code (#3050) * Update generated code for v1463 * Update generated code for v1494 * Update generated code for v1495 * Update generated code for v1501 * Update generated code for v1505 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> From 66b2214e7db54759dffacc06dd51c3d342c8a839 Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Mon, 24 Feb 2025 17:34:29 -0500 Subject: [PATCH 19/19] Bump version to 47.4.0 --- CHANGELOG.md | 12 +++++++++++- src/Stripe.net/Constants/Version.cs | 2 +- src/Stripe.net/Stripe.net.csproj | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c538c740ad..60dbcb748b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,17 @@ * Add support for `Prices` on `BillingCreditBalanceSummaryFilterApplicabilityScopeOptions`, `BillingCreditGrantApplicabilityConfigScopeOptions`, and `BillingCreditGrantApplicabilityConfigScope` * Add support for `BrandProduct` on `ChargePaymentMethodDetailsAmazonPayFundingCard` and `ChargePaymentMethodDetailsRevolutPayFundingCard` * Add support for `Restrictions` on `CheckoutSessionPaymentMethodOptionsCardOptions` and `CheckoutSessionPaymentMethodOptionsCard` + +## 47.4.0 - 2025-02-24 +* [#3050](https://github.com/stripe/stripe-dotnet/pull/3050) Update generated code + * Add support for `Prices` on `BillingCreditBalanceSummaryFilterApplicabilityScopeOptions`, `BillingCreditGrantApplicabilityConfigScopeOptions`, and `BillingCreditGrantApplicabilityConfigScope` + * Add support for `Priority` on `Billing.CreditGrantCreateOptions` and `BillingCreditGrant` + * Add support for `TargetDate` on `CheckoutSessionPaymentMethodOptionsAcssDebitOptions`, `CheckoutSessionPaymentMethodOptionsAcssDebit`, `CheckoutSessionPaymentMethodOptionsAuBecsDebitOptions`, `CheckoutSessionPaymentMethodOptionsAuBecsDebit`, `CheckoutSessionPaymentMethodOptionsBacsDebitOptions`, `CheckoutSessionPaymentMethodOptionsBacsDebit`, `CheckoutSessionPaymentMethodOptionsSepaDebitOptions`, `CheckoutSessionPaymentMethodOptionsSepaDebit`, `CheckoutSessionPaymentMethodOptionsUsBankAccountOptions`, `CheckoutSessionPaymentMethodOptionsUsBankAccount`, `PaymentIntentPaymentMethodOptionsAcssDebitOptions`, `PaymentIntentPaymentMethodOptionsAcssDebit`, `PaymentIntentPaymentMethodOptionsAuBecsDebitOptions`, `PaymentIntentPaymentMethodOptionsAuBecsDebit`, `PaymentIntentPaymentMethodOptionsBacsDebitOptions`, `PaymentIntentPaymentMethodOptionsBacsDebit`, `PaymentIntentPaymentMethodOptionsSepaDebitOptions`, `PaymentIntentPaymentMethodOptionsSepaDebit`, `PaymentIntentPaymentMethodOptionsUsBankAccountOptions`, and `PaymentIntentPaymentMethodOptionsUsBankAccount` + * Add support for `Restrictions` on `CheckoutSessionPaymentMethodOptionsCardOptions` and `CheckoutSessionPaymentMethodOptionsCard` + * Add support for `CollectedInformation` on `Checkout.SessionUpdateOptions` and `CheckoutSession` + * Add support for `Metadata` on `ProductDefaultPriceDataOptions` +* [#3054](https://github.com/stripe/stripe-dotnet/pull/3054) Improved examples +* [#3055](https://github.com/stripe/stripe-dotnet/pull/3055) add codeowners file ## 47.3.0 - 2025-01-27 * [#3044](https://github.com/stripe/stripe-dotnet/pull/3044) Update generated code @@ -4152,4 +4163,3 @@ List of backwards incompatible changes: * [#1019](https://github.com/stripe/stripe-dotnet#1019) Add `StripeChargeCaptureOptions` and use it for charge capture * [#1022](https://github.com/stripe/stripe-dotnet#1022) Add support for SKUs * [#1025](https://github.com/stripe/stripe-dotnet#1025) Add `Discountable` for `StripeInvoiceLineItem` - diff --git a/src/Stripe.net/Constants/Version.cs b/src/Stripe.net/Constants/Version.cs index c7293b5487..48bcfec753 100644 --- a/src/Stripe.net/Constants/Version.cs +++ b/src/Stripe.net/Constants/Version.cs @@ -4,4 +4,4 @@ internal class Version { public const string Current = "47.4.0-beta.1"; } -} \ No newline at end of file +} diff --git a/src/Stripe.net/Stripe.net.csproj b/src/Stripe.net/Stripe.net.csproj index 9047d8b900..4b3f217578 100644 --- a/src/Stripe.net/Stripe.net.csproj +++ b/src/Stripe.net/Stripe.net.csproj @@ -1,7 +1,7 @@  - Stripe.net is a sync/async .NET 4.6.1+ client, and a portable class library for the Stripe API. (Official Library) + Stripe.net is a sync/async client and portable class library for the Stripe API, supporting .NET Standard 2.0+, .NET Core 3.1+, and .NET Framework 4.6.1+. (Official Library) 47.4.0-beta.1 8 Stripe, Jayme Davis