Skip to content

Commit 1e8ae12

Browse files
committed
update after rebase
1 parent 5801f2c commit 1e8ae12

13 files changed

+315
-174
lines changed

libs/payments/customer/src/lib/subscription.manager.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ describe('SubscriptionManager', () => {
423423
customerId: mockCustomer.id,
424424
subscriptionId: mockSubscription.id,
425425
stripeCouponId: mockCouponId,
426+
setCancelAtPeriodEnd: false,
426427
});
427428

428429
expect(subscriptionManager.retrieve).toHaveBeenCalledWith(
@@ -432,6 +433,7 @@ describe('SubscriptionManager', () => {
432433
mockSubscription.id,
433434
{
434435
discounts: [{ coupon: mockCouponId }],
436+
cancel_at_period_end: false,
435437
}
436438
);
437439
expect(result).toEqual(mockUpdatedResponse);

libs/payments/management/src/lib/churn-intervention.error.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,20 @@ export class ChurnInterventionProductIdentifierMissingError extends ChurnInterve
2424
this.name = 'ChurnInterventionProductIdentifierMissingError';
2525
}
2626
}
27+
28+
export class ChurnSubscriptionCustomerMismatchError extends ChurnInterventionError {
29+
constructor(
30+
uid: string,
31+
accountCustomer: string,
32+
subscriptionCustomer: string,
33+
subscriptionId: string
34+
) {
35+
super('Subscription customer does not match account customer', {
36+
uid,
37+
accountCustomer,
38+
subscriptionCustomer,
39+
subscriptionId,
40+
});
41+
this.name = 'ChurnSubscriptionCustomerMismatchError';
42+
}
43+
}

0 commit comments

Comments
 (0)