/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { ILimitAmount, LimitAmount } from './limit-amount.model'; import { IMoney, Money } from './money.model'; import { LimitRateBase } from './enums'; export interface IRatedLimitAmount extends ILimitAmount{ maximumAmount?: IMoney; rate?: string; rateBase?: LimitRateBase; } export class RatedLimitAmount extends LimitAmount implements IRatedLimitAmount { static TYPE_SELECTOR = 'RatedLimitAmount'; static MAXIMUM_AMOUNT_FIELD_NAME = 'maximumAmount'; static RATE_FIELD_NAME = 'rate'; static RATE_BASE_FIELD_NAME = 'rateBase'; maximumAmount: Money; rate: string; rateBase: LimitRateBase; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.typeSelector = RatedLimitAmount.TYPE_SELECTOR; this.maximumAmount = 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.rate = this.getValue(rawValues, RatedLimitAmount.RATE_FIELD_NAME); this.rateBase = this.getValue(rawValues, RatedLimitAmount.RATE_BASE_FIELD_NAME); } } }