Skip to content

Commit 441471e

Browse files
Add webhook event types for pending_updates
1 parent 6f29359 commit 441471e

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

src/Stripe.net/Constants/Events.cs

+12
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,18 @@ public static class Events
241241
/// </summary>
242242
public const string CustomerSubscriptionDeleted = "customer.subscription.deleted";
243243

244+
/// <summary>
245+
/// Occurs whenever a customer's subscription's pending update is
246+
/// applied, and the subscription is updated.
247+
/// </summary>
248+
public const string CustomerSubscriptionPendingUpdateApplied = "customer.subscription.pending_update_applied";
249+
250+
/// <summary>
251+
/// Occurs whenever a customer's subscription's pending update expires
252+
/// before the related invoice is paid.
253+
/// </summary>
254+
public const string CustomerSubscriptionPendingUpdateExpired = "customer.subscription.pending_update_expired";
255+
244256
/// <summary>
245257
/// Occurs three days before the trial period of a subscription is scheduled to end.
246258
/// </summary>

src/Stripe.net/Entities/Subscriptions/Subscription.cs

+8-7
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,20 @@ public class Subscription : StripeEntity<Subscription>, IHasId, IHasMetadata, IH
4646
public DateTime? CancelAt { get; set; }
4747

4848
/// <summary>
49-
/// If the subscription has been canceled with the <c>AtPeriodEnd</c> flag
50-
/// set to true, <c>CancelAtPeriodEnd</c> on the subscription will be true.
51-
/// You can use this attribute to determine whether a subscription that
52-
/// has a status of active is scheduled to be canceled at the end of
53-
/// the current period.
49+
/// If the subscription has been canceled with the
50+
/// <see cref="AtPeriodEnd" /> flag set to true,
51+
/// <see cref="CancelAtPeriodEnd" /> on the
52+
/// subscription will be true. You can use this attribute to determine
53+
/// whether a subscription that has a status of active is scheduled to
54+
/// be canceled at the end of the current period.
5455
/// </summary>
5556
[JsonProperty("cancel_at_period_end")]
5657
public bool CancelAtPeriodEnd { get; set; }
5758

5859
/// <summary>
5960
/// If the subscription has been canceled, the date of that
6061
/// cancellation. If the subscription was canceled with
61-
/// <c>CancelAtPeriodEnd</c>, <c>CanceledAt</c> will still reflect the
62+
/// <see cref="CancelAtPeriodEnd" />, <see cref="CanceledAt" /> will still reflect the
6263
/// date of the initial cancellation request, not the end of the
6364
/// subscription period when the subscription is automatically moved to
6465
/// a canceled state.
@@ -298,7 +299,7 @@ public SetupIntent PendingSetupIntent
298299

299300
/// <summary>
300301
/// If specified, deferred upgrade changes that will be applied to the
301-
/// subscription once the latest_invoice has been paid.
302+
/// subscription once the <see cref="LatestInvoice" /> has been paid.
302303
/// </summary>
303304
[JsonProperty("pending_update")]
304305
public SubscriptionPendingUpdate PendingUpdate { get; set; }

src/Stripe.net/Entities/Subscriptions/SubscriptionPendingUpdate.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class SubscriptionPendingUpdate : StripeEntity<SubscriptionPendingUpdate>
99
{
1010
/// <summary>
1111
/// If the update is applied, determines the date of the first full
12-
/// invoice, and, for plans with <c>month</c> or year <c>intervals</c>,
12+
/// invoice, and, for plans with <c>month</c> or <c>year</c> intervals,
1313
/// the day of the month for subsequent invoices.
1414
/// </summary>
1515
[JsonProperty("billing_cycle_anchor")]
@@ -41,7 +41,7 @@ public class SubscriptionPendingUpdate : StripeEntity<SubscriptionPendingUpdate>
4141
public DateTime? TrialEnd { get; set; }
4242

4343
/// <summary>
44-
/// Indicates if a <see cref="Plan" />’s <c>TrialPeriodDays</c> should
44+
/// Indicates if a <see cref="Plan" />’s <see cref="TrialPeriodDays"/> should
4545
/// be applied to the subscription. Setting <see cref="TrialEnd" /> per
4646
/// subscription is preferred, and this defaults to false. Setting this
4747
/// flag to true together with trial_end is not allowed.

0 commit comments

Comments
 (0)