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