mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
cloud SDK with billing
This commit is contained in:
@@ -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