mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
feat: create new billing endpoints
This commit is contained in:
@@ -702,6 +702,46 @@ export class Billing {
|
||||
);
|
||||
}
|
||||
|
||||
async getOrganizationPaymentMethod(
|
||||
organizationId: string,
|
||||
paymentMethodId: string
|
||||
): Promise<PaymentMethodData> {
|
||||
const path = `/organizations/${organizationId}/payment-methods/${paymentMethodId}`;
|
||||
const params = {
|
||||
organizationId,
|
||||
paymentMethodId
|
||||
};
|
||||
const uri = new URL(this.client.config.endpoint + path);
|
||||
return await this.client.call(
|
||||
'GET',
|
||||
uri,
|
||||
{
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
params
|
||||
);
|
||||
}
|
||||
|
||||
async getOrganizationBillingAddress(
|
||||
organizationId: string,
|
||||
billingAddressId: string
|
||||
): Promise<PaymentMethodData> {
|
||||
const path = `/organizations/${organizationId}/payment-methods/${billingAddressId}`;
|
||||
const params = {
|
||||
organizationId,
|
||||
billingAddressId
|
||||
};
|
||||
const uri = new URL(this.client.config.endpoint + path);
|
||||
return await this.client.call(
|
||||
'GET',
|
||||
uri,
|
||||
{
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
params
|
||||
);
|
||||
}
|
||||
|
||||
//ACCOUNT
|
||||
|
||||
async listPaymentMethods(queries: [] = []): Promise<PaymentList> {
|
||||
|
||||
Reference in New Issue
Block a user