From f29ca9a8e9776e643aad723c268bb549d1a63f34 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Thu, 14 Nov 2024 12:59:39 +0545 Subject: [PATCH] update plan upgrade --- src/lib/sdk/billing.ts | 14 +- .../change-plan/+page.svelte | 126 +++++++++++------- 2 files changed, 91 insertions(+), 49 deletions(-) diff --git a/src/lib/sdk/billing.ts b/src/lib/sdk/billing.ts index f2428fd19..bee94ffc3 100644 --- a/src/lib/sdk/billing.ts +++ b/src/lib/sdk/billing.ts @@ -416,14 +416,22 @@ export class Billing { organizationId: string, billingPlan: string, paymentMethodId: string, - billingAddressId: string = undefined - ): Promise { + billingAddressId: string = undefined, + couponId: string = null, + invites: Array = [], + budget: number = undefined, + taxId: string = null + ): Promise { const path = `/organizations/${organizationId}/plan`; const params = { organizationId, billingPlan, paymentMethodId, - billingAddressId + billingAddressId, + couponId, + invites, + budget, + taxId }; const uri = new URL(this.client.config.endpoint + path); return await this.client.call( diff --git a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte index 3682491c7..573f1e9fb 100644 --- a/src/routes/(console)/organization-[organization]/change-plan/+page.svelte +++ b/src/routes/(console)/organization-[organization]/change-plan/+page.svelte @@ -1,5 +1,5 @@