1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-16 07:23:19 +00:00
Files
jslib/common/src/models/response/organizationSubscriptionResponse.ts
Oscar Hinton 1016bbfb9e Split jslib into multiple modules (#363)
* Split jslib into multiple modules
2021-06-03 18:58:57 +02:00

26 lines
1.1 KiB
TypeScript

import { OrganizationResponse } from './organizationResponse';
import {
BillingSubscriptionResponse,
BillingSubscriptionUpcomingInvoiceResponse,
} from './subscriptionResponse';
export class OrganizationSubscriptionResponse extends OrganizationResponse {
storageName: string;
storageGb: number;
subscription: BillingSubscriptionResponse;
upcomingInvoice: BillingSubscriptionUpcomingInvoiceResponse;
expiration: string;
constructor(response: any) {
super(response);
this.storageName = this.getResponseProperty('StorageName');
this.storageGb = this.getResponseProperty('StorageGb');
const subscription = this.getResponseProperty('Subscription');
this.subscription = subscription == null ? null : new BillingSubscriptionResponse(subscription);
const upcomingInvoice = this.getResponseProperty('UpcomingInvoice');
this.upcomingInvoice = upcomingInvoice == null ? null :
new BillingSubscriptionUpcomingInvoiceResponse(upcomingInvoice);
this.expiration = this.getResponseProperty('Expiration');
}
}