diff --git a/package.json b/package.json index 79182be5..dfe60956 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@internxt/sdk", - "version": "1.4.61", + "version": "1.4.62", "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 69ad6db7..94b53c2d 100644 --- a/src/drive/payments/index.ts +++ b/src/drive/payments/index.ts @@ -82,8 +82,10 @@ export class Payments { }); } - public getPrices(): Promise { - return this.client.get('/prices', this.headers()); + public async getPrices(currency?: string): Promise { + const query = new URLSearchParams(); + if (currency !== undefined) query.set('currency', currency); + return this.client.get(`/prices?${query.toString()}`, this.headers()); } public requestPreventCancellation(): Promise { diff --git a/src/drive/payments/types.ts b/src/drive/payments/types.ts index 59a13d41..a69f625c 100644 --- a/src/drive/payments/types.ts +++ b/src/drive/payments/types.ts @@ -107,6 +107,7 @@ export interface DisplayPrice { bytes: number; interval: 'year' | 'month' | 'lifetime'; amount: number; + currency: string; } export interface CreateCheckoutSessionPayload { @@ -116,6 +117,7 @@ export interface CreateCheckoutSessionPayload { success_url: string; cancel_url: string; customer_email: string; + currency?: string; } export interface FreeTrialAvailable {