/**
 * Account information PNZ-API-CentreLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import { array, lazy, object, Schema, string } from '../schema';
import { StatementAmount, statementAmountSchema } from './statementAmount';

export interface Statement {
  accountId: string;
  startDateTime: string;
  endDateTime: string;
  creationDateTime: string;
  type: string;
  statementId: string;
  statementDescription: string[];
  statementBenefit: string[];
  statementFee: string[];
  statementInterest: string[];
  statementDateTime: string[];
  statementRate: string[];
  statementValue: string[];
  statementAmount: StatementAmount[];
}

export const statementSchema: Schema<Statement> = object({
  accountId: ['AccountId', string()],
  startDateTime: ['StartDateTime', string()],
  endDateTime: ['EndDateTime', string()],
  creationDateTime: ['CreationDateTime', string()],
  type: ['Type', string()],
  statementId: ['StatementId', string()],
  statementDescription: ['StatementDescription', array(string())],
  statementBenefit: ['StatementBenefit', array(string())],
  statementFee: ['StatementFee', array(string())],
  statementInterest: ['StatementInterest', array(string())],
  statementDateTime: ['StatementDateTime', array(string())],
  statementRate: ['StatementRate', array(string())],
  statementValue: ['StatementValue', array(string())],
  statementAmount: [
    'StatementAmount',
    array(lazy(() => statementAmountSchema)),
  ],
});
