-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1965 from stripe/cjavilla/add-pause-collection
Add support for `PauseCollection` on `Subscription`
- Loading branch information
Showing
4 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/Stripe.net/Entities/Subscriptions/SubscriptionPauseCollection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace Stripe | ||
{ | ||
using System; | ||
using Newtonsoft.Json; | ||
using Stripe.Infrastructure; | ||
|
||
public class SubscriptionPauseCollection : StripeEntity<SubscriptionPauseCollection> | ||
{ | ||
/// <summary> | ||
/// The payment collection behavior for this subscription while paused. | ||
/// One of <c>keep_as_draft</c>, <c>mark_uncollectible</c>, or <c>void</c>. | ||
/// </summary> | ||
[JsonProperty("behavior")] | ||
public string Behavior { get; set; } | ||
|
||
/// <summary> | ||
/// The time after which the subscription will resume collecting payments. | ||
/// </summary> | ||
[JsonProperty("resumes_at")] | ||
[JsonConverter(typeof(DateTimeConverter))] | ||
public DateTime? ResumesAt { get; set; } | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/Stripe.net/Services/Subscriptions/SubscriptionPauseCollectionOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace Stripe | ||
{ | ||
using System; | ||
using Newtonsoft.Json; | ||
using Stripe.Infrastructure; | ||
|
||
public class SubscriptionPauseCollectionOptions : INestedOptions | ||
{ | ||
/// <summary> | ||
/// The payment collection behavior for this subscription while paused. | ||
/// One of <c>keep_as_draft</c>, <c>mark_uncollectible</c>, or <c>void</c>. | ||
/// </summary> | ||
[JsonProperty("behavior")] | ||
public string Behavior { get; set; } | ||
|
||
/// <summary> | ||
/// The time after which the subscription will resume collecting payments. | ||
/// </summary> | ||
[JsonProperty("resumes_at")] | ||
[JsonConverter(typeof(DateTimeConverter))] | ||
public DateTime? ResumesAt { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters