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

export type UNDishonoredAchTransaction = {
  type: UNTransactionTypes.DishonoredACH
  id: number
  attributes: {
    createdAt: Date
    amount: UNCents
    direction: UNDirection
    balance: UNCents
    description: string
    summary: string
    companyName: string
    counterpartyName: string
    counterpartyRoutingNumber: string
    traceNumber: string
    returnReason: string
    secCode: string
    tags?: { [key: string]: 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
      }
    }
  }
}; 