org upgrade api

This commit is contained in:
Kyle Spearrin 2019-03-21 21:38:52 -04:00
parent aebd1b57fc
commit 593870e936
3 changed files with 16 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import { KdfRequest } from '../models/request/kdfRequest';
import { KeysRequest } from '../models/request/keysRequest';
import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest';
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
import { OrganizationUpgradeRequest } from '../models/request/organizationUpgradeRequest';
import { OrganizationUserAcceptRequest } from '../models/request/organizationUserAcceptRequest';
import { OrganizationUserConfirmRequest } from '../models/request/organizationUserConfirmRequest';
import { OrganizationUserInviteRequest } from '../models/request/organizationUserInviteRequest';
@ -238,6 +239,7 @@ export abstract class ApiService {
postOrganizationLicenseUpdate: (id: string, data: FormData) => Promise<any>;
postOrganizationApiKey: (id: string, request: PasswordVerificationRequest) => Promise<ApiKeyResponse>;
postOrganizationRotateApiKey: (id: string, request: PasswordVerificationRequest) => Promise<ApiKeyResponse>;
postOrganizationUpgrade: (id: string, request: OrganizationUpgradeRequest) => Promise<any>;
postOrganizationSeat: (id: string, request: SeatRequest) => Promise<any>;
postOrganizationStorage: (id: string, request: StorageRequest) => Promise<any>;
postOrganizationPayment: (id: string, request: PaymentRequest) => Promise<any>;

View File

@ -0,0 +1,9 @@
import { PlanType } from '../../enums/planType';
export class OrganizationUpgradeRequest {
businessName: string;
planType: PlanType;
additionalSeats: number;
additionalStorageGb: number;
premiumAccessAddon: boolean;
}

View File

@ -27,6 +27,7 @@ import { KdfRequest } from '../models/request/kdfRequest';
import { KeysRequest } from '../models/request/keysRequest';
import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest';
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
import { OrganizationUpgradeRequest } from '../models/request/organizationUpgradeRequest';
import { OrganizationUserAcceptRequest } from '../models/request/organizationUserAcceptRequest';
import { OrganizationUserConfirmRequest } from '../models/request/organizationUserConfirmRequest';
import { OrganizationUserInviteRequest } from '../models/request/organizationUserInviteRequest';
@ -778,6 +779,10 @@ export class ApiService implements ApiServiceAbstraction {
return new ApiKeyResponse(r);
}
postOrganizationUpgrade(id: string, request: OrganizationUpgradeRequest): Promise<any> {
return this.send('POST', '/organizations/' + id + '/upgrade', request, true, false);
}
postOrganizationSeat(id: string, request: SeatRequest): Promise<any> {
return this.send('POST', '/organizations/' + id + '/seat', request, true, false);
}