diff --git a/CHANGELOG.md b/CHANGELOG.md index 6261082eac..ee93d7ccb2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,29 @@ This release changes the pinned API version to 2026-04-22.private. * Add support for `AdmissionsTax`, `AttendanceTax`, `EntertainmentTax`, `GrossReceiptsTax`, `HospitalityTax`, `LuxuryTax`, `ResortTax`, and `TourismTax` on `TaxRegistrationCountryOptionsUsOptions` * Add support for `Purpose` on `Treasury.OutboundPaymentCreateOptions` and `Treasury.OutboundPayment` +## 51.1.0 - 2026-04-23 +This release changes the pinned API version to 2026-04-22.dahlia. + +* [#3365](https://github.com/stripe/stripe-dotnet/pull/3365) Update generated code + * Add support for `BalanceReport` and `PayoutReconciliationReport` on `AccountSession.Components` and `AccountSessionComponentsOptions` + * Add support for `AppDistribution` and `SunbitPayments` on `Account.Capabilities` and `AccountCapabilitiesOptions` + * Add support for `Sunbit` on `Charge.PaymentMethodDetails`, `ConfirmationToken.PaymentMethodPreview`, `ConfirmationTokenPaymentMethodDataOptions`, `PaymentAttemptRecord.PaymentMethodDetails`, `PaymentIntentPaymentMethodDataOptions`, `PaymentMethodConfigurationCreateOptions`, `PaymentMethodConfigurationUpdateOptions`, `PaymentMethodConfiguration`, `PaymentMethodCreateOptions`, `PaymentMethod`, `PaymentRecord.PaymentMethodDetails`, and `SetupIntentPaymentMethodDataOptions` + * Add support for `Location` and `Reader` on `Charge.PaymentMethodDetails.Klarna`, `PaymentAttemptRecord.PaymentMethodDetails.Klarna`, and `PaymentRecord.PaymentMethodDetails.Klarna` + * Add support for `Mandate` on `Charge.PaymentMethodDetails.Pix`, `PaymentAttemptRecord.PaymentMethodDetails.Pix`, and `PaymentRecord.PaymentMethodDetails.Pix` + * Add support for `ManagedPayments` on `Checkout.SessionCreateOptions`, `Checkout.Session`, `PaymentIntent`, `PaymentLinkCreateOptions`, `PaymentLink`, `SetupIntent`, and `Subscription` + * Add support for `MandateOptions` on `Checkout.Session.PaymentMethodOptions.Pix`, `CheckoutSessionPaymentMethodOptionsPixOptions`, `PaymentIntent.PaymentMethodOptions.Pix`, and `PaymentIntentPaymentMethodOptionsPixOptions` + * Change type of `CheckoutSessionPaymentMethodOptionsPixOptions.SetupFutureUsage` and `PaymentIntentPaymentMethodOptionsPixOptions.SetupFutureUsage` from `literal('none')` to `enum('none'|'off_session')` + * ⚠️ Change type of `Checkout.Session.PaymentMethodOptions.Pix.SetupFutureUsage` and `PaymentIntent.PaymentMethodOptions.Pix.SetupFutureUsage` from `literal('none')` to `enum('none'|'off_session')` + * Add support for `Pix` on `Invoice.PaymentSettings.PaymentMethodOptions`, `InvoicePaymentSettingsPaymentMethodOptionsOptions`, `Mandate.PaymentMethodDetails`, `SetupAttempt.PaymentMethodDetails`, `SetupIntent.PaymentMethodOptions`, `SetupIntentPaymentMethodOptionsOptions`, `Subscription.PaymentSettings.PaymentMethodOptions`, and `SubscriptionPaymentSettingsPaymentMethodOptionsOptions` + * Add support for `Upi` on `Invoice.PaymentSettings.PaymentMethodOptions`, `InvoicePaymentSettingsPaymentMethodOptionsOptions`, `Subscription.PaymentSettings.PaymentMethodOptions`, and `SubscriptionPaymentSettingsPaymentMethodOptionsOptions` + * Add support for `CardPresence` on `Issuing.Authorization` + * Add support for `AllowedCardPresences` and `BlockedCardPresences` on `Issuing.Card.SpendingControls`, `Issuing.Cardholder.SpendingControls`, `IssuingCardSpendingControlsOptions`, and `IssuingCardholderSpendingControlsOptions` + * Add support for `Amount` and `Currency` on `Mandate.MultiUse` + * Add support for `AmountToConfirm` on `PaymentIntentConfirmOptions` + * Add support for `KlarnaDisplayQrCode` on `PaymentIntent.NextAction` + * Add support for `Moto` on `SetupAttempt.PaymentMethodDetails.Card` + * Add support for `PixDisplayQrCode` on `SetupIntent.NextAction` + ## 51.1.0-beta.2 - 2026-04-17 Please review the [changelog for 51.0.1](https://github.com/stripe/stripe-dotnet/blob/master/CHANGELOG.md#5101---2026-04-17) for more information about changes in this release. diff --git a/CODEGEN_VERSION b/CODEGEN_VERSION index 65009e232f..4540bccf09 100644 --- a/CODEGEN_VERSION +++ b/CODEGEN_VERSION @@ -1 +1 @@ -77db2d3a0cf933a87e318463e31419e60d76483b \ No newline at end of file +826bf48af8bcd391512daeaf283b8486347b14c8 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 048a4fc1a7..97a2932083 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2252 \ No newline at end of file +v2253 \ No newline at end of file diff --git a/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionCalculationTax.cs b/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionCalculationTax.cs index 4ae84994cb..25bee96cef 100644 --- a/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionCalculationTax.cs +++ b/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionCalculationTax.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class BillSettingVersionCalculationTax : StripeEntity { /// - /// Determines if tax will be calculated automatically based on a PTC or manually based on - /// rules defined by the merchant. Defaults to "manual". + /// Determines if tax is calculated automatically based on a PTC or manually based on rules + /// defined by the business. Defaults to "manual". /// One of: automatic, or manual. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionInvoice.cs b/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionInvoice.cs index d304d78d3a..5d2974f27f 100644 --- a/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionInvoice.cs +++ b/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionInvoice.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Billing public class BillSettingVersionInvoice : StripeEntity { /// - /// The amount of time until the invoice will be overdue for payment. + /// The amount of time until the invoice is overdue for payment. /// [JsonProperty("time_until_due")] [STJS.JsonPropertyName("time_until_due")] diff --git a/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionInvoiceTimeUntilDue.cs b/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionInvoiceTimeUntilDue.cs index 787028906b..df832ec8d5 100644 --- a/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionInvoiceTimeUntilDue.cs +++ b/src/Stripe.net/Entities/V2/Billing/BillSettingVersions/BillSettingVersionInvoiceTimeUntilDue.cs @@ -18,7 +18,7 @@ public class BillSettingVersionInvoiceTimeUntilDue : StripeEntity /// The number of interval units. For example, if interval=day and interval_count=30, the - /// invoice will be due in 30 days. + /// invoice is due in 30 days. /// [JsonProperty("interval_count")] [STJS.JsonPropertyName("interval_count")] diff --git a/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSetting.cs b/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSetting.cs index c2552caf80..438ce1b3a7 100644 --- a/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSetting.cs +++ b/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSetting.cs @@ -65,7 +65,7 @@ public class BillSetting : StripeEntity, IHasId, IHasObject public string InvoiceRenderingTemplate { get; set; } /// - /// The latest version of the current settings object. This will be Updated every time an + /// The latest version of the current settings object. This is updated every time an /// attribute of the settings is updated. /// [JsonProperty("latest_version")] diff --git a/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingCalculationTax.cs b/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingCalculationTax.cs index 23811f2613..70ccc40f7c 100644 --- a/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingCalculationTax.cs +++ b/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingCalculationTax.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class BillSettingCalculationTax : StripeEntity { /// - /// Determines if tax will be calculated automatically based on a PTC or manually based on - /// rules defined by the merchant. Defaults to "manual". + /// Determines if tax is calculated automatically based on a PTC or manually based on rules + /// defined by the business. Defaults to "manual". /// One of: automatic, or manual. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingInvoice.cs b/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingInvoice.cs index cbd060452f..5738242be1 100644 --- a/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingInvoice.cs +++ b/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingInvoice.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Billing public class BillSettingInvoice : StripeEntity { /// - /// The amount of time until the invoice will be overdue for payment. + /// The amount of time until the invoice is overdue for payment. /// [JsonProperty("time_until_due")] [STJS.JsonPropertyName("time_until_due")] diff --git a/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingInvoiceTimeUntilDue.cs b/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingInvoiceTimeUntilDue.cs index 3acd95b4d7..c6f517c0b2 100644 --- a/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingInvoiceTimeUntilDue.cs +++ b/src/Stripe.net/Entities/V2/Billing/BillSettings/BillSettingInvoiceTimeUntilDue.cs @@ -18,7 +18,7 @@ public class BillSettingInvoiceTimeUntilDue : StripeEntity /// The number of interval units. For example, if interval=day and interval_count=30, the - /// invoice will be due in 30 days. + /// invoice is due in 30 days. /// [JsonProperty("interval_count")] [STJS.JsonPropertyName("interval_count")] diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleMonth.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleMonth.cs index f7d496752a..f52376aba1 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleMonth.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleMonth.cs @@ -10,8 +10,8 @@ public class CadenceBillingCycleMonth : StripeEntity { /// /// The day to anchor the billing on for a type="month" billing cycle from 1-31. If this - /// number is greater than the number of days in the month being billed, this will anchor to - /// the last day of the month. + /// number is greater than the number of days in the month being billed, this anchors to the + /// last day of the month. /// [JsonProperty("day_of_month")] [STJS.JsonPropertyName("day_of_month")] diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleYear.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleYear.cs index a0ea610686..dda4c0d714 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleYear.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceBillingCycleYear.cs @@ -10,16 +10,16 @@ public class CadenceBillingCycleYear : StripeEntity { /// /// The day to anchor the billing on for a type="month" billing cycle from 1-31. If this - /// number is greater than the number of days in the month being billed, this will anchor to - /// the last day of the month. + /// number is greater than the number of days in the month being billed, this anchors to the + /// last day of the month. /// [JsonProperty("day_of_month")] [STJS.JsonPropertyName("day_of_month")] public long DayOfMonth { get; set; } /// - /// The month to bill on from 1-12. If not provided, this will default to the month the - /// cadence was created. + /// The month to bill on from 1-12. If not provided, this defaults to the month the cadence + /// was created. /// [JsonProperty("month_of_year")] [STJS.JsonPropertyName("month_of_year")] diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadencePayer.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadencePayer.cs index 7da8c2fac4..9ac5069264 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadencePayer.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadencePayer.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Billing public class CadencePayer : StripeEntity { /// - /// The ID of the Billing Profile object which determines how a bill will be paid. + /// The ID of the Billing Profile object which determines how a bill is paid. /// [JsonProperty("billing_profile")] [STJS.JsonPropertyName("billing_profile")] diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillCalculationTax.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillCalculationTax.cs index cfd250bcaf..a91f12d10e 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillCalculationTax.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillCalculationTax.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class CadenceSettingsDataBillCalculationTax : StripeEntity { /// - /// Determines if tax will be calculated automatically based on a PTC or manually based on - /// rules defined by the merchant. Defaults to "manual". + /// Determines if tax is calculated automatically based on a PTC or manually based on rules + /// defined by the business. Defaults to "manual". /// One of: automatic, or manual. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillInvoice.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillInvoice.cs index 76db47f0ea..503ad14c1e 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillInvoice.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillInvoice.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Billing public class CadenceSettingsDataBillInvoice : StripeEntity { /// - /// The amount of time until the invoice will be overdue for payment. + /// The amount of time until the invoice is overdue for payment. /// [JsonProperty("time_until_due")] [STJS.JsonPropertyName("time_until_due")] diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillInvoiceTimeUntilDue.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillInvoiceTimeUntilDue.cs index ae30c79ca0..d7a5e44029 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillInvoiceTimeUntilDue.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataBillInvoiceTimeUntilDue.cs @@ -18,7 +18,7 @@ public class CadenceSettingsDataBillInvoiceTimeUntilDue : StripeEntity /// The number of interval units. For example, if interval=day and interval_count=30, the - /// invoice will be due in 30 days. + /// invoice is due in 30 days. /// [JsonProperty("interval_count")] [STJS.JsonPropertyName("interval_count")] diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollection.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollection.cs index dc27263dd5..a1a3de817f 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollection.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollection.cs @@ -9,9 +9,9 @@ namespace Stripe.V2.Billing public class CadenceSettingsDataCollection : StripeEntity { /// - /// Either automatic, or send_invoice. When charging automatically, Stripe will attempt to - /// pay this bill at the end of the period using the payment method attached to the payer - /// profile. When sending an invoice, Stripe will email your payer profile an invoice with + /// Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay + /// this bill at the end of the period using the payment method attached to the billing + /// profile. When sending an invoice, Stripe emails your billing profile an invoice with /// payment instructions. Defaults to automatic. /// One of: automatic, or send_invoice. /// diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptions.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptions.cs index 90d1bda27b..fa81121817 100644 --- a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptions.cs @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Billing { - using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; using STJS = System.Text.Json.Serialization; @@ -43,14 +42,14 @@ public class CadenceSettingsDataCollectionPaymentMethodOptions : StripeEntity [JsonProperty("konbini")] [STJS.JsonPropertyName("konbini")] - public Dictionary Konbini { get; set; } + public CadenceSettingsDataCollectionPaymentMethodOptionsKonbini Konbini { get; set; } /// /// This sub-hash contains details about the SEPA Direct Debit payment method options. /// [JsonProperty("sepa_debit")] [STJS.JsonPropertyName("sepa_debit")] - public Dictionary SepaDebit { get; set; } + public CadenceSettingsDataCollectionPaymentMethodOptionsSepaDebit SepaDebit { get; set; } /// /// This sub-hash contains details about the ACH direct debit payment method options. diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptionsKonbini.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptionsKonbini.cs new file mode 100644 index 0000000000..1aa5cb12ef --- /dev/null +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptionsKonbini.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class CadenceSettingsDataCollectionPaymentMethodOptionsKonbini : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptionsSepaDebit.cs new file mode 100644 index 0000000000..14b4ad8642 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Billing/Cadences/CadenceSettingsDataCollectionPaymentMethodOptionsSepaDebit.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class CadenceSettingsDataCollectionPaymentMethodOptionsSepaDebit : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersion.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersion.cs index 0e4d60175f..1278d6400c 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersion.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersion.cs @@ -31,9 +31,9 @@ public class CollectionSettingVersion : StripeEntity, public string Object { get; set; } /// - /// Either automatic, or send_invoice. When charging automatically, Stripe will attempt to - /// pay this bill at the end of the period using the payment method attached to the payer - /// profile. When sending an invoice, Stripe will email your payer profile an invoice with + /// Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay + /// this bill at the end of the period using the payment method attached to the billing + /// profile. When sending an invoice, Stripe emails your billing profile an invoice with /// payment instructions. Defaults to automatic. /// One of: automatic, or send_invoice. /// diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptions.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptions.cs index e89e6a99b7..efe06f9d09 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptions.cs @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Billing { - using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; using STJS = System.Text.Json.Serialization; @@ -43,14 +42,14 @@ public class CollectionSettingVersionPaymentMethodOptions : StripeEntity [JsonProperty("konbini")] [STJS.JsonPropertyName("konbini")] - public Dictionary Konbini { get; set; } + public CollectionSettingVersionPaymentMethodOptionsKonbini Konbini { get; set; } /// /// This sub-hash contains details about the SEPA Direct Debit payment method options. /// [JsonProperty("sepa_debit")] [STJS.JsonPropertyName("sepa_debit")] - public Dictionary SepaDebit { get; set; } + public CollectionSettingVersionPaymentMethodOptionsSepaDebit SepaDebit { get; set; } /// /// This sub-hash contains details about the ACH direct debit payment method options. diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsKonbini.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsKonbini.cs new file mode 100644 index 0000000000..0200c5a7ea --- /dev/null +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsKonbini.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class CollectionSettingVersionPaymentMethodOptionsKonbini : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsSepaDebit.cs new file mode 100644 index 0000000000..ef5f107ad0 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettingVersions/CollectionSettingVersionPaymentMethodOptionsSepaDebit.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class CollectionSettingVersionPaymentMethodOptionsSepaDebit : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSetting.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSetting.cs index da50cb693a..3a63255c08 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSetting.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSetting.cs @@ -28,9 +28,9 @@ public class CollectionSetting : StripeEntity, IHasId, IHasOb public string Object { get; set; } /// - /// Either automatic, or send_invoice. When charging automatically, Stripe will attempt to - /// pay this bill at the end of the period using the payment method attached to the payer - /// profile. When sending an invoice, Stripe will email your payer profile an invoice with + /// Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay + /// this bill at the end of the period using the payment method attached to the billing + /// profile. When sending an invoice, Stripe emails your billing profile an invoice with /// payment instructions. Defaults to automatic. /// One of: automatic, or send_invoice. /// @@ -60,7 +60,7 @@ public class CollectionSetting : StripeEntity, IHasId, IHasOb public CollectionSettingEmailDelivery EmailDelivery { get; set; } /// - /// The latest version of the current settings object. This will be Updated every time an + /// The latest version of the current settings object. This is updated every time an /// attribute of the settings is updated. /// [JsonProperty("latest_version")] diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptions.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptions.cs index dc1da9921b..1ca665d442 100644 --- a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptions.cs @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Billing { - using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; using STJS = System.Text.Json.Serialization; @@ -43,14 +42,14 @@ public class CollectionSettingPaymentMethodOptions : StripeEntity [JsonProperty("konbini")] [STJS.JsonPropertyName("konbini")] - public Dictionary Konbini { get; set; } + public CollectionSettingPaymentMethodOptionsKonbini Konbini { get; set; } /// /// This sub-hash contains details about the SEPA Direct Debit payment method options. /// [JsonProperty("sepa_debit")] [STJS.JsonPropertyName("sepa_debit")] - public Dictionary SepaDebit { get; set; } + public CollectionSettingPaymentMethodOptionsSepaDebit SepaDebit { get; set; } /// /// This sub-hash contains details about the ACH direct debit payment method options. diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsKonbini.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsKonbini.cs new file mode 100644 index 0000000000..aab8d5503c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsKonbini.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class CollectionSettingPaymentMethodOptionsKonbini : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsSepaDebit.cs b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsSepaDebit.cs new file mode 100644 index 0000000000..b402668890 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Billing/CollectionSettings/CollectionSettingPaymentMethodOptionsSepaDebit.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class CollectionSettingPaymentMethodOptionsSepaDebit : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs index ea15b65b84..5d6dfe316d 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustment.cs @@ -15,7 +15,7 @@ namespace Stripe.V2.Billing public class MeterEventAdjustment : StripeEntity, IHasId, IHasObject { /// - /// The unique id of this meter event adjustment. + /// The unique ID of this meter event adjustment. /// [JsonProperty("id")] [STJS.JsonPropertyName("id")] @@ -67,8 +67,8 @@ public class MeterEventAdjustment : StripeEntity, IHasId, public string Status { get; set; } /// - /// Open Enum. Specifies whether to cancel a single event or a range of events for a time - /// period. Time period cancellation is not supported yet. + /// Open Enum. Specifies the type of cancellation. Currently supports canceling a single + /// event. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs index c469b81557..f6ff85a5ea 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCancel.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class MeterEventAdjustmentCancel : StripeEntity { /// - /// Unique identifier for the event. You can only cancel events within 24 hours of Stripe - /// receiving them. + /// The identifier that was originally assigned to the meter event. You can only cancel + /// events within 24 hours of Stripe receiving them. /// [JsonProperty("identifier")] [STJS.JsonPropertyName("identifier")] diff --git a/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs b/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs index 83e4ff7bb4..4bf459d703 100644 --- a/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs +++ b/src/Stripe.net/Entities/V2/Billing/MeterEventSessions/MeterEventSession.cs @@ -15,7 +15,7 @@ namespace Stripe.V2.Billing public class MeterEventSession : StripeEntity, IHasId, IHasObject { /// - /// The unique id of this auth session. + /// The unique ID of this auth session. /// [JsonProperty("id")] [STJS.JsonPropertyName("id")] @@ -30,7 +30,7 @@ public class MeterEventSession : StripeEntity, IHasId, IHasOb public string Object { get; set; } /// - /// The authentication token for this session. Use this token when calling the + /// The authentication token for this session. Use this token when calling the /// high-throughput meter event API. /// [JsonProperty("authentication_token")] @@ -45,7 +45,7 @@ public class MeterEventSession : StripeEntity, IHasId, IHasOb public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; /// - /// The time at which this session will expire. + /// The time at which this session expires. /// [JsonProperty("expires_at")] [STJS.JsonPropertyName("expires_at")] diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs new file mode 100644 index 0000000000..035682c53a --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImport.cs @@ -0,0 +1,78 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + /// + /// The product catalog import object tracks the long-running background process that + /// handles uploading, processing and validation. + /// + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImport : StripeEntity, IHasId, IHasMetadata, IHasObject + { + /// + /// The unique identifier for this ProductCatalogImport. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value of + /// the object field. + /// + [JsonProperty("object")] + [STJS.JsonPropertyName("object")] + public string Object { get; set; } + + /// + /// The time this ProductCatalogImport was created. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The type of feed data being imported into the product catalog. + /// One of: inventory, pricing, or product. + /// + [JsonProperty("feed_type")] + [STJS.JsonPropertyName("feed_type")] + public string FeedType { get; set; } + + /// + /// Has the value true if the object exists in live mode or the value false if + /// the object exists in test mode. + /// + [JsonProperty("livemode")] + [STJS.JsonPropertyName("livemode")] + public bool Livemode { get; set; } + + /// + /// Additional information about the object in a structured format. + /// + [JsonProperty("metadata")] + [STJS.JsonPropertyName("metadata")] + public Dictionary Metadata { get; set; } + + /// + /// The current status of this ProductCatalogImport. + /// One of: awaiting_upload, failed, processing, succeeded, or + /// succeeded_with_errors. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + + /// + /// Details about the current import status. + /// + [JsonProperty("status_details")] + [STJS.JsonPropertyName("status_details")] + public ProductCatalogImportStatusDetails StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetails.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetails.cs new file mode 100644 index 0000000000..6320b549eb --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetails.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetails : StripeEntity + { + /// + /// Details when the import is awaiting file upload. + /// + [JsonProperty("awaiting_upload")] + [STJS.JsonPropertyName("awaiting_upload")] + public ProductCatalogImportStatusDetailsAwaitingUpload AwaitingUpload { get; set; } + + /// + /// Details when the import didn't complete. + /// + [JsonProperty("failed")] + [STJS.JsonPropertyName("failed")] + public ProductCatalogImportStatusDetailsFailed Failed { get; set; } + + /// + /// Details when the import is processing. + /// + [JsonProperty("processing")] + [STJS.JsonPropertyName("processing")] + public ProductCatalogImportStatusDetailsProcessing Processing { get; set; } + + /// + /// Details when the import has succeeded. + /// + [JsonProperty("succeeded")] + [STJS.JsonPropertyName("succeeded")] + public ProductCatalogImportStatusDetailsSucceeded Succeeded { get; set; } + + /// + /// Details when the import completed but some records failed to process. + /// + [JsonProperty("succeeded_with_errors")] + [STJS.JsonPropertyName("succeeded_with_errors")] + public ProductCatalogImportStatusDetailsSucceededWithErrors SucceededWithErrors { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUpload.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUpload.cs new file mode 100644 index 0000000000..1e836be27d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUpload.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsAwaitingUpload : StripeEntity + { + /// + /// The pre-signed URL information for uploading the catalog file. + /// + [JsonProperty("upload_url")] + [STJS.JsonPropertyName("upload_url")] + public ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl UploadUrl { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl.cs new file mode 100644 index 0000000000..20dc6de462 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsAwaitingUploadUploadUrl : StripeEntity + { + /// + /// The timestamp when the upload URL expires. + /// + [JsonProperty("expires_at")] + [STJS.JsonPropertyName("expires_at")] + public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The pre-signed URL for uploading the catalog file. + /// + [JsonProperty("url")] + [STJS.JsonPropertyName("url")] + public string Url { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsFailed.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsFailed.cs new file mode 100644 index 0000000000..cb7a871055 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsFailed.cs @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsFailed : StripeEntity + { + /// + /// The error code for this product catalog processing failure. + /// One of: file_not_found, internal_error, or invalid_file. + /// + [JsonProperty("code")] + [STJS.JsonPropertyName("code")] + public string Code { get; set; } + + /// + /// A message explaining why the import failed. + /// + [JsonProperty("failure_message")] + [STJS.JsonPropertyName("failure_message")] + public string FailureMessage { get; set; } + + /// + /// The error type for this product catalog processing failure. + /// One of: cannot_proceed, or transient_failure. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsProcessing.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsProcessing.cs new file mode 100644 index 0000000000..2dbe8fa53d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsProcessing.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsProcessing : StripeEntity + { + /// + /// The number of records that failed to process so far. + /// + [JsonProperty("error_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("error_count")] + public long ErrorCount { get; set; } + + /// + /// The number of records processed so far. + /// + [JsonProperty("success_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("success_count")] + public long SuccessCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceeded.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceeded.cs new file mode 100644 index 0000000000..20a102d34e --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceeded.cs @@ -0,0 +1,20 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceeded : StripeEntity + { + /// + /// The total number of records processed. + /// + [JsonProperty("success_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("success_count")] + public long SuccessCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrors.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrors.cs new file mode 100644 index 0000000000..f1d7b0bf7e --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrors.cs @@ -0,0 +1,44 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceededWithErrors : StripeEntity + { + /// + /// The total number of records that failed to process. + /// + [JsonProperty("error_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("error_count")] + public long ErrorCount { get; set; } + + /// + /// A file containing details about all errors that occurred. + /// + [JsonProperty("error_file")] + [STJS.JsonPropertyName("error_file")] + public ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile ErrorFile { get; set; } + + /// + /// A sample of errors that occurred during processing. + /// + [JsonProperty("samples")] + [STJS.JsonPropertyName("samples")] + public List Samples { get; set; } + + /// + /// The total number of records processed. + /// + [JsonProperty("success_count")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("success_count")] + public long SuccessCount { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile.cs new file mode 100644 index 0000000000..308832418c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile.cs @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFile : StripeEntity + { + /// + /// The MIME type of the error file. + /// + [JsonProperty("content_type")] + [STJS.JsonPropertyName("content_type")] + public string ContentType { get; set; } + + /// + /// The pre-signed URL information for downloading the error file. + /// + [JsonProperty("download_url")] + [STJS.JsonPropertyName("download_url")] + public ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl DownloadUrl { get; set; } + + /// + /// The size of the error file in bytes. + /// + [JsonProperty("size")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("size")] + public long Size { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl.cs new file mode 100644 index 0000000000..14a62ee99c --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceededWithErrorsErrorFileDownloadUrl : StripeEntity + { + /// + /// The timestamp when the download URL expires. + /// + [JsonProperty("expires_at")] + [STJS.JsonPropertyName("expires_at")] + public DateTime ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The pre-signed URL for downloading the error file. + /// + [JsonProperty("url")] + [STJS.JsonPropertyName("url")] + public string Url { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsSample.cs b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsSample.cs new file mode 100644 index 0000000000..eb73319e1b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Commerce/ProductCatalogImports/ProductCatalogImportStatusDetailsSucceededWithErrorsSample.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ProductCatalogImportStatusDetailsSucceededWithErrorsSample : StripeEntity, IHasId + { + /// + /// A description of what went wrong with this record. + /// + [JsonProperty("error_message")] + [STJS.JsonPropertyName("error_message")] + public string ErrorMessage { get; set; } + + /// + /// The name of the field that caused the error. + /// + [JsonProperty("field")] + [STJS.JsonPropertyName("field")] + public string Field { get; set; } + + /// + /// The identifier of the record that failed to process. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// The row number in the import file where the error occurred. + /// + [JsonProperty("row")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("row")] + public long Row { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientDefaultOutboundDestination.cs b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientDefaultOutboundDestination.cs index 360f49b769..dbdf2024cf 100644 --- a/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientDefaultOutboundDestination.cs +++ b/src/Stripe.net/Entities/V2/Core/Accounts/AccountConfigurationRecipientDefaultOutboundDestination.cs @@ -23,35 +23,35 @@ public class AccountConfigurationRecipientDefaultOutboundDestination : StripeEnt /// bg_bank_account, bh_bank_account, bj_bank_account, /// bn_bank_account, bs_bank_account, bt_bank_account, /// bw_bank_account, card, ca_bank_account, ch_bank_account, - /// ci_bank_account, co_bank_account, crypto_wallet, - /// cr_bank_account, cy_bank_account, cz_bank_account, - /// de_bank_account, dk_bank_account, do_bank_account, - /// dz_bank_account, ec_bank_account, ee_bank_account, - /// eg_bank_account, es_bank_account, et_bank_account, - /// fi_bank_account, fr_bank_account, gb_bank_account, - /// gm_bank_account, gr_bank_account, gt_bank_account, - /// gy_bank_account, hk_bank_account, hr_bank_account, - /// hu_bank_account, id_bank_account, ie_bank_account, - /// il_bank_account, in_bank_account, is_bank_account, - /// it_bank_account, jm_bank_account, jo_bank_account, - /// ke_bank_account, kh_bank_account, kw_bank_account, - /// lc_bank_account, li_bank_account, lk_bank_account, - /// lt_bank_account, lu_bank_account, lv_bank_account, - /// ma_bank_account, mc_bank_account, md_bank_account, - /// mg_bank_account, mk_bank_account, mn_bank_account, - /// mo_bank_account, mt_bank_account, mu_bank_account, - /// mx_bank_account, my_bank_account, mz_bank_account, - /// na_bank_account, nl_bank_account, no_bank_account, - /// nz_bank_account, om_bank_account, pa_bank_account, - /// pe_bank_account, ph_bank_account, pk_bank_account, - /// pl_bank_account, pt_bank_account, qa_bank_account, - /// ro_bank_account, rs_bank_account, rw_bank_account, - /// se_bank_account, sg_bank_account, si_bank_account, - /// sk_bank_account, sn_bank_account, sv_bank_account, - /// th_bank_account, tn_bank_account, tr_bank_account, - /// tt_bank_account, tw_bank_account, tz_bank_account, - /// us_bank_account, uz_bank_account, vn_bank_account, or - /// za_bank_account. + /// ci_bank_account, cn_bank_account, co_bank_account, + /// crypto_wallet, cr_bank_account, cy_bank_account, + /// cz_bank_account, de_bank_account, dk_bank_account, + /// do_bank_account, dz_bank_account, ec_bank_account, + /// ee_bank_account, eg_bank_account, es_bank_account, + /// et_bank_account, fi_bank_account, fr_bank_account, + /// gb_bank_account, gm_bank_account, gr_bank_account, + /// gt_bank_account, gy_bank_account, hk_bank_account, + /// hr_bank_account, hu_bank_account, id_bank_account, + /// ie_bank_account, il_bank_account, in_bank_account, + /// is_bank_account, it_bank_account, jm_bank_account, + /// jo_bank_account, jp_bank_account, ke_bank_account, + /// kh_bank_account, kw_bank_account, lc_bank_account, + /// li_bank_account, lk_bank_account, lt_bank_account, + /// lu_bank_account, lv_bank_account, ma_bank_account, + /// mc_bank_account, md_bank_account, mg_bank_account, + /// mk_bank_account, mn_bank_account, mo_bank_account, + /// mt_bank_account, mu_bank_account, mx_bank_account, + /// my_bank_account, mz_bank_account, na_bank_account, + /// nl_bank_account, no_bank_account, nz_bank_account, + /// om_bank_account, pa_bank_account, pe_bank_account, + /// ph_bank_account, pk_bank_account, pl_bank_account, + /// pt_bank_account, qa_bank_account, ro_bank_account, + /// rs_bank_account, rw_bank_account, se_bank_account, + /// sg_bank_account, si_bank_account, sk_bank_account, + /// sn_bank_account, sv_bank_account, th_bank_account, + /// tn_bank_account, tr_bank_account, tt_bank_account, + /// tw_bank_account, tz_bank_account, us_bank_account, + /// uz_bank_account, vn_bank_account, or za_bank_account. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJob.cs b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJob.cs index f9a22d4e27..19f2bd6331 100644 --- a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJob.cs +++ b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJob.cs @@ -8,13 +8,14 @@ namespace Stripe.V2.Core using STJS = System.Text.Json.Serialization; /// - /// BatchJob resource. + /// A batch job allows you to perform an API operation on a large set of records + /// asynchronously. /// [STJS.JsonConverter(typeof(STJStripeEntityConverter))] public class BatchJob : StripeEntity, IHasId, IHasMetadata, IHasObject { /// - /// Unique identifier for the BatchJob. + /// Unique identifier for the batch_job. /// [JsonProperty("id")] [STJS.JsonPropertyName("id")] @@ -29,7 +30,7 @@ public class BatchJob : StripeEntity, IHasId, IHasMetadata, IHasObject public string Object { get; set; } /// - /// Timestamp at which BatchJob was created. + /// Timestamp at which the batch_job was created. /// [JsonProperty("created")] [STJS.JsonPropertyName("created")] @@ -44,28 +45,28 @@ public class BatchJob : StripeEntity, IHasId, IHasMetadata, IHasObject public bool Livemode { get; set; } /// - /// The maximum rps defined for the BatchJob. + /// The maximum requests per second defined for the batch_job. /// [JsonProperty("maximum_rps")] [STJS.JsonPropertyName("maximum_rps")] public long MaximumRps { get; set; } /// - /// The metadata of the BatchJob object. + /// The metadata of the batch_job. /// [JsonProperty("metadata")] [STJS.JsonPropertyName("metadata")] public Dictionary Metadata { get; set; } /// - /// If the validation will be run previous to the execution of the BatchJob. + /// Whether validation runs before executing the batch_job. /// [JsonProperty("skip_validation")] [STJS.JsonPropertyName("skip_validation")] public bool SkipValidation { get; set; } /// - /// The current status of the BatchJob. + /// The current status of the batch_job. /// One of: batch_failed, canceled, cancelling, complete, /// in_progress, ready_for_upload, timeout, upload_timeout, /// validating, or validation_failed. @@ -75,7 +76,7 @@ public class BatchJob : StripeEntity, IHasId, IHasMetadata, IHasObject public string Status { get; set; } /// - /// Additional details about the current state of the BatchJob. + /// Additional details about the current state of the batch_job. /// [JsonProperty("status_details")] [STJS.JsonPropertyName("status_details")] diff --git a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetails.cs b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetails.cs index 1916b882ce..893eb7a506 100644 --- a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetails.cs +++ b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetails.cs @@ -9,56 +9,56 @@ namespace Stripe.V2.Core public class BatchJobStatusDetails : StripeEntity { /// - /// Additional details for the BATCH_FAILED status of the BatchJob. + /// Additional details for the BATCH_FAILED status of the batch_job. /// [JsonProperty("batch_failed")] [STJS.JsonPropertyName("batch_failed")] public BatchJobStatusDetailsBatchFailed BatchFailed { get; set; } /// - /// Additional details for the CANCELED status of the BatchJob. + /// Additional details for the CANCELED status of the batch_job. /// [JsonProperty("canceled")] [STJS.JsonPropertyName("canceled")] public BatchJobStatusDetailsCanceled Canceled { get; set; } /// - /// Additional details for the COMPLETE status of the BatchJob. + /// Additional details for the COMPLETE status of the batch_job. /// [JsonProperty("complete")] [STJS.JsonPropertyName("complete")] public BatchJobStatusDetailsComplete Complete { get; set; } /// - /// Additional details for the IN_PROGRESS status of the BatchJob. + /// Additional details for the IN_PROGRESS status of the batch_job. /// [JsonProperty("in_progress")] [STJS.JsonPropertyName("in_progress")] public BatchJobStatusDetailsInProgress InProgress { get; set; } /// - /// Additional details for the READY_FOR_UPLOAD status of the BatchJob. + /// Additional details for the READY_FOR_UPLOAD status of the batch_job. /// [JsonProperty("ready_for_upload")] [STJS.JsonPropertyName("ready_for_upload")] public BatchJobStatusDetailsReadyForUpload ReadyForUpload { get; set; } /// - /// Additional details for the TIMEOUT status of the BatchJob. + /// Additional details for the TIMEOUT status of the batch_job. /// [JsonProperty("timeout")] [STJS.JsonPropertyName("timeout")] public BatchJobStatusDetailsTimeout Timeout { get; set; } /// - /// Additional details for the VALIDATING status of the BatchJob. + /// Additional details for the VALIDATING status of the batch_job. /// [JsonProperty("validating")] [STJS.JsonPropertyName("validating")] public BatchJobStatusDetailsValidating Validating { get; set; } /// - /// Additional details for the VALIDATION_FAILED status of the BatchJob. + /// Additional details for the VALIDATION_FAILED status of the batch_job. /// [JsonProperty("validation_failed")] [STJS.JsonPropertyName("validation_failed")] diff --git a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsBatchFailed.cs b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsBatchFailed.cs index 1782d9e86b..3c3a40270e 100644 --- a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsBatchFailed.cs +++ b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsBatchFailed.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Core public class BatchJobStatusDetailsBatchFailed : StripeEntity { /// - /// Details about the BatchJob failure. + /// Details about the batch_job failure. /// [JsonProperty("error")] [STJS.JsonPropertyName("error")] diff --git a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsCanceled.cs b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsCanceled.cs index 66789840eb..029fdf5f15 100644 --- a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsCanceled.cs +++ b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsCanceled.cs @@ -18,8 +18,8 @@ public class BatchJobStatusDetailsCanceled : StripeEntity - /// The output file details. If BatchJob is cancelled it's provided only if there is already - /// output at this point. + /// The output file details. If the batch_job is canceled, this is provided only if + /// there is already output at this point. /// [JsonProperty("output_file")] [STJS.JsonPropertyName("output_file")] diff --git a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsComplete.cs b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsComplete.cs index 0b26813766..c165d08f05 100644 --- a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsComplete.cs +++ b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsComplete.cs @@ -18,8 +18,8 @@ public class BatchJobStatusDetailsComplete : StripeEntity - /// The output file details. If BatchJob is cancelled it's provided only if there is already - /// output at this point. + /// The output file details. If the batch_job is canceled, this is provided only if + /// there is already output at this point. /// [JsonProperty("output_file")] [STJS.JsonPropertyName("output_file")] diff --git a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsTimeout.cs b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsTimeout.cs index 38e0410fb8..67fabb1bd4 100644 --- a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsTimeout.cs +++ b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsTimeout.cs @@ -18,8 +18,8 @@ public class BatchJobStatusDetailsTimeout : StripeEntity - /// The output file details. If BatchJob is cancelled it's provided only if there is already - /// output at this point. + /// The output file details. If the batch_job is canceled, this is provided only if + /// there is already output at this point. /// [JsonProperty("output_file")] [STJS.JsonPropertyName("output_file")] diff --git a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsValidationFailed.cs b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsValidationFailed.cs index 2d3dc0ff78..0162b8a81e 100644 --- a/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsValidationFailed.cs +++ b/src/Stripe.net/Entities/V2/Core/BatchJobs/BatchJobStatusDetailsValidationFailed.cs @@ -18,8 +18,8 @@ public class BatchJobStatusDetailsValidationFailed : StripeEntity - /// The output file details. If BatchJob is cancelled it's provided only if there is already - /// output at this point. + /// The output file details. If the batch_job is canceled, this is provided only if + /// there is already output at this point. /// [JsonProperty("output_file")] [STJS.JsonPropertyName("output_file")] diff --git a/src/Stripe.net/Entities/V2/Core/Vault/GbBankAccounts/GbBankAccount.cs b/src/Stripe.net/Entities/V2/Core/Vault/GbBankAccounts/GbBankAccount.cs index 3f0b80df0d..1eddb6e5c6 100644 --- a/src/Stripe.net/Entities/V2/Core/Vault/GbBankAccounts/GbBankAccount.cs +++ b/src/Stripe.net/Entities/V2/Core/Vault/GbBankAccounts/GbBankAccount.cs @@ -47,7 +47,7 @@ public class GbBankAccount : StripeEntity, IHasId, IHasObject /// /// Closed Enum. The type of the bank account (checking or savings). - /// One of: checking, or savings. + /// One of: checking, futsu, savings, or toza. /// [JsonProperty("bank_account_type")] [STJS.JsonPropertyName("bank_account_type")] diff --git a/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRun.cs b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRun.cs new file mode 100644 index 0000000000..8da493715d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRun.cs @@ -0,0 +1,86 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + /// + /// The QueryRun object represents an ad-hoc SQL execution. Once created, Stripe + /// processes the query. When the query has finished running, the object provides a + /// reference to the results. + /// + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class QueryRun : StripeEntity, IHasId, IHasObject + { + /// + /// The unique identifier of the QueryRun object. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value of + /// the object field. + /// + [JsonProperty("object")] + [STJS.JsonPropertyName("object")] + public string Object { get; set; } + + /// + /// Time at which the object was created. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Has the value true if the object exists in live mode or the value false if + /// the object exists in test mode. + /// + [JsonProperty("livemode")] + [STJS.JsonPropertyName("livemode")] + public bool Livemode { get; set; } + + /// + /// Details how to retrieve the results of a successfully completed QueryRun. + /// + [JsonProperty("result")] + [STJS.JsonPropertyName("result")] + public QueryRunResult Result { get; set; } + + /// + /// The options specified for customizing the output of the QueryRun. + /// + [JsonProperty("result_options")] + [STJS.JsonPropertyName("result_options")] + public QueryRunResultOptions ResultOptions { get; set; } + + /// + /// The SQL that was executed. + /// + [JsonProperty("sql")] + [STJS.JsonPropertyName("sql")] + public string Sql { get; set; } + + /// + /// The current status of the QueryRun. + /// One of: failed, running, or succeeded. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + + /// + /// Additional details about the current state of the QueryRun. Populated when the + /// QueryRun is in the failed state, providing more information about why the + /// query failed. + /// + [JsonProperty("status_details")] + [STJS.JsonPropertyName("status_details")] + public Dictionary StatusDetails { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResult.cs b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResult.cs new file mode 100644 index 0000000000..8e2f15397f --- /dev/null +++ b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResult.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class QueryRunResult : StripeEntity + { + /// + /// Contains metadata about the file produced by the ReportRun or QueryRun, + /// including its content type, size, and a URL to download its contents. + /// + [JsonProperty("file")] + [STJS.JsonPropertyName("file")] + public QueryRunResultFile File { get; set; } + + /// + /// The type of the ReportRun or QueryRun result. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResultFile.cs b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResultFile.cs new file mode 100644 index 0000000000..65f9f019b9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResultFile.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class QueryRunResultFile : StripeEntity + { + /// + /// The content type of the file. + /// One of: csv, or zip. + /// + [JsonProperty("content_type")] + [STJS.JsonPropertyName("content_type")] + public string ContentType { get; set; } + + /// + /// A pre-signed URL that allows secure, time-limited access to download the file. + /// + [JsonProperty("download_url")] + [STJS.JsonPropertyName("download_url")] + public QueryRunResultFileDownloadUrl DownloadUrl { get; set; } + + /// + /// The total size of the file in bytes. + /// + [JsonProperty("size")] + [JsonConverter(typeof(Int64StringConverter))] + [STJS.JsonNumberHandling(STJS.JsonNumberHandling.AllowReadingFromString | STJS.JsonNumberHandling.WriteAsString)] + [STJS.JsonPropertyName("size")] + public long Size { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResultFileDownloadUrl.cs b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResultFileDownloadUrl.cs new file mode 100644 index 0000000000..e43251016b --- /dev/null +++ b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResultFileDownloadUrl.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class QueryRunResultFileDownloadUrl : StripeEntity + { + /// + /// The time that the URL expires. + /// + [JsonProperty("expires_at")] + [STJS.JsonPropertyName("expires_at")] + public DateTime? ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The URL that can be used for accessing the file. + /// + [JsonProperty("url")] + [STJS.JsonPropertyName("url")] + public string Url { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResultOptions.cs b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResultOptions.cs new file mode 100644 index 0000000000..c6a2b18bb4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunResultOptions.cs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class QueryRunResultOptions : StripeEntity + { + /// + /// If set, the generated results file will be compressed into a ZIP folder. This is useful + /// for reducing file size and download time for large results. + /// + [JsonProperty("compress_file")] + [STJS.JsonPropertyName("compress_file")] + public bool? CompressFile { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunStatusDetails.cs b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunStatusDetails.cs new file mode 100644 index 0000000000..9e9dca2a8e --- /dev/null +++ b/src/Stripe.net/Entities/V2/Data/Reporting/QueryRuns/QueryRunStatusDetails.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class QueryRunStatusDetails : StripeEntity + { + /// + /// Error code categorizing the reason the QueryRun failed. + /// One of: file_size_above_limit, or internal_error. + /// + [JsonProperty("error_code")] + [STJS.JsonPropertyName("error_code")] + public string ErrorCode { get; set; } + + /// + /// Error message with additional details about the failure. + /// + [JsonProperty("error_message")] + [STJS.JsonPropertyName("error_message")] + public string ErrorMessage { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRun.cs b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRun.cs new file mode 100644 index 0000000000..2af8b30f28 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRun.cs @@ -0,0 +1,81 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + /// + /// An execution of a Workflow in response to a triggering event. + /// + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowRun : StripeEntity, IHasId, IHasObject + { + /// + /// The unique ID of the Workflow Run. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value of + /// the object field. + /// + [JsonProperty("object")] + [STJS.JsonPropertyName("object")] + public string Object { get; set; } + + /// + /// When the Workflow Run was created. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Has the value true if the object exists in live mode or the value false if + /// the object exists in test mode. + /// + [JsonProperty("livemode")] + [STJS.JsonPropertyName("livemode")] + public bool Livemode { get; set; } + + /// + /// The current Workflow Run execution status. + /// One of: failed, started, or succeeded. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + + /// + /// Details about the Workflow Run's status transitions. + /// + [JsonProperty("status_details")] + [STJS.JsonPropertyName("status_details")] + public WorkflowRunStatusDetails StatusDetails { get; set; } + + /// + /// Summary information about the Workflow Run's status transitions. + /// + [JsonProperty("status_transitions")] + [STJS.JsonPropertyName("status_transitions")] + public WorkflowRunStatusTransitions StatusTransitions { get; set; } + + /// + /// A record of the trigger that launched this Workflow Run. + /// + [JsonProperty("trigger")] + [STJS.JsonPropertyName("trigger")] + public WorkflowRunTrigger Trigger { get; set; } + + /// + /// The Workflow this Run belongs to. + /// + [JsonProperty("workflow")] + [STJS.JsonPropertyName("workflow")] + public string Workflow { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetails.cs b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetails.cs new file mode 100644 index 0000000000..4c422d5507 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetails.cs @@ -0,0 +1,32 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowRunStatusDetails : StripeEntity + { + /// + /// Details about the Workflow Run's transition into the FAILED state. + /// + [JsonProperty("failed")] + [STJS.JsonPropertyName("failed")] + public WorkflowRunStatusDetailsFailed Failed { get; set; } + + /// + /// Details about the Workflow Run's transition in to the STARTED state. + /// + [JsonProperty("started")] + [STJS.JsonPropertyName("started")] + public WorkflowRunStatusDetailsStarted Started { get; set; } + + /// + /// Details about the Workflow Run's transition into the SUCCEEDED state. + /// + [JsonProperty("succeeded")] + [STJS.JsonPropertyName("succeeded")] + public WorkflowRunStatusDetailsSucceeded Succeeded { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetailsFailed.cs b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetailsFailed.cs new file mode 100644 index 0000000000..276e9d33d4 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetailsFailed.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowRunStatusDetailsFailed : StripeEntity + { + /// + /// Optional details about the failure result. + /// + [JsonProperty("error_message")] + [STJS.JsonPropertyName("error_message")] + public string ErrorMessage { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetailsStarted.cs b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetailsStarted.cs new file mode 100644 index 0000000000..82d689b311 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetailsStarted.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowRunStatusDetailsStarted : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetailsSucceeded.cs b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetailsSucceeded.cs new file mode 100644 index 0000000000..d26cd22c4d --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusDetailsSucceeded.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowRunStatusDetailsSucceeded : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusTransitions.cs b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusTransitions.cs new file mode 100644 index 0000000000..32bb6b3dd8 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunStatusTransitions.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowRunStatusTransitions : StripeEntity + { + /// + /// When the Workflow Run failed. + /// + [JsonProperty("failed_at")] + [STJS.JsonPropertyName("failed_at")] + public DateTime? FailedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// When the Workflow Run was started. + /// + [JsonProperty("started_at")] + [STJS.JsonPropertyName("started_at")] + public DateTime? StartedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// When the Workflow Run succeeded. + /// + [JsonProperty("succeeded_at")] + [STJS.JsonPropertyName("succeeded_at")] + public DateTime? SucceededAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunTrigger.cs b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunTrigger.cs new file mode 100644 index 0000000000..a91d6ef542 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunTrigger.cs @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowRunTrigger : StripeEntity + { + /// + /// The Workflow Run was launched when Stripe emitted a certain event. + /// + [JsonProperty("event_trigger")] + [STJS.JsonPropertyName("event_trigger")] + public WorkflowRunTriggerEventTrigger EventTrigger { get; set; } + + /// + /// The Workflow Run was launched through a direct call, using either the Dashboard or the + /// Stripe API. + /// + [JsonProperty("manual")] + [STJS.JsonPropertyName("manual")] + public WorkflowRunTriggerManual Manual { get; set; } + + /// + /// Which type of trigger this is. + /// One of: event_trigger, or manual. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunTriggerEventTrigger.cs b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunTriggerEventTrigger.cs new file mode 100644 index 0000000000..4697081dda --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunTriggerEventTrigger.cs @@ -0,0 +1,32 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowRunTriggerEventTrigger : StripeEntity, IHasId + { + /// + /// The account that generated the triggering event. + /// + [JsonProperty("context")] + [STJS.JsonPropertyName("context")] + public string Context { get; set; } + + /// + /// The Stripe event that triggered this Run. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// The Stripe event type triggered this Run. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunTriggerManual.cs b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunTriggerManual.cs new file mode 100644 index 0000000000..cffcb07d21 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/WorkflowRuns/WorkflowRunTriggerManual.cs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowRunTriggerManual : StripeEntity + { + /// + /// The input parameters used when launching the Run. + /// + [JsonProperty("input_parameters")] + [STJS.JsonPropertyName("input_parameters")] + public Dictionary InputParameters { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/Workflows/Workflow.cs b/src/Stripe.net/Entities/V2/Extend/Workflows/Workflow.cs new file mode 100644 index 0000000000..eec8b0e8bb --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/Workflows/Workflow.cs @@ -0,0 +1,71 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + /// + /// A Stripe Workflow is a sequence of actions, like Stripe API calls, that are taken in + /// response to an initiating trigger. A trigger can be a Stripe API event, or a manual + /// invocation. + /// + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class Workflow : StripeEntity, IHasId, IHasObject + { + /// + /// The unique ID of the Workflow. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value of + /// the object field. + /// + [JsonProperty("object")] + [STJS.JsonPropertyName("object")] + public string Object { get; set; } + + /// + /// When the Workflow was created. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Has the value true if the object exists in live mode or the value false if + /// the object exists in test mode. + /// + [JsonProperty("livemode")] + [STJS.JsonPropertyName("livemode")] + public bool Livemode { get; set; } + + /// + /// Whether this Workflow is active, inactive, or in some other state. Only active Workflows + /// may be invoked. + /// One of: active, archived, draft, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + + /// + /// Workflow title. + /// + [JsonProperty("title")] + [STJS.JsonPropertyName("title")] + public string Title { get; set; } + + /// + /// Under what conditions will this Workflow launch. + /// + [JsonProperty("triggers")] + [STJS.JsonPropertyName("triggers")] + public List Triggers { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/Workflows/WorkflowTrigger.cs b/src/Stripe.net/Entities/V2/Extend/Workflows/WorkflowTrigger.cs new file mode 100644 index 0000000000..624a98c6d8 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/Workflows/WorkflowTrigger.cs @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowTrigger : StripeEntity + { + /// + /// The Workflow can be launched when Stripe emits a certain event. + /// + [JsonProperty("event_trigger")] + [STJS.JsonPropertyName("event_trigger")] + public WorkflowTriggerEventTrigger EventTrigger { get; set; } + + /// + /// The Workflow can be launched through a direct call, using either the Dashboard or the + /// Stripe API. + /// + [JsonProperty("manual")] + [STJS.JsonPropertyName("manual")] + public WorkflowTriggerManual Manual { get; set; } + + /// + /// Which type of trigger this is. + /// One of: event_trigger, or manual. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/Workflows/WorkflowTriggerEventTrigger.cs b/src/Stripe.net/Entities/V2/Extend/Workflows/WorkflowTriggerEventTrigger.cs new file mode 100644 index 0000000000..a0dd736b34 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/Workflows/WorkflowTriggerEventTrigger.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowTriggerEventTrigger : StripeEntity + { + /// + /// Specifies which accounts' events will trigger this Workflow. + /// + [JsonProperty("events_from")] + [STJS.JsonPropertyName("events_from")] + public List EventsFrom { get; set; } + + /// + /// The Stripe event type that will trigger this Workflow. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Extend/Workflows/WorkflowTriggerManual.cs b/src/Stripe.net/Entities/V2/Extend/Workflows/WorkflowTriggerManual.cs new file mode 100644 index 0000000000..7c1479cb68 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Extend/Workflows/WorkflowTriggerManual.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class WorkflowTriggerManual : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLog.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLog.cs new file mode 100644 index 0000000000..036c869ad2 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLog.cs @@ -0,0 +1,75 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + /// + /// An activity log records a single action performed on an account. + /// + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLog : StripeEntity, IHasId, IHasObject + { + /// + /// Unique identifier of the activity log entry. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value of + /// the object field. + /// + [JsonProperty("object")] + [STJS.JsonPropertyName("object")] + public string Object { get; set; } + + /// + /// The actor that performed the action. + /// + [JsonProperty("actor")] + [STJS.JsonPropertyName("actor")] + public ActivityLogActor Actor { get; set; } + + /// + /// The account on which the action was performed. + /// + [JsonProperty("context")] + [STJS.JsonPropertyName("context")] + public string Context { get; set; } + + /// + /// Timestamp when the activity log entry was created. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Action-specific details of the activity log entry. + /// + [JsonProperty("details")] + [STJS.JsonPropertyName("details")] + public ActivityLogDetails Details { get; set; } + + /// + /// Whether the action was performed in live mode. + /// + [JsonProperty("livemode")] + [STJS.JsonPropertyName("livemode")] + public bool Livemode { get; set; } + + /// + /// The type of action that was performed. + /// One of: api_key_created, api_key_deleted, api_key_updated, + /// api_key_viewed, user_invite_accepted, user_invite_created, + /// user_invite_deleted, user_roles_deleted, or user_roles_updated. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogActor.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogActor.cs new file mode 100644 index 0000000000..c1e8051637 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogActor.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLogActor : StripeEntity + { + /// + /// Set when the actor is an API key. + /// + [JsonProperty("api_key")] + [STJS.JsonPropertyName("api_key")] + public ActivityLogActorApiKey ApiKey { get; set; } + + /// + /// The type of actor. + /// One of: api_key, or user. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + + /// + /// Set when the actor is a user. + /// + [JsonProperty("user")] + [STJS.JsonPropertyName("user")] + public ActivityLogActorUser User { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogActorApiKey.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogActorApiKey.cs new file mode 100644 index 0000000000..01a2c48792 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogActorApiKey.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLogActorApiKey : StripeEntity, IHasId + { + /// + /// Unique identifier of the API key. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogActorUser.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogActorUser.cs new file mode 100644 index 0000000000..f630067914 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogActorUser.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLogActorUser : StripeEntity + { + /// + /// Email address of the user. + /// + [JsonProperty("email")] + [STJS.JsonPropertyName("email")] + public string Email { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetails.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetails.cs new file mode 100644 index 0000000000..673b6f4ed8 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetails.cs @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLogDetails : StripeEntity + { + /// + /// Details of an API key action. + /// + [JsonProperty("api_key")] + [STJS.JsonPropertyName("api_key")] + public ActivityLogDetailsApiKey ApiKey { get; set; } + + /// + /// The action group type of the activity log entry. + /// One of: api_key, user_invite, or user_roles. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + + /// + /// Details of a user invite action. + /// + [JsonProperty("user_invite")] + [STJS.JsonPropertyName("user_invite")] + public ActivityLogDetailsUserInvite UserInvite { get; set; } + + /// + /// Details of a user role change action. + /// + [JsonProperty("user_roles")] + [STJS.JsonPropertyName("user_roles")] + public ActivityLogDetailsUserRoles UserRoles { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsApiKey.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsApiKey.cs new file mode 100644 index 0000000000..e2d29d2352 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsApiKey.cs @@ -0,0 +1,77 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLogDetailsApiKey : StripeEntity, IHasId + { + /// + /// Timestamp when the API key was created. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Timestamp when the API key expires. + /// + [JsonProperty("expires_at")] + [STJS.JsonPropertyName("expires_at")] + public DateTime? ExpiresAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Unique identifier of the API key. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// List of IP addresses allowed to use this API key. + /// + [JsonProperty("ip_allowlist")] + [STJS.JsonPropertyName("ip_allowlist")] + public List IpAllowlist { get; set; } + + /// + /// Information about the entity managing this API key. + /// + [JsonProperty("managed_by")] + [STJS.JsonPropertyName("managed_by")] + public ActivityLogDetailsApiKeyManagedBy ManagedBy { get; set; } + + /// + /// Name of the API key. + /// + [JsonProperty("name")] + [STJS.JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// Unique identifier of the new API key, set when this key was rotated. + /// + [JsonProperty("new_key")] + [STJS.JsonPropertyName("new_key")] + public string NewKey { get; set; } + + /// + /// Note or description for the API key. + /// + [JsonProperty("note")] + [STJS.JsonPropertyName("note")] + public string Note { get; set; } + + /// + /// Type of the API key. + /// One of: publishable_key, or secret_key. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsApiKeyManagedBy.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsApiKeyManagedBy.cs new file mode 100644 index 0000000000..64c0f9f3df --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsApiKeyManagedBy.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLogDetailsApiKeyManagedBy : StripeEntity + { + /// + /// An application. + /// + [JsonProperty("application")] + [STJS.JsonPropertyName("application")] + public ActivityLogDetailsApiKeyManagedByApplication Application { get; set; } + + /// + /// The type of entity. + /// + [JsonProperty("type")] + [STJS.JsonPropertyName("type")] + public string Type { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsApiKeyManagedByApplication.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsApiKeyManagedByApplication.cs new file mode 100644 index 0000000000..8f91048eb3 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsApiKeyManagedByApplication.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLogDetailsApiKeyManagedByApplication : StripeEntity, IHasId + { + /// + /// Identifier of the application. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsUserInvite.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsUserInvite.cs new file mode 100644 index 0000000000..baab7817d9 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsUserInvite.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLogDetailsUserInvite : StripeEntity + { + /// + /// Email address of the invited user. + /// + [JsonProperty("invited_user_email")] + [STJS.JsonPropertyName("invited_user_email")] + public string InvitedUserEmail { get; set; } + + /// + /// Roles assigned to the invited user. + /// + [JsonProperty("roles")] + [STJS.JsonPropertyName("roles")] + public List Roles { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsUserRoles.cs b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsUserRoles.cs new file mode 100644 index 0000000000..ff7cf44410 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Iam/ActivityLogs/ActivityLogDetailsUserRoles.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class ActivityLogDetailsUserRoles : StripeEntity + { + /// + /// Roles the user has after the change. + /// + [JsonProperty("new_roles")] + [STJS.JsonPropertyName("new_roles")] + public List NewRoles { get; set; } + + /// + /// Roles the user had before the change. + /// + [JsonProperty("old_roles")] + [STJS.JsonPropertyName("old_roles")] + public List OldRoles { get; set; } + + /// + /// Email address of the user whose roles were changed. + /// + [JsonProperty("user_email")] + [STJS.JsonPropertyName("user_email")] + public string UserEmail { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistory.cs b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistory.cs index 4a91fb2add..ea015413c3 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistory.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistory.cs @@ -2,7 +2,6 @@ namespace Stripe.V2.MoneyManagement { using System; - using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; using STJS = System.Text.Json.Serialization; @@ -22,14 +21,14 @@ public class InboundTransferTransferHistory : StripeEntity [JsonProperty("bank_debit_processing")] [STJS.JsonPropertyName("bank_debit_processing")] - public Dictionary BankDebitProcessing { get; set; } + public InboundTransferTransferHistoryBankDebitProcessing BankDebitProcessing { get; set; } /// /// The history entry for a queued InboundTransfer. /// [JsonProperty("bank_debit_queued")] [STJS.JsonPropertyName("bank_debit_queued")] - public Dictionary BankDebitQueued { get; set; } + public InboundTransferTransferHistoryBankDebitQueued BankDebitQueued { get; set; } /// /// The history entry for a returned InboundTransfer. @@ -43,7 +42,7 @@ public class InboundTransferTransferHistory : StripeEntity [JsonProperty("bank_debit_succeeded")] [STJS.JsonPropertyName("bank_debit_succeeded")] - public Dictionary BankDebitSucceeded { get; set; } + public InboundTransferTransferHistoryBankDebitSucceeded BankDebitSucceeded { get; set; } /// /// Creation time of the HistoryEntry in RFC 3339 format and UTC. diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitProcessing.cs b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitProcessing.cs new file mode 100644 index 0000000000..62fa31ead6 --- /dev/null +++ b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitProcessing.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class InboundTransferTransferHistoryBankDebitProcessing : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitQueued.cs b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitQueued.cs new file mode 100644 index 0000000000..2d1193e3cc --- /dev/null +++ b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitQueued.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class InboundTransferTransferHistoryBankDebitQueued : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitSucceeded.cs b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitSucceeded.cs new file mode 100644 index 0000000000..e5b8b0ee33 --- /dev/null +++ b/src/Stripe.net/Entities/V2/MoneyManagement/InboundTransfers/InboundTransferTransferHistoryBankDebitSucceeded.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.MoneyManagement +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class InboundTransferTransferHistoryBankDebitSucceeded : StripeEntity + { + } +} diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransferStatusDetailsFailed.cs b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransferStatusDetailsFailed.cs index f6011934c7..949047d69d 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransferStatusDetailsFailed.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/OutboundTransfers/OutboundTransferStatusDetailsFailed.cs @@ -10,9 +10,10 @@ public class OutboundTransferStatusDetailsFailed : StripeEntity /// Open Enum. The failed status reason. - /// One of: payout_method_declined, payout_method_does_not_exist, - /// payout_method_expired, payout_method_unsupported, - /// payout_method_usage_frequency_limit_exceeded, or unknown_failure. + /// One of: payout_method_amount_limit_exceeded, payout_method_declined, + /// payout_method_does_not_exist, payout_method_expired, + /// payout_method_unsupported, payout_method_usage_frequency_limit_exceeded, + /// or unknown_failure. /// [JsonProperty("reason")] [STJS.JsonPropertyName("reason")] diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/PayoutMethods/PayoutMethodBankAccount.cs b/src/Stripe.net/Entities/V2/MoneyManagement/PayoutMethods/PayoutMethodBankAccount.cs index 6834c4fbaa..4f817702d5 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/PayoutMethods/PayoutMethodBankAccount.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/PayoutMethods/PayoutMethodBankAccount.cs @@ -21,7 +21,7 @@ public class PayoutMethodBankAccount : StripeEntity /// /// The type of bank account (checking or savings). - /// One of: checking, or savings. + /// One of: checking, futsu, savings, or toza. /// [JsonProperty("bank_account_type")] [STJS.JsonPropertyName("bank_account_type")] diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/TransactionEntries/TransactionEntryTransactionDetails.cs b/src/Stripe.net/Entities/V2/MoneyManagement/TransactionEntries/TransactionEntryTransactionDetails.cs index d9fa333448..ba34af350a 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/TransactionEntries/TransactionEntryTransactionDetails.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/TransactionEntries/TransactionEntryTransactionDetails.cs @@ -12,8 +12,11 @@ public class TransactionEntryTransactionDetails : StripeEntityadjustment, currency_conversion, inbound_transfer, - /// outbound_payment, outbound_transfer, received_credit, - /// received_debit, return, or stripe_fee. + /// inbound_transfer_reversal, outbound_payment, + /// outbound_payment_reversal, outbound_transfer, + /// outbound_transfer_reversal, received_credit, + /// received_credit_reversal, received_debit, received_debit_reversal, + /// stripe_fee, or stripe_fee_tax. /// [JsonProperty("category")] [STJS.JsonPropertyName("category")] diff --git a/src/Stripe.net/Entities/V2/MoneyManagement/Transactions/Transaction.cs b/src/Stripe.net/Entities/V2/MoneyManagement/Transactions/Transaction.cs index 96807a33f3..1973d8a1c7 100644 --- a/src/Stripe.net/Entities/V2/MoneyManagement/Transactions/Transaction.cs +++ b/src/Stripe.net/Entities/V2/MoneyManagement/Transactions/Transaction.cs @@ -49,8 +49,11 @@ public class Transaction : StripeEntity, IHasId, IHasObject /// /// Open Enum. A descriptive category used to classify the Transaction. /// One of: adjustment, currency_conversion, inbound_transfer, - /// outbound_payment, outbound_transfer, received_credit, - /// received_debit, return, or stripe_fee. + /// inbound_transfer_reversal, outbound_payment, + /// outbound_payment_reversal, outbound_transfer, + /// outbound_transfer_reversal, received_credit, + /// received_credit_reversal, received_debit, received_debit_reversal, + /// stripe_fee, or stripe_fee_tax. /// [JsonProperty("category")] [STJS.JsonPropertyName("category")] diff --git a/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfile.cs b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfile.cs new file mode 100644 index 0000000000..17a1bf6d20 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfile.cs @@ -0,0 +1,73 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Network +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + /// + /// The Stripe profile represents a business' public identity on the Stripe network. + /// + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class BusinessProfile : StripeEntity, IHasId, IHasObject + { + /// + /// The ID of the Stripe business profile; also known as the Network ID. This is the ID used + /// to identify the business on the Stripe network. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value of + /// the object field. + /// + [JsonProperty("object")] + [STJS.JsonPropertyName("object")] + public string Object { get; set; } + + /// + /// Branding data for the business. + /// + [JsonProperty("branding")] + [STJS.JsonPropertyName("branding")] + public BusinessProfileBranding Branding { get; set; } + + /// + /// The description of the business. + /// + [JsonProperty("description")] + [STJS.JsonPropertyName("description")] + public string Description { get; set; } + + /// + /// The display name of the Stripe profile. + /// + [JsonProperty("display_name")] + [STJS.JsonPropertyName("display_name")] + public string DisplayName { get; set; } + + /// + /// Has the value true if the object exists in live mode or the value false if + /// the object exists in test mode. + /// + [JsonProperty("livemode")] + [STJS.JsonPropertyName("livemode")] + public bool Livemode { get; set; } + + /// + /// The URL of the business. + /// + [JsonProperty("url")] + [STJS.JsonPropertyName("url")] + public string Url { get; set; } + + /// + /// The username of the Stripe profile. + /// + [JsonProperty("username")] + [STJS.JsonPropertyName("username")] + public string Username { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfileBranding.cs b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfileBranding.cs new file mode 100644 index 0000000000..e582746e09 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfileBranding.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Network +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class BusinessProfileBranding : StripeEntity + { + /// + /// URL of the icon for the business. The image will be square and at least 128px x 128px. + /// + [JsonProperty("icon")] + [STJS.JsonPropertyName("icon")] + public BusinessProfileBrandingIcon Icon { get; set; } + + /// + /// URL of the logo for the business. The image will be at least 128px x 128px. + /// + [JsonProperty("logo")] + [STJS.JsonPropertyName("logo")] + public BusinessProfileBrandingLogo Logo { get; set; } + + /// + /// A CSS hex color value representing the primary branding color for this business. + /// + [JsonProperty("primary_color")] + [STJS.JsonPropertyName("primary_color")] + public string PrimaryColor { get; set; } + + /// + /// A CSS hex color value representing the secondary branding color for this business. + /// + [JsonProperty("secondary_color")] + [STJS.JsonPropertyName("secondary_color")] + public string SecondaryColor { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfileBrandingIcon.cs b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfileBrandingIcon.cs new file mode 100644 index 0000000000..183a526b82 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfileBrandingIcon.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Network +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class BusinessProfileBrandingIcon : StripeEntity + { + /// + /// The URL of the image in its original size. + /// + [JsonProperty("original")] + [STJS.JsonPropertyName("original")] + public string Original { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfileBrandingLogo.cs b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfileBrandingLogo.cs new file mode 100644 index 0000000000..1ab53322e1 --- /dev/null +++ b/src/Stripe.net/Entities/V2/Network/BusinessProfiles/BusinessProfileBrandingLogo.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Network +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class BusinessProfileBrandingLogo : StripeEntity + { + /// + /// The URL of the image in its original size. + /// + [JsonProperty("original")] + [STJS.JsonPropertyName("original")] + public string Original { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/Agreement.cs b/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/Agreement.cs new file mode 100644 index 0000000000..94990c7480 --- /dev/null +++ b/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/Agreement.cs @@ -0,0 +1,92 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + /// + /// An Orchestrated Commerce Agreement represents a mutual agreement between a seller and an + /// orchestrator/agent on the Stripe network. + /// + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class Agreement : StripeEntity, IHasId, IHasObject + { + /// + /// The unique identifier for the agreement. + /// + [JsonProperty("id")] + [STJS.JsonPropertyName("id")] + public string Id { get; set; } + + /// + /// String representing the object's type. Objects of the same type share the same value of + /// the object field. + /// + [JsonProperty("object")] + [STJS.JsonPropertyName("object")] + public string Object { get; set; } + + /// + /// The time at which the agreement was created. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The party that initiated the agreement. + /// One of: orchestrator, or seller. + /// + [JsonProperty("initiated_by")] + [STJS.JsonPropertyName("initiated_by")] + public string InitiatedBy { get; set; } + + /// + /// Has the value true if the object exists in live mode or the value false if + /// the object exists in test mode. + /// + [JsonProperty("livemode")] + [STJS.JsonPropertyName("livemode")] + public bool Livemode { get; set; } + + /// + /// Details about the orchestrator. + /// + [JsonProperty("orchestrator_details")] + [STJS.JsonPropertyName("orchestrator_details")] + public AgreementOrchestratorDetails OrchestratorDetails { get; set; } + + /// + /// Details about the seller. + /// + [JsonProperty("seller_details")] + [STJS.JsonPropertyName("seller_details")] + public AgreementSellerDetails SellerDetails { get; set; } + + /// + /// The current status of the agreement. + /// One of: confirmed, initiated, partially_confirmed, or + /// terminated. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + + /// + /// Timestamps of key status transitions for the agreement. + /// + [JsonProperty("status_transitions")] + [STJS.JsonPropertyName("status_transitions")] + public AgreementStatusTransitions StatusTransitions { get; set; } + + /// + /// The party that terminated the agreement, if applicable. + /// One of: orchestrator, or seller. + /// + [JsonProperty("terminated_by")] + [STJS.JsonPropertyName("terminated_by")] + public string TerminatedBy { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/AgreementOrchestratorDetails.cs b/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/AgreementOrchestratorDetails.cs new file mode 100644 index 0000000000..f2fb7f5f5e --- /dev/null +++ b/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/AgreementOrchestratorDetails.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AgreementOrchestratorDetails : StripeEntity + { + /// + /// The name of the orchestrator. This can be the name of the agent or the name of the + /// business. + /// + [JsonProperty("name")] + [STJS.JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// The Network ID of the orchestrator. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/AgreementSellerDetails.cs b/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/AgreementSellerDetails.cs new file mode 100644 index 0000000000..8ff8340ea0 --- /dev/null +++ b/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/AgreementSellerDetails.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AgreementSellerDetails : StripeEntity + { + /// + /// The Network ID of the seller. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/AgreementStatusTransitions.cs b/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/AgreementStatusTransitions.cs new file mode 100644 index 0000000000..403b9a9dad --- /dev/null +++ b/src/Stripe.net/Entities/V2/OrchestratedCommerce/Agreements/AgreementStatusTransitions.cs @@ -0,0 +1,33 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeEntityConverter))] + public class AgreementStatusTransitions : StripeEntity + { + /// + /// The time at which the orchestrator confirmed the agreement. + /// + [JsonProperty("orchestrator_confirmed_at")] + [STJS.JsonPropertyName("orchestrator_confirmed_at")] + public DateTime? OrchestratorConfirmedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The time at which the seller confirmed the agreement. + /// + [JsonProperty("seller_confirmed_at")] + [STJS.JsonPropertyName("seller_confirmed_at")] + public DateTime? SellerConfirmedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The time at which the agreement was terminated. + /// + [JsonProperty("terminated_at")] + [STJS.JsonPropertyName("terminated_at")] + public DateTime? TerminatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + } +} diff --git a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs index 40fbb0ac2b..050bb3f62b 100644 --- a/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs +++ b/src/Stripe.net/Events/V1BillingMeterErrorReportTriggeredEventDataReasonErrorType.cs @@ -13,8 +13,9 @@ public class V1BillingMeterErrorReportTriggeredEventDataReasonErrorType : Stripe /// Open Enum. /// One of: archived_meter, meter_event_customer_not_found, /// meter_event_dimension_count_too_high, meter_event_invalid_value, - /// meter_event_no_customer_defined, missing_dimension_payload_keys, - /// no_meter, timestamp_in_future, or timestamp_too_far_in_past. + /// meter_event_no_customer_defined, meter_event_value_too_many_digits, + /// missing_dimension_payload_keys, no_meter, timestamp_in_future, or + /// timestamp_too_far_in_past. /// [JsonProperty("code")] [STJS.JsonPropertyName("code")] diff --git a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs index f3d309fee4..bc52c26423 100644 --- a/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs +++ b/src/Stripe.net/Events/V1BillingMeterNoMeterFoundEventDataReasonErrorType.cs @@ -13,8 +13,9 @@ public class V1BillingMeterNoMeterFoundEventDataReasonErrorType : StripeEntityarchived_meter, meter_event_customer_not_found, /// meter_event_dimension_count_too_high, meter_event_invalid_value, - /// meter_event_no_customer_defined, missing_dimension_payload_keys, - /// no_meter, timestamp_in_future, or timestamp_too_far_in_past. + /// meter_event_no_customer_defined, meter_event_value_too_many_digits, + /// missing_dimension_payload_keys, no_meter, timestamp_in_future, or + /// timestamp_too_far_in_past. /// [JsonProperty("code")] [STJS.JsonPropertyName("code")] diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEvent.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEvent.cs new file mode 100644 index 0000000000..d2e4a10343 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEvent.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog import cannot be processed or if processing fails + /// unexpectedly. + /// + public class V2CommerceProductCatalogImportsFailedEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEventNotification.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEventNotification.cs new file mode 100644 index 0000000000..ed0c76114e --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsFailedEventNotification.cs @@ -0,0 +1,50 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog import cannot be processed or if processing fails + /// unexpectedly. + /// + public class V2CommerceProductCatalogImportsFailedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CommerceProductCatalogImportsFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEvent.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEvent.cs new file mode 100644 index 0000000000..2673786668 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog import file has been uploaded and has started processing. + /// + public class V2CommerceProductCatalogImportsProcessingEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEventNotification.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEventNotification.cs new file mode 100644 index 0000000000..066ac496b1 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsProcessingEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog import file has been uploaded and has started processing. + /// + public class V2CommerceProductCatalogImportsProcessingEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CommerceProductCatalogImportsProcessingEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEvent.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEvent.cs new file mode 100644 index 0000000000..c303d67886 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog file has been uploaded successfully and passed validation. + /// + public class V2CommerceProductCatalogImportsSucceededEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEventNotification.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEventNotification.cs new file mode 100644 index 0000000000..47a35be48d --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog file has been uploaded successfully and passed validation. + /// + public class V2CommerceProductCatalogImportsSucceededEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CommerceProductCatalogImportsSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.cs new file mode 100644 index 0000000000..b424f5f17c --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEvent.cs @@ -0,0 +1,39 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog file has been successfully processed but some rows failed + /// validation. + /// + public class V2CommerceProductCatalogImportsSucceededWithErrorsEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.cs b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.cs new file mode 100644 index 0000000000..77c6a48251 --- /dev/null +++ b/src/Stripe.net/Events/V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification.cs @@ -0,0 +1,50 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a product catalog file has been successfully processed but some rows failed + /// validation. + /// + public class V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Commerce.ProductCatalogImport FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2CommerceProductCatalogImportsSucceededWithErrorsEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2DataReportingQueryRunCreatedEvent.cs b/src/Stripe.net/Events/V2DataReportingQueryRunCreatedEvent.cs new file mode 100644 index 0000000000..dd2f5b29b4 --- /dev/null +++ b/src/Stripe.net/Events/V2DataReportingQueryRunCreatedEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a QueryRun is created. + /// + public class V2DataReportingQueryRunCreatedEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Data.Reporting.QueryRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2DataReportingQueryRunCreatedEventNotification.cs b/src/Stripe.net/Events/V2DataReportingQueryRunCreatedEventNotification.cs new file mode 100644 index 0000000000..e308396e34 --- /dev/null +++ b/src/Stripe.net/Events/V2DataReportingQueryRunCreatedEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a QueryRun is created. + /// + public class V2DataReportingQueryRunCreatedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Data.Reporting.QueryRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2DataReportingQueryRunCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2DataReportingQueryRunFailedEvent.cs b/src/Stripe.net/Events/V2DataReportingQueryRunFailedEvent.cs new file mode 100644 index 0000000000..8cb0cf3728 --- /dev/null +++ b/src/Stripe.net/Events/V2DataReportingQueryRunFailedEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a QueryRun has failed to complete. + /// + public class V2DataReportingQueryRunFailedEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Data.Reporting.QueryRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2DataReportingQueryRunFailedEventNotification.cs b/src/Stripe.net/Events/V2DataReportingQueryRunFailedEventNotification.cs new file mode 100644 index 0000000000..5dab28e461 --- /dev/null +++ b/src/Stripe.net/Events/V2DataReportingQueryRunFailedEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a QueryRun has failed to complete. + /// + public class V2DataReportingQueryRunFailedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Data.Reporting.QueryRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2DataReportingQueryRunFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2DataReportingQueryRunSucceededEvent.cs b/src/Stripe.net/Events/V2DataReportingQueryRunSucceededEvent.cs new file mode 100644 index 0000000000..e3b7d5011b --- /dev/null +++ b/src/Stripe.net/Events/V2DataReportingQueryRunSucceededEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a QueryRun has successfully completed. + /// + public class V2DataReportingQueryRunSucceededEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Data.Reporting.QueryRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2DataReportingQueryRunSucceededEventNotification.cs b/src/Stripe.net/Events/V2DataReportingQueryRunSucceededEventNotification.cs new file mode 100644 index 0000000000..a9e2367dd4 --- /dev/null +++ b/src/Stripe.net/Events/V2DataReportingQueryRunSucceededEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a QueryRun has successfully completed. + /// + public class V2DataReportingQueryRunSucceededEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Data.Reporting.QueryRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2DataReportingQueryRunSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2DataReportingQueryRunUpdatedEvent.cs b/src/Stripe.net/Events/V2DataReportingQueryRunUpdatedEvent.cs new file mode 100644 index 0000000000..36e0dece45 --- /dev/null +++ b/src/Stripe.net/Events/V2DataReportingQueryRunUpdatedEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a QueryRun is updated. + /// + public class V2DataReportingQueryRunUpdatedEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Data.Reporting.QueryRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2DataReportingQueryRunUpdatedEventNotification.cs b/src/Stripe.net/Events/V2DataReportingQueryRunUpdatedEventNotification.cs new file mode 100644 index 0000000000..e793878263 --- /dev/null +++ b/src/Stripe.net/Events/V2DataReportingQueryRunUpdatedEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a QueryRun is updated. + /// + public class V2DataReportingQueryRunUpdatedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Data.Reporting.QueryRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2DataReportingQueryRunUpdatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEvent.cs b/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEvent.cs new file mode 100644 index 0000000000..333d5338ee --- /dev/null +++ b/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEvent.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a Workflow Run fails. + /// + public class V2ExtendWorkflowRunFailedEvent : V2.Core.Event + { + /// + /// Data for the v2.extend.workflow_run.failed event. + /// + [JsonProperty("data")] + [STJS.JsonPropertyName("data")] + + public V2ExtendWorkflowRunFailedEventData Data { get; set; } + + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Extend.WorkflowRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEventData.cs b/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEventData.cs new file mode 100644 index 0000000000..4c0ed742be --- /dev/null +++ b/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEventData.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2ExtendWorkflowRunFailedEventData : StripeEntity + { + /// + /// A Stripe dashboard URL with more information about the Workflow Run failure. + /// + [JsonProperty("dashboard_url")] + [STJS.JsonPropertyName("dashboard_url")] + public string DashboardUrl { get; set; } + + /// + /// Details about the Workflow Run's transition into the FAILED state. + /// + [JsonProperty("failure_details")] + [STJS.JsonPropertyName("failure_details")] + public V2ExtendWorkflowRunFailedEventDataFailureDetails FailureDetails { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEventDataFailureDetails.cs b/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEventDataFailureDetails.cs new file mode 100644 index 0000000000..abcb5d8844 --- /dev/null +++ b/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEventDataFailureDetails.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2ExtendWorkflowRunFailedEventDataFailureDetails : StripeEntity + { + /// + /// Optional details about the failure result. + /// + [JsonProperty("error_message")] + [STJS.JsonPropertyName("error_message")] + public string ErrorMessage { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEventNotification.cs b/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEventNotification.cs new file mode 100644 index 0000000000..ca43e4d27f --- /dev/null +++ b/src/Stripe.net/Events/V2ExtendWorkflowRunFailedEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a Workflow Run fails. + /// + public class V2ExtendWorkflowRunFailedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Extend.WorkflowRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2ExtendWorkflowRunFailedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2ExtendWorkflowRunStartedEvent.cs b/src/Stripe.net/Events/V2ExtendWorkflowRunStartedEvent.cs new file mode 100644 index 0000000000..7b0366b68a --- /dev/null +++ b/src/Stripe.net/Events/V2ExtendWorkflowRunStartedEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a Workflow Run starts. + /// + public class V2ExtendWorkflowRunStartedEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Extend.WorkflowRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2ExtendWorkflowRunStartedEventNotification.cs b/src/Stripe.net/Events/V2ExtendWorkflowRunStartedEventNotification.cs new file mode 100644 index 0000000000..d40da7930c --- /dev/null +++ b/src/Stripe.net/Events/V2ExtendWorkflowRunStartedEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a Workflow Run starts. + /// + public class V2ExtendWorkflowRunStartedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Extend.WorkflowRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2ExtendWorkflowRunStartedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2ExtendWorkflowRunSucceededEvent.cs b/src/Stripe.net/Events/V2ExtendWorkflowRunSucceededEvent.cs new file mode 100644 index 0000000000..b3123319a5 --- /dev/null +++ b/src/Stripe.net/Events/V2ExtendWorkflowRunSucceededEvent.cs @@ -0,0 +1,38 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a Workflow Run succeeds. + /// + public class V2ExtendWorkflowRunSucceededEvent : V2.Core.Event + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Extend.WorkflowRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2ExtendWorkflowRunSucceededEventNotification.cs b/src/Stripe.net/Events/V2ExtendWorkflowRunSucceededEventNotification.cs new file mode 100644 index 0000000000..75353b647b --- /dev/null +++ b/src/Stripe.net/Events/V2ExtendWorkflowRunSucceededEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when a Workflow Run succeeds. + /// + public class V2ExtendWorkflowRunSucceededEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.Extend.WorkflowRun FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2ExtendWorkflowRunSucceededEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventData.cs b/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventData.cs index c8f6a457e3..8fd5c10aec 100644 --- a/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventData.cs +++ b/src/Stripe.net/Events/V2MoneyManagementTransactionCreatedEventData.cs @@ -8,6 +8,13 @@ namespace Stripe.Events public class V2MoneyManagementTransactionCreatedEventData : StripeEntity { + /// + /// Id of the v1 Treasury Transaction corresponding to this Transaction. + /// + [JsonProperty("treasury_transaction")] + [STJS.JsonPropertyName("treasury_transaction")] + public string TreasuryTransaction { get; set; } + /// /// Id of the v1 Transaction corresponding to this Transaction. /// diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEvent.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEvent.cs new file mode 100644 index 0000000000..b4f1d88c94 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEvent.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when an Agreement is confirmed by one party. + /// + public class V2OrchestratedCommerceAgreementConfirmedEvent : V2.Core.Event + { + /// + /// Data for the v2.orchestrated_commerce.agreement.confirmed event. + /// + [JsonProperty("data")] + [STJS.JsonPropertyName("data")] + + public V2OrchestratedCommerceAgreementConfirmedEventData Data { get; set; } + + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.OrchestratedCommerce.Agreement FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventData.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventData.cs new file mode 100644 index 0000000000..d1f2126c6e --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventData.cs @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System; + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementConfirmedEventData : StripeEntity + { + /// + /// The time at which the orchestrator confirmed the agreement. + /// + [JsonProperty("orchestrator_confirmed_at")] + [STJS.JsonPropertyName("orchestrator_confirmed_at")] + public DateTime OrchestratorConfirmedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Details about the orchestrator. + /// + [JsonProperty("orchestrator_details")] + [STJS.JsonPropertyName("orchestrator_details")] + public V2OrchestratedCommerceAgreementConfirmedEventDataOrchestratorDetails OrchestratorDetails { get; set; } + + /// + /// The time at which the seller confirmed the agreement. + /// + [JsonProperty("seller_confirmed_at")] + [STJS.JsonPropertyName("seller_confirmed_at")] + public DateTime SellerConfirmedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Details about the seller. + /// + [JsonProperty("seller_details")] + [STJS.JsonPropertyName("seller_details")] + public V2OrchestratedCommerceAgreementConfirmedEventDataSellerDetails SellerDetails { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventDataOrchestratorDetails.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventDataOrchestratorDetails.cs new file mode 100644 index 0000000000..64b67fce0f --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventDataOrchestratorDetails.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementConfirmedEventDataOrchestratorDetails : StripeEntity + { + /// + /// The name of the orchestrator. This can be the name of the agent or the name of the + /// business. + /// + [JsonProperty("name")] + [STJS.JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// The Network ID of the orchestrator. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventDataSellerDetails.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventDataSellerDetails.cs new file mode 100644 index 0000000000..5788f0bf58 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventDataSellerDetails.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementConfirmedEventDataSellerDetails : StripeEntity + { + /// + /// The Network ID of the seller. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventNotification.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventNotification.cs new file mode 100644 index 0000000000..6d6509f5df --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementConfirmedEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when an Agreement is confirmed by one party. + /// + public class V2OrchestratedCommerceAgreementConfirmedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.OrchestratedCommerce.Agreement FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2OrchestratedCommerceAgreementConfirmedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEvent.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEvent.cs new file mode 100644 index 0000000000..78c8e4590d --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEvent.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when an Agreement is created. + /// + public class V2OrchestratedCommerceAgreementCreatedEvent : V2.Core.Event + { + /// + /// Data for the v2.orchestrated_commerce.agreement.created event. + /// + [JsonProperty("data")] + [STJS.JsonPropertyName("data")] + + public V2OrchestratedCommerceAgreementCreatedEventData Data { get; set; } + + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.OrchestratedCommerce.Agreement FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventData.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventData.cs new file mode 100644 index 0000000000..99d3421828 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventData.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System; + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementCreatedEventData : StripeEntity + { + /// + /// The time at which the agreement was created. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime Created { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The party that initiated the agreement. + /// One of: orchestrator, or seller. + /// + [JsonProperty("initiated_by")] + [STJS.JsonPropertyName("initiated_by")] + public string InitiatedBy { get; set; } + + /// + /// Details about the orchestrator. + /// + [JsonProperty("orchestrator_details")] + [STJS.JsonPropertyName("orchestrator_details")] + public V2OrchestratedCommerceAgreementCreatedEventDataOrchestratorDetails OrchestratorDetails { get; set; } + + /// + /// Details about the seller. + /// + [JsonProperty("seller_details")] + [STJS.JsonPropertyName("seller_details")] + public V2OrchestratedCommerceAgreementCreatedEventDataSellerDetails SellerDetails { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventDataOrchestratorDetails.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventDataOrchestratorDetails.cs new file mode 100644 index 0000000000..de3c15cb63 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventDataOrchestratorDetails.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementCreatedEventDataOrchestratorDetails : StripeEntity + { + /// + /// The name of the orchestrator. This can be the name of the agent or the name of the + /// business. + /// + [JsonProperty("name")] + [STJS.JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// The Network ID of the orchestrator. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventDataSellerDetails.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventDataSellerDetails.cs new file mode 100644 index 0000000000..f36bb20b2b --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventDataSellerDetails.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementCreatedEventDataSellerDetails : StripeEntity + { + /// + /// The Network ID of the seller. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventNotification.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventNotification.cs new file mode 100644 index 0000000000..ca84aa4734 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementCreatedEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when an Agreement is created. + /// + public class V2OrchestratedCommerceAgreementCreatedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.OrchestratedCommerce.Agreement FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2OrchestratedCommerceAgreementCreatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.cs new file mode 100644 index 0000000000..be93d21d04 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEvent.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when an Agreement is partially confirmed (confirmed by one party but not both). + /// + public class V2OrchestratedCommerceAgreementPartiallyConfirmedEvent : V2.Core.Event + { + /// + /// Data for the v2.orchestrated_commerce.agreement.partially_confirmed event. + /// + [JsonProperty("data")] + [STJS.JsonPropertyName("data")] + + public V2OrchestratedCommerceAgreementPartiallyConfirmedEventData Data { get; set; } + + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.OrchestratedCommerce.Agreement FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventData.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventData.cs new file mode 100644 index 0000000000..3ccb78fe5e --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventData.cs @@ -0,0 +1,40 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System; + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementPartiallyConfirmedEventData : StripeEntity + { + /// + /// The time at which the orchestrator confirmed the agreement. + /// + [JsonProperty("orchestrator_confirmed_at")] + [STJS.JsonPropertyName("orchestrator_confirmed_at")] + public DateTime OrchestratorConfirmedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Details about the orchestrator. + /// + [JsonProperty("orchestrator_details")] + [STJS.JsonPropertyName("orchestrator_details")] + public V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataOrchestratorDetails OrchestratorDetails { get; set; } + + /// + /// The time at which the seller confirmed the agreement. + /// + [JsonProperty("seller_confirmed_at")] + [STJS.JsonPropertyName("seller_confirmed_at")] + public DateTime SellerConfirmedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// Details about the seller. + /// + [JsonProperty("seller_details")] + [STJS.JsonPropertyName("seller_details")] + public V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataSellerDetails SellerDetails { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataOrchestratorDetails.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataOrchestratorDetails.cs new file mode 100644 index 0000000000..dcc45ef9cd --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataOrchestratorDetails.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataOrchestratorDetails : StripeEntity + { + /// + /// The name of the orchestrator. This can be the name of the agent or the name of the + /// business. + /// + [JsonProperty("name")] + [STJS.JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// The Network ID of the orchestrator. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataSellerDetails.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataSellerDetails.cs new file mode 100644 index 0000000000..20170dc54a --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataSellerDetails.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementPartiallyConfirmedEventDataSellerDetails : StripeEntity + { + /// + /// The Network ID of the seller. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.cs new file mode 100644 index 0000000000..d62ceab559 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when an Agreement is partially confirmed (confirmed by one party but not both). + /// + public class V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.OrchestratedCommerce.Agreement FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2OrchestratedCommerceAgreementPartiallyConfirmedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEvent.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEvent.cs new file mode 100644 index 0000000000..d84b27e4ec --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEvent.cs @@ -0,0 +1,46 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when an Agreement is terminated. + /// + public class V2OrchestratedCommerceAgreementTerminatedEvent : V2.Core.Event + { + /// + /// Data for the v2.orchestrated_commerce.agreement.terminated event. + /// + [JsonProperty("data")] + [STJS.JsonPropertyName("data")] + + public V2OrchestratedCommerceAgreementTerminatedEventData Data { get; set; } + + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.OrchestratedCommerce.Agreement FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventData.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventData.cs new file mode 100644 index 0000000000..c6d4161c43 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventData.cs @@ -0,0 +1,41 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System; + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementTerminatedEventData : StripeEntity + { + /// + /// Details about the orchestrator. + /// + [JsonProperty("orchestrator_details")] + [STJS.JsonPropertyName("orchestrator_details")] + public V2OrchestratedCommerceAgreementTerminatedEventDataOrchestratorDetails OrchestratorDetails { get; set; } + + /// + /// Details about the seller. + /// + [JsonProperty("seller_details")] + [STJS.JsonPropertyName("seller_details")] + public V2OrchestratedCommerceAgreementTerminatedEventDataSellerDetails SellerDetails { get; set; } + + /// + /// The time at which the agreement was terminated. + /// + [JsonProperty("terminated_at")] + [STJS.JsonPropertyName("terminated_at")] + public DateTime TerminatedAt { get; set; } = Stripe.Infrastructure.DateTimeUtils.UnixEpoch; + + /// + /// The party that terminated the agreement. + /// One of: orchestrator, or seller. + /// + [JsonProperty("terminated_by")] + [STJS.JsonPropertyName("terminated_by")] + public string TerminatedBy { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventDataOrchestratorDetails.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventDataOrchestratorDetails.cs new file mode 100644 index 0000000000..18127ab98c --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventDataOrchestratorDetails.cs @@ -0,0 +1,26 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementTerminatedEventDataOrchestratorDetails : StripeEntity + { + /// + /// The name of the orchestrator. This can be the name of the agent or the name of the + /// business. + /// + [JsonProperty("name")] + [STJS.JsonPropertyName("name")] + public string Name { get; set; } + + /// + /// The Network ID of the orchestrator. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventDataSellerDetails.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventDataSellerDetails.cs new file mode 100644 index 0000000000..3907cdaba4 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventDataSellerDetails.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class V2OrchestratedCommerceAgreementTerminatedEventDataSellerDetails : StripeEntity + { + /// + /// The Network ID of the seller. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventNotification.cs b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventNotification.cs new file mode 100644 index 0000000000..d6b8f8aa98 --- /dev/null +++ b/src/Stripe.net/Events/V2OrchestratedCommerceAgreementTerminatedEventNotification.cs @@ -0,0 +1,49 @@ +// File generated from our OpenAPI spec +namespace Stripe.Events +{ + using System.Threading.Tasks; + using Newtonsoft.Json; + using Stripe.V2; + using STJS = System.Text.Json.Serialization; + + /// + /// Occurs when an Agreement is terminated. + /// + public class V2OrchestratedCommerceAgreementTerminatedEventNotification : V2.Core.EventNotification + { + /// + /// Object containing the reference to API resource relevant to the event. + /// + [JsonProperty("related_object")] + [STJS.JsonPropertyName("related_object")] + + public V2.Core.EventNotificationRelatedObject RelatedObject { get; set; } + + /// + /// Asynchronously retrieves the related object from the API. Make an API request on every + /// call. + /// + public Task FetchRelatedObjectAsync() + { + return this.FetchRelatedObjectAsync(this.RelatedObject); + } + + /// + /// Retrieves the related object from the API. Make an API request on every call. + /// + public V2.OrchestratedCommerce.Agreement FetchRelatedObject() + { + return this.FetchRelatedObject(this.RelatedObject); + } + + public V2OrchestratedCommerceAgreementTerminatedEvent FetchEvent() + { + return this.FetchEvent(); + } + + public Task FetchEventAsync() + { + return this.FetchEventAsync(); + } + } +} diff --git a/src/Stripe.net/Exceptions/V2/CannotProceedError.cs b/src/Stripe.net/Exceptions/V2/CannotProceedError.cs new file mode 100644 index 0000000000..d3a7a20ee8 --- /dev/null +++ b/src/Stripe.net/Exceptions/V2/CannotProceedError.cs @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class CannotProceedError : StripeError + { + [JsonProperty("reason")] + [STJS.JsonPropertyName("reason")] + public string Reason { get; set; } + } +} \ No newline at end of file diff --git a/src/Stripe.net/Exceptions/V2/CannotProceedException.cs b/src/Stripe.net/Exceptions/V2/CannotProceedException.cs new file mode 100644 index 0000000000..9565506e8a --- /dev/null +++ b/src/Stripe.net/Exceptions/V2/CannotProceedException.cs @@ -0,0 +1,34 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System.Net; + using System.Text.Json; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + public class CannotProceedException : StripeException + { + private CannotProceedException( + HttpStatusCode httpStatusCode, + StripeError stripeError, + string message, + string reason) + : base(httpStatusCode, stripeError) + { + this.Reason = reason; + } + + [JsonProperty("reason")] + [STJS.JsonPropertyName("reason")] + public string Reason { get; set; } + + internal static CannotProceedException Parse( + HttpStatusCode httpStatusCode, + JsonElement body) + { + var stripeError = CannotProceedError.FromJson(body); + return new CannotProceedException(httpStatusCode, stripeError, stripeError.Message, stripeError.Reason); + } + } +} \ No newline at end of file diff --git a/src/Stripe.net/Infrastructure/Public/StripeEventNotificationHandler.cs b/src/Stripe.net/Infrastructure/Public/StripeEventNotificationHandler.cs index fd3639ed7e..d593fc0fdb 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeEventNotificationHandler.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeEventNotificationHandler.cs @@ -19,6 +19,10 @@ public class StripeEventNotificationHandler // private-event-handlers: The beginning of the section generated from our OpenAPI spec private EventHandler> v1BillingMeterErrorReportTriggered; private EventHandler> v1BillingMeterNoMeterFound; + private EventHandler> v2CommerceProductCatalogImportsFailed; + private EventHandler> v2CommerceProductCatalogImportsProcessing; + private EventHandler> v2CommerceProductCatalogImportsSucceeded; + private EventHandler> v2CommerceProductCatalogImportsSucceededWithErrors; private EventHandler> v2CoreAccountClosed; private EventHandler> v2CoreAccountCreated; private EventHandler> v2CoreAccountUpdated; @@ -50,6 +54,13 @@ public class StripeEventNotificationHandler private EventHandler> v2CoreBatchJobValidationFailed; private EventHandler> v2CoreEventDestinationPing; private EventHandler> v2CoreHealthEventGenerationFailureResolved; + private EventHandler> v2DataReportingQueryRunCreated; + private EventHandler> v2DataReportingQueryRunFailed; + private EventHandler> v2DataReportingQueryRunSucceeded; + private EventHandler> v2DataReportingQueryRunUpdated; + private EventHandler> v2ExtendWorkflowRunFailed; + private EventHandler> v2ExtendWorkflowRunStarted; + private EventHandler> v2ExtendWorkflowRunSucceeded; private EventHandler> v2MoneyManagementAdjustmentCreated; private EventHandler> v2MoneyManagementFinancialAccountCreated; private EventHandler> v2MoneyManagementFinancialAccountUpdated; @@ -86,6 +97,10 @@ public class StripeEventNotificationHandler private EventHandler> v2MoneyManagementReceivedDebitUpdated; private EventHandler> v2MoneyManagementTransactionCreated; private EventHandler> v2MoneyManagementTransactionUpdated; + private EventHandler> v2OrchestratedCommerceAgreementConfirmed; + private EventHandler> v2OrchestratedCommerceAgreementCreated; + private EventHandler> v2OrchestratedCommerceAgreementPartiallyConfirmed; + private EventHandler> v2OrchestratedCommerceAgreementTerminated; // private-event-handlers: The end of the section generated from our OpenAPI spec @@ -150,6 +165,30 @@ public event EventHandler> V2CommerceProductCatalogImportsFailed + { + add { this.AddEventHandler(ref this.v2CommerceProductCatalogImportsFailed, value, "v2.commerce.product_catalog.imports.failed"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2CommerceProductCatalogImportsProcessing + { + add { this.AddEventHandler(ref this.v2CommerceProductCatalogImportsProcessing, value, "v2.commerce.product_catalog.imports.processing"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2CommerceProductCatalogImportsSucceeded + { + add { this.AddEventHandler(ref this.v2CommerceProductCatalogImportsSucceeded, value, "v2.commerce.product_catalog.imports.succeeded"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2CommerceProductCatalogImportsSucceededWithErrors + { + add { this.AddEventHandler(ref this.v2CommerceProductCatalogImportsSucceededWithErrors, value, "v2.commerce.product_catalog.imports.succeeded_with_errors"); } + remove { this.RemoveEventHandler(); } + } + public event EventHandler> V2CoreAccountClosed { add { this.AddEventHandler(ref this.v2CoreAccountClosed, value, "v2.core.account.closed"); } @@ -336,6 +375,48 @@ public event EventHandler> V2DataReportingQueryRunCreated + { + add { this.AddEventHandler(ref this.v2DataReportingQueryRunCreated, value, "v2.data.reporting.query_run.created"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2DataReportingQueryRunFailed + { + add { this.AddEventHandler(ref this.v2DataReportingQueryRunFailed, value, "v2.data.reporting.query_run.failed"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2DataReportingQueryRunSucceeded + { + add { this.AddEventHandler(ref this.v2DataReportingQueryRunSucceeded, value, "v2.data.reporting.query_run.succeeded"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2DataReportingQueryRunUpdated + { + add { this.AddEventHandler(ref this.v2DataReportingQueryRunUpdated, value, "v2.data.reporting.query_run.updated"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2ExtendWorkflowRunFailed + { + add { this.AddEventHandler(ref this.v2ExtendWorkflowRunFailed, value, "v2.extend.workflow_run.failed"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2ExtendWorkflowRunStarted + { + add { this.AddEventHandler(ref this.v2ExtendWorkflowRunStarted, value, "v2.extend.workflow_run.started"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2ExtendWorkflowRunSucceeded + { + add { this.AddEventHandler(ref this.v2ExtendWorkflowRunSucceeded, value, "v2.extend.workflow_run.succeeded"); } + remove { this.RemoveEventHandler(); } + } + public event EventHandler> V2MoneyManagementAdjustmentCreated { add { this.AddEventHandler(ref this.v2MoneyManagementAdjustmentCreated, value, "v2.money_management.adjustment.created"); } @@ -552,6 +633,30 @@ public event EventHandler> V2OrchestratedCommerceAgreementConfirmed + { + add { this.AddEventHandler(ref this.v2OrchestratedCommerceAgreementConfirmed, value, "v2.orchestrated_commerce.agreement.confirmed"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2OrchestratedCommerceAgreementCreated + { + add { this.AddEventHandler(ref this.v2OrchestratedCommerceAgreementCreated, value, "v2.orchestrated_commerce.agreement.created"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2OrchestratedCommerceAgreementPartiallyConfirmed + { + add { this.AddEventHandler(ref this.v2OrchestratedCommerceAgreementPartiallyConfirmed, value, "v2.orchestrated_commerce.agreement.partially_confirmed"); } + remove { this.RemoveEventHandler(); } + } + + public event EventHandler> V2OrchestratedCommerceAgreementTerminated + { + add { this.AddEventHandler(ref this.v2OrchestratedCommerceAgreementTerminated, value, "v2.orchestrated_commerce.agreement.terminated"); } + remove { this.RemoveEventHandler(); } + } + // public-event-handlers: The end of the section generated from our OpenAPI spec /// @@ -669,6 +774,22 @@ private void DispatchEvent(V2.Core.EventNotification eventNotification, StripeCl { this.v1BillingMeterNoMeterFound.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V1BillingMeterNoMeterFoundEventNotification)eventNotification, client)); } + else if (eventNotification is Stripe.Events.V2CommerceProductCatalogImportsFailedEventNotification) + { + this.v2CommerceProductCatalogImportsFailed.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2CommerceProductCatalogImportsFailedEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2CommerceProductCatalogImportsProcessingEventNotification) + { + this.v2CommerceProductCatalogImportsProcessing.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2CommerceProductCatalogImportsProcessingEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2CommerceProductCatalogImportsSucceededEventNotification) + { + this.v2CommerceProductCatalogImportsSucceeded.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2CommerceProductCatalogImportsSucceededEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification) + { + this.v2CommerceProductCatalogImportsSucceededWithErrors.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification)eventNotification, client)); + } else if (eventNotification is Stripe.Events.V2CoreAccountClosedEventNotification) { this.v2CoreAccountClosed.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2CoreAccountClosedEventNotification)eventNotification, client)); @@ -793,6 +914,34 @@ private void DispatchEvent(V2.Core.EventNotification eventNotification, StripeCl { this.v2CoreHealthEventGenerationFailureResolved.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2CoreHealthEventGenerationFailureResolvedEventNotification)eventNotification, client)); } + else if (eventNotification is Stripe.Events.V2DataReportingQueryRunCreatedEventNotification) + { + this.v2DataReportingQueryRunCreated.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2DataReportingQueryRunCreatedEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2DataReportingQueryRunFailedEventNotification) + { + this.v2DataReportingQueryRunFailed.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2DataReportingQueryRunFailedEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2DataReportingQueryRunSucceededEventNotification) + { + this.v2DataReportingQueryRunSucceeded.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2DataReportingQueryRunSucceededEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2DataReportingQueryRunUpdatedEventNotification) + { + this.v2DataReportingQueryRunUpdated.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2DataReportingQueryRunUpdatedEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2ExtendWorkflowRunFailedEventNotification) + { + this.v2ExtendWorkflowRunFailed.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2ExtendWorkflowRunFailedEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2ExtendWorkflowRunStartedEventNotification) + { + this.v2ExtendWorkflowRunStarted.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2ExtendWorkflowRunStartedEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2ExtendWorkflowRunSucceededEventNotification) + { + this.v2ExtendWorkflowRunSucceeded.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2ExtendWorkflowRunSucceededEventNotification)eventNotification, client)); + } else if (eventNotification is Stripe.Events.V2MoneyManagementAdjustmentCreatedEventNotification) { this.v2MoneyManagementAdjustmentCreated.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2MoneyManagementAdjustmentCreatedEventNotification)eventNotification, client)); @@ -937,6 +1086,22 @@ private void DispatchEvent(V2.Core.EventNotification eventNotification, StripeCl { this.v2MoneyManagementTransactionUpdated.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2MoneyManagementTransactionUpdatedEventNotification)eventNotification, client)); } + else if (eventNotification is Stripe.Events.V2OrchestratedCommerceAgreementConfirmedEventNotification) + { + this.v2OrchestratedCommerceAgreementConfirmed.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2OrchestratedCommerceAgreementConfirmedEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2OrchestratedCommerceAgreementCreatedEventNotification) + { + this.v2OrchestratedCommerceAgreementCreated.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2OrchestratedCommerceAgreementCreatedEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification) + { + this.v2OrchestratedCommerceAgreementPartiallyConfirmed.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification)eventNotification, client)); + } + else if (eventNotification is Stripe.Events.V2OrchestratedCommerceAgreementTerminatedEventNotification) + { + this.v2OrchestratedCommerceAgreementTerminated.Invoke(this, new StripeEventNotificationEventArgs((Stripe.Events.V2OrchestratedCommerceAgreementTerminatedEventNotification)eventNotification, client)); + } // event-handler-dispatch: The end of the section generated from our OpenAPI spec else diff --git a/src/Stripe.net/Infrastructure/Public/StripeException.cs b/src/Stripe.net/Infrastructure/Public/StripeException.cs index 2f43bec4fc..91724f1866 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeException.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeException.cs @@ -59,6 +59,10 @@ internal static StripeException ParseV2Exception(string type, StripeResponse res ret = Stripe.V2.BlockedByStripeException.Parse(httpStatusCode, body); break; + case "cannot_proceed": + ret = Stripe.V2.CannotProceedException.Parse(httpStatusCode, body); + break; + case "controlled_by_alternate_resource": ret = Stripe.V2.ControlledByAlternateResourceException.Parse(httpStatusCode, body); break; diff --git a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs index 193fc192ee..d25d52a245 100644 --- a/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs +++ b/src/Stripe.net/Infrastructure/Public/StripeTypeRegistry.cs @@ -255,6 +255,10 @@ public static class StripeTypeRegistry { "v2.billing.meter_event_adjustment", typeof(V2.Billing.MeterEventAdjustment) }, { "v2.billing.meter_event_session", typeof(V2.Billing.MeterEventSession) }, { "v2.billing.profile", typeof(V2.Billing.Profile) }, + { + "v2.commerce.product_catalog_import", typeof( + V2.Commerce.ProductCatalogImport) + }, { "v2.core.account", typeof(V2.Core.Account) }, { "v2.core.account_link", typeof(V2.Core.AccountLink) }, { "v2.core.account_person", typeof(V2.Core.AccountPerson) }, @@ -265,6 +269,10 @@ public static class StripeTypeRegistry { "v2.core.event_destination", typeof(V2.Core.EventDestination) }, { "v2.core.vault.gb_bank_account", typeof(V2.Core.Vault.GbBankAccount) }, { "v2.core.vault.us_bank_account", typeof(V2.Core.Vault.UsBankAccount) }, + { "v2.data.reporting.query_run", typeof(V2.Data.Reporting.QueryRun) }, + { "v2.extend.workflow", typeof(V2.Extend.Workflow) }, + { "v2.extend.workflow_run", typeof(V2.Extend.WorkflowRun) }, + { "v2.iam.activity_log", typeof(V2.Iam.ActivityLog) }, { "v2.money_management.adjustment", typeof(V2.MoneyManagement.Adjustment) }, { "v2.money_management.financial_account", typeof( @@ -312,6 +320,11 @@ public static class StripeTypeRegistry "v2.money_management.transaction_entry", typeof( V2.MoneyManagement.TransactionEntry) }, + { "v2.network.business_profile", typeof(V2.Network.BusinessProfile) }, + { + "v2.orchestrated_commerce.agreement", typeof( + V2.OrchestratedCommerce.Agreement) + }, // V2ObjectsToTypes: The end of the section generated from our OpenAPI spec }); @@ -328,6 +341,22 @@ public static class StripeTypeRegistry "v1.billing.meter.no_meter_found", typeof( Events.V1BillingMeterNoMeterFoundEvent) }, + { + "v2.commerce.product_catalog.imports.failed", typeof( + Events.V2CommerceProductCatalogImportsFailedEvent) + }, + { + "v2.commerce.product_catalog.imports.processing", typeof( + Events.V2CommerceProductCatalogImportsProcessingEvent) + }, + { + "v2.commerce.product_catalog.imports.succeeded", typeof( + Events.V2CommerceProductCatalogImportsSucceededEvent) + }, + { + "v2.commerce.product_catalog.imports.succeeded_with_errors", typeof( + Events.V2CommerceProductCatalogImportsSucceededWithErrorsEvent) + }, { "v2.core.account.closed", typeof(Events.V2CoreAccountClosedEvent) }, { "v2.core.account.created", typeof(Events.V2CoreAccountCreatedEvent) }, { "v2.core.account.updated", typeof(Events.V2CoreAccountUpdatedEvent) }, @@ -425,6 +454,34 @@ public static class StripeTypeRegistry "v2.core.health.event_generation_failure.resolved", typeof( Events.V2CoreHealthEventGenerationFailureResolvedEvent) }, + { + "v2.data.reporting.query_run.created", typeof( + Events.V2DataReportingQueryRunCreatedEvent) + }, + { + "v2.data.reporting.query_run.failed", typeof( + Events.V2DataReportingQueryRunFailedEvent) + }, + { + "v2.data.reporting.query_run.succeeded", typeof( + Events.V2DataReportingQueryRunSucceededEvent) + }, + { + "v2.data.reporting.query_run.updated", typeof( + Events.V2DataReportingQueryRunUpdatedEvent) + }, + { + "v2.extend.workflow_run.failed", typeof( + Events.V2ExtendWorkflowRunFailedEvent) + }, + { + "v2.extend.workflow_run.started", typeof( + Events.V2ExtendWorkflowRunStartedEvent) + }, + { + "v2.extend.workflow_run.succeeded", typeof( + Events.V2ExtendWorkflowRunSucceededEvent) + }, { "v2.money_management.adjustment.created", typeof( Events.V2MoneyManagementAdjustmentCreatedEvent) @@ -569,6 +626,22 @@ public static class StripeTypeRegistry "v2.money_management.transaction.updated", typeof( Events.V2MoneyManagementTransactionUpdatedEvent) }, + { + "v2.orchestrated_commerce.agreement.confirmed", typeof( + Events.V2OrchestratedCommerceAgreementConfirmedEvent) + }, + { + "v2.orchestrated_commerce.agreement.created", typeof( + Events.V2OrchestratedCommerceAgreementCreatedEvent) + }, + { + "v2.orchestrated_commerce.agreement.partially_confirmed", typeof( + Events.V2OrchestratedCommerceAgreementPartiallyConfirmedEvent) + }, + { + "v2.orchestrated_commerce.agreement.terminated", typeof( + Events.V2OrchestratedCommerceAgreementTerminatedEvent) + }, // V2EventsToTypes: The end of the section generated from our OpenAPI spec }); @@ -585,6 +658,22 @@ public static class StripeTypeRegistry "v1.billing.meter.no_meter_found", typeof( Events.V1BillingMeterNoMeterFoundEventNotification) }, + { + "v2.commerce.product_catalog.imports.failed", typeof( + Events.V2CommerceProductCatalogImportsFailedEventNotification) + }, + { + "v2.commerce.product_catalog.imports.processing", typeof( + Events.V2CommerceProductCatalogImportsProcessingEventNotification) + }, + { + "v2.commerce.product_catalog.imports.succeeded", typeof( + Events.V2CommerceProductCatalogImportsSucceededEventNotification) + }, + { + "v2.commerce.product_catalog.imports.succeeded_with_errors", typeof( + Events.V2CommerceProductCatalogImportsSucceededWithErrorsEventNotification) + }, { "v2.core.account.closed", typeof( Events.V2CoreAccountClosedEventNotification) @@ -709,6 +798,34 @@ public static class StripeTypeRegistry "v2.core.health.event_generation_failure.resolved", typeof( Events.V2CoreHealthEventGenerationFailureResolvedEventNotification) }, + { + "v2.data.reporting.query_run.created", typeof( + Events.V2DataReportingQueryRunCreatedEventNotification) + }, + { + "v2.data.reporting.query_run.failed", typeof( + Events.V2DataReportingQueryRunFailedEventNotification) + }, + { + "v2.data.reporting.query_run.succeeded", typeof( + Events.V2DataReportingQueryRunSucceededEventNotification) + }, + { + "v2.data.reporting.query_run.updated", typeof( + Events.V2DataReportingQueryRunUpdatedEventNotification) + }, + { + "v2.extend.workflow_run.failed", typeof( + Events.V2ExtendWorkflowRunFailedEventNotification) + }, + { + "v2.extend.workflow_run.started", typeof( + Events.V2ExtendWorkflowRunStartedEventNotification) + }, + { + "v2.extend.workflow_run.succeeded", typeof( + Events.V2ExtendWorkflowRunSucceededEventNotification) + }, { "v2.money_management.adjustment.created", typeof( Events.V2MoneyManagementAdjustmentCreatedEventNotification) @@ -853,6 +970,22 @@ public static class StripeTypeRegistry "v2.money_management.transaction.updated", typeof( Events.V2MoneyManagementTransactionUpdatedEventNotification) }, + { + "v2.orchestrated_commerce.agreement.confirmed", typeof( + Events.V2OrchestratedCommerceAgreementConfirmedEventNotification) + }, + { + "v2.orchestrated_commerce.agreement.created", typeof( + Events.V2OrchestratedCommerceAgreementCreatedEventNotification) + }, + { + "v2.orchestrated_commerce.agreement.partially_confirmed", typeof( + Events.V2OrchestratedCommerceAgreementPartiallyConfirmedEventNotification) + }, + { + "v2.orchestrated_commerce.agreement.terminated", typeof( + Events.V2OrchestratedCommerceAgreementTerminatedEventNotification) + }, // V2EventNotificationsToTypes: The end of the section generated from our OpenAPI spec }); diff --git a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateCalculationTaxOptions.cs b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateCalculationTaxOptions.cs index 6e8c4003c5..a8086c5cfe 100644 --- a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateCalculationTaxOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateCalculationTaxOptions.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class BillSettingCreateCalculationTaxOptions : INestedOptions { /// - /// Determines if tax will be calculated automatically based on a PTC or manually based on - /// rules defined by the merchant. Defaults to "manual". + /// Determines if tax is calculated automatically based on a PTC or manually based on rules + /// defined by the business. Defaults to "manual". /// One of: automatic, or manual. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateInvoiceOptions.cs b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateInvoiceOptions.cs index f1fa847784..5296ea99b5 100644 --- a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateInvoiceOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateInvoiceOptions.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Billing public class BillSettingCreateInvoiceOptions : INestedOptions { /// - /// The amount of time until the invoice will be overdue for payment. + /// The amount of time until the invoice is overdue for payment. /// [JsonProperty("time_until_due")] [STJS.JsonPropertyName("time_until_due")] diff --git a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateInvoiceTimeUntilDueOptions.cs b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateInvoiceTimeUntilDueOptions.cs index 4459e3a4df..c292631e63 100644 --- a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateInvoiceTimeUntilDueOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingCreateInvoiceTimeUntilDueOptions.cs @@ -18,7 +18,7 @@ public class BillSettingCreateInvoiceTimeUntilDueOptions : INestedOptions /// /// The number of interval units. For example, if interval=day and interval_count=30, the - /// invoice will be due in 30 days. + /// invoice is due in 30 days. /// [JsonProperty("interval_count")] [STJS.JsonPropertyName("interval_count")] diff --git a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateCalculationTaxOptions.cs b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateCalculationTaxOptions.cs index e5deff2094..50238cf6e9 100644 --- a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateCalculationTaxOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateCalculationTaxOptions.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class BillSettingUpdateCalculationTaxOptions : INestedOptions { /// - /// Determines if tax will be calculated automatically based on a PTC or manually based on - /// rules defined by the merchant. Defaults to "manual". + /// Determines if tax is calculated automatically based on a PTC or manually based on rules + /// defined by the business. Defaults to "manual". /// One of: automatic, or manual. /// [JsonProperty("type")] diff --git a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateInvoiceOptions.cs b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateInvoiceOptions.cs index 7415a42998..6940246696 100644 --- a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateInvoiceOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateInvoiceOptions.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Billing public class BillSettingUpdateInvoiceOptions : INestedOptions { /// - /// The amount of time until the invoice will be overdue for payment. + /// The amount of time until the invoice is overdue for payment. /// [JsonProperty("time_until_due")] [STJS.JsonPropertyName("time_until_due")] diff --git a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateInvoiceTimeUntilDueOptions.cs b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateInvoiceTimeUntilDueOptions.cs index c59c4c8117..cfffb319dd 100644 --- a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateInvoiceTimeUntilDueOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateInvoiceTimeUntilDueOptions.cs @@ -18,7 +18,7 @@ public class BillSettingUpdateInvoiceTimeUntilDueOptions : INestedOptions /// /// The number of interval units. For example, if interval=day and interval_count=30, the - /// invoice will be due in 30 days. + /// invoice is due in 30 days. /// [JsonProperty("interval_count")] [STJS.JsonPropertyName("interval_count")] diff --git a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateOptions.cs b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateOptions.cs index 032c4faaaa..4cf0b5393f 100644 --- a/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/BillSettings/BillSettingUpdateOptions.cs @@ -40,7 +40,7 @@ public class BillSettingUpdateOptions : BaseOptions /// /// Optionally change the live version of the BillSetting. Providing live_version = - /// "latest" will set the BillSetting' live_version to its latest version. + /// "latest" sets the BillSetting' live_version to its latest version. /// [JsonProperty("live_version")] [STJS.JsonPropertyName("live_version")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleDayOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleDayOptions.cs index 774f225930..a33bba7085 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleDayOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleDayOptions.cs @@ -10,7 +10,7 @@ public class CadenceCreateBillingCycleDayOptions : INestedOptions { /// /// The time at which the billing cycle ends. This field is optional, and if not provided, - /// it will default to the time at which the cadence was created in UTC timezone. + /// it defaults to the time at which the cadence was created in UTC timezone. /// [JsonProperty("time")] [STJS.JsonPropertyName("time")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleMonthOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleMonthOptions.cs index 61271b70fe..defef74b7b 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleMonthOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleMonthOptions.cs @@ -10,8 +10,8 @@ public class CadenceCreateBillingCycleMonthOptions : INestedOptions { /// /// The day to anchor the billing on for a type="month" billing cycle from 1-31. If this - /// number is greater than the number of days in the month being billed, this will anchor to - /// the last day of the month. If not provided, this will default to the day the cadence was + /// number is greater than the number of days in the month being billed, this anchors to the + /// last day of the month. If not provided, this defaults to the day the cadence was /// created. /// [JsonProperty("day_of_month")] @@ -20,9 +20,9 @@ public class CadenceCreateBillingCycleMonthOptions : INestedOptions /// /// The month to anchor the billing on for a type="month" billing cycle from 1-12. If not - /// provided, this will default to the month the cadence was created. This setting can only - /// be used for monthly billing cycles with interval_count of 2, 3, 4 or 6. All - /// occurrences will be calculated from month provided. + /// provided, this defaults to the month the cadence was created. This setting can only be + /// used for monthly billing cycles with interval_count of 2, 3, 4 or 6. All + /// occurrences are calculated from the month provided. /// [JsonProperty("month_of_year")] [STJS.JsonPropertyName("month_of_year")] @@ -30,7 +30,7 @@ public class CadenceCreateBillingCycleMonthOptions : INestedOptions /// /// The time at which the billing cycle ends. This field is optional, and if not provided, - /// it will default to the time at which the cadence was created in UTC timezone. + /// it defaults to the time at which the cadence was created in UTC timezone. /// [JsonProperty("time")] [STJS.JsonPropertyName("time")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleOptions.cs index 5183355ef1..51db99f507 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleOptions.cs @@ -17,8 +17,8 @@ public class CadenceCreateBillingCycleOptions : INestedOptions /// /// The number of intervals (specified in the interval attribute) between cadence billings. - /// For example, type=month and interval_count=3 bills every 3 months. If this is not - /// provided, it will default to 1. + /// For example, type=month and interval_count=3 bills every 3 months. If not provided, this + /// defaults to 1. /// [JsonProperty("interval_count")] [STJS.JsonPropertyName("interval_count")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleWeekOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleWeekOptions.cs index db438311b7..ea3cde1b46 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleWeekOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleWeekOptions.cs @@ -11,7 +11,7 @@ public class CadenceCreateBillingCycleWeekOptions : INestedOptions /// /// The day of the week to bill the type=week billing cycle on. Numbered from 1-7 for Monday /// to Sunday respectively, based on the ISO-8601 week day numbering. If not provided, this - /// will default to the day the cadence was created. + /// defaults to the day the cadence was created. /// [JsonProperty("day_of_week")] [STJS.JsonPropertyName("day_of_week")] @@ -19,7 +19,7 @@ public class CadenceCreateBillingCycleWeekOptions : INestedOptions /// /// The time at which the billing cycle ends. This field is optional, and if not provided, - /// it will default to the time at which the cadence was created in UTC timezone. + /// it defaults to the time at which the cadence was created in UTC timezone. /// [JsonProperty("time")] [STJS.JsonPropertyName("time")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleYearOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleYearOptions.cs index b3412a888e..1a5a62197f 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleYearOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateBillingCycleYearOptions.cs @@ -10,8 +10,8 @@ public class CadenceCreateBillingCycleYearOptions : INestedOptions { /// /// The day to anchor the billing on for a type="month" billing cycle from 1-31. If this - /// number is greater than the number of days in the month being billed, this will anchor to - /// the last day of the month. If not provided, this will default to the day the cadence was + /// number is greater than the number of days in the month being billed, this anchors to the + /// last day of the month. If not provided, this defaults to the day the cadence was /// created. /// [JsonProperty("day_of_month")] @@ -19,8 +19,8 @@ public class CadenceCreateBillingCycleYearOptions : INestedOptions public long? DayOfMonth { get; set; } /// - /// The month to bill on from 1-12. If not provided, this will default to the month the - /// cadence was created. + /// The month to bill on from 1-12. If not provided, this defaults to the month the cadence + /// was created. /// [JsonProperty("month_of_year")] [STJS.JsonPropertyName("month_of_year")] @@ -28,7 +28,7 @@ public class CadenceCreateBillingCycleYearOptions : INestedOptions /// /// The time at which the billing cycle ends. This field is optional, and if not provided, - /// it will default to the time at which the cadence was created in UTC timezone. + /// it defaults to the time at which the cadence was created in UTC timezone. /// [JsonProperty("time")] [STJS.JsonPropertyName("time")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreatePayerOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreatePayerOptions.cs index df62eee353..e9527d5163 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreatePayerOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreatePayerOptions.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Billing public class CadenceCreatePayerOptions : INestedOptions { /// - /// The ID of the Billing Profile object which determines how a bill will be paid. + /// The ID of the Billing Profile object which determines how a bill is paid. /// [JsonProperty("billing_profile")] [STJS.JsonPropertyName("billing_profile")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateSettingsBillOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateSettingsBillOptions.cs index c65de3ce14..00f3d68523 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateSettingsBillOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateSettingsBillOptions.cs @@ -17,7 +17,7 @@ public class CadenceCreateSettingsBillOptions : INestedOptions, IHasId /// /// An optional field to specify the version of the Settings to use. If not provided, this - /// will always default to the live version any time the settings are used. + /// defaults to the live version any time the settings are used. /// [JsonProperty("version")] [STJS.JsonPropertyName("version")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateSettingsCollectionOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateSettingsCollectionOptions.cs index 988541366a..2fcce09d8a 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateSettingsCollectionOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceCreateSettingsCollectionOptions.cs @@ -17,7 +17,7 @@ public class CadenceCreateSettingsCollectionOptions : INestedOptions, IHasId /// /// An optional field to specify the version of the Settings to use. If not provided, this - /// will always default to the live version any time the settings are used. + /// defaults to the live version any time the settings are used. /// [JsonProperty("version")] [STJS.JsonPropertyName("version")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdatePayerOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdatePayerOptions.cs index 4db2c85146..76b765bdb5 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdatePayerOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdatePayerOptions.cs @@ -9,7 +9,7 @@ namespace Stripe.V2.Billing public class CadenceUpdatePayerOptions : INestedOptions { /// - /// The ID of the Billing Profile object which determines how a bill will be paid. + /// The ID of the Billing Profile object which determines how a bill is paid. /// [JsonProperty("billing_profile")] [STJS.JsonPropertyName("billing_profile")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsBillOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsBillOptions.cs index df7f9264f9..21551729cc 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsBillOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsBillOptions.cs @@ -16,11 +16,10 @@ public class CadenceUpdateSettingsBillOptions : INestedOptions, IHasId public string Id { get; set; } /// - /// An optional field to specify the version of Settings to use. If not provided, this will - /// always default to the live_version specified on the setting, any time the - /// settings are used. Using a specific version here will prevent the settings from - /// updating, and is discouraged for cadences. To clear a pinned version, set the version to - /// null. + /// An optional field to specify the version of Settings to use. If not provided, this + /// defaults to the live_version specified on the setting, any time the settings are + /// used. Using a specific version here prevents the settings from updating, and is + /// discouraged for cadences. To clear a pinned version, set the version to null. /// [JsonProperty("version")] [STJS.JsonPropertyName("version")] diff --git a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsCollectionOptions.cs b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsCollectionOptions.cs index 1e084cff71..a37f490218 100644 --- a/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsCollectionOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Cadences/CadenceUpdateSettingsCollectionOptions.cs @@ -16,11 +16,10 @@ public class CadenceUpdateSettingsCollectionOptions : INestedOptions, IHasId public string Id { get; set; } /// - /// An optional field to specify the version of Settings to use. If not provided, this will - /// always default to the live_version specified on the setting, any time the - /// settings are used. Using a specific version here will prevent the settings from - /// updating, and is discouraged for cadences. To clear a pinned version, set the version to - /// null. + /// An optional field to specify the version of Settings to use. If not provided, this + /// defaults to the live_version specified on the setting, any time the settings are + /// used. Using a specific version here prevents the settings from updating, and is + /// discouraged for cadences. To clear a pinned version, set the version to null. /// [JsonProperty("version")] [STJS.JsonPropertyName("version")] diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateOptions.cs index 13805c518e..5b2bbbc261 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreateOptions.cs @@ -9,9 +9,9 @@ namespace Stripe.V2.Billing public class CollectionSettingCreateOptions : BaseOptions { /// - /// Either automatic, or send_invoice. When charging automatically, Stripe will attempt to - /// pay this bill at the end of the period using the payment method attached to the payer - /// profile. When sending an invoice, Stripe will email your payer profile an invoice with + /// Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay + /// this bill at the end of the period using the payment method attached to the billing + /// profile. When sending an invoice, Stripe emails your billing profile an invoice with /// payment instructions. Defaults to automatic. /// One of: automatic, or send_invoice. /// diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsKonbiniOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsKonbiniOptions.cs new file mode 100644 index 0000000000..8c3f3ff61e --- /dev/null +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsKonbiniOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class CollectionSettingCreatePaymentMethodOptionsKonbiniOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsOptions.cs index 25f573973d..0d7f583ce9 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsOptions.cs @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Billing { - using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; using STJS = System.Text.Json.Serialization; @@ -43,14 +42,14 @@ public class CollectionSettingCreatePaymentMethodOptionsOptions : INestedOptions /// [JsonProperty("konbini")] [STJS.JsonPropertyName("konbini")] - public Dictionary Konbini { get; set; } + public CollectionSettingCreatePaymentMethodOptionsKonbiniOptions Konbini { get; set; } /// /// This sub-hash contains details about the SEPA Direct Debit payment method options. /// [JsonProperty("sepa_debit")] [STJS.JsonPropertyName("sepa_debit")] - public Dictionary SepaDebit { get; set; } + public CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } /// /// This sub-hash contains details about the ACH direct debit payment method options. diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions.cs new file mode 100644 index 0000000000..6edca7e4cb --- /dev/null +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class CollectionSettingCreatePaymentMethodOptionsSepaDebitOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateOptions.cs index 2a276b99ef..d6ad9d339a 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdateOptions.cs @@ -9,9 +9,9 @@ namespace Stripe.V2.Billing public class CollectionSettingUpdateOptions : BaseOptions { /// - /// Either automatic, or send_invoice. When charging automatically, Stripe will attempt to - /// pay this bill at the end of the period using the payment method attached to the payer - /// profile. When sending an invoice, Stripe will email your payer profile an invoice with + /// Either automatic, or send_invoice. When charging automatically, Stripe attempts to pay + /// this bill at the end of the period using the payment method attached to the billing + /// profile. When sending an invoice, Stripe emails your billing profile an invoice with /// payment instructions. /// One of: automatic, or send_invoice. /// @@ -37,8 +37,8 @@ public class CollectionSettingUpdateOptions : BaseOptions /// /// Optionally change the live version of the CollectionSetting. Billing Cadences and other - /// objects that refer to this CollectionSetting will use this version when no overrides are - /// set. Providing live_version = "latest" will set the CollectionSetting's + /// objects that refer to this CollectionSetting uses this version when no overrides are + /// set. Providing live_version = "latest" sets the CollectionSetting's /// live_version to its latest version. /// [JsonProperty("live_version")] diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions.cs new file mode 100644 index 0000000000..cd4302fb77 --- /dev/null +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsOptions.cs index 1bd2d08f8f..8f68ca0643 100644 --- a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsOptions.cs @@ -1,7 +1,6 @@ // File generated from our OpenAPI spec namespace Stripe.V2.Billing { - using System.Collections.Generic; using Newtonsoft.Json; using Stripe.Infrastructure; using STJS = System.Text.Json.Serialization; @@ -43,14 +42,14 @@ public class CollectionSettingUpdatePaymentMethodOptionsOptions : INestedOptions /// [JsonProperty("konbini")] [STJS.JsonPropertyName("konbini")] - public Dictionary Konbini { get; set; } + public CollectionSettingUpdatePaymentMethodOptionsKonbiniOptions Konbini { get; set; } /// /// This sub-hash contains details about the SEPA Direct Debit payment method options. /// [JsonProperty("sepa_debit")] [STJS.JsonPropertyName("sepa_debit")] - public Dictionary SepaDebit { get; set; } + public CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } /// /// This sub-hash contains details about the ACH direct debit payment method options. diff --git a/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions.cs new file mode 100644 index 0000000000..f5e6e23a9b --- /dev/null +++ b/src/Stripe.net/Services/V2/Billing/CollectionSettings/CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Billing +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class CollectionSettingUpdatePaymentMethodOptionsSepaDebitOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs index 218a315c11..17c17308c1 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateCancelOptions.cs @@ -9,8 +9,8 @@ namespace Stripe.V2.Billing public class MeterEventAdjustmentCreateCancelOptions : INestedOptions { /// - /// Unique identifier for the event. You can only cancel events within 24 hours of Stripe - /// receiving them. + /// The identifier that was originally assigned to the meter event. You can only cancel + /// events within 24 hours of Stripe receiving them. /// [JsonProperty("identifier")] [STJS.JsonPropertyName("identifier")] diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs index 2e0c733b99..9c82f4fe27 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventAdjustments/MeterEventAdjustmentCreateOptions.cs @@ -23,8 +23,7 @@ public class MeterEventAdjustmentCreateOptions : BaseOptions public string EventName { get; set; } /// - /// Specifies whether to cancel a single event or a range of events for a time period. Time - /// period cancellation is not supported yet. + /// Specifies the type of cancellation. Currently supports canceling a single event. /// [JsonProperty("type")] [STJS.JsonPropertyName("type")] diff --git a/src/Stripe.net/Services/V2/Billing/MeterEventSessions/MeterEventSessionService.cs b/src/Stripe.net/Services/V2/Billing/MeterEventSessions/MeterEventSessionService.cs index f8119c7394..4587e70fc5 100644 --- a/src/Stripe.net/Services/V2/Billing/MeterEventSessions/MeterEventSessionService.cs +++ b/src/Stripe.net/Services/V2/Billing/MeterEventSessions/MeterEventSessionService.cs @@ -20,8 +20,8 @@ internal MeterEventSessionService(IStripeClient client) /// /// Creates a meter event session to send usage on the high-throughput meter event stream. - /// Authentication tokens are only valid for 15 minutes, so you will need to create a new - /// meter event session when your token expires. + /// Authentication tokens are only valid for 15 minutes, so you need to create a new meter + /// event session when your token expires. /// public virtual MeterEventSession Create(MeterEventSessionCreateOptions options, RequestOptions requestOptions = null) { @@ -30,8 +30,8 @@ public virtual MeterEventSession Create(MeterEventSessionCreateOptions options, /// /// Creates a meter event session to send usage on the high-throughput meter event stream. - /// Authentication tokens are only valid for 15 minutes, so you will need to create a new - /// meter event session when your token expires. + /// Authentication tokens are only valid for 15 minutes, so you need to create a new meter + /// event session when your token expires. /// public virtual Task CreateAsync(MeterEventSessionCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/V2/Billing/Profiles/ProfileListOptions.cs b/src/Stripe.net/Services/V2/Billing/Profiles/ProfileListOptions.cs index 9376fc01f8..434e390bd6 100644 --- a/src/Stripe.net/Services/V2/Billing/Profiles/ProfileListOptions.cs +++ b/src/Stripe.net/Services/V2/Billing/Profiles/ProfileListOptions.cs @@ -35,7 +35,7 @@ public class ProfileListOptions : V2.ListOptions /// /// Filter billing profiles by status. Can be combined with all other filters. If not - /// provided, all billing profiles will be returned. + /// provided, all billing profiles are returned. /// One of: active, or inactive. /// [JsonProperty("status")] diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportCreateOptions.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportCreateOptions.cs new file mode 100644 index 0000000000..bfafdaba7b --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportCreateOptions.cs @@ -0,0 +1,35 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce.ProductCatalog +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ImportCreateOptions : BaseOptions, IHasMetadata + { + /// + /// The type of catalog data to import. + /// One of: inventory, pricing, or product. + /// + [JsonProperty("feed_type")] + [STJS.JsonPropertyName("feed_type")] + public string FeedType { get; set; } + + /// + /// Additional information about the import in a structured format. + /// + [JsonProperty("metadata")] + [STJS.JsonPropertyName("metadata")] + public Dictionary Metadata { get; set; } + + /// + /// The strategy for handling existing catalog data during import. + /// One of: replace, or upsert. + /// + [JsonProperty("mode")] + [STJS.JsonPropertyName("mode")] + public string Mode { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportGetOptions.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportGetOptions.cs new file mode 100644 index 0000000000..ca1735f434 --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportGetOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce.ProductCatalog +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ImportGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportListOptions.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportListOptions.cs new file mode 100644 index 0000000000..26fe8b5688 --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportListOptions.cs @@ -0,0 +1,69 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce.ProductCatalog +{ + using System; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ImportListOptions : V2.ListOptions + { + /// + /// Filter for objects created at the specified timestamp. Must be an RFC 3339 date & + /// time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created")] + [STJS.JsonPropertyName("created")] + public DateTime? Created { get; set; } + + /// + /// Filter for objects created after the specified timestamp. Must be an RFC 3339 date & + /// time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created_gt")] + [STJS.JsonPropertyName("created_gt")] + public DateTime? CreatedGt { get; set; } + + /// + /// Filter for objects created on or after the specified timestamp. Must be an RFC 3339 date + /// & time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created_gte")] + [STJS.JsonPropertyName("created_gte")] + public DateTime? CreatedGte { get; set; } + + /// + /// Filter for objects created before the specified timestamp. Must be an RFC 3339 date + /// & time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created_lt")] + [STJS.JsonPropertyName("created_lt")] + public DateTime? CreatedLt { get; set; } + + /// + /// Filter for objects created on or before the specified timestamp. Must be an RFC 3339 + /// date & time value, for example: 2022-09-18T13:22:00Z. + /// + [JsonProperty("created_lte")] + [STJS.JsonPropertyName("created_lte")] + public DateTime? CreatedLte { get; set; } + + /// + /// Filter by the type of feed data being imported. + /// One of: inventory, pricing, or product. + /// + [JsonProperty("feed_type")] + [STJS.JsonPropertyName("feed_type")] + public string FeedType { get; set; } + + /// + /// Filter by import status. + /// One of: awaiting_upload, failed, processing, succeeded, or + /// succeeded_with_errors. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public string Status { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportService.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportService.cs new file mode 100644 index 0000000000..1cf8dccc59 --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalog/Imports/ImportService.cs @@ -0,0 +1,87 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce.ProductCatalog +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class ImportService : Service + { + internal ImportService(ApiRequestor requestor) + : base(requestor) + { + } + + internal ImportService(IStripeClient client) + : base(client) + { + } + + /// + /// Creates a ProductCatalogImport. + /// + public virtual V2.Commerce.ProductCatalogImport Create(ImportCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/commerce/product_catalog/imports", options, requestOptions); + } + + /// + /// Creates a ProductCatalogImport. + /// + public virtual Task CreateAsync(ImportCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/commerce/product_catalog/imports", options, requestOptions, cancellationToken); + } + + /// + /// Retrieves a ProductCatalogImport by ID. + /// + public virtual V2.Commerce.ProductCatalogImport Get(string id, ImportGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/commerce/product_catalog/imports/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Retrieves a ProductCatalogImport by ID. + /// + public virtual Task GetAsync(string id, ImportGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/commerce/product_catalog/imports/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + + /// + /// Returns a list of ProductCatalogImport objects. + /// + public virtual V2.StripeList List(ImportListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/commerce/product_catalog/imports", options, requestOptions); + } + + /// + /// Returns a list of ProductCatalogImport objects. + /// + public virtual Task> ListAsync(ImportListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/commerce/product_catalog/imports", options, requestOptions, cancellationToken); + } + + /// + /// Returns a list of ProductCatalogImport objects. + /// + public virtual IEnumerable ListAutoPaging(ImportListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v2/commerce/product_catalog/imports", options, requestOptions); + } + + /// + /// Returns a list of ProductCatalogImport objects. + /// + public virtual IAsyncEnumerable ListAutoPagingAsync(ImportListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v2/commerce/product_catalog/imports", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2/Commerce/ProductCatalogService.cs b/src/Stripe.net/Services/V2/Commerce/ProductCatalogService.cs new file mode 100644 index 0000000000..8acb03286b --- /dev/null +++ b/src/Stripe.net/Services/V2/Commerce/ProductCatalogService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Commerce +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class ProductCatalogService : Service + { + private V2.Commerce.ProductCatalog.ImportService imports; + + internal ProductCatalogService(ApiRequestor requestor) + : base(requestor) + { + } + + internal ProductCatalogService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Commerce.ProductCatalog.ImportService Imports => this.imports ??= new V2.Commerce.ProductCatalog.ImportService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2/CommerceService.cs b/src/Stripe.net/Services/V2/CommerceService.cs new file mode 100644 index 0000000000..31e733ec93 --- /dev/null +++ b/src/Stripe.net/Services/V2/CommerceService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class CommerceService : Service + { + private V2.Commerce.ProductCatalogService productCatalog; + + internal CommerceService(ApiRequestor requestor) + : base(requestor) + { + } + + internal CommerceService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Commerce.ProductCatalogService ProductCatalog => this.productCatalog ??= new V2.Commerce.ProductCatalogService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenService.cs b/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenService.cs index 3f143c12b4..8b3cfb8f5f 100644 --- a/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenService.cs +++ b/src/Stripe.net/Services/V2/Core/Accounts/PersonTokens/PersonTokenService.cs @@ -20,7 +20,11 @@ internal PersonTokenService(IStripeClient client) } /// - /// Creates a Person Token associated with an Account. + /// Creates a single-use token that represents the details for a person. Use this when you + /// create or update persons associated with an Account v2. Learn more about account tokens. You can only + /// create person tokens with your application's publishable key and in live mode. You can + /// use your application's secret key to create person tokens only in test mode. /// public virtual V2.Core.AccountPersonToken Create(string id, PersonTokenCreateOptions options, RequestOptions requestOptions = null) { @@ -28,7 +32,11 @@ public virtual V2.Core.AccountPersonToken Create(string id, PersonTokenCreateOpt } /// - /// Creates a Person Token associated with an Account. + /// Creates a single-use token that represents the details for a person. Use this when you + /// create or update persons associated with an Account v2. Learn more about account tokens. You can only + /// create person tokens with your application's publishable key and in live mode. You can + /// use your application's secret key to create person tokens only in test mode. /// public virtual Task CreateAsync(string id, PersonTokenCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) { diff --git a/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateEndpointOptions.cs b/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateEndpointOptions.cs index 5c956ecfd9..7863f5abd3 100644 --- a/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateEndpointOptions.cs +++ b/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateEndpointOptions.cs @@ -10,6 +10,7 @@ public class BatchJobCreateEndpointOptions : INestedOptions { /// /// The HTTP method to use when calling the endpoint. + /// One of: delete, or post. /// [JsonProperty("http_method")] [STJS.JsonPropertyName("http_method")] diff --git a/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateOptions.cs b/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateOptions.cs index 5c1a30ed4c..bfe7bd1750 100644 --- a/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/BatchJobs/BatchJobCreateOptions.cs @@ -25,7 +25,7 @@ public class BatchJobCreateOptions : BaseOptions, IHasMetadata public long? MaximumRps { get; set; } /// - /// The metadata of the BatchJob object. + /// The metadata of the batch_job. /// [JsonProperty("metadata")] [STJS.JsonPropertyName("metadata")] diff --git a/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountCreateOptions.cs b/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountCreateOptions.cs index ab1f22b367..1a6981e62d 100644 --- a/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountCreateOptions.cs +++ b/src/Stripe.net/Services/V2/Core/Vault/GbBankAccounts/GbBankAccountCreateOptions.cs @@ -17,7 +17,7 @@ public class GbBankAccountCreateOptions : BaseOptions /// /// Closed Enum. The type of the bank account (checking or savings). - /// One of: checking, or savings. + /// One of: checking, futsu, savings, or toza. /// [JsonProperty("bank_account_type")] [STJS.JsonPropertyName("bank_account_type")] diff --git a/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunCreateOptions.cs b/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunCreateOptions.cs new file mode 100644 index 0000000000..68851c1c90 --- /dev/null +++ b/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunCreateOptions.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class QueryRunCreateOptions : BaseOptions + { + /// + /// Optional settings to customize the results of the QueryRun. + /// + [JsonProperty("result_options")] + [STJS.JsonPropertyName("result_options")] + public QueryRunCreateResultOptionsOptions ResultOptions { get; set; } + + /// + /// The SQL to execute. + /// + [JsonProperty("sql")] + [STJS.JsonPropertyName("sql")] + public string Sql { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunCreateResultOptionsOptions.cs b/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunCreateResultOptionsOptions.cs new file mode 100644 index 0000000000..cacd60a1a1 --- /dev/null +++ b/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunCreateResultOptionsOptions.cs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class QueryRunCreateResultOptionsOptions : INestedOptions + { + /// + /// If set, the generated results file will be compressed into a ZIP folder. This is useful + /// for reducing file size and download time for large results. + /// + [JsonProperty("compress_file")] + [STJS.JsonPropertyName("compress_file")] + public bool? CompressFile { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunGetOptions.cs b/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunGetOptions.cs new file mode 100644 index 0000000000..2b9e594ec3 --- /dev/null +++ b/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunGetOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class QueryRunGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunService.cs b/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunService.cs new file mode 100644 index 0000000000..1469edac01 --- /dev/null +++ b/src/Stripe.net/Services/V2/Data/Reporting/QueryRuns/QueryRunService.cs @@ -0,0 +1,60 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data.Reporting +{ + using System; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class QueryRunService : Service + { + internal QueryRunService(ApiRequestor requestor) + : base(requestor) + { + } + + internal QueryRunService(IStripeClient client) + : base(client) + { + } + + /// + /// Creates a query run to execute ad-hoc SQL and returns a QueryRun object to track + /// progress and retrieve results. + /// + public virtual QueryRun Create(QueryRunCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/data/reporting/query_runs", options, requestOptions); + } + + /// + /// Creates a query run to execute ad-hoc SQL and returns a QueryRun object to track + /// progress and retrieve results. + /// + public virtual Task CreateAsync(QueryRunCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/data/reporting/query_runs", options, requestOptions, cancellationToken); + } + + /// + /// Fetches the current state and details of a previously created QueryRun. If the + /// QueryRun has succeeded, the endpoint will provide details for how to retrieve the + /// results. + /// + public virtual QueryRun Get(string id, QueryRunGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/data/reporting/query_runs/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Fetches the current state and details of a previously created QueryRun. If the + /// QueryRun has succeeded, the endpoint will provide details for how to retrieve the + /// results. + /// + public virtual Task GetAsync(string id, QueryRunGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/data/reporting/query_runs/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2/Data/ReportingService.cs b/src/Stripe.net/Services/V2/Data/ReportingService.cs new file mode 100644 index 0000000000..744cfe8b76 --- /dev/null +++ b/src/Stripe.net/Services/V2/Data/ReportingService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Data +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class ReportingService : Service + { + private V2.Data.Reporting.QueryRunService queryRuns; + + internal ReportingService(ApiRequestor requestor) + : base(requestor) + { + } + + internal ReportingService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Data.Reporting.QueryRunService QueryRuns => this.queryRuns ??= new V2.Data.Reporting.QueryRunService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2/DatumService.cs b/src/Stripe.net/Services/V2/DatumService.cs new file mode 100644 index 0000000000..bedfe79a88 --- /dev/null +++ b/src/Stripe.net/Services/V2/DatumService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class DatumService : Service + { + private V2.Data.ReportingService reporting; + + internal DatumService(ApiRequestor requestor) + : base(requestor) + { + } + + internal DatumService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Data.ReportingService Reporting => this.reporting ??= new V2.Data.ReportingService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2/Extend/WorkflowRuns/WorkflowRunGetOptions.cs b/src/Stripe.net/Services/V2/Extend/WorkflowRuns/WorkflowRunGetOptions.cs new file mode 100644 index 0000000000..94ef8987fd --- /dev/null +++ b/src/Stripe.net/Services/V2/Extend/WorkflowRuns/WorkflowRunGetOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class WorkflowRunGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Extend/WorkflowRuns/WorkflowRunListOptions.cs b/src/Stripe.net/Services/V2/Extend/WorkflowRuns/WorkflowRunListOptions.cs new file mode 100644 index 0000000000..544208a5f5 --- /dev/null +++ b/src/Stripe.net/Services/V2/Extend/WorkflowRuns/WorkflowRunListOptions.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class WorkflowRunListOptions : V2.ListOptions + { + /// + /// When retrieving Workflow Runs, include only those with the specified status values. If + /// not specified, all Runs are returned. + /// One of: failed, started, or succeeded. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public List Status { get; set; } + + /// + /// When retrieving Workflow Runs, include only those associated with the Workflows + /// specified. If not specified, all Runs are returned. + /// + [JsonProperty("workflow")] + [STJS.JsonPropertyName("workflow")] + public List Workflow { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Extend/WorkflowRuns/WorkflowRunService.cs b/src/Stripe.net/Services/V2/Extend/WorkflowRuns/WorkflowRunService.cs new file mode 100644 index 0000000000..003da0d6b8 --- /dev/null +++ b/src/Stripe.net/Services/V2/Extend/WorkflowRuns/WorkflowRunService.cs @@ -0,0 +1,71 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class WorkflowRunService : Service + { + internal WorkflowRunService(ApiRequestor requestor) + : base(requestor) + { + } + + internal WorkflowRunService(IStripeClient client) + : base(client) + { + } + + /// + /// Retrieves the details of a Workflow Run by ID. + /// + public virtual WorkflowRun Get(string id, WorkflowRunGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/extend/workflow_runs/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Retrieves the details of a Workflow Run by ID. + /// + public virtual Task GetAsync(string id, WorkflowRunGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/extend/workflow_runs/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + + /// + /// List all Workflow Runs. + /// + public virtual V2.StripeList List(WorkflowRunListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/extend/workflow_runs", options, requestOptions); + } + + /// + /// List all Workflow Runs. + /// + public virtual Task> ListAsync(WorkflowRunListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/extend/workflow_runs", options, requestOptions, cancellationToken); + } + + /// + /// List all Workflow Runs. + /// + public virtual IEnumerable ListAutoPaging(WorkflowRunListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v2/extend/workflow_runs", options, requestOptions); + } + + /// + /// List all Workflow Runs. + /// + public virtual IAsyncEnumerable ListAutoPagingAsync(WorkflowRunListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v2/extend/workflow_runs", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowGetOptions.cs b/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowGetOptions.cs new file mode 100644 index 0000000000..bb34fc3980 --- /dev/null +++ b/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowGetOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class WorkflowGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowInvokeOptions.cs b/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowInvokeOptions.cs new file mode 100644 index 0000000000..310cd1c5b0 --- /dev/null +++ b/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowInvokeOptions.cs @@ -0,0 +1,19 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class WorkflowInvokeOptions : BaseOptions + { + /// + /// Parameters used to invoke the Workflow Run. + /// + [JsonProperty("input_parameters")] + [STJS.JsonPropertyName("input_parameters")] + public Dictionary InputParameters { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowListOptions.cs b/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowListOptions.cs new file mode 100644 index 0000000000..c5a933cf86 --- /dev/null +++ b/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowListOptions.cs @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class WorkflowListOptions : V2.ListOptions + { + /// + /// When retrieving Workflows, include only those with the specified status values. If not + /// specified, all Workflows in active and inactive status are returned. + /// One of: active, archived, draft, or inactive. + /// + [JsonProperty("status")] + [STJS.JsonPropertyName("status")] + public List Status { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowService.cs b/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowService.cs new file mode 100644 index 0000000000..d4db99cbbb --- /dev/null +++ b/src/Stripe.net/Services/V2/Extend/Workflows/WorkflowService.cs @@ -0,0 +1,87 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Extend +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class WorkflowService : Service + { + internal WorkflowService(ApiRequestor requestor) + : base(requestor) + { + } + + internal WorkflowService(IStripeClient client) + : base(client) + { + } + + /// + /// Retrieves the details of a Workflow by ID. + /// + public virtual Workflow Get(string id, WorkflowGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/extend/workflows/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Retrieves the details of a Workflow by ID. + /// + public virtual Task GetAsync(string id, WorkflowGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/extend/workflows/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + + /// + /// Invokes an on-demand Workflow with parameters, to launch a new Workflow Run. + /// + public virtual WorkflowRun Invoke(string id, WorkflowInvokeOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/extend/workflows/{WebUtility.UrlEncode(id)}/invoke", options, requestOptions); + } + + /// + /// Invokes an on-demand Workflow with parameters, to launch a new Workflow Run. + /// + public virtual Task InvokeAsync(string id, WorkflowInvokeOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/extend/workflows/{WebUtility.UrlEncode(id)}/invoke", options, requestOptions, cancellationToken); + } + + /// + /// List all Workflows. + /// + public virtual V2.StripeList List(WorkflowListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/extend/workflows", options, requestOptions); + } + + /// + /// List all Workflows. + /// + public virtual Task> ListAsync(WorkflowListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/extend/workflows", options, requestOptions, cancellationToken); + } + + /// + /// List all Workflows. + /// + public virtual IEnumerable ListAutoPaging(WorkflowListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v2/extend/workflows", options, requestOptions); + } + + /// + /// List all Workflows. + /// + public virtual IAsyncEnumerable ListAutoPagingAsync(WorkflowListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v2/extend/workflows", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2/ExtendService.cs b/src/Stripe.net/Services/V2/ExtendService.cs new file mode 100644 index 0000000000..30625bf5ff --- /dev/null +++ b/src/Stripe.net/Services/V2/ExtendService.cs @@ -0,0 +1,29 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class ExtendService : Service + { + private V2.Extend.WorkflowService workflows; + private V2.Extend.WorkflowRunService workflowRuns; + + internal ExtendService(ApiRequestor requestor) + : base(requestor) + { + } + + internal ExtendService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Extend.WorkflowService Workflows => this.workflows ??= new V2.Extend.WorkflowService( + this.Requestor); + + public virtual V2.Extend.WorkflowRunService WorkflowRuns => this.workflowRuns ??= new V2.Extend.WorkflowRunService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogListOptions.cs b/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogListOptions.cs new file mode 100644 index 0000000000..7d032c3915 --- /dev/null +++ b/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogListOptions.cs @@ -0,0 +1,30 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class ActivityLogListOptions : V2.ListOptions + { + /// + /// Filter results to only include activity logs for the specified action group types. + /// One of: api_key, user_invite, or user_roles. + /// + [JsonProperty("action_groups")] + [STJS.JsonPropertyName("action_groups")] + public List ActionGroups { get; set; } + + /// + /// Filter results to only include activity logs for the specified action types. + /// One of: api_key_created, api_key_deleted, api_key_updated, + /// api_key_viewed, user_invite_accepted, user_invite_created, + /// user_invite_deleted, user_roles_deleted, or user_roles_updated. + /// + [JsonProperty("actions")] + [STJS.JsonPropertyName("actions")] + public List Actions { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogService.cs b/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogService.cs new file mode 100644 index 0000000000..98f4fc3779 --- /dev/null +++ b/src/Stripe.net/Services/V2/Iam/ActivityLogs/ActivityLogService.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Iam +{ + using System; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class ActivityLogService : Service + { + internal ActivityLogService(ApiRequestor requestor) + : base(requestor) + { + } + + internal ActivityLogService(IStripeClient client) + : base(client) + { + } + + /// + /// List activity logs of an account. + /// + public virtual V2.StripeList List(ActivityLogListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/iam/activity_logs", options, requestOptions); + } + + /// + /// List activity logs of an account. + /// + public virtual Task> ListAsync(ActivityLogListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/iam/activity_logs", options, requestOptions, cancellationToken); + } + + /// + /// List activity logs of an account. + /// + public virtual IEnumerable ListAutoPaging(ActivityLogListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v2/iam/activity_logs", options, requestOptions); + } + + /// + /// List activity logs of an account. + /// + public virtual IAsyncEnumerable ListAutoPagingAsync(ActivityLogListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v2/iam/activity_logs", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2/IamService.cs b/src/Stripe.net/Services/V2/IamService.cs new file mode 100644 index 0000000000..b5dcd6075f --- /dev/null +++ b/src/Stripe.net/Services/V2/IamService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class IamService : Service + { + private V2.Iam.ActivityLogService activityLogs; + + internal IamService(ApiRequestor requestor) + : base(requestor) + { + } + + internal IamService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Iam.ActivityLogService ActivityLogs => this.activityLogs ??= new V2.Iam.ActivityLogService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentCreatePayoutMethodDataBankAccountOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentCreatePayoutMethodDataBankAccountOptions.cs index 4793c1ea54..0fac830756 100644 --- a/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentCreatePayoutMethodDataBankAccountOptions.cs +++ b/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentCreatePayoutMethodDataBankAccountOptions.cs @@ -17,7 +17,7 @@ public class OutboundSetupIntentCreatePayoutMethodDataBankAccountOptions : INest /// /// Closed Enum. The type of the bank account (checking or savings). - /// One of: checking, or savings. + /// One of: checking, futsu, savings, or toza. /// [JsonProperty("bank_account_type")] [STJS.JsonPropertyName("bank_account_type")] diff --git a/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentUpdatePayoutMethodDataBankAccountOptions.cs b/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentUpdatePayoutMethodDataBankAccountOptions.cs index ed838587b7..65b68aafa7 100644 --- a/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentUpdatePayoutMethodDataBankAccountOptions.cs +++ b/src/Stripe.net/Services/V2/MoneyManagement/OutboundSetupIntents/OutboundSetupIntentUpdatePayoutMethodDataBankAccountOptions.cs @@ -17,7 +17,7 @@ public class OutboundSetupIntentUpdatePayoutMethodDataBankAccountOptions : INest /// /// Closed Enum. The type of the bank account (checking or savings). - /// One of: checking, or savings. + /// One of: checking, futsu, savings, or toza. /// [JsonProperty("bank_account_type")] [STJS.JsonPropertyName("bank_account_type")] diff --git a/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileGetOptions.cs b/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileGetOptions.cs new file mode 100644 index 0000000000..672fa21c4c --- /dev/null +++ b/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileGetOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Network +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class BusinessProfileGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileMeOptions.cs b/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileMeOptions.cs new file mode 100644 index 0000000000..2a18cb8e3c --- /dev/null +++ b/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileMeOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Network +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class BusinessProfileMeOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileService.cs b/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileService.cs new file mode 100644 index 0000000000..6b768b2371 --- /dev/null +++ b/src/Stripe.net/Services/V2/Network/BusinessProfiles/BusinessProfileService.cs @@ -0,0 +1,54 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.Network +{ + using System; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class BusinessProfileService : Service + { + internal BusinessProfileService(ApiRequestor requestor) + : base(requestor) + { + } + + internal BusinessProfileService(IStripeClient client) + : base(client) + { + } + + /// + /// Retrieve a Stripe profile by its Network ID. + /// + public virtual BusinessProfile Get(string id, BusinessProfileGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/network/business_profiles/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Retrieve a Stripe profile by its Network ID. + /// + public virtual Task GetAsync(string id, BusinessProfileGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/network/business_profiles/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + + /// + /// Retrieve the Stripe profile associated with the requesting merchant and livemode. + /// + public virtual BusinessProfile Me(BusinessProfileMeOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/network/business_profiles/me", options, requestOptions); + } + + /// + /// Retrieve the Stripe profile associated with the requesting merchant and livemode. + /// + public virtual Task MeAsync(BusinessProfileMeOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/network/business_profiles/me", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2/NetworkService.cs b/src/Stripe.net/Services/V2/NetworkService.cs new file mode 100644 index 0000000000..9fb31d4542 --- /dev/null +++ b/src/Stripe.net/Services/V2/NetworkService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class NetworkService : Service + { + private V2.Network.BusinessProfileService businessProfiles; + + internal NetworkService(ApiRequestor requestor) + : base(requestor) + { + } + + internal NetworkService(IStripeClient client) + : base(client) + { + } + + public virtual V2.Network.BusinessProfileService BusinessProfiles => this.businessProfiles ??= new V2.Network.BusinessProfileService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementConfirmOptions.cs b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementConfirmOptions.cs new file mode 100644 index 0000000000..3eaf368539 --- /dev/null +++ b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementConfirmOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AgreementConfirmOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementCreateOptions.cs b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementCreateOptions.cs new file mode 100644 index 0000000000..6d0c000adc --- /dev/null +++ b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementCreateOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AgreementCreateOptions : BaseOptions + { + /// + /// The Network ID of the orchestrator to create an agreement with. + /// + [JsonProperty("orchestrator")] + [STJS.JsonPropertyName("orchestrator")] + public string Orchestrator { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementGetOptions.cs b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementGetOptions.cs new file mode 100644 index 0000000000..ab4ab9b580 --- /dev/null +++ b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementGetOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AgreementGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementListOptions.cs b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementListOptions.cs new file mode 100644 index 0000000000..38f7b1d0d4 --- /dev/null +++ b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementListOptions.cs @@ -0,0 +1,18 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AgreementListOptions : V2.ListOptions + { + /// + /// Filter list to Orchestrated Commerce Agreements with a specific counterparty. + /// + [JsonProperty("network_business_profile")] + [STJS.JsonPropertyName("network_business_profile")] + public string NetworkBusinessProfile { get; set; } + } +} diff --git a/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementService.cs b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementService.cs new file mode 100644 index 0000000000..194e2efa4f --- /dev/null +++ b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementService.cs @@ -0,0 +1,119 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + public class AgreementService : Service + { + internal AgreementService(ApiRequestor requestor) + : base(requestor) + { + } + + internal AgreementService(IStripeClient client) + : base(client) + { + } + + /// + /// Confirm an Agreement. + /// + public virtual Agreement Confirm(string id, AgreementConfirmOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/orchestrated_commerce/agreements/{WebUtility.UrlEncode(id)}/confirm", options, requestOptions); + } + + /// + /// Confirm an Agreement. + /// + public virtual Task ConfirmAsync(string id, AgreementConfirmOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/orchestrated_commerce/agreements/{WebUtility.UrlEncode(id)}/confirm", options, requestOptions, cancellationToken); + } + + /// + /// Create a new Agreement. + /// + public virtual Agreement Create(AgreementCreateOptions options, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/orchestrated_commerce/agreements", options, requestOptions); + } + + /// + /// Create a new Agreement. + /// + public virtual Task CreateAsync(AgreementCreateOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/orchestrated_commerce/agreements", options, requestOptions, cancellationToken); + } + + /// + /// Retrieve an Agreement by ID. + /// + public virtual Agreement Get(string id, AgreementGetOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Get, $"/v2/orchestrated_commerce/agreements/{WebUtility.UrlEncode(id)}", options, requestOptions); + } + + /// + /// Retrieve an Agreement by ID. + /// + public virtual Task GetAsync(string id, AgreementGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Get, $"/v2/orchestrated_commerce/agreements/{WebUtility.UrlEncode(id)}", options, requestOptions, cancellationToken); + } + + /// + /// List Agreements for the profile associated with the authenticated merchant. + /// + public virtual V2.StripeList List(AgreementListOptions options = null, RequestOptions requestOptions = null) + { + return this.Request>(BaseAddress.Api, HttpMethod.Get, $"/v2/orchestrated_commerce/agreements", options, requestOptions); + } + + /// + /// List Agreements for the profile associated with the authenticated merchant. + /// + public virtual Task> ListAsync(AgreementListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync>(BaseAddress.Api, HttpMethod.Get, $"/v2/orchestrated_commerce/agreements", options, requestOptions, cancellationToken); + } + + /// + /// List Agreements for the profile associated with the authenticated merchant. + /// + public virtual IEnumerable ListAutoPaging(AgreementListOptions options = null, RequestOptions requestOptions = null) + { + return this.ListRequestAutoPaging($"/v2/orchestrated_commerce/agreements", options, requestOptions); + } + + /// + /// List Agreements for the profile associated with the authenticated merchant. + /// + public virtual IAsyncEnumerable ListAutoPagingAsync(AgreementListOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.ListRequestAutoPagingAsync($"/v2/orchestrated_commerce/agreements", options, requestOptions, cancellationToken); + } + + /// + /// Terminate an Agreement. + /// + public virtual Agreement Terminate(string id, AgreementTerminateOptions options = null, RequestOptions requestOptions = null) + { + return this.Request(BaseAddress.Api, HttpMethod.Post, $"/v2/orchestrated_commerce/agreements/{WebUtility.UrlEncode(id)}/terminate", options, requestOptions); + } + + /// + /// Terminate an Agreement. + /// + public virtual Task TerminateAsync(string id, AgreementTerminateOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default) + { + return this.RequestAsync(BaseAddress.Api, HttpMethod.Post, $"/v2/orchestrated_commerce/agreements/{WebUtility.UrlEncode(id)}/terminate", options, requestOptions, cancellationToken); + } + } +} diff --git a/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementTerminateOptions.cs b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementTerminateOptions.cs new file mode 100644 index 0000000000..6b2be4c155 --- /dev/null +++ b/src/Stripe.net/Services/V2/OrchestratedCommerce/Agreements/AgreementTerminateOptions.cs @@ -0,0 +1,12 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2.OrchestratedCommerce +{ + using Newtonsoft.Json; + using Stripe.Infrastructure; + using STJS = System.Text.Json.Serialization; + + [STJS.JsonConverter(typeof(STJStripeOptionsConverter))] + public class AgreementTerminateOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/V2/OrchestratedCommerceService.cs b/src/Stripe.net/Services/V2/OrchestratedCommerceService.cs new file mode 100644 index 0000000000..f59b105794 --- /dev/null +++ b/src/Stripe.net/Services/V2/OrchestratedCommerceService.cs @@ -0,0 +1,25 @@ +// File generated from our OpenAPI spec +namespace Stripe.V2 +{ + using System; + using System.Threading; + using System.Threading.Tasks; + + public class OrchestratedCommerceService : Service + { + private V2.OrchestratedCommerce.AgreementService agreements; + + internal OrchestratedCommerceService(ApiRequestor requestor) + : base(requestor) + { + } + + internal OrchestratedCommerceService(IStripeClient client) + : base(client) + { + } + + public virtual V2.OrchestratedCommerce.AgreementService Agreements => this.agreements ??= new V2.OrchestratedCommerce.AgreementService( + this.Requestor); + } +} diff --git a/src/Stripe.net/Services/V2Services.cs b/src/Stripe.net/Services/V2Services.cs index ff001493b1..8cf0290a75 100644 --- a/src/Stripe.net/Services/V2Services.cs +++ b/src/Stripe.net/Services/V2Services.cs @@ -8,8 +8,14 @@ namespace Stripe public class V2Services : Service { private V2.BillingService billing; + private V2.CommerceService commerce; private V2.CoreService core; + private V2.DatumService data; + private V2.ExtendService extend; + private V2.IamService iam; private V2.MoneyManagementService moneyManagement; + private V2.NetworkService network; + private V2.OrchestratedCommerceService orchestratedCommerce; private V2.TestHelperService testHelpers; internal V2Services(ApiRequestor requestor) @@ -25,12 +31,30 @@ internal V2Services(IStripeClient client) public virtual V2.BillingService Billing => this.billing ??= new V2.BillingService( this.Requestor); + public virtual V2.CommerceService Commerce => this.commerce ??= new V2.CommerceService( + this.Requestor); + public virtual V2.CoreService Core => this.core ??= new V2.CoreService( this.Requestor); + public virtual V2.DatumService Data => this.data ??= new V2.DatumService( + this.Requestor); + + public virtual V2.ExtendService Extend => this.extend ??= new V2.ExtendService( + this.Requestor); + + public virtual V2.IamService Iam => this.iam ??= new V2.IamService( + this.Requestor); + public virtual V2.MoneyManagementService MoneyManagement => this.moneyManagement ??= new V2.MoneyManagementService( this.Requestor); + public virtual V2.NetworkService Network => this.network ??= new V2.NetworkService( + this.Requestor); + + public virtual V2.OrchestratedCommerceService OrchestratedCommerce => this.orchestratedCommerce ??= new V2.OrchestratedCommerceService( + this.Requestor); + public virtual V2.TestHelperService TestHelpers => this.testHelpers ??= new V2.TestHelperService( this.Requestor); } diff --git a/src/StripeTests/Services/GeneratedExamplesTest.cs b/src/StripeTests/Services/GeneratedExamplesTest.cs index 1088c8a212..7f2ff83f47 100644 --- a/src/StripeTests/Services/GeneratedExamplesTest.cs +++ b/src/StripeTests/Services/GeneratedExamplesTest.cs @@ -6680,6 +6680,66 @@ public void TestV2BillingProfilePost2() this.AssertRequest(HttpMethod.Post, "/v2/billing/profiles/id_123"); } + [Fact] + public void TestV2CommerceProductCatalogImportGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.StripeList productCatalogImports = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public void TestV2CommerceProductCatalogImportPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var options = new Stripe.V2.Commerce.ProductCatalog.ImportCreateOptions + { + FeedType = "pricing", + Metadata = new Dictionary + { + { "key", "metadata" }, + }, + Mode = "upsert", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = service + .Create(options); + this.AssertRequest( + HttpMethod.Post, + "/v2/commerce/product_catalog/imports"); + } + + [Fact] + public void TestV2CommerceProductCatalogImportGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.commerce.product_catalog_import\",\"created\":\"1970-01-12T21:42:34.472Z\",\"feed_type\":\"pricing\",\"id\":\"obj_123\",\"livemode\":true,\"metadata\":{\"key\":\"metadata\"},\"status\":\"awaiting_upload\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Commerce.ProductCatalog.Imports; + Stripe.V2.Commerce.ProductCatalogImport productCatalogImport = service + .Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/commerce/product_catalog/imports/id_123"); + } + [Fact] public void TestV2CoreAccountGet() { @@ -6970,7 +7030,7 @@ public void TestV2CoreBatchJobPost() { Endpoint = new Stripe.V2.Core.BatchJobCreateEndpointOptions { - HttpMethod = "post", + HttpMethod = "delete", Path = BatchJobEndpointPath.V1SubscriptionScheduleCreate, }, Metadata = new Dictionary @@ -7189,7 +7249,7 @@ public void TestV2CoreVaultGbBankAccountGet() HttpMethod.Get, "/v2/core/vault/gb_bank_accounts", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; Stripe.V2.StripeList gbBankAccounts = service @@ -7206,7 +7266,7 @@ public void TestV2CoreVaultGbBankAccountPost() HttpMethod.Post, "/v2/core/vault/gb_bank_accounts", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var options = new Stripe.V2.Core.Vault.GbBankAccountCreateOptions { Currency = "usd", @@ -7227,7 +7287,7 @@ public void TestV2CoreVaultGbBankAccountGet2() HttpMethod.Get, "/v2/core/vault/gb_bank_accounts/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Get( @@ -7244,7 +7304,7 @@ public void TestV2CoreVaultGbBankAccountPost2() HttpMethod.Post, "/v2/core/vault/gb_bank_accounts/id_123/acknowledge_confirmation_of_payee", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service @@ -7261,7 +7321,7 @@ public void TestV2CoreVaultGbBankAccountPost3() HttpMethod.Post, "/v2/core/vault/gb_bank_accounts/id_123/archive", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service.Archive( @@ -7278,7 +7338,7 @@ public void TestV2CoreVaultGbBankAccountPost4() HttpMethod.Post, "/v2/core/vault/gb_bank_accounts/id_123/initiate_confirmation_of_payee", (HttpStatusCode)200, - "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"savings\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); + "{\"object\":\"v2.core.vault.gb_bank_account\",\"archived\":true,\"bank_account_type\":\"toza\",\"bank_name\":\"bank_name\",\"confirmation_of_payee\":{\"result\":{\"created\":\"1970-01-12T21:42:34.472Z\",\"match_result\":\"unavailable\",\"matched\":{},\"message\":\"message\",\"provided\":{\"business_type\":\"personal\",\"name\":\"name\"}},\"status\":\"awaiting_acknowledgement\"},\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"last4\":\"last4\",\"livemode\":true,\"supported_currencies\":[\"supported_currencies\"]}"); var client = new StripeClient(this.Requestor); var service = client.V2.Core.Vault.GbBankAccounts; Stripe.V2.Core.Vault.GbBankAccount gbBankAccount = service @@ -7414,6 +7474,154 @@ public void TestV2CoreVaultUsBankAccountPost5() "/v2/core/vault/us_bank_accounts/id_123/send_microdeposits"); } + [Fact] + public void TestV2DataReportingQueryRunPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/data/reporting/query_runs", + (HttpStatusCode)200, + "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); + var options = new Stripe.V2.Data.Reporting.QueryRunCreateOptions + { + Sql = "sql", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Data.Reporting.QueryRuns; + Stripe.V2.Data.Reporting.QueryRun queryRun = service.Create( + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/data/reporting/query_runs"); + } + + [Fact] + public void TestV2DataReportingQueryRunGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/data/reporting/query_runs/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.data.reporting.query_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"sql\":\"sql\",\"status\":\"failed\",\"status_details\":{\"key\":{}}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Data.Reporting.QueryRuns; + Stripe.V2.Data.Reporting.QueryRun queryRun = service.Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/data/reporting/query_runs/id_123"); + } + + [Fact] + public void TestV2ExtendWorkflowGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/extend/workflows", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Extend.Workflows; + Stripe.V2.StripeList workflows = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows"); + } + + [Fact] + public void TestV2ExtendWorkflowGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/extend/workflows/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.extend.workflow\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"draft\",\"title\":\"title\",\"triggers\":[{\"type\":\"event_trigger\"}]}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Extend.Workflows; + Stripe.V2.Extend.Workflow workflow = service.Get("id_123"); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflows/id_123"); + } + + [Fact] + public void TestV2ExtendWorkflowPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/extend/workflows/id_123/invoke", + (HttpStatusCode)200, + "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); + var options = new Stripe.V2.Extend.WorkflowInvokeOptions + { + InputParameters = new Dictionary + { + { "int_key", 123 }, + { "string_key", "value" }, + { "boolean_key", true }, + { + "object_key", new Dictionary + { + { "object_int_key", 123 }, + { "object_string_key", "value" }, + { "object_boolean_key", true }, + } + }, + { "array_key", new List { 1, 2, 3 } }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Extend.Workflows; + Stripe.V2.Extend.WorkflowRun workflowRun = service.Invoke( + "id_123", + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/extend/workflows/id_123/invoke"); + } + + [Fact] + public void TestV2ExtendWorkflowRunGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/extend/workflow_runs", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Extend.WorkflowRuns; + Stripe.V2.StripeList workflowRuns = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/extend/workflow_runs"); + } + + [Fact] + public void TestV2ExtendWorkflowRunGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/extend/workflow_runs/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.extend.workflow_run\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"failed\",\"status_transitions\":{},\"trigger\":{\"type\":\"event_trigger\"},\"workflow\":\"workflow\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Extend.WorkflowRuns; + Stripe.V2.Extend.WorkflowRun workflowRun = service.Get("id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/extend/workflow_runs/id_123"); + } + + [Fact] + public void TestV2IamActivityLogGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/iam/activity_logs", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.iam.activity_log\",\"actor\":{\"type\":\"api_key\"},\"context\":\"context\",\"created\":\"1970-01-12T21:42:34.472Z\",\"details\":{\"type\":\"api_key\"},\"id\":\"obj_123\",\"livemode\":true,\"type\":\"api_key_created\"}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Iam.ActivityLogs; + Stripe.V2.StripeList activityLogs = service + .List(); + this.AssertRequest(HttpMethod.Get, "/v2/iam/activity_logs"); + } + [Fact] public void TestV2MoneyManagementAdjustmentGet() { @@ -8123,7 +8331,7 @@ public void TestV2MoneyManagementTransactionGet() HttpMethod.Get, "/v2/money_management/transactions", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"stripe_fee\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.Transactions; Stripe.V2.StripeList transactions = service @@ -8140,7 +8348,7 @@ public void TestV2MoneyManagementTransactionGet2() HttpMethod.Get, "/v2/money_management/transactions/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"received_debit\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}"); + "{\"object\":\"v2.money_management.transaction\",\"amount\":{\"currency\":\"USD\",\"value\":96},\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"category\":\"stripe_fee\",\"created\":\"1970-01-12T21:42:34.472Z\",\"financial_account\":\"financial_account\",\"id\":\"obj_123\",\"livemode\":true,\"status\":\"pending\",\"status_transitions\":{}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.Transactions; Stripe.V2.MoneyManagement.Transaction transaction = service.Get( @@ -8157,7 +8365,7 @@ public void TestV2MoneyManagementTransactionEntryGet() HttpMethod.Get, "/v2/money_management/transaction_entries", (HttpStatusCode)200, - "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); + "{\"data\":[{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"stripe_fee\",\"financial_account\":\"financial_account\"}}],\"next_page_url\":null,\"previous_page_url\":null}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.TransactionEntries; Stripe.V2.StripeList transactionEntries = service @@ -8174,7 +8382,7 @@ public void TestV2MoneyManagementTransactionEntryGet2() HttpMethod.Get, "/v2/money_management/transaction_entries/id_123", (HttpStatusCode)200, - "{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"received_debit\",\"financial_account\":\"financial_account\"}}"); + "{\"object\":\"v2.money_management.transaction_entry\",\"balance_impact\":{\"available\":{\"currency\":\"USD\",\"value\":35},\"inbound_pending\":{\"currency\":\"USD\",\"value\":11},\"outbound_pending\":{\"currency\":\"USD\",\"value\":60}},\"created\":\"1970-01-12T21:42:34.472Z\",\"effective_at\":\"1970-01-03T20:38:28.043Z\",\"id\":\"obj_123\",\"livemode\":true,\"transaction\":\"transaction\",\"transaction_details\":{\"category\":\"stripe_fee\",\"financial_account\":\"financial_account\"}}"); var client = new StripeClient(this.Requestor); var service = client.V2.MoneyManagement.TransactionEntries; Stripe.V2.MoneyManagement.TransactionEntry transactionEntry = service @@ -8184,6 +8392,128 @@ public void TestV2MoneyManagementTransactionEntryGet2() "/v2/money_management/transaction_entries/id_123"); } + [Fact] + public void TestV2NetworkBusinessProfileGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/network/business_profiles/me", + (HttpStatusCode)200, + "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Network.BusinessProfiles; + Stripe.V2.Network.BusinessProfile businessProfile = service.Me(); + this.AssertRequest( + HttpMethod.Get, + "/v2/network/business_profiles/me"); + } + + [Fact] + public void TestV2NetworkBusinessProfileGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/network/business_profiles/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.network.business_profile\",\"display_name\":\"display_name\",\"id\":\"obj_123\",\"livemode\":true,\"username\":\"username\"}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.Network.BusinessProfiles; + Stripe.V2.Network.BusinessProfile businessProfile = service.Get( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/network/business_profiles/id_123"); + } + + [Fact] + public void TestV2OrchestratedCommerceAgreementGet() + { + this.StubRequest( + HttpMethod.Get, + "/v2/orchestrated_commerce/agreements", + (HttpStatusCode)200, + "{\"data\":[{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}],\"next_page_url\":null,\"previous_page_url\":null}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.StripeList agreements = service + .List(); + this.AssertRequest( + HttpMethod.Get, + "/v2/orchestrated_commerce/agreements"); + } + + [Fact] + public void TestV2OrchestratedCommerceAgreementPost() + { + this.StubRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements", + (HttpStatusCode)200, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + var options = new Stripe.V2.OrchestratedCommerce.AgreementCreateOptions + { + Orchestrator = "orchestrator", + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.OrchestratedCommerce.Agreement agreement = service.Create( + options); + this.AssertRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements"); + } + + [Fact] + public void TestV2OrchestratedCommerceAgreementGet2() + { + this.StubRequest( + HttpMethod.Get, + "/v2/orchestrated_commerce/agreements/id_123", + (HttpStatusCode)200, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.OrchestratedCommerce.Agreement agreement = service.Get( + "id_123"); + this.AssertRequest( + HttpMethod.Get, + "/v2/orchestrated_commerce/agreements/id_123"); + } + + [Fact] + public void TestV2OrchestratedCommerceAgreementPost2() + { + this.StubRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements/id_123/confirm", + (HttpStatusCode)200, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.OrchestratedCommerce.Agreement agreement = service + .Confirm("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements/id_123/confirm"); + } + + [Fact] + public void TestV2OrchestratedCommerceAgreementPost3() + { + this.StubRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements/id_123/terminate", + (HttpStatusCode)200, + "{\"object\":\"v2.orchestrated_commerce.agreement\",\"created\":\"1970-01-12T21:42:34.472Z\",\"id\":\"obj_123\",\"initiated_by\":\"seller\",\"livemode\":true,\"orchestrator_details\":{\"name\":\"name\",\"network_business_profile\":\"network_business_profile\"},\"seller_details\":{\"network_business_profile\":\"network_business_profile\"},\"status\":\"partially_confirmed\",\"status_transitions\":{}}"); + var client = new StripeClient(this.Requestor); + var service = client.V2.OrchestratedCommerce.Agreements; + Stripe.V2.OrchestratedCommerce.Agreement agreement = service + .Terminate("id_123"); + this.AssertRequest( + HttpMethod.Post, + "/v2/orchestrated_commerce/agreements/id_123/terminate"); + } + [Fact] public void TestV2TestHelpersFinancialAddressPost() { @@ -8295,6 +8625,46 @@ public void TestBlockedByStripeError() "/v2/core/vault/us_bank_accounts"); } + [Fact] + public void TestCannotProceedError() + { + this.StubRequest( + HttpMethod.Post, + "/v2/extend/workflows/id_123/invoke", + (HttpStatusCode)400, + "{\"error\":{\"type\":\"cannot_proceed\",\"code\":\"default_payout_method_cannot_be_archived\"}}"); + var exception = Assert.Throws( + () => + { + var options = new Stripe.V2.Extend.WorkflowInvokeOptions + { + InputParameters = new Dictionary + { + { "int_key", 123 }, + { "string_key", "value" }, + { "boolean_key", true }, + { + "object_key", new Dictionary + { + { "object_int_key", 123 }, + { "object_string_key", "value" }, + { "object_boolean_key", true }, + } + }, + { "array_key", new List { 1, 2, 3 } }, + }, + }; + var client = new StripeClient(this.Requestor); + var service = client.V2.Extend.Workflows; + Stripe.V2.Extend.WorkflowRun workflowRun = service.Invoke( + "id_123", + options); + }); + this.AssertRequest( + HttpMethod.Post, + "/v2/extend/workflows/id_123/invoke"); + } + [Fact] public void TestControlledByAlternateResourceError() {