cloud SDK with billing

This commit is contained in:
Damodar Lohani
2023-02-08 01:57:15 +00:00
parent cc469a50ee
commit a85b105505
2 changed files with 22 additions and 1 deletions
+16
View File
@@ -0,0 +1,16 @@
import type { Client } from "@aw-labs/appwrite-console";
export class Billing {
client: Client;
constructor(client: Client) {
this.client = client;
}
async createPaymentMethod(teamId: string) {
const path = `/teams/${teamId}/payment-methods`;
const params = {};
const uri = new URL(this.client.config.endpoint + path);
this.client.call('POST', uri, {}, params);
}
}
+6 -1
View File
@@ -48,4 +48,9 @@ const sdkForProject = {
users: new Users(clientProject)
};
export { sdkForConsole, sdkForProject, setProject };
const cloudSdk = {
...sdkForConsole,
billing: new Billing(clientConsole),
}
export { sdkForConsole, sdkForProject, cloudSdk, setProject };