mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) add tests for site deletion
Summary: This tests site deletion with and without a plan. Test Plan: adding tests Reviewers: dsagal Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D3017
This commit is contained in:
@@ -121,7 +121,11 @@ export interface BillingAPI {
|
||||
settings: IBillingOrgSettings): Promise<OrganizationWithoutAccessInfo>;
|
||||
setCard(tokenId: string): Promise<void>;
|
||||
removeCard(): Promise<void>;
|
||||
setSubscription(planId: string, tokenId?: string): Promise<void>;
|
||||
setSubscription(planId: string, options: {
|
||||
tokenId?: string,
|
||||
address?: IBillingAddress,
|
||||
settings?: IBillingOrgSettings,
|
||||
}): Promise<void>;
|
||||
updateAddress(address?: IBillingAddress, settings?: IBillingOrgSettings): Promise<void>;
|
||||
updateBillingManagers(delta: ManagerDelta): Promise<void>;
|
||||
}
|
||||
@@ -178,10 +182,13 @@ export class BillingAPIImpl extends BaseAPI implements BillingAPI {
|
||||
return parsed.data;
|
||||
}
|
||||
|
||||
public async setSubscription(planId: string, tokenId?: string): Promise<void> {
|
||||
public async setSubscription(planId: string, options: {
|
||||
tokenId?: string,
|
||||
address?: IBillingAddress,
|
||||
}): Promise<void> {
|
||||
await this.request(`${this._url}/api/billing/subscription`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ tokenId, planId })
|
||||
body: JSON.stringify({ ...options, planId })
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user