Skip to content

Commit

Permalink
Codegen for openapi 35ca85b
Browse files Browse the repository at this point in the history
  • Loading branch information
remi-stripe committed Nov 24, 2020
1 parent f609a82 commit d1d4dec
Show file tree
Hide file tree
Showing 11 changed files with 104 additions and 5 deletions.
12 changes: 8 additions & 4 deletions src/Stripe.net/Entities/Customers/Customer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,14 @@ public IPaymentSource DefaultSource
public bool? Deleted { get; set; }

/// <summary>
/// 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,
/// <c>delinquent</c> is <c>true</c> if the invoice's latest charge failed. When the
/// customer's latest invoice is billed by sending an invoice, <c>delinquent</c> is
/// <c>true</c> if the invoice isn't paid by its due date.
///
/// If an invoice is marked uncollectible by <a
/// href="https://stripe.com/docs/billing/automatic-collection">dunning</a>,
/// <c>delinquent</c> doesn't get reset to <c>false</c>.
/// </summary>
[JsonProperty("delinquent")]
public bool Delinquent { get; set; }
Expand Down
32 changes: 32 additions & 0 deletions src/Stripe.net/Entities/Invoices/Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,38 @@ public class Invoice : StripeEntity<Invoice>, IHasId, IHasMetadata, IHasObject
[JsonProperty("account_name")]
public string AccountName { get; set; }

#region Expandable AccountTaxIds

/// <summary>
/// (IDs of the AccountTaxIds)
/// The account tax IDs associated with the invoice. Only editable when the invoice is a
/// draft.
/// </summary>
[JsonIgnore]
public List<string> AccountTaxIdIds
{
get => this.InternalAccountTaxIds?.Select((x) => x.Id).ToList();
set => this.InternalAccountTaxIds = SetExpandableArrayIds<AccountTaxId>(value);
}

/// <summary>
/// (Expanded)
/// The account tax IDs associated with the invoice. Only editable when the invoice is a
/// draft.
///
/// For more information, see the <a href="https://stripe.com/docs/expand">expand documentation</a>.
/// </summary>
[JsonIgnore]
public List<TaxId> AccountTaxIds
{
get => this.InternalAccountTaxIds?.Select((x) => x.ExpandedObject).ToList();
set => this.InternalAccountTaxIds = SetExpandableArrayObjects(value);
}

[JsonProperty("account_tax_ids", ItemConverterType = typeof(ExpandableFieldConverter<AccountTaxId>))]
internal List<ExpandableField<TaxId>> InternalAccountTaxIds { get; set; }
#endregion

/// <summary>
/// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public class PaymentIntentPaymentMethodOptions : StripeEntity<PaymentIntentPayme
[JsonProperty("p24")]
public PaymentIntentPaymentMethodOptionsP24 P24 { get; set; }

[JsonProperty("sepa_debit")]
public PaymentIntentPaymentMethodOptionsSepaDebit SepaDebit { get; set; }

[JsonProperty("sofort")]
public PaymentIntentPaymentMethodOptionsSofort Sofort { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentIntentPaymentMethodOptionsSepaDebit : StripeEntity<PaymentIntentPaymentMethodOptionsSepaDebit>
{
[JsonProperty("mandate_options")]
public PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions MandateOptions { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe
{
public class PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions : StripeEntity<PaymentIntentPaymentMethodOptionsSepaDebitMandateOptions>
{
}
}
7 changes: 7 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ namespace Stripe

public class InvoiceCreateOptions : BaseOptions, IHasMetadata
{
/// <summary>
/// The account tax IDs associated with the invoice. Only editable when the invoice is a
/// draft.
/// </summary>
[JsonProperty("account_tax_ids")]
public List<string> AccountTaxIds { get; set; }

/// <summary>
/// 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
Expand Down
7 changes: 7 additions & 0 deletions src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ namespace Stripe

public class InvoiceUpdateOptions : BaseOptions, IHasMetadata
{
/// <summary>
/// The account tax IDs associated with the invoice. Only editable when the invoice is a
/// draft.
/// </summary>
[JsonProperty("account_tax_ids")]
public List<string> AccountTaxIds { get; set; }

/// <summary>
/// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ public class PaymentIntentPaymentMethodOptionsOptions : INestedOptions
[JsonProperty("p24")]
public PaymentIntentPaymentMethodOptionsP24Options P24 { get; set; }

/// <summary>
/// If this is a <c>sepa_debit</c> PaymentIntent, this sub-hash contains details about the
/// SEPA Debit payment method options.
/// </summary>
[JsonProperty("sepa_debit")]
public PaymentIntentPaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; }

/// <summary>
/// If this is a <c>sofort</c> PaymentMethod, this sub-hash contains details about the
/// SOFORT payment method options.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// File generated from our OpenAPI spec
namespace Stripe
{
public class PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions : INestedOptions
{
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// File generated from our OpenAPI spec
namespace Stripe
{
using Newtonsoft.Json;

public class PaymentIntentPaymentMethodOptionsSepaDebitOptions : INestedOptions
{
/// <summary>
/// Additional fields for Mandate creation.
/// </summary>
[JsonProperty("mandate_options")]
public PaymentIntentPaymentMethodOptionsSepaDebitMandateOptionsOptions MandateOptions { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class SetupIntentPaymentMethodOptionsOptions : INestedOptions

/// <summary>
/// If this is a <c>sepa_debit</c> SetupIntent, this sub-hash contains details about the
/// Sepa Debit payment method options.
/// SEPA Debit payment method options.
/// </summary>
[JsonProperty("sepa_debit")]
public SetupIntentPaymentMethodOptionsSepaDebitOptions SepaDebit { get; set; }
Expand Down

0 comments on commit d1d4dec

Please sign in to comment.