Skip to content

Commit 9d4a95c

Browse files
chore(clerk-js,types): Clean up deprecated attribute (#6788)
1 parent de90ede commit 9d4a95c

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

.changeset/seven-buses-teach.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@clerk/clerk-js': minor
3+
'@clerk/types': minor
4+
---
5+
6+
[Billing Beta] Remove deprecated `subscription` attribute from Billing

packages/clerk-js/src/core/resources/CommercePayment.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ export class CommercePayment extends BaseResource implements CommercePaymentReso
1919
paidAt?: Date;
2020
updatedAt!: Date;
2121
paymentSource!: CommercePaymentSourceResource;
22-
/**
23-
* @deprecated
24-
*/
25-
subscription!: CommerceSubscriptionItemResource;
2622
subscriptionItem!: CommerceSubscriptionItemResource;
2723
chargeType!: CommercePaymentChargeType;
2824
status!: CommercePaymentStatus;
@@ -43,7 +39,6 @@ export class CommercePayment extends BaseResource implements CommercePaymentReso
4339
this.failedAt = data.failed_at ? unixEpochToDate(data.failed_at) : undefined;
4440
this.updatedAt = unixEpochToDate(data.updated_at);
4541
this.paymentSource = new CommercePaymentSource(data.payment_source);
46-
this.subscription = new CommerceSubscriptionItem(data.subscription);
4742
this.subscriptionItem = new CommerceSubscriptionItem(data.subscription_item);
4843
this.chargeType = data.charge_type;
4944
this.status = data.status;

packages/types/src/commerce.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -645,16 +645,6 @@ export interface CommercePaymentResource extends ClerkResource {
645645
* ```
646646
*/
647647
paymentSource: CommercePaymentSourceResource;
648-
/**
649-
* @deprecated Use `subscriptionItem` instead.
650-
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
651-
* It is advised to pin the SDK version and the clerk-js version to a specific version to avoid breaking changes.
652-
* @example
653-
* ```tsx
654-
* <ClerkProvider clerkJsVersion="x.x.x" />
655-
* ```
656-
*/
657-
subscription: CommerceSubscriptionItemResource;
658648
/**
659649
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change.
660650
* It is advised to pin the SDK version and the clerk-js version to a specific version to avoid breaking changes.

0 commit comments

Comments
 (0)