/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IExchangeRate, ExchangeRate } from './exchange-rate.model'; export interface ICurrencyExchange { fromCurrency?: string; rates?: Array; toCurrency?: string; } export class CurrencyExchange extends BaseModel implements ICurrencyExchange { static FROM_CURRENCY_FIELD_NAME = 'fromCurrency'; static RATES_FIELD_NAME = 'rates'; static TO_CURRENCY_FIELD_NAME = 'toCurrency'; fromCurrency: string; rates: Array; toCurrency: string; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.rates = new Array(); 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) { const rawValues = values this.fromCurrency = this.getValue(rawValues, CurrencyExchange.FROM_CURRENCY_FIELD_NAME); this.fillModelArray(this, CurrencyExchange.RATES_FIELD_NAME, rawValues.rates, ExchangeRate, SubTypeFactory.createSubTypeInstance); this.toCurrency = this.getValue(rawValues, CurrencyExchange.TO_CURRENCY_FIELD_NAME); } } }