1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

payment update api

This commit is contained in:
Kyle Spearrin 2018-06-30 13:22:21 -04:00
parent c0e7e588ed
commit f5287e29a2
3 changed files with 10 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import { ImportOrganizationCiphersRequest } from '../models/request/importOrgani
import { PasswordHintRequest } from '../models/request/passwordHintRequest';
import { PasswordRequest } from '../models/request/passwordRequest';
import { PasswordVerificationRequest } from '../models/request/passwordVerificationRequest';
import { PaymentRequest } from '../models/request/paymentRequest';
import { RegisterRequest } from '../models/request/registerRequest';
import { StorageRequest } from '../models/request/storageRequest';
import { TokenRequest } from '../models/request/tokenRequest';
@ -69,6 +70,7 @@ export abstract class ApiService {
postReinstatePremium: () => Promise<any>;
postCancelPremium: () => Promise<any>;
postAccountStorage: (request: StorageRequest) => Promise<any>;
postAccountPayment: (request: PaymentRequest) => Promise<any>;
postFolder: (request: FolderRequest) => Promise<FolderResponse>;
putFolder: (id: string, request: FolderRequest) => Promise<FolderResponse>;
deleteFolder: (id: string) => Promise<any>;

View File

@ -0,0 +1,3 @@
export class PaymentRequest {
paymentToken: string;
}

View File

@ -21,6 +21,7 @@ import { ImportOrganizationCiphersRequest } from '../models/request/importOrgani
import { PasswordHintRequest } from '../models/request/passwordHintRequest';
import { PasswordRequest } from '../models/request/passwordRequest';
import { PasswordVerificationRequest } from '../models/request/passwordVerificationRequest';
import { PaymentRequest } from '../models/request/paymentRequest';
import { RegisterRequest } from '../models/request/registerRequest';
import { StorageRequest } from '../models/request/storageRequest';
import { TokenRequest } from '../models/request/tokenRequest';
@ -207,6 +208,10 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('POST', '/accounts/storage', request, true, false);
}
postAccountPayment(request: PaymentRequest): Promise<any> {
return this.send('POST', '/accounts/payment', request, true, false);
}
// Folder APIs
async postFolder(request: FolderRequest): Promise<FolderResponse> {