import { UNCents } from '../payment/payments.types';
import { UNTransactionTypes } from './transactions.types';
import { UNDirection } from '../types';

export type UNReceivedAchTransaction = {
  type: UNTransactionTypes.ReceivedACH
  id: number
  attributes: {
    createdAt: Date
    amount: UNCents
    direction: UNDirection
    balance: UNCents
    summary: string
    description: string
    companyName: string
    counterpartyRoutingNumber: string
    secCode: string
    traceNumber: string
  }
  relationships: {
    account: {
      data: {
        type: string
        id: number
      }
    }
    customer?: {
      data: {
        type: string
        id: number
      }
    }
    customers?: {
      data: [
        {
          type: 'customer'
          id: string
        }
      ]
    }
    org?: {
      data: {
        type: string
        id: number
      }
    }
    incomingAch?: {
      data: {
        type: string
        id: number
      }
    }
  }
} 