/** * This file is generated by the SwaggerTSGenerator. * Do not edit. */ /* tslint:disable */ import { BaseModel } from './base-model'; import { SubTypeFactory } from './sub-type-factory'; import { IBoundedPeriod, BoundedPeriod } from './bounded-period.model'; import { IMoney, Money } from './money.model'; import { ISoftReference, SoftReference } from './soft-reference.model'; import { IBureauLeader, BureauLeader } from './bureau-leader.model'; import { ICedent, Cedent } from './cedent.model'; import { ICoAgreementParty, CoAgreementParty } from './co-agreement-party.model'; import { IContractHolder, ContractHolder } from './contract-holder.model'; import { ICoverHolder, CoverHolder } from './cover-holder.model'; import { IFinancialBroker, FinancialBroker } from './financial-broker.model'; import { IInsuranceBroker, InsuranceBroker } from './insurance-broker.model'; import { IInsured, Insured } from './insured.model'; import { IPricingLeader, PricingLeader } from './pricing-leader.model'; import { IPrimaryInsurer, PrimaryInsurer } from './primary-insurer.model'; import { IProducingBroker, ProducingBroker } from './producing-broker.model'; import { IProducingContractHolder, ProducingContractHolder } from './producing-contract-holder.model'; import { IProducingInsurer, ProducingInsurer } from './producing-insurer.model'; import { IReinsurer, Reinsurer } from './reinsurer.model'; import { ISlipLeader, SlipLeader } from './slip-leader.model'; import { AccountItemCategory } from './enums'; import { AccountItemDueStatus } from './enums'; import { AccountItemStatus } from './enums'; import { AccountItemType } from './enums'; import { FinancialEventType } from './enums'; export interface IAccountItemView { accountId?: string; accountItemCategory?: AccountItemCategory; accountItemDueStatus?: AccountItemDueStatus; accountItemId?: string; accountItemStatus?: AccountItemStatus; accountItemType?: AccountItemType; accountingPeriod?: IBoundedPeriod; amount?: IMoney; claim?: ISoftReference; contractId?: string; contractName?: string; coverageId?: string; coverageName?: string; creditor?: IBureauLeader | ICedent | ICoAgreementParty | IContractHolder | ICoverHolder | IFinancialBroker | IInsuranceBroker | IInsured | IPricingLeader | IPrimaryInsurer | IProducingBroker | IProducingContractHolder | IProducingInsurer | IReinsurer | ISlipLeader; debtor?: IBureauLeader | ICedent | ICoAgreementParty | IContractHolder | ICoverHolder | IFinancialBroker | IInsuranceBroker | IInsured | IPricingLeader | IPrimaryInsurer | IProducingBroker | IProducingContractHolder | IProducingInsurer | IReinsurer | ISlipLeader; eventProcessedDate?: Date; eventType?: FinancialEventType; financialEventId?: string; instalmentDueDate?: Date; insuranceTypes?: Array; isReversal?: boolean; nrOfAllMessages?: number; nrOfUnreadMessages?: number; programName?: string; } export class AccountItemView extends BaseModel implements IAccountItemView { static ACCOUNT_ID_FIELD_NAME = 'accountId'; static ACCOUNT_ITEM_CATEGORY_FIELD_NAME = 'accountItemCategory'; static ACCOUNT_ITEM_DUE_STATUS_FIELD_NAME = 'accountItemDueStatus'; static ACCOUNT_ITEM_ID_FIELD_NAME = 'accountItemId'; static ACCOUNT_ITEM_STATUS_FIELD_NAME = 'accountItemStatus'; static ACCOUNT_ITEM_TYPE_FIELD_NAME = 'accountItemType'; static ACCOUNTING_PERIOD_FIELD_NAME = 'accountingPeriod'; static AMOUNT_FIELD_NAME = 'amount'; static CLAIM_FIELD_NAME = 'claim'; static CONTRACT_ID_FIELD_NAME = 'contractId'; static CONTRACT_NAME_FIELD_NAME = 'contractName'; static COVERAGE_ID_FIELD_NAME = 'coverageId'; static COVERAGE_NAME_FIELD_NAME = 'coverageName'; static CREDITOR_FIELD_NAME = 'creditor'; static DEBTOR_FIELD_NAME = 'debtor'; static EVENT_PROCESSED_DATE_FIELD_NAME = 'eventProcessedDate'; static EVENT_TYPE_FIELD_NAME = 'eventType'; static FINANCIAL_EVENT_ID_FIELD_NAME = 'financialEventId'; static INSTALMENT_DUE_DATE_FIELD_NAME = 'instalmentDueDate'; static INSURANCE_TYPES_FIELD_NAME = 'insuranceTypes'; static IS_REVERSAL_FIELD_NAME = 'isReversal'; static NR_OF_ALL_MESSAGES_FIELD_NAME = 'nrOfAllMessages'; static NR_OF_UNREAD_MESSAGES_FIELD_NAME = 'nrOfUnreadMessages'; static PROGRAM_NAME_FIELD_NAME = 'programName'; accountId: string; accountItemCategory: AccountItemCategory; accountItemDueStatus: AccountItemDueStatus; accountItemId: string; accountItemStatus: AccountItemStatus; accountItemType: AccountItemType; accountingPeriod: BoundedPeriod; amount: Money; claim: SoftReference; contractId: string; contractName: string; coverageId: string; coverageName: string; creditor: BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; debtor: BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; eventProcessedDate: Date; eventType: FinancialEventType; financialEventId: string; instalmentDueDate: Date; insuranceTypes: Array; isReversal: boolean; nrOfAllMessages: number; nrOfUnreadMessages: number; programName: string; /** * constructor * @param values Can be used to set a webapi response or formValues to this newly constructed model */ constructor(values?: Partial) { super(); this.accountingPeriod = new BoundedPeriod(); this.amount = new Money(); this.claim = new SoftReference(); this.creditor = new BureauLeader(); this.debtor = new BureauLeader(); this.insuranceTypes = 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.accountId = this.getValue(rawValues, AccountItemView.ACCOUNT_ID_FIELD_NAME); this.accountItemCategory = this.getValue(rawValues, AccountItemView.ACCOUNT_ITEM_CATEGORY_FIELD_NAME); this.accountItemDueStatus = this.getValue(rawValues, AccountItemView.ACCOUNT_ITEM_DUE_STATUS_FIELD_NAME); this.accountItemId = this.getValue(rawValues, AccountItemView.ACCOUNT_ITEM_ID_FIELD_NAME); this.accountItemStatus = this.getValue(rawValues, AccountItemView.ACCOUNT_ITEM_STATUS_FIELD_NAME); this.accountItemType = this.getValue(rawValues, AccountItemView.ACCOUNT_ITEM_TYPE_FIELD_NAME); this.accountingPeriod.setValues(rawValues.accountingPeriod); this.amount.setValues(rawValues.amount); this.claim.setValues(rawValues.claim); this.contractId = this.getValue(rawValues, AccountItemView.CONTRACT_ID_FIELD_NAME); this.contractName = this.getValue(rawValues, AccountItemView.CONTRACT_NAME_FIELD_NAME); this.coverageId = this.getValue(rawValues, AccountItemView.COVERAGE_ID_FIELD_NAME); this.coverageName = this.getValue(rawValues, AccountItemView.COVERAGE_NAME_FIELD_NAME); if (rawValues.creditor && rawValues.creditor.typeSelector && this.creditor.typeSelector !== rawValues.creditor.typeSelector) { this.creditor = SubTypeFactory.createSubTypeInstance(rawValues.creditor) as BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; } this.creditor.setValues(rawValues.creditor); if (rawValues.debtor && rawValues.debtor.typeSelector && this.debtor.typeSelector !== rawValues.debtor.typeSelector) { this.debtor = SubTypeFactory.createSubTypeInstance(rawValues.debtor) as BureauLeader | Cedent | CoAgreementParty | ContractHolder | CoverHolder | FinancialBroker | InsuranceBroker | Insured | PricingLeader | PrimaryInsurer | ProducingBroker | ProducingContractHolder | ProducingInsurer | Reinsurer | SlipLeader; } this.debtor.setValues(rawValues.debtor); this.eventProcessedDate = this.getValue(rawValues, AccountItemView.EVENT_PROCESSED_DATE_FIELD_NAME); this.eventType = this.getValue(rawValues, AccountItemView.EVENT_TYPE_FIELD_NAME); this.financialEventId = this.getValue(rawValues, AccountItemView.FINANCIAL_EVENT_ID_FIELD_NAME); this.instalmentDueDate = this.getValue(rawValues, AccountItemView.INSTALMENT_DUE_DATE_FIELD_NAME); this.fillModelArray(this, AccountItemView.INSURANCE_TYPES_FIELD_NAME, rawValues.insuranceTypes); this.isReversal = this.getValue(rawValues, AccountItemView.IS_REVERSAL_FIELD_NAME); this.nrOfAllMessages = this.getValue(rawValues, AccountItemView.NR_OF_ALL_MESSAGES_FIELD_NAME); this.nrOfUnreadMessages = this.getValue(rawValues, AccountItemView.NR_OF_UNREAD_MESSAGES_FIELD_NAME); this.programName = this.getValue(rawValues, AccountItemView.PROGRAM_NAME_FIELD_NAME); } } }