From 9c0b4b897387045d08c5e9651ba4c103379d3ac6 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 17 Jul 2018 11:04:19 -0400 Subject: [PATCH] org billing apis --- src/abstractions/api.service.ts | 4 ++++ src/models/request/verifyBankRequest.ts | 4 ++++ src/services/api.service.ts | 13 +++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 src/models/request/verifyBankRequest.ts diff --git a/src/abstractions/api.service.ts b/src/abstractions/api.service.ts index 56b6f61836..15dde2ac27 100644 --- a/src/abstractions/api.service.ts +++ b/src/abstractions/api.service.ts @@ -40,6 +40,7 @@ import { UpdateTwoFactorDuoRequest } from '../models/request/updateTwoFactorDuoR import { UpdateTwoFactorEmailRequest } from '../models/request/updateTwoFactorEmailRequest'; import { UpdateTwoFactorU2fRequest } from '../models/request/updateTwoFactorU2fRequest'; import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest'; +import { VerifyBankRequest } from '../models/request/verifyBankRequest'; import { VerifyDeleteRecoverRequest } from '../models/request/verifyDeleteRecoverRequest'; import { VerifyEmailRequest } from '../models/request/verifyEmailRequest'; @@ -202,6 +203,9 @@ export abstract class ApiService { postOrganizationLicense: (data: FormData) => Promise; postOrganizationStorage: (id: string, request: StorageRequest) => Promise; postOrganizationPayment: (id: string, request: PaymentRequest) => Promise; + postOrganizationVerifyBank: (id: string, request: VerifyBankRequest) => Promise; + postOrganizationCancel: (id: string) => Promise; + postOrganizationReinstate: (id: string) => Promise; deleteOrganization: (id: string, request: PasswordVerificationRequest) => Promise; getEvents: (start: string, end: string, token: string) => Promise>; diff --git a/src/models/request/verifyBankRequest.ts b/src/models/request/verifyBankRequest.ts new file mode 100644 index 0000000000..bddd452d93 --- /dev/null +++ b/src/models/request/verifyBankRequest.ts @@ -0,0 +1,4 @@ +export class VerifyBankRequest { + amount1: number; + amount2: number; +} diff --git a/src/services/api.service.ts b/src/services/api.service.ts index 1a09753848..75720dc353 100644 --- a/src/services/api.service.ts +++ b/src/services/api.service.ts @@ -46,6 +46,7 @@ import { UpdateTwoFactorDuoRequest } from '../models/request/updateTwoFactorDuoR import { UpdateTwoFactorEmailRequest } from '../models/request/updateTwoFactorEmailRequest'; import { UpdateTwoFactorU2fRequest } from '../models/request/updateTwoFactorU2fRequest'; import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest'; +import { VerifyBankRequest } from '../models/request/verifyBankRequest'; import { VerifyDeleteRecoverRequest } from '../models/request/verifyDeleteRecoverRequest'; import { VerifyEmailRequest } from '../models/request/verifyEmailRequest'; @@ -665,6 +666,18 @@ export class ApiService implements ApiServiceAbstraction { return this.send('POST', '/organizations/' + id + '/payment', request, true, false); } + postOrganizationVerifyBank(id: string, request: VerifyBankRequest): Promise { + return this.send('POST', '/organizations/' + id + '/verify-bank', request, true, false); + } + + postOrganizationCancel(id: string): Promise { + return this.send('POST', '/organizations/' + id + '/cancel', null, true, false); + } + + postOrganizationReinstate(id: string): Promise { + return this.send('POST', '/organizations/' + id + '/reinstate', null, true, false); + } + deleteOrganization(id: string, request: PasswordVerificationRequest): Promise { return this.send('DELETE', '/organizations/' + id, request, true, false); }