From 1cb3447bdd3531d08eb77a8b7a0ad65124428a09 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 17 Jul 2018 12:05:19 -0400 Subject: [PATCH] org seat billing api --- src/abstractions/api.service.ts | 2 ++ src/models/request/seatRequest.ts | 3 +++ src/services/api.service.ts | 5 +++++ 3 files changed, 10 insertions(+) create mode 100644 src/models/request/seatRequest.ts diff --git a/src/abstractions/api.service.ts b/src/abstractions/api.service.ts index 425e5cb075..b3fb8512dc 100644 --- a/src/abstractions/api.service.ts +++ b/src/abstractions/api.service.ts @@ -28,6 +28,7 @@ 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 { SeatRequest } from '../models/request/seatRequest'; import { StorageRequest } from '../models/request/storageRequest'; import { TokenRequest } from '../models/request/tokenRequest'; import { TwoFactorEmailRequest } from '../models/request/twoFactorEmailRequest'; @@ -202,6 +203,7 @@ export abstract class ApiService { putOrganization: (id: string, request: OrganizationUpdateRequest) => Promise; postLeaveOrganization: (id: string) => Promise; postOrganizationLicense: (data: FormData) => Promise; + postOrganizationSeat: (id: string, request: SeatRequest) => Promise; postOrganizationStorage: (id: string, request: StorageRequest) => Promise; postOrganizationPayment: (id: string, request: PaymentRequest) => Promise; postOrganizationVerifyBank: (id: string, request: VerifyBankRequest) => Promise; diff --git a/src/models/request/seatRequest.ts b/src/models/request/seatRequest.ts new file mode 100644 index 0000000000..92d47669b8 --- /dev/null +++ b/src/models/request/seatRequest.ts @@ -0,0 +1,3 @@ +export class SeatRequest { + seatAdjustment: number; +} diff --git a/src/services/api.service.ts b/src/services/api.service.ts index 749073f743..12e40e0df5 100644 --- a/src/services/api.service.ts +++ b/src/services/api.service.ts @@ -34,6 +34,7 @@ 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 { SeatRequest } from '../models/request/seatRequest'; import { StorageRequest } from '../models/request/storageRequest'; import { TokenRequest } from '../models/request/tokenRequest'; import { TwoFactorEmailRequest } from '../models/request/twoFactorEmailRequest'; @@ -663,6 +664,10 @@ export class ApiService implements ApiServiceAbstraction { return new OrganizationResponse(r); } + postOrganizationSeat(id: string, request: SeatRequest): Promise { + return this.send('POST', '/organizations/' + id + '/seat', request, true, false); + } + postOrganizationStorage(id: string, request: StorageRequest): Promise { return this.send('POST', '/organizations/' + id + '/storage', request, true, false); }