1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

adjust storage with payment intent/method handling

This commit is contained in:
Kyle Spearrin
2019-08-10 12:59:47 -04:00
parent e28e820286
commit de9bcac0ec
2 changed files with 7 additions and 5 deletions

View File

@@ -122,7 +122,7 @@ export abstract class ApiService {
postPremium: (data: FormData) => Promise<PaymentResponse>; postPremium: (data: FormData) => Promise<PaymentResponse>;
postReinstatePremium: () => Promise<any>; postReinstatePremium: () => Promise<any>;
postCancelPremium: () => Promise<any>; postCancelPremium: () => Promise<any>;
postAccountStorage: (request: StorageRequest) => Promise<any>; postAccountStorage: (request: StorageRequest) => Promise<PaymentResponse>;
postAccountPayment: (request: PaymentRequest) => Promise<any>; postAccountPayment: (request: PaymentRequest) => Promise<any>;
postAccountLicense: (data: FormData) => Promise<any>; postAccountLicense: (data: FormData) => Promise<any>;
postAccountKey: (request: UpdateKeyRequest) => Promise<any>; postAccountKey: (request: UpdateKeyRequest) => Promise<any>;

View File

@@ -267,8 +267,9 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('POST', '/accounts/cancel-premium', null, true, false); return this.send('POST', '/accounts/cancel-premium', null, true, false);
} }
postAccountStorage(request: StorageRequest): Promise<any> { async postAccountStorage(request: StorageRequest): Promise<PaymentResponse> {
return this.send('POST', '/accounts/storage', request, true, false); const r = await this.send('POST', '/accounts/storage', request, true, true);
return new PaymentResponse(r);
} }
postAccountPayment(request: PaymentRequest): Promise<any> { postAccountPayment(request: PaymentRequest): Promise<any> {
@@ -791,8 +792,9 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('POST', '/organizations/' + id + '/seat', request, true, false); return this.send('POST', '/organizations/' + id + '/seat', request, true, false);
} }
postOrganizationStorage(id: string, request: StorageRequest): Promise<any> { async postOrganizationStorage(id: string, request: StorageRequest): Promise<PaymentResponse> {
return this.send('POST', '/organizations/' + id + '/storage', request, true, false); const r = await this.send('POST', '/organizations/' + id + '/storage', request, true, true);
return new PaymentResponse(r);
} }
postOrganizationPayment(id: string, request: PaymentRequest): Promise<any> { postOrganizationPayment(id: string, request: PaymentRequest): Promise<any> {