mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
cloud SDK with billing
This commit is contained in:
1 parent
cc469a50ee
commit
a85b105505
2 files changed
+22
-1
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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 };
|
||||
Reference in new issue
Block a user