/** * 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 { GrossNetAmountType } from './enums'; export interface IGrossNetAmount { amount?: IMoney; createdAt?: Date; type?: GrossNetAmountType; } export class GrossNetAmount extends BaseModel implements IGrossNetAmount { static AMOUNT_FIELD_NAME = 'amount'; static CREATED_AT_FIELD_NAME = 'createdAt'; static TYPE_FIELD_NAME = 'type'; amount: Money; createdAt: Date; type: GrossNetAmountType; /** * 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.createdAt = this.getValue(rawValues, GrossNetAmount.CREATED_AT_FIELD_NAME); this.type = this.getValue(rawValues, GrossNetAmount.TYPE_FIELD_NAME); } } }