/**
 * Account and Transaction API SpecificationLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import { lazy, object, Schema } from '../schema';
import { Amount, amountSchema } from './amount';
import {
  CreditDebitIndicatorEnum,
  creditDebitIndicatorEnumSchema,
} from './creditDebitIndicatorEnum';
import {
  StatementFeeTypeEnum,
  statementFeeTypeEnumSchema,
} from './statementFeeTypeEnum';

/** Set of elements used to provide details of a fee for the statement resource. */
export interface StatementFee {
  /** Amount of money of the cash balance. */
  amount: Amount;
  /** Indicates whether the balance is a credit or a debit balance. Usage: A zero balance is considered to be a credit balance. */
  creditDebitIndicator: CreditDebitIndicatorEnum;
  /** Fee type, in a coded form. */
  type: StatementFeeTypeEnum;
}

export const statementFeeSchema: Schema<StatementFee> = object({
  amount: ['Amount', lazy(() => amountSchema)],
  creditDebitIndicator: [
    'CreditDebitIndicator',
    creditDebitIndicatorEnumSchema,
  ],
  type: ['Type', statementFeeTypeEnumSchema],
});
