From d1d4dec7e381fcbe383eb1093b1d58a5983c3173 Mon Sep 17 00:00:00 2001 From: Remi Jannel Date: Mon, 23 Nov 2020 20:14:50 -0800 Subject: [PATCH] Codegen for openapi 35ca85b --- src/Stripe.net/Entities/Customers/Customer.cs | 12 ++++--- src/Stripe.net/Entities/Invoices/Invoice.cs | 32 +++++++++++++++++++ .../PaymentIntentPaymentMethodOptions.cs | 3 ++ ...mentIntentPaymentMethodOptionsSepaDebit.cs | 11 +++++++ ...entMethodOptionsSepaDebitMandateOptions.cs | 7 ++++ .../Services/Invoices/InvoiceCreateOptions.cs | 7 ++++ .../Services/Invoices/InvoiceUpdateOptions.cs | 7 ++++ ...aymentIntentPaymentMethodOptionsOptions.cs | 7 ++++ ...odOptionsSepaDebitMandateOptionsOptions.cs | 7 ++++ ...entPaymentMethodOptionsSepaDebitOptions.cs | 14 ++++++++ .../SetupIntentPaymentMethodOptionsOptions.cs | 2 +- 11 files changed, 104 insertions(+), 5 deletions(-) create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebit.cs create mode 100644 src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs create mode 100644 src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs diff --git a/src/Stripe.net/Entities/Customers/Customer.cs b/src/Stripe.net/Entities/Customers/Customer.cs index a217a85d32..17b2579d5d 100644 --- a/src/Stripe.net/Entities/Customers/Customer.cs +++ b/src/Stripe.net/Entities/Customers/Customer.cs @@ -102,10 +102,14 @@ public IPaymentSource DefaultSource public bool? Deleted { get; set; } /// - /// When the customer's latest invoice is billed by charging automatically, delinquent is - /// true if the invoice's latest charge is failed. When the customer's latest invoice is - /// billed by sending an invoice, delinquent is true if the invoice is not paid by its due - /// date. + /// When the customer's latest invoice is billed by charging automatically, + /// delinquent is true if the invoice's latest charge failed. When the + /// customer's latest invoice is billed by sending an invoice, delinquent is + /// true if the invoice isn't paid by its due date. + /// + /// If an invoice is marked uncollectible by dunning, + /// delinquent doesn't get reset to false. /// [JsonProperty("delinquent")] public bool Delinquent { get; set; } diff --git a/src/Stripe.net/Entities/Invoices/Invoice.cs b/src/Stripe.net/Entities/Invoices/Invoice.cs index b90c9d7286..cb3e68c4e6 100644 --- a/src/Stripe.net/Entities/Invoices/Invoice.cs +++ b/src/Stripe.net/Entities/Invoices/Invoice.cs @@ -35,6 +35,38 @@ public class Invoice : StripeEntity, IHasId, IHasMetadata, IHasObject [JsonProperty("account_name")] public string AccountName { get; set; } + #region Expandable AccountTaxIds + + /// + /// (IDs of the AccountTaxIds) + /// The account tax IDs associated with the invoice. Only editable when the invoice is a + /// draft. + /// + [JsonIgnore] + public List AccountTaxIdIds + { + get => this.InternalAccountTaxIds?.Select((x) => x.Id).ToList(); + set => this.InternalAccountTaxIds = SetExpandableArrayIds(value); + } + + /// + /// (Expanded) + /// The account tax IDs associated with the invoice. Only editable when the invoice is a + /// draft. + /// + /// For more information, see the expand documentation. + /// + [JsonIgnore] + public List AccountTaxIds + { + get => this.InternalAccountTaxIds?.Select((x) => x.ExpandedObject).ToList(); + set => this.InternalAccountTaxIds = SetExpandableArrayObjects(value); + } + + [JsonProperty("account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter))] + internal List> InternalAccountTaxIds { get; set; } + #endregion + /// /// Final amount due at this time for this invoice. If the invoice's total is smaller than /// the minimum charge amount, for example, or if there is account credit that can be diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs index 39e1b8df64..70a7c292d4 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptions.cs @@ -20,6 +20,9 @@ public class PaymentIntentPaymentMethodOptions : StripeEntity + { + [JsonProperty("mandate_options")] + public PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions MandateOptions { get; set; } + } +} diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions.cs new file mode 100644 index 0000000000..83de0f3eb9 --- /dev/null +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions : StripeEntity + { + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs index 8da771abc5..a5fda527ca 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs @@ -8,6 +8,13 @@ namespace Stripe public class InvoiceCreateOptions : BaseOptions, IHasMetadata { + /// + /// The account tax IDs associated with the invoice. Only editable when the invoice is a + /// draft. + /// + [JsonProperty("account_tax_ids")] + public List AccountTaxIds { get; set; } + /// /// A fee in %s that will be applied to the invoice and transferred to the application /// owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account diff --git a/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs index fe2cd94cba..f402f51ea1 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs @@ -8,6 +8,13 @@ namespace Stripe public class InvoiceUpdateOptions : BaseOptions, IHasMetadata { + /// + /// The account tax IDs associated with the invoice. Only editable when the invoice is a + /// draft. + /// + [JsonProperty("account_tax_ids")] + public List AccountTaxIds { get; set; } + /// /// A fee in %s that will be applied to the invoice and transferred to the application /// owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs index a287832ad2..02fc827848 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsOptions.cs @@ -39,6 +39,13 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions [JsonProperty("p24")] public PaymentIntentPaymentMethodOptionsP24Options P24 { get; set; } + /// + /// If this is a sepa_debit PaymentIntent, this sub-hash contains details about the + /// SEPA Debit payment method options. + /// + [JsonProperty("sepa_debit")] + public PaymentIntentPaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; } + /// /// If this is a sofort PaymentMethod, this sub-hash contains details about the /// SOFORT payment method options. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs new file mode 100644 index 0000000000..68167cabf4 --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions.cs @@ -0,0 +1,7 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + public class PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions : INestedOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs new file mode 100644 index 0000000000..ead2878c0a --- /dev/null +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentPaymentMethodOptionsSepaDebitOptions.cs @@ -0,0 +1,14 @@ +// File generated from our OpenAPI spec +namespace Stripe +{ + using Newtonsoft.Json; + + public class PaymentIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions + { + /// + /// Additional fields for Mandate creation. + /// + [JsonProperty("mandate_options")] + public PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions MandateOptions { get; set; } + } +} diff --git a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs index 8706cc54b4..ffca63e3e2 100644 --- a/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs +++ b/src/Stripe.net/Services/SetupIntents/SetupIntentPaymentMethodOptionsOptions.cs @@ -13,7 +13,7 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions /// /// If this is a sepa_debit SetupIntent, this sub-hash contains details about the - /// Sepa Debit payment method options. + /// SEPA Debit payment method options. /// [JsonProperty("sepa_debit")] public SetupIntentPaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; }