diff --git a/package.json b/package.json index a5bf309c..3bbe99c0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@internxt/sdk", "author": "Internxt ", - "version": "1.17.13", + "version": "1.17.14", "description": "An sdk for interacting with Internxt's services", "repository": { "type": "git", diff --git a/src/drive/payments/index.ts b/src/drive/payments/index.ts index 10c60011..baf9cd5c 100644 --- a/src/drive/payments/index.ts +++ b/src/drive/payments/index.ts @@ -127,8 +127,12 @@ export class Payments { ); } - public applyCancellationTrial(subscriptionId: string): Promise { - return this.client.post('/customer/cancellation-trial', { subscriptionId }, this.headers()); + public applyCancellationTrial(): Promise { + return this.client.post('/customer/cancellation-trial', {}, this.headers()); + } + + public cancelSubscriptionEarly(): Promise<{ clientSecret: string }> { + return this.client.post('/subscriptions/cancel-early-charge', {}, this.headers()); } public cancelSubscription(userType?: UserType): Promise { diff --git a/src/drive/payments/types/types.ts b/src/drive/payments/types/types.ts index 92733bbe..9bb36a88 100644 --- a/src/drive/payments/types/types.ts +++ b/src/drive/payments/types/types.ts @@ -74,6 +74,7 @@ export type Commitment = { remainingMonths?: number; cancellationDate?: string; isElegibleForCancellation?: boolean; + earlyCancellationFee?: number; }; export type StoragePlan = { @@ -92,6 +93,10 @@ export type StoragePlan = { cancellationTrial: { redeemed: boolean; }; + cancellation: { + scheduled: boolean; + cancelAt?: number; + }; storageLimit: number; amountOfSeats: number; isAppSumo?: boolean;