changed the way we load planResponse objects in organizationResponse objects (#167)

This commit is contained in:
Addison Beck 2020-09-08 09:17:04 -04:00 committed by GitHub
parent 4745c24695
commit 0bff8bcd56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 40 deletions

View File

@ -38,7 +38,8 @@ export class OrganizationResponse extends BaseResponse {
this.businessCountry = this.getResponseProperty('BusinessCountry'); this.businessCountry = this.getResponseProperty('BusinessCountry');
this.businessTaxNumber = this.getResponseProperty('BusinessTaxNumber'); this.businessTaxNumber = this.getResponseProperty('BusinessTaxNumber');
this.billingEmail = this.getResponseProperty('BillingEmail'); this.billingEmail = this.getResponseProperty('BillingEmail');
this.plan = this.getResponseProperty('Plan'); const plan = this.getResponseProperty('Plan');
this.plan = plan == null ? null : new PlanResponse(plan);
this.planType = this.getResponseProperty('PlanType'); this.planType = this.getResponseProperty('PlanType');
this.seats = this.getResponseProperty('Seats'); this.seats = this.getResponseProperty('Seats');
this.maxCollections = this.getResponseProperty('MaxCollections'); this.maxCollections = this.getResponseProperty('MaxCollections');

View File

@ -50,44 +50,44 @@ export class PlanResponse extends BaseResponse {
constructor(response: any) { constructor(response: any) {
super(response); super(response);
this.type = this.getResponseProperty('type'); this.type = this.getResponseProperty('Type');
this.product = this.getResponseProperty('product'); this.product = this.getResponseProperty('Product');
this.name = this.getResponseProperty('name'); this.name = this.getResponseProperty('Name');
this.isAnnual = this.getResponseProperty('isAnnual'); this.isAnnual = this.getResponseProperty('IsAnnual');
this.nameLocalizationKey = this.getResponseProperty('nameLocalizationKey'); this.nameLocalizationKey = this.getResponseProperty('NameLocalizationKey');
this.descriptionLocalizationKey = this.getResponseProperty('descriptionLocalizationKey'); this.descriptionLocalizationKey = this.getResponseProperty('DescriptionLocalizationKey');
this.canBeUsedByBusiness = this.getResponseProperty('canBeUsedByBusiness'); this.canBeUsedByBusiness = this.getResponseProperty('CanBeUsedByBusiness');
this.baseSeats = this.getResponseProperty('baseSeats'); this.baseSeats = this.getResponseProperty('BaseSeats');
this.baseStorageGb = this.getResponseProperty('baseStorageGb'); this.baseStorageGb = this.getResponseProperty('BaseStorageGb');
this.maxCollections = this.getResponseProperty('maxCollections'); this.maxCollections = this.getResponseProperty('MaxCollections');
this.maxUsers = this.getResponseProperty('maxUsers'); this.maxUsers = this.getResponseProperty('MaxUsers');
this.hasAdditionalSeatsOption = this.getResponseProperty('hasAdditionalSeatsOption'); this.hasAdditionalSeatsOption = this.getResponseProperty('HasAdditionalSeatsOption');
this.maxAdditionalSeats = this.getResponseProperty('maxAdditionalSeats'); this.maxAdditionalSeats = this.getResponseProperty('MaxAdditionalSeats');
this.hasAdditionalStorageOption = this.getResponseProperty('hasAdditionalStorageOption'); this.hasAdditionalStorageOption = this.getResponseProperty('HasAdditionalStorageOption');
this.maxAdditionalStorage = this.getResponseProperty('maxAdditionalStorage'); this.maxAdditionalStorage = this.getResponseProperty('MaxAdditionalStorage');
this.hasPremiumAccessOption = this.getResponseProperty('hasPremiumAccessOption'); this.hasPremiumAccessOption = this.getResponseProperty('HasPremiumAccessOption');
this.trialPeriodDays = this.getResponseProperty('trialPeriodDays'); this.trialPeriodDays = this.getResponseProperty('TrialPeriodDays');
this.hasSelfHost = this.getResponseProperty('hasSelfHost'); this.hasSelfHost = this.getResponseProperty('HasSelfHost');
this.hasPolicies = this.getResponseProperty('hasPolicies'); this.hasPolicies = this.getResponseProperty('HasPolicies');
this.hasGroups = this.getResponseProperty('hasGroups'); this.hasGroups = this.getResponseProperty('HasGroups');
this.hasDirectory = this.getResponseProperty('hasDirectory'); this.hasDirectory = this.getResponseProperty('HasDirectory');
this.hasEvents = this.getResponseProperty('hasEvents'); this.hasEvents = this.getResponseProperty('HasEvents');
this.hasTotp = this.getResponseProperty('hasTotp'); this.hasTotp = this.getResponseProperty('HasTotp');
this.has2fa = this.getResponseProperty('has2fa'); this.has2fa = this.getResponseProperty('Has2fa');
this.hasApi = this.getResponseProperty('hasApi'); this.hasApi = this.getResponseProperty('HasApi');
this.hasSso = this.getResponseProperty('hasSso'); this.hasSso = this.getResponseProperty('HasSso');
this.usersGetPremium = this.getResponseProperty('usersGetPremium'); this.usersGetPremium = this.getResponseProperty('UsersGetPremium');
this.upgradeSortOrder = this.getResponseProperty('upgradeSortOrder'); this.upgradeSortOrder = this.getResponseProperty('UpgradeSortOrder');
this.displaySortOrder = this.getResponseProperty('sortOrder'); this.displaySortOrder = this.getResponseProperty('SortOrder');
this.legacyYear = this.getResponseProperty('legacyYear'); this.legacyYear = this.getResponseProperty('LegacyYear');
this.disabled = this.getResponseProperty('disabled'); this.disabled = this.getResponseProperty('Disabled');
this.stripePlanId = this.getResponseProperty('stripePlanId'); this.stripePlanId = this.getResponseProperty('StripePlanId');
this.stripeSeatPlanId = this.getResponseProperty('stripeSeatPlanId'); this.stripeSeatPlanId = this.getResponseProperty('StripeSeatPlanId');
this.stripeStoragePlanId = this.getResponseProperty('stripeStoragePlanId'); this.stripeStoragePlanId = this.getResponseProperty('StripeStoragePlanId');
this.stripePremiumAccessPlanId = this.getResponseProperty('stripePremiumAccessPlanId'); this.stripePremiumAccessPlanId = this.getResponseProperty('StripePremiumAccessPlanId');
this.basePrice = this.getResponseProperty('basePrice'); this.basePrice = this.getResponseProperty('BasePrice');
this.seatPrice = this.getResponseProperty('seatPrice'); this.seatPrice = this.getResponseProperty('SeatPrice');
this.additionalStoragePricePerGb = this.getResponseProperty('additionalStoragePricePerGb'); this.additionalStoragePricePerGb = this.getResponseProperty('AdditionalStoragePricePerGb');
this.premiumAccessOptionPrice = this.getResponseProperty('premiumAccessOptionPrice'); this.premiumAccessOptionPrice = this.getResponseProperty('PremiumAccessOptionPrice');
} }
} }