mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
support taxid and budget while creating
This commit is contained in:
1 parent
708517a0d0
commit
eec5c6f1f3
2 files changed
+15
-9
No files matched your search
@@ -309,7 +309,9 @@ export class Billing {
|
||||
paymentMethodId: string,
|
||||
billingAddressId: string = undefined,
|
||||
couponId: string = undefined,
|
||||
invites: Array<string> = []
|
||||
invites: Array<string> = [],
|
||||
budget: number = undefined,
|
||||
taxId: string = undefined
|
||||
): Promise<Organization | CreateOrgAuth> {
|
||||
const path = `/organizations`;
|
||||
const params = {
|
||||
@@ -319,7 +321,9 @@ export class Billing {
|
||||
paymentMethodId,
|
||||
billingAddressId,
|
||||
couponId,
|
||||
invites
|
||||
invites,
|
||||
budget,
|
||||
taxId
|
||||
};
|
||||
const uri = new URL(this.client.config.endpoint + path);
|
||||
return await this.client.call(
|
||||
|
||||
@@ -119,7 +119,9 @@
|
||||
paymentMethodId,
|
||||
null,
|
||||
couponData?.code,
|
||||
collaborators
|
||||
collaborators,
|
||||
billingBudget,
|
||||
taxId
|
||||
);
|
||||
|
||||
if (!isOrganization(org) && org.status == 402) {
|
||||
@@ -129,9 +131,9 @@
|
||||
}
|
||||
|
||||
//Add budget
|
||||
if (billingBudget && isOrganization(org)) {
|
||||
await sdk.forConsole.billing.updateBudget(org.$id, billingBudget, [75]);
|
||||
}
|
||||
// if (billingBudget && isOrganization(org)) {
|
||||
// await sdk.forConsole.billing.updateBudget(org.$id, billingBudget, [75]);
|
||||
// }
|
||||
|
||||
// //Add coupon
|
||||
// if (couponData?.code) {
|
||||
@@ -154,9 +156,9 @@
|
||||
// }
|
||||
|
||||
// Add tax ID
|
||||
if (taxId) {
|
||||
await sdk.forConsole.billing.updateTaxId(org.$id, taxId);
|
||||
}
|
||||
// if (taxId) {
|
||||
// await sdk.forConsole.billing.updateTaxId(org.$id, taxId);
|
||||
// }
|
||||
}
|
||||
|
||||
trackEvent(Submit.OrganizationCreate, {
|
||||
|
||||
Reference in new issue
Block a user