/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IDeductibleAmount, DeductibleAmount } from './deductible-amount.model'; import { IMoney, Money } from './money.model'; export interface IRatedDeductibleAmount extends IDeductibleAmount{ maximumAmount?: IMoney; minimumAmount?: IMoney; rate?: string; } export class RatedDeductibleAmount extends DeductibleAmount implements IRatedDeductibleAmount { static TYPE_SELECTOR = 'RatedDeductibleAmount'; static MAXIMUM_AMOUNT_FIELD_NAME = 'maximumAmount'; static MINIMUM_AMOUNT_FIELD_NAME = 'minimumAmount'; static RATE_FIELD_NAME = 'rate'; maximumAmount: Money; minimumAmount: Money; rate: string; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.typeSelector = RatedDeductibleAmount.TYPE_SELECTOR; this.maximumAmount = new Money(); this.minimumAmount = new Money(); if (values) { this.setValues(values); } } /** * set the values. * @param values Can be used to set a webapi response to this newly constructed model */ setValues(values: Partial): void { if (values) { super.setValues(values) const rawValues = values this.maximumAmount.setValues(rawValues.maximumAmount); this.minimumAmount.setValues(rawValues.minimumAmount); this.rate = this.getValue(rawValues, RatedDeductibleAmount.RATE_FIELD_NAME); } } }