Skip to content

Commit

Permalink
Add CollectionMethod to InvoiceUpdateOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
cjavilla-stripe committed Jul 2, 2019
1 parent 77c7a3c commit aefacf9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Stripe.net/Enums/Billing.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
namespace Stripe
{
using System;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

// Deprecated. Please use CollectionMethod
/// <summary>
/// The field this enum was used for has been renamed to
/// <c>CollectionMethod</c> and now accepts string.
/// </summary>
[Obsolete("Use CollectionMethod instead")]
[JsonConverter(typeof(StringEnumConverter))]
public enum Billing
{
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 @@ -19,6 +19,13 @@ public class InvoiceUpdateOptions : BaseOptions
[JsonProperty("auto_advance")]
public bool? AutoAdvance { get; set; }

/// <summary>
/// Either <c>charge_automatically</c> or <c>send_invoice</c>. This
/// field can be updated only on <c>draft</c> invoices.
/// </summary>
[JsonProperty("collection_method")]
public string CollectionMethod { get; set; }

/// <summary>
/// A list of up to 4 custom fields to be displayed on the invoice.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public abstract class SubscriptionScheduleSharedOptions : BaseOptions
[JsonProperty("default_source")]
public string DefaultSourceId { get; set; }

/// <summary>
/// Either <c>charge_automatically</c>, or <c>send_invoice</c>. When
/// charging automatically, Stripe will attempt to pay the underlying
/// subscription at the end of each billing cycle using the default
Expand Down

0 comments on commit aefacf9

Please sign in to comment.